@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --color-primary: #5d8233;
    --color-primary-dark: #4d6b2a;
}

.dark {
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}


body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
}

.dark body {
    background-color: #0f172a;
    color: #f1f5f9;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.sidebar-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.18), 2px 0 8px rgba(0, 0, 0, 0.10);
}

.sidebar-nav-scroll {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.75), rgba(100, 116, 139, 0.75));
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.dark .sidebar-nav-scroll {
    scrollbar-color: #475569 transparent;
}

.dark .sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(71, 85, 105, 0.9), rgba(51, 65, 85, 0.9));
    border-color: rgba(15, 23, 42, 0.9);
}

/* Compact vertical rhythm for sidebar menu links */
.sidebar-nav-scroll > * + * {
    margin-top: 0.125rem !important;
}

.sidebar-nav-scroll .nav-link {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
}

.dark .sidebar-glass {
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(30, 41, 59, 1);
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.55), 2px 0 10px rgba(0, 0, 0, 0.35);
}

.nav-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background-color: #5d8233;
    color: white !important;
    transform: translateX(4px);
}

/* Improved collapsed sidebar styling */
.sidebar-collapsed {
    width: 16rem !important;
    transition: width 0.3s ease, background-color 0.2s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.3);
    box-shadow: inset -2px 0 4px rgba(0,0,0,0.05);
}

/* Center icons and adjust spacing when collapsed */
.sidebar-collapsed .nav-link {
    justify-content: flex-start !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0.75rem !important;
}
.sidebar-collapsed .nav-link i {
    margin-right: 0.5rem;
    font-size: 1rem;
}
/* Prevent hover transform shift on collapsed */
.sidebar-collapsed .nav-link:hover {
    transform: translateX(4px) !important;
}

/* Keep labels visible in compact mode */
.sidebar-collapsed .sidebar-text {
    display: inline !important;
}

/* Keep navigation category headers visible */
.sidebar-collapsed nav > p {
    display: block !important;
}

/* Keep logo text visible */
.sidebar-collapsed h1 {
    display: block !important;
}

/* Keep logo alignment natural */
.sidebar-collapsed .mb-7 {
    justify-content: space-between !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    gap: 0.75rem !important;
}

/* Keep directory dropdown available in compact mode */
.sidebar-collapsed #school-directory-dropdown {
    display: block !important;
}

/* Trim footer details slightly in compact mode */
.sidebar-collapsed .sidebar-footer-content {
    display: block !important;
}
.sidebar-collapsed .mt-auto .bg-primary\/5,
.sidebar-collapsed .mt-auto .bg-primary\/10 {
    justify-content: flex-start !important;
    padding: 0.75rem !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0.75rem !important;
}

/* Tooltip for compact sidebar links */
.sidebar-collapsed .nav-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.9;
    z-index: 10;
}
/* Ensure nav-link has relative positioning for tooltip */
.sidebar-collapsed .nav-link {
    position: relative;
}

/* Force readable desktop sidebar whenever the expanded state is active */
.sidebar-expanded {
    width: 16rem !important;
}

