:root {
    /* Minimalist Dark Palette */
    --bg-primary: #0F1117;
    --bg-secondary: #1A1D27;
    --bg-tertiary: #252836;
    --text-primary: #E2E8F0;
    --text-secondary: #A0AEC0;
    --text-muted: #636B7D;
    --accent-main: #6C8EEF;
    --accent-secondary: #A78BFA;
    --accent-green: #68D391;
    --accent-yellow: #F6C857;
    --accent-red: #FC6B7F;
    --accent-orange: #F6A150;
    --border-color: #2D3140;
    --border-radius: 10px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    --box-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.28);
    --transition-speed: 0.2s;
    --font-primary: 'Inter', 'Poppins', sans-serif;
    --font-code: 'Fira Code', monospace;
    --accent-primary: #6C8EEF;
}

body {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px;
    /* Adjusted padding */
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow-x: hidden;
    /* Prevent container overflow */
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mb-1 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 1.25rem;
}

.mb-3 {
    margin-bottom: 1.75rem;
}

.mt-1 {
    margin-top: 0.75rem;
}

.mt-2 {
    margin-top: 1.25rem;
}

.mt-3 {
    margin-top: 1.75rem;
}

/* --- Spinner & Loading States --- */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-main);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-sizing: border-box;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 2000;
    gap: 16px;
}

.page-loading .loading-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* --- Sidebar Overlay (base) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity 0.3s ease;
}

/* --- Focus States (Accessibility) --- */
button:focus-visible:not(:disabled),
.btn:focus-visible:not(:disabled) {
    outline: 2px solid var(--accent-main);
    outline-offset: 2px;
}

.nav-item:focus-visible {
    outline: 2px solid var(--accent-main);
    outline-offset: -2px;
}

.close-button:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--accent-main);
    outline-offset: 2px;
}

/* --- Active States --- */
button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* --- Profile Role Variants --- */
.sidebar-profile .profile-role.teacher {
    color: var(--accent-secondary);
}

.sidebar-profile .profile-role.admin {
    color: var(--accent-orange);
}

/* --- Responsive Images --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- BUTTON REDESIGN --- */
button,
.btn {
    padding: 9px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.2px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

button:hover:not(:disabled) {
    border-color: var(--accent-main);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-hover);
}

/* Primary Button Style */
.btn-primary {
    background-color: var(--accent-main);
    color: var(--bg-primary);
    border-color: var(--accent-main);
}

.btn-primary:hover:not(:disabled) {
    background-color: #638ef5;
    border-color: #638ef5;
    color: var(--bg-primary);
}

/* Secondary Button Style */
.btn-secondary {
    background-color: var(--accent-secondary);
    color: var(--bg-primary);
    border-color: var(--accent-secondary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #a883f5;
    border-color: #a883f5;
    color: var(--bg-primary);
}

/* Danger Button Style */
.btn-danger {
    background-color: var(--accent-red);
    color: var(--bg-primary);
    border-color: var(--accent-red);
}

.btn-danger:hover:not(:disabled) {
    background-color: #f56078;
    border-color: #f56078;
    color: var(--bg-primary);
}

/* Success Button Style */
.btn-success {
    background-color: var(--accent-green);
    color: var(--bg-primary);
    border-color: var(--accent-green);
}

.btn-success:hover:not(:disabled) {
    background-color: #8ac75a;
    border-color: #8ac75a;
    color: var(--bg-primary);
}

/* Warning Button Style */
.btn-warning {
    background-color: var(--accent-yellow);
    color: var(--bg-primary);
    border-color: var(--accent-yellow);
}

.btn-warning:hover:not(:disabled) {
    background-color: #d9a05a;
    border-color: #d9a05a;
    color: var(--bg-primary);
}

/* Outline Button Style */
.btn-outline-primary {
    background-color: transparent;
    color: var(--accent-main);
    border-color: var(--accent-main);
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: var(--accent-main);
    color: var(--bg-primary);
}

/* --- END BUTTON REDESIGN --- */


/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
select,
input.flatpickr-input,
input[type="checkbox"],
input[type="radio"] {
    width: calc(100% - 24px);
    padding: 11px 12px;
    margin-bottom: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    box-sizing: border-box;
}

input.flatpickr-input {
    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
    accent-color: var(--accent-main);
}


input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
input.flatpickr-input:focus,
input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 3px rgba(108, 142, 239, 0.2);
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* --- Header --- */
#app-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

#header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#app-header h1 {
    /* Main title "Weekly Schedule" */
    font-size: 2.2rem;
    /* Slightly larger */
    font-weight: 700;
    /* Bolder */
    color: var(--accent-secondary);
    margin: 0;
    letter-spacing: 0.5px;
    cursor: pointer;
    /* Make it clickable to return to main view */
}

#user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

#user-display-name {
    font-weight: 500;
    color: var(--accent-main);
}

#user-display-name.is-admin {
    color: var(--accent-orange);
    /* Make admin name stand out */
    font-weight: 600;
}


#header-secondary-content {
    display: flex;
    flex-direction: column;
    /* Stack date and stats on smaller screens */
    gap: 1.25rem;
    /* Space between date and stats */
    width: 100%;
    align-items: center;
    /* Center content by default */
}

#current-date-display-container {
    width: 100%;
    text-align: center;
    padding: 6px 0;
}

#current-date-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Live License Status Bar */
#live-license-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    flex-wrap: wrap;
}

#live-license-bar:empty {
    display: none;
}

.license-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.license-dot .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.license-dot.free {
    border-color: rgba(104, 211, 145, 0.3);
    color: var(--accent-green);
}

.license-dot.free .dot {
    background: var(--accent-green);
    box-shadow: 0 0 6px rgba(104, 211, 145, 0.5);
}

.license-dot.occupied {
    border-color: rgba(252, 107, 127, 0.2);
    color: var(--accent-red);
    opacity: 0.7;
}

.license-dot.occupied .dot {
    background: var(--accent-red);
}

#teacher-stats-container {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
    gap: 15px;
    /* Space between stat items */
    justify-content: center;
    /* Center stat items */
    width: 100%;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

#teacher-stats-container .stat-label-admin-note {
    font-size: 0.7em;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
    font-style: italic;
}


.stat-item {
    background-color: var(--bg-secondary);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 150px;
    /* Minimum width for each stat card */
    flex-grow: 1;
    /* Allow items to grow */
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.stat-value {
    display: block;
    font-size: 2rem;
    /* Large stat number */
    font-weight: 700;
    color: var(--accent-main);
    margin-bottom: 5px;
    font-family: var(--font-code);
    /* Use code font for numbers */
}

/* NEW: Style for earnings stats */
.stat-value.earnings {
    color: var(--accent-green);
}

.stat-label {
    font-size: 0.8rem;
    /* Slightly smaller for a cleaner look */
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    /* Wider spacing looks more professional */
    font-weight: 500;
    /* A slightly bolder weight */
}

/* --- End Enhanced Header --- */


/* Week Selector & Navigation - Enhanced */
#week-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 2.5rem;
}

.nav-arrow {
    padding: 8px;
    /* Adjusted padding for a square look */
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    line-height: 1;
}

