:root {
    /* Desert Theme Colors */
    --primary-color: #D4A76A;      /* Lighter camel brown */
    --secondary-color: #E6B17A;    /* Light sand */
    --accent-color: #B38B6D;       /* Lighter saddle brown */
    --background-color: #FDF5E6;   /* Old lace */
    --text-color: #4A4A4A;         /* Dark gray */
    --success-color: #2E7D32;      /* Forest green */
    --warning-color: #F57C00;      /* Deep orange */
    --danger-color: #C62828;       /* Deep red */
    --light-color: #FFF8E1;        /* Cornsilk */
    --dark-color: #3E2723;         /* Dark brown */
    --border-color: #D2B48C;       /* Tan */
    --heading-color: #8B4513;      /* Saddle brown for headings */
}

/* Global Styles */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
}

h5 {
    color: var(--heading-color);
    font-weight: 600;
}

.dashboard-card .card-header h5 {
    color: white;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand, .nav-link {
    color: white !important;
}

.nav-link:hover {
    color: var(--light-color) !important;
    opacity: 0.9;
}

/* Card Styles */
.dashboard-card {
    background: white;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 25px;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem;
    border: none;
}

.dashboard-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
}

.dashboard-card .card-body {
    padding: 1.5rem;
    border-radius: 0 0 15px 15px;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Stats Display */
.stats-container {
    padding: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

.stat-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-box:hover {
    transform: translateY(-3px);
}

.stat-box h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.stat-box p {
    color: var(--text-color);
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Styles */
.table, .theme-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 0;
}

.theme-table-header {
    background-color: var(--light-color);
    color: var(--dark-color);
    font-weight: 500;
    border: none;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Ensure proper spacing for table content */
.table-container {
    margin-top: 1rem;
    padding-top: 0.5rem;
}

.search-container {
    margin-bottom: 2rem;
}

.tabs-container {
    margin-bottom: 2rem;
}

.table thead th {
    background-color: var(--light-color);
    color: var(--dark-color);
    font-weight: 500;
    border: none;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    text-align: center;
    border-color: var(--border-color);
    background-color: white;
    background: white;
}

.table-responsive {
    border-radius: 12px;
    margin-top: 0;
}

.table-bordered {
    border-color: var(--border-color);
}

.table-light {
    background-color: var(--light-color) !important;
}

/* Override Bootstrap table-light */
.table-light thead th {
    background-color: var(--light-color) !important;
    color: var(--dark-color) !important;
    font-weight: 500;
    border: none;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Force override any conflicting sticky positioning */
.table thead th,
.table-light thead th,
thead th {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
}

/* Badge Styles */
.badge {
    padding: 0.5em 1em;
    border-radius: 6px;
    font-weight: 500;
}

/* Default white background for regular table rows */
body .table tbody tr,
body .table.table-hover tbody tr,
body .table tbody tr.student-row,
body .table tbody tr.student-row td {
    background-color: white !important;
    background: white !important;
}

/* Student Status Row Colors - Ultra Specific */
body .table tbody tr.status-green,
body .table.table-hover tbody tr.status-green,
body .table tbody tr.student-row.status-green,
body .table tbody tr.student-row.status-green td {
    background-color: #d4edda !important;
    background: #d4edda !important;
}

body .table tbody tr.status-yellow,
body .table.table-hover tbody tr.status-yellow,
body .table tbody tr.student-row.status-yellow,
body .table tbody tr.student-row.status-yellow td {
    background-color: #fff3cd !important;
    background: #fff3cd !important;
}

body .table tbody tr.status-red,
body .table.table-hover tbody tr.status-red,
body .table tbody tr.student-row.status-red,
body .table tbody tr.student-row.status-red td {
    background-color: #f8d7da !important;
    background: #f8d7da !important;
}

/* Hover states for status rows */
body .table tbody tr.status-green:hover,
body .table.table-hover tbody tr.status-green:hover,
body .table tbody tr.student-row.status-green:hover {
    background-color: #c3e6cb !important;
    background: #c3e6cb !important;
}

body .table tbody tr.status-yellow:hover,
body .table.table-hover tbody tr.status-yellow:hover,
body .table tbody tr.student-row.status-yellow:hover {
    background-color: #ffeaa7 !important;
    background: #ffeaa7 !important;
}

body .table tbody tr.status-red:hover,
body .table.table-hover tbody tr.status-red:hover,
body .table tbody tr.student-row.status-red:hover {
    background-color: #f5c6cb !important;
    background: #f5c6cb !important;
}

/* Discontinue warning styling */
.discontinue-warning {
    background-color: #f44336 !important;
    position: relative;
}

.discontinue-warning:hover {
    background-color: #ffcdd2 !important;
}

.discontinue-warning::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #f44336;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 2.75rem;
    box-sizing: border-box;
    width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(193, 120, 23, 0.25);
    outline: none;
}

/* Ensure text inputs don't cut off text */
.form-control[type="text"],
.form-control[type="email"],
.form-control[type="tel"],
.form-control[type="number"] {
    min-width: 150px;
    padding-right: 1.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.form-control[type="text"]:focus,
.form-control[type="email"]:focus,
.form-control[type="tel"]:focus,
.form-control[type="number"]:focus {
    overflow: visible;
    white-space: normal;
    min-height: auto;
    height: auto;
}

/* Select dropdowns */
.form-control[type="select"],
select.form-control {
    padding-right: 2.5rem;
    background-position: right 0.8rem center;
    background-size: 1.2em;
    background-repeat: no-repeat;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%234A4A4A" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>');
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(198, 40, 40, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(245, 124, 0, 0.1);
    color: var(--warning-color);
}

.alert-info {
    background-color: rgba(193, 120, 23, 0.1);
    color: var(--primary-color);
}

/* Icon Styles */
.fas {
    margin-right: 0.5rem;
}

/* Text Colors */
.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-muted {
    color: var(--text-color) !important;
    opacity: 0.7;
}

/* Default Values */
.default-value {
    color: var(--text-color);
    opacity: 0.7;
}

/* List Group Styles */
.list-group-item {
    border-color: var(--border-color);
    padding: 1rem;
}

.list-group-item h6 {
    color: var(--heading-color);
    font-weight: 600;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 20px;
    }
    
    .stat-box {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        border-radius: 12px;
    }
} 

/* --- Common App Navbar & Sidebar Styles --- */
.app-navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    height: 4.5rem;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.app-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--light-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    padding-left: 1.2rem;
}
.app-navbar .navbar-logo {
    height: 2.2rem;
    width: auto;
    max-width: 100%;
}
.app-navbar .navbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-color);
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.1;
}
.app-navbar .navbar-toggler {
    border: none;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: auto;
    margin-right: 1.2rem;
    transition: none;
}
.app-navbar .navbar-toggler .navbar-toggler-icon,
.app-navbar .navbar-toggler i {
    color: var(--background-color) !important; /* Page background color for the lines */
    font-size: 1.6rem;
    width: 100%;
    text-align: center;
}
.app-navbar .navbar-toggler:focus,
.app-navbar .navbar-toggler:hover {
    background: transparent !important;
    outline: none;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-title {
        font-size: 1rem !important;
    }
    .app-navbar .navbar-logo {
        height: 1.7rem !important;
    }
    .app-navbar .navbar-toggler {
        font-size: 1.5rem !important;
        padding: 0.2rem 0.6rem !important;
        margin-right: 0.5rem !important; /* or 0, or as needed */
    }
    .app-navbar .navbar-brand {
        font-size: 1rem !important;
        gap: 0.4rem !important;
    }
    .app-navbar .container-fluid {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }
}
/* Remove forced display:block for .offcanvas on desktop */
/* @media (min-width: 992px) {
    .offcanvas {
        display: block !important;
    }
} */

.app-sidebar,
.offcanvas {
    background: var(--background-color) !important;
    border-right: 2px solid var(--border-color);
}
.app-sidebar .offcanvas-title,
.offcanvas .offcanvas-title {
    color: var(--heading-color);
    font-weight: 700;
}
.app-sidebar .btn-close,
.offcanvas .btn-close {
    filter: invert(0.7);
}
.app-sidebar .list-group-item,
.offcanvas .list-group-item {
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
    background: transparent;
    padding: 0.75rem 1.5rem 0.75rem 2.2rem;
    transition: background 0.15s, color 0.15s;
}
.app-sidebar .list-group-item.active, .app-sidebar .list-group-item:active,
.offcanvas .list-group-item.active, .offcanvas .list-group-item:active {
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
}
.app-sidebar .list-group-item:hover,
.offcanvas .list-group-item:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
}
.app-sidebar .dropdown-toggle,
.offcanvas .dropdown-toggle {
    width: 100%;
    text-align: left;
    background: var(--secondary-color);
    border: none;
    color: var(--heading-color);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.75rem 1.2rem 0.75rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--secondary-color);
    margin-bottom: 0;
}
.app-sidebar .dropdown-toggle:after,
.offcanvas .dropdown-toggle:after {
    margin-left: auto;
}
.app-sidebar .collapse .list-group-item,
.offcanvas .collapse .list-group-item {
    padding-left: 2.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
    background: transparent;
}
.app-sidebar .collapse .list-group-item.active, .app-sidebar .collapse .list-group-item:active,
.offcanvas .collapse .list-group-item.active, .offcanvas .collapse .list-group-item:active {
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
}
.app-sidebar .collapse .list-group-item:hover,
.offcanvas .collapse .list-group-item:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
}
.app-sidebar .dropdown-toggle[aria-expanded="true"],
.offcanvas .dropdown-toggle[aria-expanded="true"] {
    background: var(--accent-color);
    color: #fff;
}

