/* Professional Navy Blue, White, Soft Gray Theme for SLGTI SIS - Bootstrap 5 Enhanced */

:root {
    --primary-navy: #001f3f;
    --primary-navy-dark: #001529;
    --primary-navy-light: #003d7a;
    --secondary-navy: #003366;
    --accent-navy: #1e3a5f;
    --light-gray: #f5f5f5;
    --soft-gray: #e8e8e8;
    --medium-gray: #d3d3d3;
    --text-gray: #6c757d;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --border-color: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --white: #ffffff;
    --black: #000000;
    --navy: #001f3f;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --bs-primary: #001f3f;
    --bs-secondary: #6c757d;
    --bs-success: #28a745;
    --bs-danger: #dc3545;
    --bs-warning: #ffc107;
    --bs-info: #17a2b8;
}

/* Bootstrap 5 Custom Overrides */
.bg-primary {
    background-color: var(--primary-navy) !important;
}

.btn-primary {
    background-color: var(--primary-navy);
    border-color: var(--primary-navy);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-navy-dark);
    border-color: var(--primary-navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 31, 63, 0.3);
}

.card {
    border: none;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-radius: 0;
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

/* Form Controls - Enhanced Styling */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text-dark);
}

/* Select dropdown on colored backgrounds */
.form-select option {
    background-color: var(--white);
    color: var(--text-dark);
}

/* Select on transparent/colored backgrounds */
select.form-select[style*="background-color: rgba"] {
    color: white !important;
}

select.form-select[style*="background-color: rgba"] option {
    background-color: var(--primary-navy);
    color: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 0.25rem rgba(0, 31, 63, 0.15);
    outline: none;
    background-color: var(--white);
}

.form-control:hover:not(:disabled):not(:focus),
.form-select:hover:not(:disabled):not(:focus) {
    border-color: var(--primary-navy-light);
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa;
    opacity: 1;
    cursor: not-allowed;
    color: #6c757d;
}

/* Select Box Specific Styling */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23001f3f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.form-select-sm {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-size: 14px 10px;
    background-position: right 0.5rem center;
}

.form-select-lg {
    padding: 0.75rem 3rem 0.75rem 1rem;
    font-size: 1.125rem;
    background-size: 18px 14px;
    background-position: right 1rem center;
}

.badge {
    padding: 0.5em 0.75em;
    font-weight: 600;
    border-radius: 6px;
}

.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--primary-navy);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand h2 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.navbar .nav-brand a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar .nav-brand .logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 0.9;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background-color: var(--white);
}

body:not(.logged-in) .main-content {
    padding: 0;
    margin: 0;
    min-height: calc(100vh - 60px);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    color: var(--primary-navy);
    font-size: 1.75rem;
    font-weight: 700;
}

.card-body {
    background-color: var(--white);
    padding: 1.25rem;
}

/* Buttons - Consolidated with Bootstrap 5 */

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}


.table tbody tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid var(--success);
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid var(--danger);
}

.alert-info {
    background-color: var(--light-gray);
    color: var(--primary-navy);
    border: 1px solid var(--primary-navy-light);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--primary-navy);
    color: var(--white);
    border-color: var(--primary-navy);
}

.pagination .active {
    background-color: var(--primary-navy);
    color: var(--white);
    border-color: var(--primary-navy);
}

/* Search Box */
.search-box {
    margin-bottom: 2rem;
}

.search-box form {
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
}

/* Footer */
.footer {
    background-color: var(--white);
    color: var(--text-dark);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
}