.nav-arrow:hover {
    background-color: var(--accent-main);
    border-color: var(--accent-main);
    color: var(--bg-primary);
}

#week-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    flex-grow: 1;
}

#week-selector button {
    flex-grow: 1;
    min-width: 120px;
    font-weight: 500;
    padding: 10px 14px;
    line-height: 1.4;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
    flex-direction: column;
    gap: 2px;
    border-radius: 10px;
    font-size: 0.85rem;
}

#week-selector button .date-small {
    font-size: 0.75em;
    color: var(--text-muted);
    font-family: var(--font-code);
}

#week-selector button:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-primary);
    border-color: var(--accent-secondary);
}

#week-selector button.active-day {
    background-color: var(--accent-main) !important;
    color: #fff !important;
    border-color: var(--accent-main) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 142, 239, 0.25);
}

#week-selector button.active-day .date-small {
    color: var(--bg-tertiary);
}


/* Day Schedule View */
#day-schedule-view h2#day-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

#slots-list {
    list-style: none;
    padding: 0;
}

.slots-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.slot-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-secondary);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.slot-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
    border-left-color: var(--accent-main);
}

.slot-item.is-own {
    border-left-color: var(--accent-main);
}

.slot-item.is-other-teacher {
    border-left-color: var(--accent-orange);
}

.slot-item.is-cancelled {
    opacity: 0.6;
    border-left-color: var(--text-muted);
    background-color: var(--bg-tertiary);
}

.slot-item.is-cancelled .slot-details .topic {
    text-decoration: line-through;
}


.slot-details {
    margin-bottom: 15px;
}

.slot-details strong {
    color: var(--accent-main);
    font-size: 1.15em;
    font-family: var(--font-code);
    display: flex;
    align-items: center;
    gap: 10px;
}

.slot-details .topic {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.slot-details .teacher {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.slot-details .teacher .admin-view-teacher-highlight {
    font-weight: 600;
    color: var(--accent-yellow);
}

.slot-details .status-cancelled {
    font-size: 0.9em;
    color: var(--accent-yellow);
    margin-top: 5px;
    font-style: italic;
}

.slot-details .status-cancelled strong {
    color: var(--accent-orange);
}

/* NEW: Style for the class tag */
.slot-tag {
    background-color: var(--accent-secondary);
    color: var(--bg-primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-primary);
}

/* START: NEW STYLE FOR TIMESTAMP */
.slot-timestamp-info {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    font-style: italic;
    font-family: var(--font-code);
}

/* END: NEW STYLE FOR TIMESTAMP */


.slot-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.slot-actions button {
    font-size: 0.8rem;
    padding: 6px 12px;
    /* Smaller padding for action buttons */
}

/* Auth View Styling */
#auth-view h1 {
    color: var(--accent-secondary);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    font-size: 2.2rem;
}

#auth-view h1 .code-emphasis {
    font-family: var(--font-code);
    color: var(--accent-main);
    font-weight: 600;
}

#auth-view h2 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

#auth-view p a {
    color: var(--accent-main);
    text-decoration: none;
    font-weight: 500;
}

#auth-view p a:hover {
    text-decoration: underline;
    color: var(--accent-secondary);
}

#auth-view input[type="email"]:focus,
#auth-view input[type="password"]:focus,
#auth-view input[type="text"]:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(187, 154, 247, 0.4);
}

#auth-view .btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 18px rgba(122, 162, 247, 0.6);
}

#auth-view .btn-success:hover:not(:disabled) {
    box-shadow: 0 0 18px rgba(158, 206, 106, 0.6);
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 11, 17, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility 0s var(--transition-speed) ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 520px;
    transform: scale(0.96) translateY(16px);
    transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--accent-secondary);
    font-size: 1.6rem;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    font-size: 2.2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-speed) ease;
    padding: 0;
    /* Reset padding */
    width: 30px;
    height: 30px;
}

.close-button:hover {
    color: var(--accent-red);
    background-color: transparent;
    box-shadow: none;
    transform: none;
    border: none;
}

.time-inputs-container {
    display: flex;
    gap: 20px;
    margin-bottom: 1.25rem;
}

.time-inputs-container>div {
    flex: 1;
}

#teacher-select-container-for-admin {
    margin-bottom: 1.25rem;
}

/* Style for admin teacher selector */


/* Notifications */
#notifications {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    padding: 12px 18px;
    border-radius: 10px;
    color: var(--bg-primary);
    background-color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(110%);
    animation: slideInFade 0.4s forwards, slideOutFade 0.4s 4.5s forwards;
    font-weight: 500;
    font-size: 0.875rem;
    border-left: 4px solid;
}

.notification.error {
    background-color: var(--accent-red);
    border-left-color: #c7586e;
    color: white;
}

.notification.success {
    background-color: var(--accent-green);
    border-left-color: #7cb850;
    color: var(--bg-primary);
}

.notification.warning {
    background-color: var(--accent-yellow);
    border-left-color: #c89551;
    color: var(--bg-primary);
}

.notification.info {
    background-color: var(--accent-main);
    border-left-color: var(--accent-main);
    color: var(--bg-primary);
}


@keyframes slideInFade {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutFade {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(110%);
    }
}

/* Flatpickr Customizations */
.flatpickr-calendar {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    width: auto;
}

.flatpickr-months .flatpickr-month {
    color: var(--text-primary);
    fill: var(--text-primary);
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: var(--accent-main) !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--accent-secondary) !important;
}

span.flatpickr-weekday {
    color: var(--accent-secondary);
}

.flatpickr-day {
    color: var(--text-secondary);
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--bg-tertiary);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: var(--accent-main);
    color: var(--bg-primary);
    border-color: var(--accent-main);
}

