/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #e6ecef, #f5f5f5);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* Custom Gradient Background */
.bg-gradient-custom {
    background: linear-gradient(135deg, #e6ecef, #f5f5f5);
}

/* Navbar Styles */
.navbar {
    padding: 1.5rem;
    transition: transform 0.5s ease-out;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    color: #063f6b !important;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #ffffff !important;
}

.nav-link {
    color: #1E6091 ;
    margin-left: 1rem;
    font-weight: 500;
    padding: 10px 20px;
    transition: color 0.3s ease, background 0.3s ease;
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(5, 105, 245, 0.2);
    border-radius: 10px;
}

.animate-navbar {
    animation: slideDown 0.6s ease-out;
}

/* Logo Styles */
.logo-circle {
    width: 60px; /* Smaller for navbar consistency */
    height: 60px;
    background: linear-gradient(45deg, #0A3D62, #1E6091);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
}

.animate-logo {
    animation: bounceIn 0.8s ease-out;
}

/* Card Styles */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    overflow: hidden; /* For header gradient */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    background: linear-gradient(45deg, #0A3D62, #1E6091);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.card-body {
    padding: 2rem;
}

.animate-card {
    animation: slideUp 0.8s ease-out;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(45deg, #0A3D62, #1E6091);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1.1rem;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
    border-color: #1E6091;
    color: #1E6091;
    transition: all 0.2s ease;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1.1rem;
}

.btn-outline-primary:hover {
    background: linear-gradient(45deg, #0A3D62, #1E6091);
    color: white;
    transform: scale(1.05);
}

/* Tab Styles (Dashboard-specific) */
.nav-tabs {
    border-bottom: none;
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    background: rgba(255, 255, 255, 0.9);
    margin-right: 10px;
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    padding: 12px 25px;
    color: #1E6091;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    background: rgba(30, 96, 145, 0.1);
}

.nav-tabs .nav-link.active {
    background: #1E6091;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Form and Input Styles */
.form-control,
.form-select {
    background: white;
    border: 1px solid rgba(30, 96, 145, 0.2);
    border-radius: 12px !important;
    padding: 12px 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #1E6091;
    box-shadow: 0 0 12px rgba(30, 96, 145, 0.4);
    outline: none;
}

.form-label {
    font-size: 1.1rem;
    color: #0A3D62;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Control Container Styles */
.animate-controls {
    animation: fadeIn 0.8s ease-out 0.4s both;
    background: #f9fafb;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

/* Table Styles (Dashboard-specific) */
.table-responsive {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.table {
    background: white;
    margin-bottom: 0;
}

.table th {
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background: #1E6091;
    color: white;
    padding: 15px;
}

.table td {
    vertical-align: middle;
    padding: 15px;
}

.animate-table {
    animation: fadeIn 1s ease-out 0.6s both;
}

/* Modal Styles */
.modal-content {
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-header {
    background: linear-gradient(45deg, #0A3D62, #1E6091);
    color: white;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-bottom: none;
}

.animate-modal {
    animation: zoomIn 0.4s ease-out;
}

/* Footer Styles */
footer {
    background: linear-gradient(45deg, #0A3D62, #1E6091);
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    margin-top: auto;
}

.animate-footer {
    animation: fadeIn 0.6s ease-out 0.8s both;
}

/* Animations */
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; box-shadow: none; }
    to { transform: scale(1); opacity: 1; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Toast Notification (for logout) */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    border-radius: 15px;
}

.toast .toast-body {
    font-size: 14px;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Custom Messages */
.text-danger {
    color: #dc3545;
    font-weight: 500;
}

.text-success {
    color: #28a745;
    font-weight: 500;
}

.text-info {
    color: #17a2b8;
    font-weight: 500;
}

/* Enhanced Input Group */
.input-group .form-control {
    border-right: none;
}

.input-group .btn-primary {
    border-left: none;
}

/* Student Details Section */
.bg-light {
    background-color: #f8f9fa !important;
    transition: opacity 0.3s ease;
}

/* Form Select and Date Inputs */
.form-select, .form-control[type="date"] {
    background: white;
    border: 1px solid rgba(30, 96, 145, 0.2);
    padding: 12px 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.form-select:focus, .form-control[type="date"]:focus {
    border-color: #1E6091;
    box-shadow: 0 0 12px rgba(30, 96, 145, 0.4);
}

/* Animation for Showing Elements */
.d-none {
    display: none;
}

.animate-button {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.animate-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}