.sidebar-expanded .sidebar-text,
.sidebar-expanded nav > p,
.sidebar-expanded h1,
.sidebar-expanded #school-directory-dropdown,
.sidebar-expanded .sidebar-footer-content {
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.sidebar-expanded .nav-link {
    justify-content: flex-start !important;
}

.sidebar-expanded .nav-link i {
    margin-right: 0.5rem !important;
}

.sidebar-expanded .mb-7 {
    justify-content: space-between !important;
}

.sidebar-expanded .mt-auto .bg-primary\/5,
.sidebar-expanded .mt-auto .bg-primary\/10 {
    justify-content: flex-start !important;
}

/* Hover-expand the collapsed sidebar into the full labeled menu */
.sidebar-collapsed:hover,
.sidebar-collapsed.sidebar-hover-open {
    width: 250px !important;
    z-index: 60;
}

.sidebar-collapsed:hover .sidebar-text,
.sidebar-collapsed:hover nav > p,
.sidebar-collapsed:hover h1,
.sidebar-collapsed:hover #school-directory-dropdown,
.sidebar-collapsed:hover .sidebar-footer-content,
.sidebar-collapsed.sidebar-hover-open .sidebar-text,
.sidebar-collapsed.sidebar-hover-open nav > p,
.sidebar-collapsed.sidebar-hover-open h1,
.sidebar-collapsed.sidebar-hover-open #school-directory-dropdown,
.sidebar-collapsed.sidebar-hover-open .sidebar-footer-content {
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.sidebar-collapsed:hover .nav-link,
.sidebar-collapsed.sidebar-hover-open .nav-link {
    justify-content: flex-start !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0.75rem !important;
    transform: none !important;
}

.sidebar-collapsed:hover .nav-link i,
.sidebar-collapsed.sidebar-hover-open .nav-link i {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
    font-size: 1rem !important;
}

.sidebar-collapsed:hover .mb-7,
.sidebar-collapsed.sidebar-hover-open .mb-7 {
    justify-content: space-between !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    gap: 0.75rem !important;
}

.sidebar-collapsed:hover .mt-auto .bg-primary\/5,
.sidebar-collapsed:hover .mt-auto .bg-primary\/10,
.sidebar-collapsed.sidebar-hover-open .mt-auto .bg-primary\/5,
.sidebar-collapsed.sidebar-hover-open .mt-auto .bg-primary\/10 {
    justify-content: flex-start !important;
    padding: 0.75rem !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0.75rem !important;
}


.active-nav {
    background-color: #5d8233 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(93, 130, 51, 0.25);
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* DataTables Typography & Layout Overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.75rem !important; /* text-xs equivalent */
    color: #64748b !important;
}

.dataTables_wrapper label {
    font-size: 0.75rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.dataTables_wrapper select,
.dataTables_wrapper input {
    font-size: 0.75rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 0.375rem !important;
    margin-left: 0.25rem !important;
    border: 1px solid #e2e8f0 !important;
    background: transparent !important;
    color: #475569 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #5d8233 !important;
    color: white !important;
    border-color: #5d8233 !important;
}

/* Dark mode support */
.dark .dataTables_wrapper .dataTables_length,
.dark .dataTables_wrapper .dataTables_filter,
.dark .dataTables_wrapper .dataTables_info,
.dark .dataTables_wrapper .dataTables_paginate,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #cbd5e1 !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-color: #334155 !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background-color: #5d8233;
    color: white !important;
    transform: translateX(4px);
}


/* Improved collapsed sidebar styling */
.sidebar-collapsed {
    width: 5rem !important; /* increased slightly to account for sidebar's p-4 (32px total padding) */
    transition: width 0.3s ease, background-color 0.2s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.3);
    box-shadow: inset -2px 0 4px rgba(0,0,0,0.05);
}

/* Center icons and adjust spacing when collapsed */
.sidebar-collapsed .nav-link {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 3rem !important;
    height: 3rem !important;
    margin: 0 auto !important;
    border-radius: 0.75rem !important;
}
.sidebar-collapsed .nav-link i {
    margin: 0;
    font-size: 1.25rem;
}
/* Prevent hover transform shift on collapsed */
.sidebar-collapsed .nav-link:hover {
    transform: scale(1.05) !important;
}

/* Hide text labels but keep them for tooltip */
.sidebar-collapsed .sidebar-text {
    display: none !important;
}

/* Hide navigation category headers when collapsed */
.sidebar-collapsed nav > p {
    display: none !important;
}

/* Hide logo text when collapsed */
.sidebar-collapsed h1 {
    display: none !important;
}

/* Center logo when collapsed */
.sidebar-collapsed .mb-7 {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 0 !important;
}

/* Hide directory dropdown when collapsed */
.sidebar-collapsed #school-directory-dropdown {
    display: none !important;
}

/* Collapse footer user details and logout, centering the avatar */
.sidebar-collapsed .sidebar-footer-content {
    display: none !important;
}
.sidebar-collapsed .mt-auto .bg-primary\/5,
.sidebar-collapsed .mt-auto .bg-primary\/10 {
    justify-content: center !important;
    padding: 0.5rem !important;
    width: 3rem !important;
    height: 3rem !important;
    margin: 0 auto !important;
    border-radius: 9999px !important;
}

/* Tooltip for collapsed icons */
.sidebar-collapsed .nav-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.9;
    z-index: 10;
}
/* Ensure nav-link has relative positioning for tooltip */
.sidebar-collapsed .nav-link {
    position: relative;
}


.active-nav {
    background-color: #5d8233 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(93, 130, 51, 0.25);
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* DataTables Typography & Layout Overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.75rem !important; /* text-xs equivalent */
    color: #64748b !important;
}

.dataTables_wrapper label {
    font-size: 0.75rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.dataTables_wrapper select,
.dataTables_wrapper input {
    font-size: 0.75rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 0.375rem !important;
    margin-left: 0.25rem !important;
    border: 1px solid #e2e8f0 !important;
    background: transparent !important;
    color: #475569 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #5d8233 !important;
    color: white !important;
    border-color: #5d8233 !important;
}

/* Dark mode support */
.dark .dataTables_wrapper .dataTables_length,
.dark .dataTables_wrapper .dataTables_filter,
.dark .dataTables_wrapper .dataTables_info,
.dark .dataTables_wrapper .dataTables_paginate,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #cbd5e1 !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-color: #334155 !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #5d8233 !important;
    border-color: #5d8233 !important;
    color: white !important;
}