.flatpickr-day.today {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.flatpickr-day.today:hover {
    border-color: var(--accent-orange);
    background: var(--accent-orange);
    color: var(--bg-primary);
}

.flatpickr-time {
    background: var(--bg-tertiary);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.flatpickr-time input.flatpickr-hour,
.flatpickr-time input.flatpickr-minute,
.flatpickr-time input.flatpickr-second {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    background: var(--bg-primary) !important;
    border-radius: 4px;
    padding: 5px;
    font-family: var(--font-code);
}

.flatpickr-time .flatpickr-am-pm {
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 8px;
}

.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time .flatpickr-am-pm:focus {
    background: var(--accent-main) !important;
    color: var(--bg-primary) !important;
}

.numInputWrapper:hover {
    background: var(--bg-tertiary);
}

.numInputWrapper span:hover {
    background: var(--bg-tertiary);
}

.numInputWrapper span.arrowUp:after {
    border-bottom-color: var(--accent-green);
}

.numInputWrapper span.arrowDown:after {
    border-top-color: var(--accent-red);
}

.slot-item.is-completed {
    border-left-color: var(--accent-green);
    background-color: #22302c;
}

.slot-details .status-completed {
    font-size: 0.9em;
    color: var(--accent-green);
    margin-top: 5px;
    font-style: italic;
}

.slot-details .status-completed strong {
    color: #9ECE6A;
}



/* Responsive */
@media (min-width: 769px) {

    /* Styles for larger screens */
    #header-secondary-content {
        flex-direction: row;
        /* Date and Stats side-by-side */
        justify-content: space-between;
        align-items: flex-start;
        /* Align items to the top */
    }

    #current-date-display-container {
        width: 100%;
        background-color: var(--bg-tertiary);
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        padding: 20px;
        /* Added padding for better spacing */
        box-sizing: border-box;

        /* --- Flexbox Centering --- */
        display: flex;
        justify-content: center;
        /* Horizontally center */
        align-items: center;
        /* Vertically center */

        /* Ensures it takes available vertical space */
        flex-grow: 1;
    }

    #teacher-stats-container {
        width: auto;
        /* Adjust width */
        max-width: 800px;
        /* Max width for stats block - INCREASED for new stats */
        justify-content: flex-end;
    }

    .stat-item {
        min-width: 120px;
        /* Adjust min-width for side-by-side */
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 10px;
    }

    .container {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }

    #app-header h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    #header-main-content {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    #current-date-display {
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
        /* Slightly smaller for a cleaner look */
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        /* Wider spacing looks more professional */
        font-weight: 500;
        /* A slightly bolder weight */
    }

    .stat-item {
        min-width: 100px;
        padding: 10px 15px;
        flex-basis: calc(50% - 10px);
    }

    /* FIXED: Mobile week navigation with proper day tab sizing */
    #week-navigation {
        gap: 8px;
        margin-bottom: 1.5rem;
        align-items: center;
        justify-content: space-between;
        padding: 10px 5px;
    }

    /* Navigation arrows - fixed sizing for mobile */
    .nav-arrow {
        flex-shrink: 0;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        padding: 8px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 5px;
    }

    /* Week selector container */
    #week-selector {
        flex: 1;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 5px 0;
        margin: 0 5px;
    }

    #week-selector::-webkit-scrollbar {
        display: none;
    }

    /* Day tab buttons - properly sized for mobile */
    #week-selector button {
        flex-shrink: 0;
        min-width: 85px;
        max-width: 85px;
        font-size: 0.8rem;
        padding: 8px 6px;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        scroll-snap-align: start;
    }

    #week-selector button .date-small {
        font-size: 0.7em;
        display: block;
        margin-top: 2px;
    }

    .slots-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .slot-item {
        padding: 15px;
    }

    .modal-content {
        padding: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-header h3 {
        font-size: 1.4rem;
    }

    #day-schedule-view .mb-2 {
        flex-direction: column;
        align-items: center;
    }

    #day-schedule-view .mb-2>h2#day-title {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
        font-size: 1.5rem;
    }

    #day-schedule-view .mb-2>div {
        /* Button container */
        justify-content: center;
        width: 100%;
        gap: 10px;
    }

    #add-slot-button {
        width: 100%;
    }

    /* --- IMPROVEMENT: Larger, more tappable buttons inside class slots --- */
    .slot-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-top: 1.25rem;
        gap: 8px;
    }

    .slot-actions button {
        flex-grow: 1;
        flex-basis: auto;
        font-size: 0.85rem;
        padding: 8px 10px;
    }

}

@media (max-width: 480px) {

    /* STYLES FOR THE SMALLEST SCREENS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    button,
    input.flatpickr-input {
        font-size: 1rem;
        width: calc(100% - 24px);
        box-sizing: border-box;
    }

    .time-inputs-container {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .time-inputs-container>div {
        width: 100%;
        margin-bottom: 1rem;
    }

    .time-inputs-container>div:last-child {
        margin-bottom: 0;
    }

    #auth-view h1 {
        font-size: 1.8rem;
    }

    #auth-view h2 {
        font-size: 1.3rem;
    }

    button,
    .btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    #teacher-stats-container {
        flex-direction: column;
    }

    .stat-item {
        width: 100%;
        min-width: unset;
        flex-basis: 100%;
    }

    #app-header h1 {
        font-size: 1.6rem;
    }

    #current-date-display {
        font-size: 1rem;
    }

    #day-schedule-view h2#day-title {
        font-size: 1.4rem;
    }

    .slot-details .topic {
        font-size: 1.1em;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    /* Extra small screens - further optimize day tabs */
    #week-navigation {
        padding: 8px 2px;
        gap: 6px;
    }

    .nav-arrow {
        width: 35px !important;
        height: 35px !important;
        min-width: 35px;
        padding: 6px !important;
        margin: 0 3px;
    }

    #week-selector {
        margin: 0 3px;
        gap: 3px;
    }

    #week-selector button {
        min-width: 75px;
        max-width: 75px;
        font-size: 0.75rem;
        padding: 6px 4px;
    }

    #week-selector button .date-small {
        font-size: 0.65em;
    }
}

