/* ── Layout Components ────────────────────────────── */

/* ── Layout & Surfaces ────── */
.announcement-banner {
    margin-bottom: var(--space-6);
    background: var(--info-bg);
    color: var(--info);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--info);
    font-weight: var(--fw-medium);
    font-size: var(--fs-sm);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
}

.announcement-banner--urgent {
    background: var(--danger-bg);
    color: var(--danger);
    border-left-color: var(--danger);
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

──────────────────────── */ .side-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.side-nav__group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.side-nav__label {
    font-size: 10px;
    font-weight: var(--fw-bold);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
    padding-left: var(--space-4);
}

.side-nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--fw-medium);
    transition: var(--transition-base);
}

.side-nav__link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.side-nav__link--active {
    background: var(--bg-accent-light);
    color: var(--text-accent);
}

.side-nav__link svg {
    opacity: 0.7;
}

/* Sidebar Badge Card */
.badge-card {
    background: var(--bg-accent);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    color: var(--text-on-accent);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.badge-card__title {
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    margin-bottom: var(--space-1);
}

.badge-card__desc {
    font-size: var(--fs-xs);
    opacity: 0.8;
}

/* ── Header Components ─────────────────────────────── */

.header__search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-tertiary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    width: 100%;
    max-width: 400px;
    border: 1px solid transparent;
    transition: var(--transition-base);
}

@media (max-width: 640px) {
    .header__search {
        max-width: 200px;
    }

    .search-hint {
        display: none;
    }

    .profile-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .header__search {
        max-width: 140px;
    }

    .header__search input::placeholder {
        font-size: 11px;
    }
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.header__profile {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding-left: var(--space-6);
    border-left: 1px solid var(--border-medium);
}

.profile-avatar {
    width: 44px;
    height: 44px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

/* ── Dashboard Content ─────────────────────────────── */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .dashboard-header__actions {
        width: 100%;
        gap: var(--space-2);
    }

    .dashboard-header__actions .btn {
        flex: 1;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: var(--space-8);
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-card__value {
        font-size: var(--fs-xl);
    }
}

.stat-card {
    background: #ffffff;
    padding: var(--space-6);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    align-items: center;
    justify-content: center;
}

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

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: var(--space-8);
    width: 100%;
}

@media (max-width: 768px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stat-cards {
        gap: 12px;
    }

    .stat-card {
        padding: var(--space-4);
    }
}

.side-nav__label {
    font-size: 10px;
    font-weight: var(--fw-bold);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
    padding-left: var(--space-4);
}

.side-nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--fw-medium);
    transition: var(--transition-base);
}

.side-nav__link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.side-nav__link--active {
    background: var(--bg-accent-light);
    color: var(--text-accent);
}

.side-nav__link svg {
    opacity: 0.7;
}

/* Sidebar Badge Card */
.badge-card {
    background: var(--bg-accent);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    color: var(--text-on-accent);
    position: relative;
    overflow: hidden;
}

.badge-card__title {
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    margin-bottom: var(--space-1);
}

.badge-card__desc {
    font-size: var(--fs-xs);
    opacity: 0.8;
}

/* ── Header Components ─────────────────────────────── */

.header__search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-tertiary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    width: 100%;
    max-width: 400px;
    border: 1px solid transparent;
    transition: var(--transition-base);
}

