/* ============================================
   CONSOLIDATED CSS FILE - WELL ORGANIZED
   ============================================ */

/*------------------
   1. VARIABLES & BASE STYLES
   ------------------*/

:root {
    scroll-behavior: smooth;
}

body {
    font-family: "Nunito", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    background: #f6f9ff;
    color: #444444;
}

a {
    color: #4154f1;
    text-decoration: none;
}

a:hover {
    color: #717ff5;
    text-decoration: none;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9rem; }
h6 { font-size: 0.8rem; }

/*------------------
   2. ALERT MESSAGE BOXES
   ------------------*/

#alert-box {
    padding: 20px;
    background-color: #4CAF50;
    color: white;
    margin-bottom: 15px;
    position: absolute;
    bottom: 0;
    right: 0;
    display: none;
    z-index: 999;
}

#closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

#closebtn:hover {
    color: black;
}

#success-message,
.error-message,
.loading-message {
    padding: 0;
    margin-bottom: 15px;
    position: fixed;
    width: 420px;
    max-width: 90%;
    right: 20px;
    top: 80px;
    z-index: 9999;
    display: none;
    animation: slideInRight 0.3s ease;
}

.loading-message:not(:empty) {
    padding: 1rem;
    background-color: #cfe2ff;
    border: 1px solid #9ec5fe;
    border-radius: 0.375rem;
    color: #084298;
}

.error-message:not(:empty) {
    padding: 1rem;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.375rem;
    color: #842029;
}

#success-message:not(:empty) {
    padding: 1rem;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 0.375rem;
    color: #0f5132;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/*------------------
   3. MODAL STYLES
   ------------------*/

#modal {
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
}

#modal.show {
    display: block;
}

#modal-form {
    background: #fff;
    width: 30%;
    position: relative;
    top: 20%;
    left: calc(35%);
    padding: 15px;
    border-radius: 4px;
}

#modal-form h2 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
}

#close-btn {
    background: red;
    color: white;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    position: absolute;
    top: -15px;
    right: -15px;
    cursor: pointer;
}

/*------------------
   4. HEADER STYLES
   ------------------*/

.header {
    transition: all 0.5s;
    z-index: 997;
    height: 60px;
    box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-left: 20px;
}

.logo {
    transition: all 0.3s ease;
}

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