.app-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.5rem;
    padding: 0;
} 

/* Make table input fields wider so full value is visible */
.table .form-control[type="text"],
.table .form-control[type="number"],
.table .form-control[type="email"],
.table .form-control[type="tel"] {
    min-width: 150px;
    max-width: 100%;
    width: 100%;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #fff;
    color: var(--text-color);
    line-height: 1.3;
    min-height: 2.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table .form-control[type="text"]:focus,
.table .form-control[type="number"]:focus,
.table .form-control[type="email"]:focus,
.table .form-control[type="tel"]:focus {
    overflow: visible;
    white-space: normal;
    min-height: auto;
    height: auto;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(193, 120, 23, 0.25);
    outline: none;
}

.form-select, select.filter-dropdown {
    width: 100%;
    min-width: 120px;
    max-width: 100%;
    font-size: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    margin-bottom: 0.2rem;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%234A4A4A" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.2em;
    padding-right: 2.2em;
    line-height: 1.4;
    height: auto;
}

.form-select:focus, select.filter-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(193, 120, 23, 0.25);
    outline: none;
}

/* Modal form controls - ensure proper spacing and text visibility */
.modal .form-control,
.modal .form-select {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 2.75rem;
}

.modal .form-control:focus,
.modal .form-select:focus {
    overflow: visible;
    white-space: normal;
    min-height: auto;
    height: auto;
}