@media (max-width: 640px) {
    .header__search {
        max-width: 200px;
    }

    .search-hint {
        display: none;
    }

    .profile-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .header__search {
        max-width: 140px;
    }

    .header__search input::placeholder {
        font-size: 11px;
    }
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.header__profile {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding-left: var(--space-6);
    border-left: 1px solid var(--border-medium);
}

.profile-avatar {
    width: 44px;
    height: 44px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

/* ── Dashboard Content ─────────────────────────────── */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .dashboard-header__actions {
        width: 100%;
        gap: var(--space-2);
    }

    .dashboard-header__actions .btn {
        flex: 1;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-card__value {
        font-size: var(--fs-xl);
    }
}

.stat-card {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: var(--transition-base);
}

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

.stat-card .job-title-cell {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ── Dashboard Grid & Charts ───────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .dashboard-grid>* {
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .charts-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .charts-grid>* {
        min-width: 0;
        /* Important for flex/grid items with canvas */
    }
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    /* Base height for desktop */
}

@media (max-width: 768px) {
    .chart-container {
        height: 220px;
        /* Reduced height for mobile */
    }
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    overflow: hidden;
    max-width: 100%;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media (max-width: 640px) {
    .chart-card {
        padding: var(--space-2) var(--space-3);
    }
}

.chart-card canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-card__title {
    font-size: 11px;
    font-weight: var(--fw-bold);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Tables ────────────────────────────────────────── */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
    .table-wrapper {
        max-height: 450px;
        /* Controlled vertical scrolling */
        overflow-y: auto;
    }
}

.table--loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.table--loading .loading-spinner {
    margin: var(--space-10) auto;
}

/* Custom scrollbar for tables */
.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}

@media (max-width: 640px) {

    .data-table th,
    .data-table td {
        padding: var(--space-1) var(--space-2) !important;
        /* Minimized height */
        font-size: 11px !important;
    }
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    border-radius: var(--radius-lg);
}

.data-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed; /* Ensures column widths are stable */
}

.data-table th,
.data-table td {
    padding: var(--space-4);
    text-align: left;
    font-size: var(--fs-sm);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific Column Widths to prevent Jitter */
.col-program { width: 100px; }
.col-stream  { width: 140px; }
.col-noc     { width: 180px; }
.col-date    { width: 110px; }
.col-status  { width: 150px; }
.col-waiting { width: 90px; }
.col-wp      { width: 90px; }
.col-risk    { width: 140px; }
.col-grad    { width: 70px; text-align: center; }
.col-case    { width: 90px; text-align: center; }

.data-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.data-table th[data-sort]:hover {
    background: var(--bg-tertiary);
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: var(--bg-primary);
}

.table--loading {
    opacity: 0.75;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: var(--fw-bold);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
}

.btn:active {
    transform: translateY(0);
}

/* Modern Animated Button - The "Beautiful" Request */
.btn--modern {
    border-radius: var(--radius-full);
    padding: var(--space-3) var(--space-8);
    background: linear-gradient(135deg, var(--ns-blue), #0a6ab3);
    color: var(--text-on-accent);
    box-shadow: 0 4px 15px rgba(5, 88, 149, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

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

.btn--modern:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(5, 88, 149, 0.3);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.btn--modern:hover::before {
    left: 100%;
}

.btn--modern:active {
    transform: translateY(-1px) scale(0.98);
}

.btn--primary {
    background: var(--bg-accent);
    color: var(--text-on-accent);
}

.btn--secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn--full {
    width: 100%;
}

.aggregate-filters,
.table-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    background: var(--bg-card);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--space-6);
    min-width: 0;
}

.aggregate-filters>*,
.table-filters>* {
    flex: 1;
    min-width: 200px;
    /* Allow wrapping */
}

@media (max-width: 640px) {

    .aggregate-filters,
    .table-filters {
        padding: var(--space-3);
        gap: var(--space-2);
    }

    .aggregate-filters>*,
    .table-filters>* {
        min-width: 140px;
        /* Denser on mobile */
    }
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--fs-md);
}

/* ── Form Components ───────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.form-label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .form-group {
        gap: 2px;
        margin-bottom: var(--space-3);
    }

    .form-label {
        font-size: 9px;
    }

    .form-select,
    .form-input {
        padding: var(--space-2) var(--space-3);
        font-size: 13px;
    }
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-tertiary);
    font-family: inherit;
    font-size: var(--fs-base);
    transition: var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px var(--accent-green-alpha);
}

/* ── Auth Cards ────────────────────────────────────── */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: #f0f4f8;
    /* Soft grey background like the screenshot */
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    padding: var(--space-10) var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

.auth-card__header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-card__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-4);
}

.auth-card__logo img {
    height: 100px;
    /* Matched to be slightly smaller than the previous 130px but fitting the clean look */
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

.auth-card__title {
    font-size: var(--fs-2xl);
    color: var(--ns-blue);
    font-weight: 800;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.auth-card__desc {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: 500;
}

/* ── Form Inputs specifically for Auth Card ── */
.auth-card__form .form-group {
    margin-bottom: var(--space-5);
}

.auth-card__form .form-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.auth-card__form .form-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.auth-card__form .form-input:focus {
    background: #ffffff;
    border-color: var(--ns-blue);
    box-shadow: 0 0 0 3px rgba(5, 88, 149, 0.1);
}

.auth-card__form .btn {
    border-radius: 9999px;
    /* Fully rounded pill shape */
    padding: 14px 24px;
    font-size: var(--fs-md);
    font-weight: 700;
    margin-top: var(--space-2);
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--space-6);
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-xl);
    }
}