/* --- Add this for the login button loader --- */
.btn .loader {
    width: 18px;
    height: 18px;
    border: 2px solid var(--bg-primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- End of new CSS --- */

/* Additional Mobile Responsiveness Fixes */
@media (max-width: 768px) {

    /* Fix for flatpickr calendar on mobile */
    .flatpickr-calendar {
        width: 95% !important;
        max-width: 350px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    /* Fix for notifications on small screens */
    #notifications {
        bottom: 15px;
        right: 15px;
        max-width: calc(100% - 30px);
    }

    .notification {
        padding: 12px 15px;
        font-size: 0.9rem;
        max-width: 100%;
    }
}

/* Fix for any potential horizontal scroll issues */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.license-info {
    display: block;
    /* Give it its own line */
    margin-top: 10px;
    /* Add space above it */
    padding: 6px 12px;
    /* Add some internal padding */
    background-color: var(--bg-tertiary);
    /* Use a slightly different background */
    border: 1px solid var(--accent-yellow);
    /* Bright yellow border */
    border-radius: var(--border-radius);
    color: var(--accent-yellow) !important;
    /* Bright yellow text */
    font-weight: 600;
    /* Make it bolder */
    font-size: 1em;
    /* Increase font size slightly */
    text-align: center;
    /* Center the license text */
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(224, 175, 104, 0.2);
    /* Add a subtle glow */
}

/* ================================================================= */
/* START: NEW CSS FOR LICENSE TIMELINE */
/* ================================================================= */
#license-timeline-view {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.license-timeline-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#license-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.license-row {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 35px;
}

.license-label {
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

.timeline-bar {
    flex-grow: 1;
    height: 100%;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    position: relative;
    /* START: MODIFICATION - Removed overflow: hidden to allow tooltip visibility */
    /* overflow: hidden; */
    /* END: MODIFICATION */
}

.timeline-slot {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: var(--accent-orange);
    /* Default for other teachers */
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.timeline-slot:hover {
    transform: scaleY(1.1);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.timeline-slot.is-own {
    background-color: var(--accent-main);
    /* Blue for my classes */
}

.timeline-slot.is-cancelled {
    background-color: var(--accent-red);
    opacity: 0.6;
}

.timeline-slot::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    white-space: pre;
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    pointer-events: none;
}

.timeline-slot:hover::after {
    opacity: 1;
    visibility: visible;
}

.timeline-axis {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 115px;
    /* Align with timeline bars */
    padding-top: 5px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

@media (max-width: 768px) {
    .license-label {
        width: 60px;
        font-size: 0.8rem;
    }

    .timeline-axis {
        margin-left: 75px;
    }

    .license-timeline-title {
        font-size: 1.1rem;
    }
}

/* ================================================================= */
/* END: NEW CSS FOR LICENSE TIMELINE */
/* ================================================================= */


/* ================================================================= */
/* START: NEW CSS FOR TEACHER OVERVIEW */
/* ================================================================= */
#teacher-overview-view {
    width: 100%;
}

#overview-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 1.5rem;
}

#overview-week-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-secondary);
    text-align: center;
    flex-grow: 1;
}

.overview-grid {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    /* Teacher Name | 7 Days */
    gap: 5px;
    overflow-x: auto;
    /* Allow horizontal scroll on smaller screens */
    padding-bottom: 10px;
}

.overview-header,
.overview-teacher-name,
.overview-day-cell {
    background-color: var(--bg-tertiary);
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
}

.overview-header {
    color: var(--accent-secondary);
    position: sticky;
    /* Make headers stick when scrolling */
    top: 0;
    z-index: 10;
}

.overview-teacher-name {
    color: var(--accent-main);
    background-color: #313442;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 10;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-day-cell {
    background-color: rgba(var(--bg-primary-rgb, 26, 27, 38), 0.5);
    border: 1px solid var(--border-color);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 8px;
    text-align: left;
    font-weight: 400;
}

.overview-day-cell.is-today {
    border-color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(224, 175, 104, 0.2);
}

.overview-day-cell .day-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.overview-day-cell .day-header .class-count {
    font-weight: 700;
    color: var(--accent-yellow);
}

.overview-slot {
    background-color: var(--bg-tertiary);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
    border-left: 3px solid var(--accent-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.overview-slot:hover {
    background-color: var(--accent-main);
    color: var(--bg-primary);
    transform: translateX(3px);
}

.overview-slot-time {
    font-weight: 600;
    font-family: var(--font-code);
}

.overview-slot.is-cancelled {
    border-left-color: var(--accent-red);
    opacity: 0.6;
    text-decoration: line-through;
}

.overview-slot.is-completed {
    border-left-color: var(--accent-green);
}

#overview-loader {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 40px;
}

/* ================================================================= */
/* END: NEW CSS FOR TEACHER OVERVIEW */
/* ================================================================= */

/* ================================================================= */
/* START: NEW CSS FOR SALARY HIGHLIGHT & HISTORY */
/* ================================================================= */

#salary-highlight-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background-color: #2a3a3a;
    /* A calming dark green */
    border: 1px solid var(--accent-green);
    border-radius: var(--border-radius);
    padding: 20px 25px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(158, 206, 106, 0.15);
    transition: all 0.3s ease;
}

#salary-highlight-box .salary-icon {
    font-size: 2.5rem;
    line-height: 1;
}

#salary-highlight-box .salary-text {
    flex-grow: 1;
}

#salary-highlight-box .salary-text strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

#salary-highlight-box .salary-text span {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

#salary-highlight-box #salary-highlight-amount {
    font-weight: 700;
    font-family: var(--font-code);
    color: var(--accent-green);
}

#salary-highlight-box #view-salary-history-button {
    flex-shrink: 0;
    /* Prevent button from shrinking */
    border-color: var(--accent-green);
    color: var(--accent-green);
}

#salary-highlight-box #view-salary-history-button:hover {
    background-color: var(--accent-green);
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(158, 206, 106, 0.5);
}

/* Salary History Modal */
#salary-history-list {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
    /* For scrollbar */
}

.salary-history-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-secondary);
}

.salary-history-item:nth-child(even) {
    background-color: var(--bg-tertiary);
}

.salary-history-month {
    font-weight: 500;
    color: var(--text-secondary);
}

.salary-history-amount {
    font-weight: 700;
    font-family: var(--font-code);
    color: var(--accent-green);
}

#salary-history-loader {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    #salary-highlight-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }

    #salary-highlight-box .salary-text strong {
        font-size: 1.2rem;
    }

    #salary-highlight-box .salary-text span {
        font-size: 1rem;
    }

    #salary-highlight-box #view-salary-history-button {
        width: 100%;
    }
}

/* ================================================================= */
/* HEADER LAYOUT                                                     */
/* ================================================================= */

#header-secondary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
/* ADD THIS ENTIRE CSS BLOCK */
/* --- Notification Bell in Header --- */
#notification-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

#notification-bell:hover {
    color: var(--accent-main);
}

#notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 8px rgba(247, 118, 142, 0.7);
    display: none;
    /* Hidden by default */
    animation: pulse 1.5s infinite;
}

#notification-dot.visible {
    display: block;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(247, 118, 142, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(247, 118, 142, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(247, 118, 142, 0);
    }
}

/* --- Announcement Modal (for Teachers) --- */
#announcement-modal .modal-content {
    max-width: 600px;
    text-align: center;
}

#announcement-modal-icon {
    font-size: 3rem;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
    line-height: 1;
}

#announcement-modal-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    max-height: 50vh;
    overflow-y: auto;
    text-align: left;
    background-color: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

#announcement-modal-timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-style: italic;
}

/* --- Admin Announcement Modal --- */
#admin-announcement-modal textarea {
    width: calc(100% - 24px);
    min-height: 200px;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
}

#admin-announcement-modal textarea:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 3px rgba(108, 142, 239, 0.2);
}

/* ================================================================= */
/* START: CSS FOR ANNOUNCEMENT HISTORY                             */
/* ================================================================= */
.announcement-history-item {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-secondary);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 12px;
}

.announcement-history-item.is-deleted {
    border-left-color: var(--accent-red);
    opacity: 0.6;
}

.announcement-history-item .announcement-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
    white-space: pre-wrap;
    /* Preserves line breaks from textarea */
}