.logo img {
    max-height: 35px;
    margin-right: 10px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.logo span {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.header .toggle-sidebar-btn {
    font-size: 2rem;
    padding-left: 10px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.header .toggle-sidebar-btn:hover {
    transform: rotate(90deg);
    color: #f0f0f0;
}

.header-nav ul {
    list-style: none;
}

.header-nav>ul {
    margin: 0;
    padding: 0;
}

.header-nav .nav-profile {
    color: #fff;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 50px;
}

.header-nav .nav-profile:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-nav .nav-profile img {
    max-height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.header-nav .nav-profile:hover img {
    border-color: rgba(255, 255, 255, 0.6);
}

.header-nav .nav-profile span {
    font-weight: 600;
    color: #fff;
}

.header-nav .profile {
    min-width: 260px;
    padding: 10px 0;
    top: 12px !important;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.header-nav .profile .dropdown-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.header-nav .profile .dropdown-header h3 {
    margin-bottom: 0;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.header-nav .profile .dropdown-header span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.header-nav .profile .dropdown-item {
    font-size: 14px;
    padding: 10px 15px;
    transition: 0.3s;
}

.header-nav .profile .dropdown-item i {
    margin-right: 10px;
    font-size: 18px;
    line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
    background-color: #f6f9ff;
}

/*------------------
   5. SIDEBAR STYLES
   ------------------*/

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 996;
    transition: all 0.3s;
    padding: 20px 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #aab7cf transparent;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
    height: 8px;
    background-color: #fff;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #aab7cf;
}

.sidebar-nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-nav li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-nav .nav-item {
    margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
    font-size: 11px;
    text-transform: uppercase;
    color: #899bbd;
    font-weight: 600;
    margin: 10px 0 5px 15px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sidebar-nav .nav-link:hover::before {
    left: 100%;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.15);
}

.sidebar-nav .nav-link.collapsed {
    color: #444;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.sidebar-nav .nav-link.collapsed i {
    color: #667eea;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar-nav .nav-link:hover i {
    color: #fff;
}

.sidebar-nav .nav-link .bi-chevron-down {
    margin-right: 0;
    transition: transform 0.2s ease-in-out;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-nav .nav-content {
    padding: 5px 0 0 0;
    margin: 0;
    list-style: none;
}

.sidebar-nav .nav-content a {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    padding: 10px 0 10px 20px;
    border-left: 3px solid transparent;
    border-radius: 4px;
}

.sidebar-nav .nav-content a i {
    font-size: 0.875rem;
    margin-right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dee2e6;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-content a:hover {
    color: #667eea;
    background-color: #f8f9fa;
    border-left-color: #667eea;
    padding-left: 25px;
}

.sidebar-nav .nav-content a.active {
    color: #667eea;
    font-weight: 600;
    border-left-color: #667eea;
    background-color: #f0f2ff;
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
    background-color: #667eea;
    transform: scale(1.2);
}

/*------------------
   6. MAIN CONTENT AREA
   ------------------*/

#main {
    margin-top: 0;
    padding: 15px 20px;
    transition: all 0.3s;
    background-color: #f6f9ff;
}

/*------------------
   7. DROPDOWN MENUS
   ------------------*/

.dropdown-menu {
    border-radius: 4px;
    padding: 10px 0;
    animation-name: dropdown-animate;
    animation-duration: 0.2s;
    animation-fill-mode: both;
    border: 0;
    box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
    text-align: center;
    font-size: 15px;
    padding: 10px 25px;
}

.dropdown-menu .dropdown-footer a {
    color: #444444;
    text-decoration: underline;
}

.dropdown-menu .dropdown-footer a:hover {
    text-decoration: none;
}

.dropdown-menu .dropdown-divider {
    color: #a5c5fe;
    margin: 0;
}

.dropdown-menu .dropdown-item {
    font-size: 14px;
    padding: 10px 15px;
    transition: 0.3s;
}

.dropdown-menu .dropdown-item i {
    margin-right: 10px;
    font-size: 18px;
    line-height: 0;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f6f9ff;
}

@media (min-width: 768px) {
    .dropdown-menu-arrow::before {
        content: "";
        width: 13px;
        height: 13px;
        background: #fff;
        position: absolute;
        top: -7px;
        right: 20px;
        transform: rotate(45deg);
        border-top: 1px solid #eaedf1;
        border-left: 1px solid #eaedf1;
    }
}

@keyframes dropdown-animate {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/*------------------
   8. BREADCRUMBS
   ------------------*/

.breadcrumb {
    font-size: 14px;
    font-family: "Nunito", sans-serif;
    color: #899bbd;
    font-weight: 600;
}

.breadcrumb a {
    color: #899bbd;
    transition: 0.3s;
}

.breadcrumb a:hover {
    color: #51678f;
}

.breadcrumb .breadcrumb-item::before {
    color: #899bbd;
}

.breadcrumb .active {
    color: #51678f;
    font-weight: 600;
}

/*------------------
   9. PAGE HEADERS
   ------------------*/

.page-title-box {
    padding: 20px 0;
}

.page-title-box h3 {
    color: #012970;
    font-weight: 600;
}

.page-header,
.page-header-update,
.page-header-drop,
.page-header-notes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    color: white;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-header h1,
.page-header-update h1,
.page-header-drop h1,
.page-header-notes h1 {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}

.page-header p,
.page-header-update p,
.page-header-drop p,
.page-header-notes p {
    margin: 0.35rem 0 0 0;
    opacity: 0.9;
    font-size: 0.85rem;
}

.page-header-update {
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.page-header-update h1 {
    font-size: 2rem;
}

.page-header-update p {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

.page-header-drop {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.page-header-drop h1 {
    font-size: 2rem;
}

.page-header-drop p {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

.page-header-notes {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/*------------------
   10. CARDS
   ------------------*/

.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.card-header {
    padding: 15px 20px;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #F09819 0%, #EDDE5D 100%) !important;
    color: #333 !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.search-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}

.search-card h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}

.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.attendance-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent !important;
}

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

.attendance-card[data-status="present"] {
    border-left-color: #198754 !important;
    background-color: #f0fdf4;
}

.attendance-card[data-status="absent"] {
    border-left-color: #dc3545 !important;
    background-color: #fef2f2;
}

.attendance-card[data-status="late"] {
    border-left-color: #ffc107 !important;
    background-color: #fffbeb;
}

.student-card {
    animation: fadeInUp 0.5s ease;
}

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

/*------------------
   11. BADGES
   ------------------*/

.badge {
    border-radius: 6px;
}

.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #F09819 0%, #EDDE5D 100%) !important;
    color: #333 !important;
}

.bg-info {
    background: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%) !important;
}

.bg-dark {
    background: linear-gradient(135deg, #343a40 0%, #6c757d 100%) !important;
}

.badge-sr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.attendance-badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

.badge-type {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}

.badge-number {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
}

/*------------------
   12. BUTTONS
   ------------------*/

.btn-lg {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%);
    border: none;
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #1BFFFF 0%, #2E3192 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 255, 255, 0.4);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #F09819 0%, #EDDE5D 100%);
    border: none;
    color: #333;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #EDDE5D 0%, #F09819 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 152, 25, 0.4);
    color: #333;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: none;
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f45c43 0%, #eb3349 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(235, 51, 73, 0.4);
    color: white;
}

.btn-update-submit {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    padding: 1rem 3rem;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-update-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
    color: white;
}

.btn-update-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-export,
.btn-export-notes {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.btn-export:hover,
.btn-export-notes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
    color: white;
}

.btn-export-notes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-export-notes:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-slc {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.btn-slc:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
    color: white;
}

.attendance-buttons .btn-outline-success:checked + label,
.attendance-buttons .btn-outline-success.active {
    background-color: #198754;
    color: white;
}

.attendance-buttons .btn-outline-danger:checked + label,
.attendance-buttons .btn-outline-danger.active {
    background-color: #dc3545;
    color: white;
}

.attendance-buttons .btn-outline-warning:checked + label,
.attendance-buttons .btn-outline-warning.active {
    background-color: #ffc107;
    color: #000;
}

/*------------------
   13. FORMS
   ------------------*/

.form-label,
.form-label-update {
    font-weight: 600;
    color: #012970;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label-update {
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-label-update i {
    color: #667eea;
    font-size: 0.9rem;
}

.form-control-lg,
.form-select-lg,
.form-control-modern,
.form-control-update {
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s;
}

.form-control-modern {
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control-modern:focus {
    border-color: #f093fb;
    box-shadow: 0 0 0 0.2rem rgba(240, 147, 251, 0.15);
}

.form-control-update {
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control-lg:focus,
.form-select-lg:focus {
    border-color: #4154f1;
    box-shadow: 0 0 0 0.2rem rgba(65, 84, 241, 0.1);
}

.form-control-lg:hover,
.form-select-lg:hover {
    border-color: #c1c8e6;
}

.form-control-update:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-control-update:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

select.form-control-update {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select:focus,
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/*------------------
   14. IMAGE UPLOAD & PHOTO STYLES
   ------------------*/

.userform .imgholder {
    height: 200px;
    width: 200px;
    border: 1px solid;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    position: relative;
    margin-right: 10px;
    margin-top: 10px;
}

.userform .imgholder .upload {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;
    z-index: 1;
    cursor: pointer;
    display: none;
}

.userform .imgholder .upload .pic {
    display: none;
}

.userform .imgholder:hover .upload {
    display: flex;
}

.userform .imgholder .upload i {
    color: #fff;
    font-size: 35px;
    font-weight: 300;
}

.userform .imgholder .img {
    width: 100%;
    height: 100%;
}

.photo-upload-wrapper {
    position: relative;
}

.photo-upload-label {
    cursor: pointer;
    display: inline-block;
}

.photo-preview-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    border: 4px solid #e3e6f0;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.photo-preview-container:hover {
    border-color: #4154f1;
    box-shadow: 0 6px 25px rgba(65, 84, 241, 0.3);
    transform: translateY(-2px);
}

.photo-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: white;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-preview-container:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay i {
    font-size: 32px;
}

.photo-overlay p {
    font-size: 14px;
    font-weight: 500;
}

.profile-upload-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.image-upload-wrapper {
    position: relative;
    display: inline-block;
}

.profile-image-preview {
    width: 180px;
    height: 180px;
    border-radius: 15px;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.profile-image-preview:hover {
    transform: scale(1.05);
}

.upload-label {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    border: 4px solid white;
}

.upload-label:hover {
    transform: scale(1.1) rotate(10deg);
}

.upload-label i {
    color: white;
    font-size: 1.5rem;
}

.upload-input {
    display: none;
}

.upload-hint {
    color: white;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.student-photo {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.student-img {
    border-radius: 4px;
    object-fit: cover;
}

/*------------------
   15. TABLES
   ------------------*/

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #012970;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.modern-table {
    margin: 0;
}

.modern-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-table thead th {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.75rem 0.6rem;
    white-space: nowrap;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.modern-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.modern-table tbody td {
    padding: 0.75rem 0.6rem;
    vertical-align: middle;
    color: #495057;
    font-size: 0.85rem;
}

.result-table {
    margin: 0;
}

.result-table thead {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.result-table thead th {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem 0.75rem;
    white-space: nowrap;
}

.notes-table {
    margin: 0;
}

.notes-table thead {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.table-container,
.table-container-notes {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
}

.pagination-wrapper {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.pagination-wrapper.show {
    display: block;
}

.table-responsive,
.table-responsive-notes {
    border-radius: 8px;
    overflow-x: auto;
}

/*------------------
   16. PROGRESS BARS
   ------------------*/

.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Progress Bar Height Utilities */
.progress-sm {
    height: 8px;
}

.progress-md {
    height: 25px;
}

.progress-lg {
    height: 30px;
}

/*------------------
   17. STATISTICS & ICONS
   ------------------*/

.stat-icon {
    transition: transform 0.3s ease;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.display-4 {
    font-size: 2.5rem;
    font-weight: 700;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-box {
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    text-align: center;
}

.stat-box h6 {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.stat-box h3 {
    margin: 0.5rem 0 0 0;
    font-weight: bold;
}

.stat-box-small {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-box-small small {
    display: block;
    opacity: 0.9;
}

.stats-badge,
.stats-badge-notes {
    background: #f8f9fa;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
}

.stats-badge i {
    color: #667eea;
    font-size: 1rem;
}

.stats-badge strong {
    color: #667eea;
    font-weight: 600;
}

.stats-badge-notes i {
    color: #fa709a;
    font-size: 1rem;
}

/*------------------
   18. SECTIONS & TOOLBARS
   ------------------*/

.section-title {
    color: #495057;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
    font-size: 1.3rem;
}

.section-heading {
    color: #495057;
    font-weight: 600;
}

.action-toolbar,
.action-toolbar-notes {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/*------------------
   19. LOADING OVERLAYS
   ------------------*/

.loading-overlay,
.loading-overlay-notes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.loading-overlay.show,
.loading-overlay-notes.show {
    display: flex;
}

.spinner-wrapper,
.spinner-wrapper-notes {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.spinner-border-notes {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.loading.show {
    display: flex;
}

/*------------------
   20. SEARCH & FILTERS
   ------------------*/

.search-bar {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-input input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.search-input i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1rem;
    z-index: 1;
}

.records-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.records-select label {
    margin: 0;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.records-select select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    min-width: 70px;
}

.records-select select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}


.table-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    min-height: 400px;
}

/*------------------
   21. ANIMATIONS
   ------------------*/

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

#table-data,
#exportButtons {
    animation: fadeIn 0.5s ease-in;
}

/*------------------
   22. RESPONSIVE STYLES
   ------------------*/

/* Sidebar & Main Layout */
@media (min-width: 1200px) {
    #main {
        margin-left: 260px;
        margin-top: 70px;
    }
}

@media (max-width: 1199px) {
    .sidebar {
        left: -300px;
    }
    #main {
        margin-top: 70px;
        margin-left: 0;
    }
}

@media (max-width: 1199px) {
    .toggle-sidebar .sidebar {
        left: 0;
    }
}

@media (min-width: 1200px) {
    .toggle-sidebar #main,
    .toggle-sidebar #footer {
        margin-left: 0;
    }
    .toggle-sidebar .sidebar {
        left: -300px;
    }
}

/* Logo */
@media (min-width: 768px) {
    .logo {
        width: 200px;
    }
}

/* General Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    .stat-icon {
        display: none;
    }
    .photo-preview-container {
        width: 150px;
        height: 150px;
    }
    .btn-lg {
        width: 100%;
        margin-top: 20px;
    }
}

/* Print Styles */
@media print {
    .btn {
        display: none !important;
    }
}

/*------------------
   23. LOGIN PAGE STYLES
   ------------------*/

/* Login Page - Only apply when on login page */
body:has(.login-wrapper) {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

.login-wrapper {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    padding: 40px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo-section {
    text-align: center;
    margin-bottom: 20px;
}

.logo-section img {
    max-height: 140px;
    width: auto;
    height: auto;
    margin-bottom: 8px;
}

.login-header {
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
}

.input-field {
    margin-bottom: 20px;
}

.input-box {
    position: relative;
}

.input-box .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 18px;
    z-index: 1;
}

.input-box input {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-box input[type="password"],
.input-box input[type="text"]#passwordField {
    padding: 14px 45px 14px 45px;
}

.input-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

.toggle-password:hover {
    color: #764ba2;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-group input {
    cursor: pointer;
}

.remember-me-label {
    color: #666;
    cursor: pointer;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.footer-text {
    margin-top: 30px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Login Page Responsive Design */
@media (max-width: 576px) {
    .login-box {
        padding: 40px 25px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .logo-section img {
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }

    .login-box {
        padding: 35px 20px;
    }

    .logo-section img {
        max-height: 100px;
    }

    .login-header h1 {
        font-size: 22px;
    }
}

/*------------------
   24. UTILITY CLASSES
   ------------------*/

/* Display Utilities */
.d-none-initial {
    display: none !important;
}

.d-show {
    display: block !important;
}

/* Background Colors */
.bg-readonly {
    background: #f8f9fa !important;
}

/* Text Colors */
.text-gray {
    color: #6c757d;
}

.text-info-color {
    color: #495057;
    font-weight: 600;
}

/* Spacing Utilities */
.mt-info {
    margin-top: 1rem;
}

/* Icon Sizes */
.icon-lg {
    font-size: 1.5rem;
}

.icon-xl {
    font-size: 3rem;
}

.icon-xxl {
    font-size: 4rem;
}

.icon-gray {
    color: #dee2e6;
}

/* Flex Utilities */
.flex-center {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-gap-sm {
    gap: 0.75rem;
}

/* Alert Fixed Position */
.alert-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Student Photo Report */
.student-photo-report {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #667eea;
    border-radius: 8px;
}

/* Modal Image */
.modal-image {
    max-height: 400px;
}

/* Table Column Widths */
.th-width-1 { width: 1%; }
.th-width-5 { width: 5%; }
.th-width-8 { width: 8%; }
.th-width-10 { width: 10%; }

/* Form Info Text */
.form-info-text {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}