.hidden {
    display: none !important;
}

/* ── Modal Enhancements ───────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;

    justify-content: center;
    /* Center Horizontally */
    z-index: 2000;
    padding: var(--space-4);

    /* Animation Support */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay--active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    overflow-y: auto;
    position: relative;
    padding: var(--space-8);

    /* Animation Support */
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

@media (max-width: 640px) {
    .modal {
        padding: var(--space-6);
        border-radius: var(--radius-xl);
    }
}

/* ── Admin & Dashboard Enhancements ────────────────── */

.admin-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.admin-panel--active {
    display: block;
}

/* ── Add Application Button Micro-Interaction ─────── */
#addAppBtn i {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#addAppBtn:hover i {
    transform: rotate(180deg);
}

/* ── Button Micro-Interactions ────────────────── */
.btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.btn--success {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
}

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

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Sidebar WhatsApp Card ────────────────────── */
.side-nav__cta {
    padding: var(--space-4) var(--space-2);
    margin-top: var(--space-4);
}

.cta-card {
    background: var(--nominated-bg);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(16, 185, 129, 0.25);
}

.cta-card__icon {
    width: 32px;
    height: 32px;
    background: white;
    color: #25D366;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.cta-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cta-card__text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* ── WhatsApp Community Button ────────────────── */
.btn--whatsapp {
    background-color: #25D366 !important;
    color: white !important;
    text-decoration: none !important;
}

.btn--whatsapp:hover {
    background-color: #1ebe57 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.side-nav__link--whatsapp {
    color: #25D366 !important;
}

.side-nav__link--whatsapp:hover {
    background-color: rgba(37, 211, 102, 0.1) !important;
}

/* ── WhatsApp Banner ────────────────────────── */
.whatsapp-banner {
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    transition: all 0.6s ease;
}

.whatsapp-banner--fade-out {
    opacity: 0;
    transform: translateY(-20px);
    margin-bottom: -100px;
    /* Collapse space */
    pointer-events: none;
}

.whatsapp-banner:hover {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.4);
}