.announcement-history-item .announcement-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-history-item .admin-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.announcement-history-item .admin-actions button {
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* ================================================================= */
/* END: CSS FOR ANNOUNCEMENT HISTORY                               */
/* --- Class Notes CSS --- */
.class-notes-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.class-notes-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.class-notes-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.save-notes-btn {
    margin-top: 6px;
    padding: 4px 12px;
    font-size: 0.75rem;
}

/* ================================================================= */
/* START: CSS FOR ADMIN DASHBOARD ENHANCEMENTS                       */
/* ================================================================= */

.admin-dashboard-container {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border-color: rgba(108, 142, 239, 0.2);
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.admin-stat-card.revenue::before {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
}

.admin-stat-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    opacity: 0.1;
    color: white;
}

.admin-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .admin-content-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    background: rgba(20, 20, 25, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    height: 100%;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.revenue-table {
    width: 100%;
    border-collapse: collapse;
}

.revenue-table th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.revenue-table td {
    padding: 12px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.teacher-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-right: 8px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.action-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateX(3px);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(58, 134, 255, 0.2);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}


.action-card.teachers .action-icon {
    background: rgba(255, 190, 11, 0.2);
    color: #ffbe0b;
}

.action-info h4 {
    margin: 0 0 4px 0;
    color: #fff;
    font-size: 1rem;
}

.action-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ================================================================= */
/* END: CSS FOR ADMIN DASHBOARD ENHANCEMENTS                         */
/* ================================================================= */

/* --- Enhanced Teacher Stat Cards --- */
.teacher-stat-enhanced {
    position: relative;
    overflow: hidden;
    padding: 1.2rem 1.4rem !important;
    border: 1px solid var(--border-color) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.teacher-stat-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.teacher-stat-enhanced:nth-child(1)::before {
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.teacher-stat-enhanced:nth-child(2)::before {
    background: linear-gradient(90deg, #059669, #34d399);
}

.teacher-stat-enhanced:nth-child(3)::before {
    background: linear-gradient(90deg, #d97706, #fbbf24);
}

.teacher-stat-enhanced:nth-child(4)::before {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.teacher-stat-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.teacher-stat-enhanced .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
}

.teacher-stat-enhanced:nth-child(1) .stat-icon {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

.teacher-stat-enhanced:nth-child(2) .stat-icon {
    background: rgba(5, 150, 105, 0.15);
    color: #34d399;
}

.teacher-stat-enhanced:nth-child(3) .stat-icon {
    background: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
}

.teacher-stat-enhanced:nth-child(4) .stat-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

.teacher-stat-enhanced .stat-icon svg {
    width: 18px;
    height: 18px;
}

.teacher-stat-enhanced .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.teacher-stat-enhanced .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-top: 4px;
}

/* --- Teacher Panel Sections --- */
.teacher-panel-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 1.25rem;
    overflow: hidden;
}

.teacher-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.teacher-panel-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.teacher-panel-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.teacher-panel-header h3 svg {
    width: 16px;
    height: 16px;
    color: var(--accent-secondary);
}

.teacher-panel-header .panel-toggle {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.teacher-panel-header .panel-toggle.expanded {
    transform: rotate(180deg);
}

.teacher-panel-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.teacher-panel-body.expanded {
    max-height: 600px;
}

.teacher-panel-body-inner {
    padding: 0 1.25rem 1.25rem;
}


/* --- Today's Agenda --- */
.teacher-agenda-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
}

.teacher-agenda-panel h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.teacher-agenda-panel h3 svg {
    width: 16px;
    height: 16px;
    color: var(--accent-green);
}

.agenda-timeline-item {
    display: flex;
    gap: 14px;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.agenda-timeline-item:last-child {
    border-bottom: none;
}

.agenda-time-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.agenda-time-col .time-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.agenda-time-col .time-end {
    font-family: 'Fira Code', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.agenda-detail-col {
    flex: 1;
    min-width: 0;
}

.agenda-detail-col .agenda-topic {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.agenda-detail-col .agenda-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.agenda-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.agenda-status-pill.scheduled {
    background: rgba(78, 205, 196, 0.15);
    color: var(--accent-secondary);
}

.agenda-status-pill.completed {
    background: rgba(158, 206, 106, 0.15);
    color: var(--accent-green);
}

.agenda-status-pill.cancelled {
    background: rgba(247, 118, 142, 0.15);
    color: var(--accent-red);
}


.agenda-empty {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* ================================================================= */
/* END: CSS FOR TEACHER DASHBOARD ENHANCEMENTS                       */
/* ================================================================= */
/* --- LOADING SKELETONS --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    user-select: none;
}

.skeleton-text {
    height: 1em;
    width: 70%;
    margin-bottom: 0.5em;
    display: inline-block;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- TRANSITIONS --- */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-header .section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Nav separator for sidebar admin sections */
.nav-separator {
    padding: 12px 20px 6px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.7;
}

/* Management section inline cards */
.management-section-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.management-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.management-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.management-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.management-card .btn {
    width: 100%;
}

/* ===== SIDEBAR NAVIGATION ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===== SIDEBAR NAVIGATION (MINIMALIST FLOATING) ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 72px;
    height: calc(100vh - 24px);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Hover to expand (optional - can be removed if strictly icon-only is preferred) */
.sidebar:hover {
    width: 260px;
}

.sidebar-header {
    padding: 25px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar:hover .sidebar-header {
    border-color: var(--border-color);
    justify-content: flex-start;
    padding-left: 25px;
}

.sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
    font-family: var(--font-code);
    display: none;
    /* Hide full text by default */
}

.sidebar-header h2 {
    display: none;
}

/* Logo Icon for collapsed state */
.sidebar-header::before {
    content: '</>';
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-main);
    flex-shrink: 0;
}

.sidebar:hover .sidebar-header::before {
    display: none;
    /* Hide icon on expand if we show full logo */
}

.sidebar:hover .sidebar-header .logo,
.sidebar:hover .sidebar-header h2 {
    display: block;
    margin: 0;
    font-size: 1.2rem;
}

/* Hide subtitle */
.sidebar-subtitle {
    display: none;
}

.sidebar-profile {
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px dashed transparent;
    transition: all 0.3s ease;
}

.sidebar:hover .sidebar-profile {
    border-color: var(--border-color);
    justify-content: flex-start;
    padding-left: 20px;
}

.sidebar-profile .profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    /* Squircle */
    background: linear-gradient(135deg, var(--accent-main), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(108, 142, 239, 0.2);
}

.sidebar-profile .profile-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 0;
}

.sidebar:hover .profile-info {
    opacity: 1;
    width: auto;
    margin-left: 12px;
}

.sidebar-profile .profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: block;
}

.sidebar-profile .profile-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav .nav-section-title,
.nav-separator {
    display: none;
    /* Hide section titles for clean look */
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 14px;
    margin-bottom: 8px;
    justify-content: center;
    /* Center icon */
    position: relative;
}

.sidebar:hover .sidebar-nav .nav-item {
    justify-content: flex-start;
    padding-left: 15px;
}

.sidebar-nav .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    /* Subtle hover */
    color: var(--text-primary);
    transform: translateY(-1px);
}

.sidebar-nav .nav-item.active {
    background: linear-gradient(90deg, rgba(122, 162, 247, 0.15), rgba(122, 162, 247, 0.05));
    color: var(--accent-main);
    box-shadow: inset 0 0 0 1px rgba(122, 162, 247, 0.1);
}

.sidebar-nav .nav-item svg {
    font-size: 1.2rem;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-item:hover svg {
    transform: scale(1.1);
    color: var(--accent-secondary);
}

.sidebar-nav .nav-item span {
    opacity: 0;
    width: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.sidebar:hover .sidebar-nav .nav-item span {
    opacity: 1;
    width: auto;
    display: inline-block;
}

/* Tooltips for collapsed state (when not hovered) */
.sidebar:not(:hover) .nav-item[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.sidebar:not(:hover) .nav-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.sidebar-footer {
    padding: 20px 10px;
    /* border-top: 1px solid var(--border-color); */
}

.sidebar-footer .nav-item {
    justify-content: center;
}

.sidebar:hover .sidebar-footer .nav-item {
    justify-content: flex-start;
    padding-left: 15px;
}

.main-content {
    flex: 1;
    margin-left: 110px;
    /* 80px width + 15px left + 15px gap */
    padding: 30px;
    min-height: 100vh;
    width: calc(100% - 110px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* When sidebar expands, we CAN push content, or overlay. 
   Apple usually overlays or pushes. Pushing is smoother for layout. */
.sidebar:hover~.main-content {
    margin-left: 290px;
    /* 260px width + 15px left + 15px gap */
    width: calc(100% - 290px);
}

/* Helper to hide collapse toggle as we don't need it */
.sidebar-collapse-toggle {
    display: none !important;
}

/* Mobile Responsive */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    background-color: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-120%);
        width: 260px;
        /* Full width on mobile when open */
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header h2,
    .sidebar-subtitle {
        display: block;
    }

    .sidebar-header::before {
        display: none;
    }

    .sidebar-nav .nav-item span {
        display: inline-block;
        opacity: 1;
        width: auto;
    }

    .sidebar-nav .nav-item {
        justify-content: flex-start;
        padding-left: 20px;
    }

    .sidebar-overlay.active {
        display: block;
        backdrop-filter: blur(4px);
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        margin-left: 0 !important;
        /* Reset margin */
        width: 100% !important;
        padding: 20px;
        padding-top: 80px;
        /* Space for mobile toggle */
    }

    .sidebar:hover~.main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1e1f30 50%, #252740 100%);
}

.login-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-secondary);
    font-family: var(--font-code);
    margin: 0 0 5px 0;
}

.login-card .login-logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.login-card .login-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.login-card .login-form input {
    width: 100%;
}

.login-card .login-form .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
}

.login-card .login-error {
    color: var(--accent-red);
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
    margin-top: 5px;
}

/* ===== DASHBOARD SECTION NAVIGATION ===== */
.dashboard-section {
    display: block;
}

.dashboard-section.hidden {
    display: none !important;
}

.dashboard-section.section-active {
    animation: sectionFadeIn 0.3s ease-out;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Nav Separator (Admin section divider in sidebar) */
.nav-separator {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 16px 20px 6px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

/* Management Section Content */
.management-section-content {
    display: grid;
    gap: 1rem;
}

.management-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.management-card:hover {
    border-color: var(--accent-main);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.management-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.management-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
}

.empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.empty-state p {
    font-size: 0.9rem;
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

/* ========================================= */

/* SALARY HISTORY TAB STYLES */

/* ========================================= */



.salary-history-wrapper {

    animation: fadeIn 0.4s ease-out;

}



/* Summary Card */

.salary-summary-card {

    background: var(--bg-secondary);

    border: 1px solid var(--border-color);

    border-radius: 16px;

    padding: 24px;

    display: flex;

    align-items: center;

    justify-content: space-around;

    margin-bottom: 30px;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

}



.summary-item {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;

}



.summary-label {

    font-size: 0.9rem;

    color: var(--text-muted);

    font-weight: 500;

    text-transform: uppercase;

    letter-spacing: 0.5px;

}



.summary-value {

    font-size: 2rem;

    font-weight: 700;

    color: var(--accent-green);

    font-family: 'Fira Code', monospace;

}



.summary-divider {

    width: 1px;

    height: 60px;

    background-color: var(--border-color);

}



/* Table Container */

.salary-table-container {

    background: var(--bg-secondary);

    border: 1px solid var(--border-color);

    border-radius: 16px;

    overflow: hidden;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);

}



.salary-table {

    width: 100%;

    border-collapse: collapse;

}



.salary-table th {

    background-color: rgba(255, 255, 255, 0.03);

    padding: 16px 24px;

    text-align: left;

    font-weight: 600;

    color: var(--text-secondary);

    font-size: 0.85rem;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    border-bottom: 1px solid var(--border-color);

}



.salary-table th.text-right {

    text-align: right;

}



.salary-table td {

    padding: 20px 24px;

    border-bottom: 1px solid var(--border-color);

    color: var(--text-primary);

    vertical-align: middle;

}



.salary-table tr:last-child td {

    border-bottom: none;

}



.salary-table tr:hover {

    background-color: rgba(255, 255, 255, 0.02);

}



.earnings-cell {

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 2px;

}



.earning-amount {

    font-weight: 500;

}



.earning-count {

    font-size: 0.8rem;

}



.earning-total {

    color: var(--accent-green);

    font-family: 'Fira Code', monospace;

    font-size: 1.1rem;

}



/* Utilities reused in JS */

.text-right {

    text-align: right;

}



.text-muted {

    color: var(--text-muted);

}



.font-medium {

    font-weight: 500;

}



.font-bold {

    font-weight: 700;

}



/* Mobile Responsiveness */

@media (max-width: 768px) {

    .salary-summary-card {

        flex-direction: column;

        gap: 20px;

        align-items: stretch;

        text-align: center;

    }



    .summary-divider {

        width: 100%;

        height: 1px;

    }



    .salary-table th,

    .salary-table td {

        padding: 12px 16px;

        font-size: 0.9rem;

    }



    .earning-count {

        display: none;

        /* Hide counts on very small screens if needed, or keep */

    }

}

/* ========================================= */

/* SIDEBAR LOGO UPDATE */

/* ========================================= */

.sidebar-logo {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    padding: 20px 10px;

    border-bottom: 1px solid var(--border-color);

    margin-bottom: 20px;

    text-align: center;

    transition: all 0.3s ease;

}



.logo-emoji {

    font-size: 3rem;

    line-height: 1;

    filter: drop-shadow(0 0 10px rgba(108, 142, 239, 0.2));

    transition: transform 0.3s ease, filter 0.3s ease;

    cursor: pointer;

}



.logo-emoji:hover {

    transform: scale(1.1) rotate(5deg);

    filter: drop-shadow(0 0 15px rgba(122, 162, 247, 0.5));

}



.sidebar.collapsed .logo-emoji {

    font-size: 2rem;

}



.sidebar-subtitle {

    font-size: 0.75rem;

    color: var(--text-muted);

    margin-top: 5px;

    font-weight: 500;

    opacity: 1;

    transition: opacity 0.3s ease;

    white-space: nowrap;

}



.sidebar.collapsed .sidebar-subtitle {

    opacity: 0;

    pointer-events: none;

    display: none;

    /* Ensure it doesn't take up space */

}



/* ========================================= */

/* LOGOUT BUTTON UPDATE */
/* ========================================= */

.logout-btn {
    margin-top: auto !important;
    background-color: rgba(247, 118, 142, 0.08);
    color: var(--accent-red) !important;
    border: 1px solid transparent;
    width: 100%;
    justify-content: center;
    padding: 12px;
    border-radius: 14px;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
}

.sidebar:hover .logout-btn {
    justify-content: flex-start;
    padding: 12px 15px;
}

.logout-btn:hover {
    background-color: var(--accent-red) !important;
    color: white !important;
    border-color: var(--accent-red);
    box-shadow: 0 4px 12px rgba(247, 118, 142, 0.3);
    transform: translateY(-1px);
}

.logout-btn svg {
    min-width: 20px;
    flex-shrink: 0;
}

.logout-btn span {
    opacity: 0;
    width: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.sidebar:hover .logout-btn span {
    opacity: 1;
    width: auto;
    display: inline-block;
}

/* ========================================= */

/* SIDEBAR LOGO IMAGE UPDATE */

/* ========================================= */

.sidebar-logo {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    padding: 20px 10px;

    border-bottom: 1px solid var(--border-color);

    margin-bottom: 20px;

    text-align: center;

    transition: all 0.3s ease;

}



.logo-img {

    width: 80px;

    height: 80px;

    object-fit: cover;

    border-radius: 50%;

    border: 2px solid var(--accent-main);

    box-shadow: 0 0 15px rgba(108, 142, 239, 0.2);

    transition: transform 0.3s ease, box-shadow 0.3s ease;

}



.logo-img:hover {

    transform: scale(1.05);

    box-shadow: 0 0 20px rgba(122, 162, 247, 0.5);

}



.sidebar.collapsed .logo-img {

    width: 40px;

    height: 40px;

    border-width: 1px;

}



.sidebar-subtitle {

    font-size: 0.75rem;

    color: var(--text-muted);

    margin-top: 10px;

    font-weight: 500;

    opacity: 1;

    transition: opacity 0.3s ease;

    white-space: nowrap;

}



.sidebar.collapsed .sidebar-subtitle {

    opacity: 0;

    pointer-events: none;

    display: none;

}

/* ========================================= */

/* LOGO FIXES */

/* ========================================= */

.logo-img {

    width: 80px;

    height: 80px;

    object-fit: contain;

    /* Changed from cover to contain to see full logo */

    border-radius: 12px;

    /* Soft rounded corners instead of circle */

    border: 2px solid var(--accent-main);

    box-shadow: 0 0 15px rgba(108, 142, 239, 0.2);

    transition: transform 0.3s ease, box-shadow 0.3s ease;

    background-color: transparent;

    /* Ensure no weird background */

}



.logo-img:hover {

    transform: scale(1.05);

    box-shadow: 0 0 20px rgba(122, 162, 247, 0.5);

}



.sidebar.collapsed .logo-img {

    width: 40px;

    height: 40px;

    border-radius: 8px;

    border-width: 1px;

}



/* Fix for Login Page Logo */

.branding-logo-img {

    width: 150px;

    height: 150px;

    object-fit: contain;

    /* Changed to contain */

    border-radius: 20px;

    /* Soft rounded corners */

    border: 4px solid var(--accent-main);

    box-shadow: 0 0 30px rgba(78, 205, 196, 0.3);

    margin-bottom: 1.5rem;

    transition: transform 0.3s ease;

    background-color: transparent;

}


/* ===== INLINE BASE VIEWS ===== */

/* Base Header */
.base-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.base-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.base-header-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.base-header-icon {
    font-size: 1.3rem;
    color: var(--accent-main);
}

.base-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search */
.base-search-wrapper {
    position: relative;
    min-width: 200px;
}

.base-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.base-search {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.base-search:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 3px rgba(var(--accent-main-rgb, 78, 205, 196), 0.15);
}

/* Add Button */
.base-add-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--accent-main);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    flex-shrink: 0;
}

.base-add-btn.base-add-btn-lg {
    width: auto;
    height: auto;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 8px;
}

.base-add-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.4);
}

.base-add-btn i {
    transition: transform 0.3s ease;
}

/* Collapsible Create Form */
.base-create-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    max-height: 600px;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease, margin 0.35s ease;
}

.base-create-form.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-color: transparent;
}

.base-form-title {
    color: var(--accent-green, #4ecdc4);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.base-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.base-form-grid-inline {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.base-form-field label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.base-form-field input,
.base-form-field select,
.base-form-field textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: border-color 0.2s ease;
}

.base-form-field input:focus,
.base-form-field select:focus,
.base-form-field textarea:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 3px rgba(var(--accent-main-rgb, 78, 205, 196), 0.15);
}

.base-form-submit {
    width: 100%;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
}

.base-form-submit-inline {
    padding: 0.55rem 1.5rem;
    height: 42px;
    white-space: nowrap;
    flex-shrink: 0;
}


/* Base Table */
.base-table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.base-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.base-table thead {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
}

.base-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.base-table tbody td {
    padding: 12px 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.base-table-row {
    transition: background 0.15s ease;
}

.base-table-row:hover {
    background: rgba(var(--accent-main-rgb, 78, 205, 196), 0.04);
}

.base-table-row:last-child td {
    border-bottom: none;
}

.base-table-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cell styles */
.base-cell-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.base-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-main), var(--accent-secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}


.base-cell-email {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.base-cell-date {
    color: var(--text-muted);
    font-size: 0.83rem;
    white-space: nowrap;
}

.base-cell-teacher {
    font-size: 0.85rem;
}

.base-cell-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.base-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(var(--accent-main-rgb, 78, 205, 196), 0.1);
    color: var(--accent-main);
    font-size: 0.8rem;
    font-weight: 500;
}


/* Announcement cards */
.base-announcements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.base-announcement-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    gap: 12px;
}

.base-announcement-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.base-announcement-content {
    flex: 1;
    min-width: 0;
}

.base-announcement-text {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

.base-announcement-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.base-announcement-meta i {
    margin-right: 4px;
    font-size: 0.75rem;
}

.base-announcement-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.announcement-edit-row {
    padding: 0 0 10px 0;
}

.announcement-edit-row.hidden {
    display: none;
}

/* ===== INLINE EDIT FORMS ===== */
.inline-edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 14px;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px dashed var(--border-color);
}

.inline-edit-form .form-input {
    flex: 1;
    min-width: 180px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: border-color 0.2s ease;
}

.inline-edit-form .form-input:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 3px rgba(var(--accent-main-rgb, 78, 205, 196), 0.15);
}