/* Ensure form rows have proper spacing */
.modal .form-row {
    margin-bottom: 1rem;
}

.modal .form-group {
    margin-bottom: 1rem;
}

/* Modal form labels */
.modal .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Ensure form controls in modals have proper text display */
.modal .form-control[type="text"],
.modal .form-control[type="email"],
.modal .form-control[type="tel"],
.modal .form-control[type="number"] {
    min-width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    min-height: 2.75rem;
}

.modal .form-control[type="text"]:focus,
.modal .form-control[type="email"]:focus,
.modal .form-control[type="tel"]:focus,
.modal .form-control[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(193, 120, 23, 0.25);
    outline: none;
    overflow: visible;
    white-space: normal;
    min-height: auto;
    height: auto;
}

/* Modal select dropdowns */
.modal select.form-control {
    padding-right: 2.5rem;
    background-position: right 0.8rem center;
    background-size: 1.2em;
    background-repeat: no-repeat;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%234A4A4A" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>');
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Ensure proper spacing for form rows and columns */
.modal .form-row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: 1rem;
}

.modal .form-row > .form-group {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.modal .col-md-4,
.modal .col-md-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Ensure form groups have consistent spacing */
.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group:last-child {
    margin-bottom: 0;
}

/* Ensure modal has proper width for form controls */
.modal-dialog.modal-lg {
    max-width: 800px;
    width: 90%;
}

.modal-dialog.modal-lg .modal-content {
    padding: 1rem;
}

/* Ensure form controls don't get cut off in smaller screens */
@media (max-width: 768px) {
    .modal-dialog.modal-lg {
        width: 95%;
        margin: 1rem auto;
    }
    
    .modal .form-row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .modal .col-md-4,
    .modal .col-md-6 {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 1rem;
    }
    
    .modal .form-control,
    .modal .form-select {
        min-width: 100%;
        width: 100%;
    }
}

/* Additional styling to prevent text cutting in form controls */
.form-control {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Ensure text inputs show full content when focused */
.form-control:focus {
    position: relative;
    z-index: 1000;
}

/* Modal specific text handling */
.modal .form-control {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.modal .form-control:focus {
    text-overflow: clip;
    white-space: normal;
    overflow: visible;
    min-height: auto;
    height: auto;
    z-index: 1001;
}

/* Ensure proper text display in all form controls */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

 

.sidebar-section-toggle {
  background: var(--secondary-color);
  color: var(--heading-color);
  font-weight: 999;
  border: none;
  border-radius: 0;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
}
.sidebar-section-toggle:focus,
.sidebar-section-toggle:hover {
  background: var(--accent-color);
  color: #fff;
} 

/* --- THEME TABS --- */
.theme-nav-tabs {
    border-bottom: 2px solid var(--border-color);
    background: var(--background-color);
}
.theme-nav-tabs .nav-link {
    color: var(--dark-color) !important;
    background: transparent !important;
    font-weight: 600;
    font-size: 1.08rem;
    border: none;
    border-radius: 8px 8px 0 0;
    margin-right: 0.2rem;
    padding: 0.7rem 1.5rem;
    transition: background 0.2s, color 0.2s;
}
.theme-nav-tabs .nav-link:hover, .theme-nav-tabs .nav-link:focus {
    color: var(--primary-color) !important;
    background: var(--light-color) !important;
    text-decoration: none;
}
.theme-nav-tabs .nav-link.theme-tab-active,
.theme-nav-tabs .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.theme-nav-tabs .nav-link .badge {
    background: var(--secondary-color) !important;
    color: var(--dark-color) !important;
    margin-left: 0.5em;
    font-size: 0.95em;
}

/* For accessibility, ensure focus is visible */
.theme-nav-tabs .nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} 

/* --- Policies Page Styles --- */
.policies-container {
    background: var(--light-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 2rem;
    margin-top: 2rem;
    max-width: 800px;
}
.policy-index {
    margin-bottom: 2rem;
}
.policy-index a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
}
.policy-index a:hover {
    text-decoration: underline;
}
.accordion-button {
    background: linear-gradient(90deg, var(--light-color) 0%, var(--border-color) 100%);
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: bold;
    border: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(180,138,60,0.07);
    transition: background 0.2s, color 0.2s;
}
.accordion-button:not(.collapsed) {
    background: var(--secondary-color);
    color: var(--heading-color);
}
.accordion-item {
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(180,138,60,0.04);
}
.accordion-body {
    background: #fff;
    border-radius: 0 0 8px 8px;
    padding: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}
.policies-title {
    color: var(--heading-color);
}

/* --- Bank Details Page Styles --- */
.main-content {
    margin-left: 0;
    padding: 2rem;
    min-height: 100vh;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.form-container {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-section {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.required-field::after {
    content: " *";
    color: var(--danger-color);
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--light-color);
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(212, 167, 106, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(212, 167, 106, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.ifsc-info {
    background: rgba(212, 167, 106, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    display: none;
}

.bank-details-display {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--primary-color);
}

.detail-value {
    color: var(--text-color);
}

/* Responsive adjustments for bank details */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1rem;
    }
}

/* Locked form state */
.form-container.locked {
    opacity: 0.7;
    pointer-events: none;
}

.form-container.locked .form-control,
.form-container.locked .form-select,
.form-container.locked .file-upload-area,
.form-container.locked .btn {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

/* --- Document Viewer Modal Styles --- */
.document-viewer {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    border-radius: 8px;
    padding: 1rem;
}

.document-viewer img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.document-viewer img:hover {
    transform: scale(1.02);
}

.document-viewer embed {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Document view buttons */
.btn-outline-primary.btn-sm {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary.btn-sm:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(212, 167, 106, 0.3);
}

/* Modal customization for document viewer */
#documentModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

#documentModal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#documentModal .modal-header .btn-close:hover {
    opacity: 1;
}

#documentModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

#documentModal .modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--light-color);
    border-radius: 0 0 8px 8px;
}

#documentModal .modal-footer .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#documentModal .modal-footer .btn-secondary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

#documentModal .modal-footer .btn-secondary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

#documentModal .modal-footer .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

#documentModal .modal-footer .btn-primary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 167, 106, 0.3);
}

/* Responsive document viewer */
@media (max-width: 768px) {
    #documentModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .document-viewer {
        min-height: 300px;
        padding: 0.5rem;
    }
    
    .document-viewer embed {
        height: 400px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-value .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}