.whatsapp-banner__icon {
    width: 48px;
    height: 48px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.whatsapp-banner__title {
    font-family: 'Outfit';
    color: #1ebe57;
    margin-bottom: 4px;
    font-size: 1.1rem;
    font-weight: 700;
}

.whatsapp-banner__text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .whatsapp-banner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .whatsapp-banner__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

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

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

.dashboard-title {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
}

.dashboard-subtitle {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

/* Enhanced Cards */
.table-card,
.widget-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.widget-card__title {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

/* Table Utilities */
.table-actions {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    align-items: center;
}

.cell-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Status & Role Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.status-pill--submitted {
    background: var(--info-bg);
    color: var(--info);
}

.status-pill--pending {
    background: var(--pending-bg);
    color: var(--pending);
}

.status-pill.status-pill--nominated {
    background: #ecfdf5 !important;
    color: #10b981 !important;
}

.status-pill.status-pill--endorsed {
    background: #ecfdf5 !important;
    color: #10b981 !important;
}

.status-pill--refused {
    background: var(--refused-bg);
    color: var(--refused);
}

.status-pill--selected-for-eoi {
    background: #fef3c7 !important;
    color: #d97706 !important;
}

.role-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

.role-badge--admin {
    background: var(--bg-accent-light);
    color: var(--text-accent);
}

.role-badge--user {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Forms */
.inline-form {
    display: flex;
    gap: var(--space-2);
}

.inline-form .form-input {
    flex: 1;
}

/* ── Dashboard Table Enhancements ────────────────── */

.table-card--dashboard,
.table-card--successes {
    padding: 0;
    overflow: hidden;
}

.table-card--dashboard .table-wrapper,
.table-card--successes .table-wrapper {
    border: none;
    border-radius: 0;
}

.data-table--simple th {
    background: var(--bg-tertiary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.data-table--compact td {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-sm);
}

.app-info-cell {
    display: flex;
    flex-direction: column;
}

.app-info-cell__program {
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

.app-info-cell__stream {
    font-size: 11px;
    color: var(--text-muted);
}

.app-actions-cell {
    display: flex;
    gap: var(--space-2);
}

/* Success Table Specifics */
.table-card--successes .section-header {
    padding: var(--space-5) var(--space-6) 0;
}

.success-item__icon {
    font-size: var(--fs-lg);
}

/* ── Recent Successes Card Grid (Modernized) ────────── */
.success-section {
    background: transparent;
    border-radius: var(--radius-2xl);
    padding: var(--space-2) 0;
    margin-bottom: var(--space-8);
}

.success-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

.success-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.success-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--ns-blue), var(--ns-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-card:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--ns-blue-light);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.success-card:hover::before {
    opacity: 1;
}

.success-card__icon {
    flex-shrink: 0;
}

.success-card__icon-wrapper {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.success-card:hover .success-card__icon-wrapper {
    transform: rotate(12deg) scale(1.1);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 165, 0, 0.15) 100%);
    box-shadow: 0 8px 16px rgba(217, 164, 14, 0.2);
}

.success-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.success-card__title {
    font-family: 'Outfit';
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.success-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.success-card__tags {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: 4px;
}

.success-card__program {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 6px;
    background: rgba(5, 88, 149, 0.08);
    color: var(--ns-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.success-card__date {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.success-card__meta {
    font-size: 11px;
    color: var(--text-muted);
}

.success-card__tags {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: 2px;
    flex-wrap: wrap;
}

.success-card__program {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bg-accent-light);
    color: var(--bg-accent);
    white-space: nowrap;
}

.success-card__date {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 768px) {

    .data-table--simple th:nth-child(2),
    .data-table--simple td:nth-child(2),
    .data-table--simple th:nth-child(6),
    .data-table--simple td:nth-child(6) {
        display: none;
        /* Hide Stream and WP Risk on small mobile to keep it clean */
    }

    /* Dashboard/Stats Board responsiveness handled in primary layout section */

    /* Recent Success Cards - mobile */
    .success-cards-grid {
        grid-template-columns: 1fr;
    }

    .success-card__title {
        white-space: normal;
    }

    .success-section {
        padding: var(--space-4);
    }

}


/* ── Stat Card Refinements ────────────────────────── */
.stat-card--featured {
    background: var(--ns-blue);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(5, 88, 149, 0.2);
}

.auth-card__title {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    color: #055895;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.stat-card__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    color: #475569;
}

.stat-card__header i {
    font-size: 14px;
}

.stat-card__label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card__value {
    font-size: var(--fs-2xl);
    font-weight: 900;
    color: var(--text-primary);
}

.stat-card__trend {
    font-size: 11px;
    color: var(--text-muted);
}

.stat-card .job-title-cell {
    color: var(--text-muted);
}

/* ── Premium Stat Card (Featured) ────────────────── */
.stat-card--premium {
    background: linear-gradient(135deg, #329dfa 0%, #055895 100%);
    border: none;
    box-shadow: 0 15px 35px -5px rgba(5, 88, 149, 0.4);
    padding: var(--space-5) var(--space-6);
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.stat-card--premium::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 0;
}

.stat-card__premium-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    z-index: 1;
    position: relative;
    width: 100%;
    flex-wrap: nowrap;
}

.stat-card__premium-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card__premium-label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    opacity: 0.95;
    color: white !important;
}

.stat-card__premium-value {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: var(--space-4);
    line-height: 1;
    z-index: 1;
    position: relative;
    text-align: center;
    letter-spacing: -0.01em;
    color: white !important;
}

.stat-card__premium-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: 14px;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1;
    position: relative;
    width: 90%;
}

.stat-card__premium-trend .trend-val {
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card__premium-trend .trend-val--up {
    color: #4ade80 !important;
}

.stat-card__premium-trend .trend-val--down {
    color: #f87171 !important;
}

.stat-card__premium-trend .trend-label {
    opacity: 0.85;
    color: white !important;
}

.stat-card--featured .stat-card__label {
    color: rgba(255, 255, 255, 0.85);
}

.stat-card--featured .stat-card__value {
    color: white !important;
}

.stat-card--featured .stat-card__trend {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ── Status Pill: Selected for EOI ────────────────── */
.status-pill--selected-for-eoi {
    background: var(--pending-bg);
    color: var(--pending);
}

/* ── Modal Header Layout ─────────────────────────── */
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.modal__title {
    margin: 0;
}

.modal__close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--fs-md);
    color: var(--text-secondary);
    transition: var(--transition-base);
    flex-shrink: 0;
    margin-left: auto;
}

.modal__close:hover {
    background: var(--danger-bg);
    color: var(--accent-danger);
    border-color: var(--accent-danger);
}

/* ── Badge Card — Force White Text ───────────────── */
.badge-card,
.badge-card__title,
.badge-card__desc {
    color: #ffffff !important;
}

/* ── My Applications — Empty State Text Fix ──────── */
.empty-state__desc {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Mobile: Recent Successes Truncation ─────────── */
@media (max-width: 768px) {
    .table-card--successes .data-table--compact td {
        padding: var(--space-2) var(--space-3);
    }

    .table-card--successes .data-table--compact td:nth-child(2) div:first-child {
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .table-card--successes .data-table--compact td:nth-child(4),
    .table-card--successes .data-table--compact td:nth-child(5) {
        display: none;
    }
}

/* ── Password Field with Toggle ──────────────────── */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.5;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.password-toggle:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* ── Auth Disclaimer ─────────────────────────────── */
.disclaimer {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
    opacity: 0.7;
}

/* ── Job Title Truncation ────────────────────────── */
.job-title-cell {
    max-width: 180px;
    /* Reduced to ensure it fits mobile */
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

@media (max-width: 640px) {
    .job-title-cell {
        max-width: 120px;
    }
}

/* ── Pagination Redesign ─────────────────────────── */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-subtle);
}

.pagination__info {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.pagination__controls {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: var(--bg-accent-light);
}

.pagination-btn--active {
    background: var(--bg-accent) !important;
    color: white !important;
    border-color: var(--bg-accent) !important;
    box-shadow: 0 4px 12px var(--accent-green-alpha);
}

.pagination-dots {
    color: var(--text-muted);
    padding: 0 var(--space-1);
}

@media (max-width: 640px) {
    .pagination {
        margin-top: var(--space-4);
        padding-top: var(--space-4);
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: var(--fs-xs);
    }
}

/* ── Footer ────────────────────────────────────────── */
.footer {
    padding: var(--space-8) var(--space-4);
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-10);
    width: 100%;
}

.footer__text {
    font-size: var(--fs-xs);
    /* Reduced text size */
    color: var(--text-muted);
    line-height: 1.8;
}

/* ── Community Insights & Activity Feed ───────────────── */
.insights-banner {
    background: linear-gradient(135deg, #fff9eb 0%, #fff3d1 100%);
    border: 1px solid #ffeeba;
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    display: flex;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
    align-items: center;
    box-shadow: 0 4px 15px rgba(217, 164, 14, 0.08);
}

.insights-banner__icon {
    width: 48px;
    height: 48px;
    background: var(--ns-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
}

.insights-banner__content {
    flex: 1;
}

.insights-banner__title {
    font-family: 'Outfit';
    font-size: 12px;
    font-weight: 800;
    color: #856404;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.insights-banner__list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #664d03;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
    transition: all 0.2s ease;
}

.activity-item:hover {
    transform: translateX(4px);
    border-color: var(--ns-blue);
    background: var(--bg-tertiary);
}

.activity-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    font-size: 14px;
    flex-shrink: 0;
}

.activity-item__content {
    flex: 1;
    min-width: 0;
}

.activity-item__text {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
}

.activity-item__status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-item__time {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 6px;
}

.status-text--success {
    color: #059669;
    background: #ecfdf5 !important;
}

.status-text--danger {
    color: #dc2626;
    background: #fef2f2 !important;
}

/* ── Toasts ───────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--border-medium);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    font-size: var(--fs-sm);
    font-weight: 500;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--ns-gold);
    animation: ring-pulse 2s infinite;
    opacity: 0;
}

@keyframes ring-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* ── Final Custom Overrides ───────────────────────── */
/* Removed redundant/conflicting mobile overrides to ensure primary responsive logic is used. */
.app-panel {
    display: none;
    animation: panelFadeIn 0.3s ease-out;
}

.app-panel--active {
    display: block;
}

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

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

.admin-panel {
    display: none;
    animation: panelFadeIn 0.3s ease-out;
}

.admin-panel--active {
    display: block;
}
/* ── Custom Multi-Select ───────────────────────────── */
.multi-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.multi-select__trigger {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--fs-sm);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
    min-height: 48px;
}

.multi-select__trigger:hover {
    border-color: var(--ns-blue);
    box-shadow: var(--shadow-sm);
}

.multi-select__trigger::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: var(--space-4);
    transition: transform 0.3s;
}

.multi-select--active .multi-select__trigger::after {
    transform: rotate(180deg);
}

.multi-select__content {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    padding: var(--space-2);
}

.multi-select--active .multi-select__content {
    display: block;
    animation: multiSelectFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes multiSelectFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.multi-select__search {
    padding: var(--space-2);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-light);
}

.multi-select__search input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--fs-xs);
}

.multi-select__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.multi-select__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.multi-select__item:hover {
    background: var(--bg-accent-light);
    color: var(--text-accent);
}

.multi-select__item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.multi-select__item input[type="checkbox"]:checked {
    background: var(--ns-blue);
    border-color: var(--ns-blue);
}

.multi-select__item input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.multi-select__item--selected {
    background: var(--bg-accent-light);
    color: var(--text-accent);
    font-weight: var(--fw-medium);
}

.multi-select__actions {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) var(--space-3) var(--space-2);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-2);
}

.multi-select__btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: var(--fw-bold);
    color: var(--ns-blue);
    cursor: pointer;
    text-transform: uppercase;
    padding: 0;
}