.inline-edit-form textarea.form-input {
    width: 100%;
    min-width: 100%;
    resize: vertical;
    font-family: inherit;
}

/* Teacher edit rows */
.teacher-edit-row td {
    padding: 0 16px 16px;
    background: rgba(var(--accent-main-rgb, 78, 205, 196), 0.03);
}

.teacher-edit-row.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .base-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .base-header-right {
        width: 100%;
    }

    .base-search-wrapper {
        flex: 1;
    }

    .base-form-grid {
        grid-template-columns: 1fr;
    }

    .base-form-grid-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .base-table {
        font-size: 0.82rem;
    }

    .base-table thead th,
    .base-table tbody td {
        padding: 10px 10px;
    }

    .base-cell-email,
    .base-cell-date {
        display: none;
    }
}

/* === Sortable Table Headers === */
.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: color 0.2s ease;
}

.sortable-th:hover {
    color: var(--accent-main);
}

.sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.7rem;
    opacity: 0.4;
    vertical-align: middle;
}

.sort-indicator::after {
    content: '⇅';
}

.sortable-th.sort-asc .sort-indicator {
    opacity: 1;
}

.sortable-th.sort-asc .sort-indicator::after {
    content: '▲';
}

.sortable-th.sort-desc .sort-indicator {
    opacity: 1;
}