/* Mobile responsive layout fixes */
@media (max-width: 640px) {
    .dataTables_wrapper > div:first-child {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left !important;
        width: 100% !important;
        display: flex;
        justify-content: flex-start;
        margin-bottom: 0 !important;
    }
    .dataTables_wrapper .dataTables_filter input {
        flex: 1;
        margin-left: 0.5rem !important;
        margin-top: 0;
        width: auto !important;
    }
    .dataTables_wrapper .dataTables_filter label {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    .dataTables_wrapper .dataTables_length label {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Fix DataTable sorting icon overlap */
.dataTables_wrapper table.dataTable thead th.sorting,
.dataTables_wrapper table.dataTable thead th.sorting_asc,
.dataTables_wrapper table.dataTable thead th.sorting_desc {
    padding-right: 2rem !important;
}

/* ==================== PLAIN TABLE SECTIONS ==================== */
.table-section {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Strip card styling from direct table wrappers */
div:has(> .overflow-x-auto > table),
div:has(> .overflow-x-auto > .data-table),
div:has(> .overflow-x-auto .dataTables_wrapper),
div:has(> .w-full.overflow-x-auto > table),
div:has(> table.data-table),
div:has(> table.dataTable),
.dataTables_wrapper .grid > div:has(> table),
.dataTables_wrapper .grid > div:has(> table.dataTable),
.overflow-x-auto.border:has(> table),
.overflow-x-auto.border:has(> .data-table),
.overflow-x-auto.rounded-xl:has(> table),
.overflow-x-auto.rounded-2xl:has(> table),
.overflow-x-auto.bg-white:has(> table),
.glass-card:has(.overflow-x-auto > table),
.glass-card:has(.overflow-x-auto > .data-table),
.glass-card:has(table.data-table),
.glass-card:has(table.dataTable) {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
}

/* ==================== TABLE HEADERS & STRIPED ROWS ==================== */
:root {
    --table-head-bg: #dfe8df;
    --table-head-color: #334155;
    --table-stripe-odd: #ffffff;
    --table-stripe-even: #f1f4f1;
    --table-row-hover: #e8ede8;
    --table-head-border: #c5d0c5;
}

.dark {
    --table-head-bg: #2a3830;
    --table-head-color: #cbd5e1;
    --table-stripe-odd: #1e293b;
    --table-stripe-even: #243029;
    --table-row-hover: #2a3a2e;
    --table-head-border: #3d5244;
}

.data-table thead th,
table.dataTable thead th,
.superadmin-table thead th,
.table-section table thead th,
main table thead th {
    background-color: var(--table-head-bg) !important;
    color: var(--table-head-color) !important;
    border-bottom: 1px solid var(--table-head-border) !important;
}

.data-table thead tr,
table.dataTable thead tr,
.superadmin-table thead tr,
.table-section table thead tr,
main table thead tr {
    background-color: var(--table-head-bg) !important;
}

.data-table tbody tr:nth-child(odd),
table.dataTable tbody tr:nth-child(odd),
.superadmin-table tbody tr:nth-child(odd),
.table-section table tbody tr:nth-child(odd),
main table tbody tr:nth-child(odd) {
    background-color: var(--table-stripe-odd) !important;
}

.data-table tbody tr:nth-child(even),
table.dataTable tbody tr:nth-child(even),
.superadmin-table tbody tr:nth-child(even),
.table-section table tbody tr:nth-child(even),
main table tbody tr:nth-child(even) {
    background-color: var(--table-stripe-even) !important;
}

.data-table tbody tr:hover,
table.dataTable tbody tr:hover,
.superadmin-table tbody tr:hover,
.table-section table tbody tr:hover,
main table tbody tr:hover {
    background-color: var(--table-row-hover) !important;
}

td.dataTables_empty,
table.dataTable tbody td.dataTables_empty,
.dataTables_empty {
    text-align: center !important;
    padding: 3rem 1.5rem !important;
    color: #64748b !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

.dark td.dataTables_empty,
.dark table.dataTable tbody td.dataTables_empty,
.dark .dataTables_empty {
    color: #94a3b8 !important;
}

/* ==========================================================================
   Dual Intake Overview Cards - Dark Mode & Theme Styles
   ========================================================================== */
.intake-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.intake-card.is-current {
    box-shadow: 0 10px 25px -4px rgba(13, 92, 58, 0.12), 0 0 0 1.5px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.4);
}

.intake-card.is-inactive {
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.04);
}

.intake-card.is-inactive:hover {
    box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* Dark Mode Card Background & Borders */
.dark .intake-card {
    background-color: #0b1329 !important;
    border-color: #1e293b !important;
}

.dark .intake-card.is-current {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(11, 19, 41, 0.98)) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(16, 185, 129, 0.4), 0 0 20px -2px rgba(16, 185, 129, 0.15) !important;
}

.dark .intake-card.is-inactive {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(11, 19, 41, 0.92)) !important;
    border-color: rgba(51, 65, 85, 0.7) !important;
    box-shadow: 0 6px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

.dark .intake-card.is-inactive:hover {
    border-color: rgba(71, 85, 105, 0.9) !important;
    box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.5) !important;
}

/* Monogram badges */
.intake-monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    font-weight: 900;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.intake-monogram-active {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.dark .intake-monogram-active {
    background-color: rgba(6, 78, 59, 0.6) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.intake-monogram-sep {
    background-color: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.dark .intake-monogram-sep {
    background-color: rgba(49, 46, 129, 0.55) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
}

.intake-monogram-jan {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.dark .intake-monogram-jan {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* Calendar cycle pills */
.intake-cycle-pill {
    display: inline-flex;
    align-items: center;
}

.intake-cycle-pill-active {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.dark .intake-cycle-pill-active {
    background-color: rgba(6, 78, 59, 0.5) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.intake-cycle-pill-sep {
    background-color: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.dark .intake-cycle-pill-sep {
    background-color: rgba(49, 46, 129, 0.45) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

.intake-cycle-pill-jan {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.dark .intake-cycle-pill-jan {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}

/* Sub-panels inside the card (Active term row, stat boxes) */
.intake-subpanel {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
}
.dark .intake-subpanel {
    background-color: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(51, 65, 85, 0.65) !important;
}

/* Term badge inside subpanel */
.intake-term-badge {
    background-color: #ffffff;
    color: #065f46;
    border: 1px solid #e2e8f0;
}
.dark .intake-term-badge {
    background-color: #0f172a !important;
    color: #6ee7b7 !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

/* Countdown badge */
.intake-countdown-badge {
    background-color: #d1fae5;
    color: #064e3b;
    border: 1px solid #a7f3d0;
}
.dark .intake-countdown-badge {
    background-color: rgba(6, 78, 59, 0.6) !important;
    color: #a7f3d0 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Mini stat icon boxes */
.intake-stat-icon-emerald {
    background-color: #ecfdf5;
    color: #059669;
}
.dark .intake-stat-icon-emerald {
    background-color: rgba(6, 78, 59, 0.55) !important;
    color: #34d399 !important;
}

.intake-stat-icon-indigo {
    background-color: #eef2ff;
    color: #4f46e5;
}
.dark .intake-stat-icon-indigo {
    background-color: rgba(49, 46, 129, 0.5) !important;
    color: #818cf8 !important;
}

/* Active status pill next to title */
.intake-active-badge {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.dark .intake-active-badge {
    background-color: rgba(6, 78, 59, 0.6) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Dual mode active badge in header */
.intake-mode-badge {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.dark .intake-mode-badge {
    background-color: rgba(6, 78, 59, 0.5) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Action Buttons */
.intake-btn-current {
    background-color: #eaf8f0;
    color: #0d5c3a;
    border: 1px solid #a7f3d0;
}
.dark .intake-btn-current {
    background-color: rgba(6, 78, 59, 0.45) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}
.dark .intake-btn-current i {
    color: #34d399 !important;
}

.intake-btn-switch {
    background-color: #0d5c3a;
    color: #ffffff;
    border: 1px solid transparent;
}
.intake-btn-switch:hover {
    background-color: #09472d;
    box-shadow: 0 4px 14px rgba(13, 92, 58, 0.35);
}
.dark .intake-btn-switch {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: #ffffff !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}
.dark .intake-btn-switch:hover {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.45) !important;
}

/* ==========================================================================
   School Messaging & Broadcasts - Responsive 2-Column Desktop Layout
   ========================================================================== */
.messages-layout-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

.messages-composer-card {
    width: 100%;
    box-sizing: border-box;
}

.messages-sidebar-panel {
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .messages-layout-grid {
        flex-direction: row;
        gap: 1.5rem;
        align-items: flex-start;
        flex-wrap: nowrap !important;
    }

    .messages-composer-card {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .messages-sidebar-panel {
        width: 380px !important;
        max-width: 380px !important;
        flex: 0 0 380px !important;
        box-sizing: border-box;
    }
}

@media (min-width: 1440px) {
    .messages-sidebar-panel {
        width: 420px !important;
        max-width: 420px !important;
        flex: 0 0 420px !important;
    }
}