.multi-select__btn:hover {
    text-decoration: underline;
}

/* ── Applicant Timeline Dashboard ─────────────────── */
.app-timeline-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.app-timeline-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: cardSlideIn 0.5s ease-out both;
    position: relative;
    border-top: 3px solid transparent;
}

.app-timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    border-color: rgba(5,88,149,0.15);
    border-top: 3px solid;
    border-image: linear-gradient(90deg, var(--ns-blue), var(--ns-gold), #10b981) 1;
}

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

/* ── Card Header ── */
.app-timeline-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.app-timeline-card__program {
    font-family: 'Outfit';
    font-weight: 800;
    font-size: var(--fs-lg);
    color: var(--ns-blue);
    letter-spacing: -0.02em;
}

.app-timeline-card__stream {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.app-timeline-card__noc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.app-timeline-card__actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
    flex-wrap: wrap;
}
/* ── Vertical Timeline (Compact) ─────────────────── */
.app-timeline-card__body {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    min-width: 0;
}

.vt-timeline { position: relative; padding: var(--space-2) 0; flex: 1; min-width: 0; }
.vt-step__line { position: absolute; top: 28px; bottom: 0; left: 13px; width: 2px; background: var(--border-medium); transition: background 0.3s; }
.vt-step { display: flex; gap: var(--space-3); position: relative; align-items: stretch; min-height: 50px; }
.vt-step:not(:last-child) { padding-bottom: 12px; }
.vt-step__rail { position: relative; width: 28px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.vt-step__node { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; position: relative; z-index: 2; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: white; border: 2px solid var(--border-medium); }
.vt-step__name { font-weight: 700; font-size: 13px; color: var(--text-primary); line-height: 1.2; }
.vt-step__date { font-size: 11px; font-weight: 500; color: var(--text-muted); }

/* Completed */
.vt-step--completed .vt-step__node { background: #10b981; color: white; border: 2px solid #10b981; box-shadow: 0 1px 4px rgba(16,185,129,0.2); }
.vt-step--completed .vt-step__node i { display: none; }
.vt-step--completed .vt-step__node::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 11px; }
.vt-step--completed .vt-step__line { background: #10b981; }
.vt-step--completed .vt-step__name { color: #059669; }

/* Active */
.vt-step--active .vt-step__node { background: white; color: var(--step-color, #6366f1); border: 3px solid var(--step-color, #6366f1); box-shadow: 0 0 0 4px rgba(99,102,241,0.12); animation: vtNodePulse 2s ease-in-out infinite; }
.vt-step--active .vt-step__node i { color: var(--step-color, #6366f1); }
.vt-step--active .vt-step__name { color: var(--step-color, #6366f1); font-weight: 800; }
.vt-step--active .vt-step__content { background: rgba(99,102,241,0.04); border-radius: var(--radius-md); padding: 4px 10px; border: 1px solid rgba(99,102,241,0.1); }
.vt-step--active .vt-step__line { background: linear-gradient(to bottom, var(--step-color, #6366f1), var(--border-medium)); }
@keyframes vtNodePulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(99,102,241,0.1); } 50% { box-shadow: 0 0 0 6px rgba(99,102,241,0.06); } }

/* Upcoming */
.vt-step--upcoming .vt-step__node { background: var(--bg-tertiary); color: var(--text-muted); border: 2px dashed var(--border-medium); }
.vt-step--upcoming .vt-step__line { background: var(--border-light); }
.vt-step--upcoming .vt-step__name { color: var(--text-muted); }

/* Refused */
.vt-step--refused .vt-step__node { background: var(--danger-bg); color: var(--danger); border: 2px solid rgba(239,68,68,0.15); opacity: 0.35; }
.vt-step--refused .vt-step__line { opacity: 0.3; }
.vt-step--refused .vt-step__name { opacity: 0.35; }
.vt-step--refused-final .vt-step__node { background: #ef4444; color: white; border: 2px solid #ef4444; box-shadow: 0 2px 8px rgba(239,68,68,0.25); }

/* Day Gap Pill */
.vt-gap { margin-bottom: 6px; margin-top: -4px; }
.vt-gap__pill { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; color: var(--text-muted); background: var(--bg-tertiary); padding: 1px 8px; border-radius: var(--radius-full); letter-spacing: 0.02em; border: 1px solid var(--border-light); }
.vt-gap__pill--waiting { color: #6366f1; background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.15); }
.vt-gap__pill--waiting i { font-size: 8px; animation: spin 2s linear infinite; }

/* Sidebar KPIs */
.app-timeline-card__sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 0 0 170px;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.tl-kpi { display: flex; align-items: center; gap: var(--space-2); }
.tl-kpi__icon { width: 30px; height: 30px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.tl-kpi__body { min-width: 0; }
.tl-kpi__label { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tl-kpi__value { font-size: 12px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Note */
.app-timeline-card__note { margin-top: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--bg-tertiary); border-radius: var(--radius-md); font-size: 11px; color: var(--text-secondary); font-style: italic; border-left: 3px solid var(--ns-gold); }
.app-timeline-card__note i { color: var(--ns-gold); margin-right: 4px; font-size: 9px; }

/* Status Pill Variants */
.status-pill--eoi-selected { background: #ede9fe; color: #7c3aed; }
.status-pill--eoi-assessment { background: #fef3c7; color: #d97706; }
.status-pill--adr-after-eoi-assessment { background: #ffedd5; color: #ea580c; }
.status-pill--decision-made-awaiting-nomination { background: #e0f2fe; color: #0891b2; }
.status-pill--nominated---endorsed, .status-pill--nominated-\/-endorsed { background: #ecfdf5; color: #10b981; }

/* Mobile */
@media (max-width: 900px) {
    .app-timeline-card__body { flex-direction: column; }
    .app-timeline-card__sidebar { flex: none; width: 100%; flex-direction: row; flex-wrap: wrap; }
    .tl-kpi { flex: 1; min-width: 110px; }
}
@media (max-width: 768px) {
    .app-timeline-card__header { flex-direction: column; align-items: flex-start; }
    .app-timeline-card__actions { width: 100%; margin-top: var(--space-2); }
}
@media (max-width: 480px) {
    .app-timeline-card { padding: var(--space-3); }
    .app-timeline-card__sidebar { flex-direction: column; }
}

/* ── Update My Status Button ─────────────────────── */
.btn--status-update {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-5);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(99,102,241,0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.btn--status-update:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 20px rgba(99,102,241,0.35);
}

.btn--status-update:hover::before {
    left: 100%;
}

.btn--status-update i {
    transition: transform 0.4s ease;
}

.btn--status-update:hover i {
    transform: rotate(180deg);
}

/* ── Status Update Panel (SUS) ─────────────────────── */
.sus-panel {
    background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    opacity: 0;
    transform: translateY(-12px) scaleY(0.95);
    transform-origin: top;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
}

.sus-panel--open {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    max-height: 800px;
}

.sus-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.sus-panel__title {
    font-family: 'Outfit';
    font-weight: 800;
    font-size: var(--fs-md);
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sus-panel__close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-medium);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.sus-panel__close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

.sus-panel__date {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99,102,241,0.12);
    animation: fadeIn 0.3s ease-out;
}

.sus-panel__date .form-input {
    background: var(--bg-primary);
}

/* ── Status Option Cards ── */
.sus-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sus-option {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sus-option:hover:not(:disabled) {
    transform: translateX(4px);
    border-color: rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.03);
    box-shadow: 0 4px 12px rgba(99,102,241,0.08);
}

.sus-option--current {
    background: rgba(99,102,241,0.05);
    border-color: rgba(99,102,241,0.2);
    cursor: default;
    opacity: 0.7;
}

.sus-option--selected {
    border-color: #6366f1 !important;
    background: rgba(99,102,241,0.08) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1) !important;
}

.sus-option--refused:hover:not(:disabled) {
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.03);
}

.sus-option__icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sus-option__body {
    flex: 1;
    min-width: 0;
}

.sus-option__name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.sus-option__desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.sus-option__badge {
    font-size: 10px;
    font-weight: 800;
    color: #6366f1;
    background: rgba(99,102,241,0.1);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sus-option__arrow {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.3s, color 0.3s;
    flex-shrink: 0;
}

.sus-option:hover .sus-option__arrow {
    transform: translateX(4px);
    color: #6366f1;
}

/* ── Confirm Row ── */
.sus-confirm-row {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(99,102,241,0.1);
    display: flex;
    justify-content: flex-end;
    animation: fadeIn 0.3s ease-out;
}

.sus-confirm-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    box-shadow: 0 4px 14px rgba(99,102,241,0.3) !important;
}

/* ── Loading State ── */
.app-timeline-card--loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.app-timeline-card--loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(99,102,241,0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 20;
}

/* ── Mobile: Status Picker ── */
@media (max-width: 768px) {
    .btn--status-update {
        font-size: 12px;
        padding: var(--space-2) var(--space-4);
        width: 100%;
        justify-content: center;
    }
    .sus-option {
        padding: var(--space-2) var(--space-3);
    }
    .sus-option__desc {
        display: none;
    }
}
/* ── Compact Dashboard Styles ─────────────────── */
.compact-feed {
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border: 1px solid var(--border-subtle);
}

.table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    position: relative;
}

.table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-card);
}

.whatsapp-banner {
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

.whatsapp-banner__title {
    font-size: var(--fs-md);
    margin-bottom: 2px;
}

.whatsapp-banner__text {
    font-size: var(--fs-xs);
    opacity: 0.8;
}

.dashboard-header {
    margin-bottom: var(--space-4);
}

.dashboard-subtitle {
    font-size: var(--fs-xs);
}

/* ── Activity Feed Grid ── */
.compact-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
    background: transparent;
    border: none;
    padding: 0;
}

.activity-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--bg-accent-light);
}

/* Scrollbar styling for compact areas */
.table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