.sortable-th.sort-desc .sort-indicator::after {
    content: '▼';
}

/* === Larger Add Button with Label === */
.base-add-btn-lg {
    width: auto;
    height: 42px;
    border-radius: 10px;
    padding: 0 18px;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}

.base-add-btn-lg i {
    font-size: 0.9rem;
}

.base-add-btn-lg span {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .base-add-btn-lg span {
        display: none;
    }

    .base-add-btn-lg {
        width: 42px;
        padding: 0;
        border-radius: 50%;
    }
}

/* ================================================================= */
/* TEACHER ANNOUNCEMENTS SECTION - REDESIGNED                        */
/* ================================================================= */
.announcements-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-feed-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-yellow);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.announcement-feed-card .announcement-feed-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.announcement-feed-card .announcement-feed-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1A1B26;
    flex-shrink: 0;
}

.announcement-feed-card .announcement-feed-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.announcement-feed-card .announcement-feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.announcement-feed-card .announcement-feed-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.announcement-feed-card .announcement-feed-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(224, 175, 104, 0.15);
    color: var(--accent-yellow);
    margin-left: auto;
}

.announcements-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.announcements-empty-state .empty-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.announcements-empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ================================================================= */
/* SALARY HISTORY SECTION - REDESIGNED                               */
/* ================================================================= */
.salary-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 2rem;
}