/* Hero Section */
.hero {
    background-color: var(--white);
    color: var(--text-dark);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Logged In Layout - Sidebar */
body.logged-in {
    background-color: var(--light-gray);
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navbar for Logged In Users */
.top-navbar {
    background: var(--primary-navy);
    color: var(--white);
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    width: 100%;
    border-bottom: 2px solid var(--primary-navy-light);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 100%;
    max-width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    flex-shrink: 0;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-brand i {
    font-size: 1.5rem;
}

.brand-text {
    display: inline;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-weight: 500;
}

.sidebar-header .user-name {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.user-name i {
    font-size: 1.25rem;
}

.user-name-text {
    display: inline;
    text-transform: uppercase;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-weight: 500;
}

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

.profile-text {
    display: inline;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.logout-text {
    display: inline;
}

/* App Container with Sidebar */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    margin-left: 280px;
    margin-top: 60px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 60px);
}

/* Sidebar - Matching Top Navbar Navy Blue Theme */
.sidebar {
    width: 280px;
    background: var(--primary-navy);
    box-shadow: 2px 0 15px rgba(0, 31, 63, 0.4);
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
    border-right: 2px solid var(--primary-navy-light);
}

.sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1002;
    pointer-events: auto;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-header {
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-navy-light);
    background: rgba(0, 31, 63, 0.2);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-header .sidebar-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-close {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: var(--white);
    transform: scale(1.1);
}

.sidebar-nav {
    padding: 0.75rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

/* Main Menu Links - Professional Alignment */
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    letter-spacing: 0.01em;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.sidebar-menu li a:hover {
    background: linear-gradient(90deg, rgba(0, 61, 122, 0.25) 0%, rgba(0, 61, 122, 0.15) 100%);
    color: var(--white);
    border-left-color: var(--primary-navy-light);
    transform: translateX(2px);
}

.sidebar-menu li a:hover::before {
    width: 100%;
}

.sidebar-menu li a.active {
    background: linear-gradient(90deg, rgba(0, 61, 122, 0.35) 0%, rgba(0, 61, 122, 0.25) 100%);
    color: var(--white);
    border-left-color: var(--primary-navy-light);
    font-weight: 600;
    box-shadow: inset 0 0 20px rgba(0, 61, 122, 0.15);
}

.sidebar-menu li a.active::before {
    width: 100%;
}

/* Menu Icons - Professional Alignment */
.sidebar-menu li a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    font-size: 1rem;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.sidebar-menu li a:hover i {
    transform: scale(1.1);
}

.sidebar-menu li a.active i {
    transform: scale(1.05);
}

/* Menu Text */
.sidebar-menu li a span {
    flex: 1;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu Item Has Children */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a {
    cursor: pointer;
}

.menu-item-has-children.active > a {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
}

/* Menu Arrow */
.menu-arrow {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    width: 16px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.menu-item-has-children.active > a .menu-arrow {
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.9);
}

/* Submenu Styles - Professional Alignment */
.submenu {
    display: none;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0.25rem 0 0.25rem 2.25rem;
    background: rgba(0, 0, 0, 0.15);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item-has-children.active .submenu {
    display: block;
}

.submenu li {
    margin: 0.125rem 0;
}

.submenu li a {
    display: flex;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    cursor: pointer;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem 0.625rem 2rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 2px solid transparent;
    font-weight: 400;
    position: relative;
    letter-spacing: 0.01em;
}

.submenu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.submenu li a:hover {
    background: linear-gradient(90deg, rgba(0, 61, 122, 0.2) 0%, rgba(0, 61, 122, 0.1) 100%);
    color: var(--white);
    border-left-color: rgba(255, 255, 255, 0.3);
    padding-left: 2.25rem;
    transform: translateX(2px);
}

.submenu li a:hover::before {
    width: 100%;
}

.submenu li a.active {
    background: linear-gradient(90deg, rgba(0, 61, 122, 0.3) 0%, rgba(0, 61, 122, 0.2) 100%);
    color: var(--white);
    border-left-color: var(--primary-navy-light);
    font-weight: 500;
}

.submenu li a.active::before {
    width: 100%;
}

/* Submenu Icons */
.submenu li a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-width: 16px;
    height: 16px;
    font-size: 0.8125rem;
    text-align: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    opacity: 0.8;
}

.submenu li a:hover i {
    transform: scale(1.1);
    opacity: 1;
}

.submenu li a.active i {
    opacity: 1;
}

/* Submenu Text */
.submenu li a span {
    flex: 1;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu Divider */
.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.15) 80%, transparent 100%);
    margin: 1rem 1.5rem;
    list-style: none;
}

/* Submenu Divider */
.menu-divider-submenu {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 80%, transparent 100%);
    margin: 0.5rem 2rem;
    list-style: none;
}

/* Scrollbar Styling for Sidebar - Professional Style */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Main Content Wrapper */
.main-content-wrapper {
    flex: 1;
    overflow-y: auto;
    background-color: var(--light-gray);
    width: 100%;
    height: 100%;
}

.main-content {
    padding: 1.5rem 2rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 1024px) {
    .brand-text {
        display: none;
    }
    
    .user-name-text {
        display: none;
    }
    
    .profile-text {
        display: none;
    }
    
    .logout-text {
        display: none;
    }
    
    /* Regular navbar responsive */
    .navbar .nav-brand h2 {
        font-size: 1.25rem;
    }
    
    .navbar .nav-brand .logo-img {
        height: 30px;
    }
}

@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        margin: 0;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.25rem;
    }
    
    .nav-left {
        gap: 0.75rem;
    }
    
    .top-navbar {
        position: fixed;
        width: 100%;
        z-index: 1000;
        height: 60px;
    }
    
    .navbar-content {
        padding: 0 1rem;
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .user-menu {
        gap: 0.5rem;
    }
    
    .profile-btn,
    .logout-btn {
        padding: 0.5rem;
        min-width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .app-container {
        margin-left: 0;
        margin-top: 60px;
        width: 100%;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        top: 60px;
        height: calc(100vh - 60px);
        transition: transform 0.3s ease;
    }
    
    .sidebar-overlay {
        top: 60px;
        height: calc(100vh - 60px);
        display: block;
        z-index: 998;
        left: 0;
        right: 0;
        pointer-events: none;
    }
    
    .sidebar.sidebar-open {
        transform: translateX(0);
        z-index: 1001;
        pointer-events: auto;
    }
    
    .sidebar.sidebar-open .sidebar-content {
        z-index: 1002;
        pointer-events: auto;
        position: relative;
    }
    
    .sidebar-overlay.sidebar-open {
        opacity: 1;
        pointer-events: auto;
        z-index: 998;
    }
    
    /* Sidebar content should always be clickable when sidebar is open */
    .sidebar.sidebar-open .sidebar-content {
        pointer-events: auto !important;
    }
    
    .sidebar.sidebar-open .sidebar-nav {
        pointer-events: auto !important;
    }
    
    .sidebar.sidebar-open .sidebar-menu,
    .sidebar.sidebar-open .sidebar-menu li,
    .sidebar.sidebar-open .sidebar-menu li a {
        pointer-events: auto !important;
    }
    
    .sidebar.sidebar-open .submenu,
    .sidebar.sidebar-open .submenu li,
    .sidebar.sidebar-open .submenu li a {
        pointer-events: auto !important;
    }
    
    /* Ensure menu items are clickable on mobile */
    .sidebar.sidebar-open .sidebar-menu,
    .sidebar.sidebar-open .sidebar-menu li,
    .sidebar.sidebar-open .sidebar-menu li a {
        pointer-events: auto !important;
        z-index: 10;
        position: relative;
    }
    
    .sidebar.sidebar-open .sidebar-nav {
        pointer-events: auto !important;
        z-index: 10;
        position: relative;
    }
    
    .sidebar.sidebar-open .submenu,
    .sidebar.sidebar-open .submenu li,
    .sidebar.sidebar-open .submenu li a {
        pointer-events: auto !important;
        z-index: 10;
        position: relative;
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .main-content-wrapper {
        width: 100%;
        overflow-x: hidden;
    }
    
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .nav-brand a {
        font-size: 1rem;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Regular navbar mobile */
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .navbar .nav-brand h2 {
        font-size: 1.1rem;
    }
    
    .navbar .nav-brand .logo-img {
        height: 28px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        text-align: center;
        padding: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .filters-form > div {
        grid-template-columns: 1fr !important;
    }
    
    .filters-form .form-group {
        margin-bottom: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    /* Dashboard Mobile Styles */
    .dashboard-container {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .dashboard-welcome-card .card-body {
        padding: 1.5rem;
    }
    
    .dashboard-welcome-card h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-welcome-card .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .dashboard-welcome-card .d-flex > div {
        width: 100%;
    }
    
    .stats-card-value {
        font-size: 2rem;
    }
    
    .stats-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem;
    }
    
    .navbar-content {
        padding: 0 0.75rem;
    }
    
    .nav-brand {
        font-size: 0.9rem;
    }
    
    .brand-text {
        font-size: 0.9rem;
    }
    
    .user-menu {
        gap: 0.25rem;
    }
    
    .profile-btn,
    .logout-btn {
        padding: 0.4rem;
        min-width: 36px;
        font-size: 1rem;
    }
    
    .profile-btn i,
    .logout-btn i {
        margin: 0;
    }
    
    .profile-text,
    .logout-text {
        display: none;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .nav-brand h2 {
        font-size: 1rem;
    }
    
    .navbar .nav-brand .logo-img {
        height: 25px;
    }
    
    .nav-menu {
        gap: 0.25rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .nav-menu a {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .sidebar-header {
        padding: 0.75rem;
    }
    
    .sidebar-menu li a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .submenu li a {
        padding: 0.625rem 1rem 0.625rem 3rem;
        font-size: 0.875rem;
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Filters Section */
.filters-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filters-form {
    width: 100%;
}

.filters-form .form-group {
    margin-bottom: 0;
}

.filters-form .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.badge-info {
    background-color: var(--light-gray);
    color: var(--primary-navy);
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-navy);
    border-color: var(--primary-navy);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-navy-dark);
    border-color: var(--primary-navy-dark);
    color: var(--white);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 31, 63, 0.25);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: var(--white);
}

.btn-outline-primary {
    color: var(--primary-navy);
    border-color: var(--primary-navy);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-navy);
    border-color: var(--primary-navy);
    color: var(--white);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: var(--white);
}

.btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
    background-color: transparent;
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: var(--white);
}

.btn-light {
    background-color: var(--white);
    border-color: #dee2e6;
    color: var(--text-dark);
}

.btn-light:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: var(--text-dark);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 10px;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-group {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.alert {
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success);
}

.alert-danger {
    border-left-color: var(--danger);
}

.alert-warning {
    border-left-color: var(--warning);
}

.alert-info {
    border-left-color: var(--primary-navy);
    background-color: var(--light-gray);
    color: var(--primary-navy);
}

/* Smooth Animations */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Attendance Table - Single Table Layout */
#attendanceTable {
    border-collapse: separate;
    border-spacing: 0;
}

#attendanceTable thead th.student-col {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    height: 120px;
    padding: 0.5rem;
    vertical-align: middle;
    position: sticky;
    left: 0;
    z-index: 11;
    background: #f8f9fa;
}

#attendanceTable thead th.date-header {
    height: 120px;
    vertical-align: middle;
}

#attendanceTable tbody td.student-col {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    height: 60px;
    padding: 0.5rem;
    vertical-align: middle;
    position: sticky;
    left: 0;
    z-index: 9;
    background: #ffffff;
}

#attendanceTable tbody tr {
    height: 60px;
}

#attendanceTable tbody td {
    height: auto;
    min-height: 60px;
    padding: 0.5rem;
    vertical-align: middle;
}

#attendanceTable tbody td .form-check {
    margin: 0.1rem 0;
}

#attendanceTable tbody td .form-check-label {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

/* Checkbox Styling */
.attendance-checkbox {
    cursor: pointer;
    border: 3px solid #dc3545;
    border-radius: 0.25rem;
    width: 1.5rem !important;
    height: 1.5rem !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background-color: white;
}

.attendance-checkbox:checked {
    border-color: #10b981;
    background-color: #10b981;
}

.attendance-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1;
}

.attendance-checkbox:not(:checked) {
    border-color: #dc3545;
    background-color: white;
}

/* Holiday Checkbox Styling - Yellow Outline */
.attendance-checkbox.holiday-checkbox,
.attendance-checkbox:disabled.holiday-checkbox {
    border: 3px solid #ffc107 !important;
    outline: 2px solid #ffc107 !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
    background-color: #ffffff !important;
    opacity: 0.8;
    cursor: not-allowed;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .filters-section {
        display: none !important;
    }
    
    .app-container {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