.salary-overview-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.salary-overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.salary-overview-card.card-total::before {
    background: linear-gradient(90deg, var(--accent-green), #6fcf97);
}

.salary-overview-card.card-avg::before {
    background: linear-gradient(90deg, var(--accent-main), #a3bffa);
}

.salary-overview-card.card-group::before {
    background: linear-gradient(90deg, var(--accent-secondary), #d6bcfa);
}

.salary-overview-card.card-personal::before {
    background: linear-gradient(90deg, var(--accent-orange), #fbd38d);
}

.salary-overview-card .salary-card-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.salary-overview-card .salary-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-code);
    color: var(--text-primary);
}

.salary-overview-card .salary-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.salary-month-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.salary-month-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: background 0.15s ease;
}

.salary-month-row:hover {
    background: var(--bg-tertiary);
}

.salary-month-row.salary-header-row {
    background: var(--bg-tertiary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 18px;
}

.salary-month-row.salary-header-row:hover {
    background: var(--bg-tertiary);
}

.salary-month-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.salary-month-name .month-year {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
}

.salary-cell {
    text-align: right;
    font-family: var(--font-code);
    font-size: 0.85rem;
}

.salary-cell .cell-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.salary-cell .cell-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}

.salary-cell-total {
    text-align: right;
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-green);
}

.salary-month-row.no-earnings {
    opacity: 0.5;
}

.salary-month-row.no-earnings .salary-cell-total {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .salary-month-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .salary-month-row.salary-header-row {
        display: none;
    }

    .salary-cell::before {
        content: attr(data-label);
        display: block;
        font-size: 0.65rem;
        text-transform: uppercase;
        color: var(--text-muted);
        font-family: var(--font-primary);
        font-weight: 600;
        letter-spacing: 0.3px;
    }
}



/* --- Zoom & Recordings Mobile --- */
@media (max-width: 500px) {
    .zoom-join-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .recording-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-watch-recording {
        width: 100%;
        justify-content: center;
    }

    .recording-meta {
        flex-wrap: wrap;
    }
}

/* ================================================================= */
/* LICENSE STATE BADGES                                               */
/* ================================================================= */

.license-assigned {
    border-color: var(--accent-green) !important;
    color: var(--accent-green) !important;
    background-color: rgba(158, 206, 106, 0.08) !important;
    box-shadow: 0 0 10px rgba(158, 206, 106, 0.15) !important;
}

.license-waitlisted {
    border-color: var(--accent-orange) !important;
    color: var(--accent-orange) !important;
    background-color: rgba(255, 158, 100, 0.08) !important;
    box-shadow: 0 0 10px rgba(255, 158, 100, 0.15) !important;
    animation: license-pulse 2.5s ease-in-out infinite;
}

@keyframes license-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 158, 100, 0.15); }
    50% { box-shadow: 0 0 18px rgba(255, 158, 100, 0.3); }
}

.license-fallback {
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
    background-color: var(--bg-tertiary) !important;
    box-shadow: none !important;
    font-size: 0.85em;
    margin-top: 4px;
}

.license-none {
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
    background-color: var(--bg-tertiary) !important;
    box-shadow: none !important;
    opacity: 0.7;
}

.license-auto-tag {
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.8;
}

/* Zoom License Banner in Modal */
.zoom-license-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: rgba(158, 206, 106, 0.1);
    border: 1px solid var(--accent-green);
    border-radius: var(--border-radius);
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.92rem;
}

.zoom-license-banner svg {
    flex-shrink: 0;
}

/* ─── Zoom Auto-Check Styles ─────────────────────────────────────── */

/* Auto-check waiting spinner badge */
.zoom-auto-check-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: rgba(122, 162, 247, 0.15);
    color: var(--accent-main);
    border: 1px solid rgba(108, 142, 239, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.zoom-auto-check-badge i {
    font-size: 0.75rem;
}

/* Zoom meeting info block on completed/cancelled cards */
.zoom-meeting-info {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: rgba(158, 206, 106, 0.08);
    border-left: 3px solid var(--accent-green);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.zoom-auto-verified-badge {
    color: var(--accent-green);
    font-weight: 600;
}

.zoom-auto-verified-badge i {
    margin-right: 2px;
}

/* Partial duration warning (30-45 min case) */
.zoom-note-warning {
    color: var(--accent-orange);
    font-weight: 600;
}

.zoom-note-warning i {
    margin-right: 3px;
}

/* ================================================================= */
/* SHARE BUTTON                                                       */
/* ================================================================= */
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(122, 162, 247, 0.3);
    background: rgba(122, 162, 247, 0.1);
    color: var(--accent-main);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-share:hover {
    background: rgba(122, 162, 247, 0.25);
    border-color: var(--accent-main);
    box-shadow: 0 0 10px rgba(108, 142, 239, 0.2);
    transform: translateY(-1px);
}

.btn-share i {
    font-size: 0.75rem;
}

/* ================================================================= */
/* LICENSE BAR LAST-UPDATED TIMESTAMP & REFRESH                       */
/* ================================================================= */
.license-bar-timestamp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: var(--font-code);
    color: var(--text-muted);
    background: rgba(var(--bg-tertiary-rgb, 59, 62, 77), 0.4);
    border: 1px solid transparent;
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.license-bar-timestamp:hover {
    opacity: 1;
}

/* Unscheduled meeting warning — Zoom busy but NOT on calendar */
.license-dot.unscheduled {
    border-color: rgba(255, 165, 0, 0.4);
    color: var(--accent-orange);
    animation: pulse-warn 2s infinite;
}

.license-dot.unscheduled .dot {
    background: var(--accent-orange);
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.6);
}

@keyframes pulse-warn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 165, 0, 0); }
    50% { box-shadow: 0 0 8px 2px rgba(255, 165, 0, 0.15); }
}

/* Refresh button */
.license-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.license-refresh-btn:hover {
    color: var(--accent-main);
    border-color: var(--accent-main);
    background: rgba(108, 142, 239, 0.1);
}

.license-refresh-btn.spinning i {
    animation: spin-refresh 0.8s linear infinite;
}

@keyframes spin-refresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .license-bar-timestamp {
        width: auto;
        text-align: center;
        justify-content: center;
    }
}