/* ═══════════════════════════════════════════════════════════════
   MIKH RECRUITMENT PORTAL — Design System
   Primary brand: #2179ac (MIKH Blue)
   All pages share this file. Page-specific overrides live here too.
═══════════════════════════════════════════════════════════════ */

/* ── 0. CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
    /* Brand colours */
    --clr-primary:        #2179ac;
    --clr-primary-dark:   #1760893;
    --clr-primary-darker: #155a82;
    --clr-primary-light:  #e8f4fb;
    --clr-accent:         #dd9e5d;

    /* Neutrals */
    --clr-bg:             #f4f6fb;
    --clr-surface:        #ffffff;
    --clr-border:         #e1e8f0;
    --clr-text:           #1e293b;
    --clr-text-muted:     #64748b;
    --clr-text-light:     #94a3b8;

    /* Status colours */
    --clr-success:        #16a34a;
    --clr-success-bg:     #dcfce7;
    --clr-warning:        #d97706;
    --clr-warning-bg:     #fef3c7;
    --clr-danger:         #dc2626;
    --clr-danger-bg:      #fee2e2;
    --clr-info:           #0284c7;
    --clr-info-bg:        #e0f2fe;

    /* Layout */
    --sidebar-width:      260px;
    --header-height:      64px;
    --content-max:        1400px;
    --radius-sm:          6px;
    --radius-md:          10px;
    --radius-lg:          16px;
    --radius-xl:          24px;

    /* Shadow */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);

    /* Typography */
    --font-body:   'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono:   'Courier New', monospace;

    /* Logo */
    --site-logo-max-width: 44px;
}

/* ── 1. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--clr-bg);
    color: var(--clr-text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--clr-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── 2. SITE LOGO ─────────────────────────────────────────── */
.site-logo {
    display: inline-block;
    max-width: var(--site-logo-max-width);
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

/* ── 3. SHARED HEADER (sidebar-layout pages) ──────────────── */
.mikh-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-height);
    background: var(--clr-primary);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-md);
}

.mikh-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    gap: 1rem;
}

.mikh-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mikh-header__brand-text h1 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.mikh-header__brand-text p {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
}

.mikh-header__user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.mikh-header__user-name {
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Hamburger (mobile) */
.mikh-header__menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mikh-header__menu-toggle:hover {
    background: rgba(255,255,255,0.15);
}

/* ── 4. PAGE SHELL (sidebar + main) ──────────────────────── */
.mikh-shell {
    display: flex;
    max-width: var(--content-max);
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
}

/* ── 5. SIDEBAR ───────────────────────────────────────────── */
.mikh-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--clr-surface);
    border-right: 1px solid var(--clr-border);
    padding: 1.5rem 1rem;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.mikh-sidebar__section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--clr-text-light);
    padding: 0.5rem 0.75rem 0.25rem;
    margin-top: 0.75rem;
}

.mikh-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--clr-text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
    white-space: nowrap;
}

.mikh-nav-item:hover {
    background: var(--clr-primary-light);
    color: var(--clr-primary);
    text-decoration: none;
}

.mikh-nav-item.active {
    background: var(--clr-primary-light);
    color: var(--clr-primary);
    font-weight: 700;
}

.mikh-nav-item.active::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 3px;
    background: var(--clr-primary);
    border-radius: 0 3px 3px 0;
}

.mikh-nav-item__icon {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.mikh-nav-badge {
    margin-left: auto;
    background: var(--clr-danger);
    color: #fff;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

/* ── 6. MAIN CONTENT AREA ─────────────────────────────────── */
.mikh-main {
    flex: 1;
    min-width: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* ── 7. PAGE HEADING ─────────────────────────────────────── */
.mikh-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mikh-page-heading h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--clr-text);
}

.mikh-page-heading p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-top: 0.2rem;
}

/* ── 8. CARDS ─────────────────────────────────────────────── */
.mikh-card {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--clr-border);
    overflow: hidden;
}

.mikh-card__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mikh-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-text);
}

.mikh-card__body {
    padding: 1.5rem;
}

/* ── 9. STAT CARDS ────────────────────────────────────────── */
.mikh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.mikh-stat {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--clr-border);
    border-left: 4px solid var(--clr-primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mikh-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mikh-stat--total   { border-left-color: #2179ac; }
.mikh-stat--pending { border-left-color: #d97706; }
.mikh-stat--approved{ border-left-color: #16a34a; }
.mikh-stat--rejected{ border-left-color: #dc2626; }
.mikh-stat--review  { border-left-color: #7c3aed; }

.mikh-stat__value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--clr-text);
    margin-bottom: 0.25rem;
}

.mikh-stat__label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-text-muted);
}

/* ── 10. BUTTONS ──────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--clr-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--clr-primary-darker);
    box-shadow: 0 4px 12px rgba(33,121,172,0.35);
}

.btn-success {
    background: var(--clr-success);
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
    box-shadow: 0 4px 12px rgba(22,163,74,0.35);
}

.btn-danger {
    background: var(--clr-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220,38,38,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
}

.btn-outline:hover {
    background: var(--clr-primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--clr-text-muted);
    border: 1px solid var(--clr-border);
}

.btn-ghost:hover {
    background: var(--clr-bg);
    color: var(--clr-text);
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* ── 11. FORM ELEMENTS ────────────────────────────────────── */
.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--clr-text);
    background: var(--clr-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(33,121,172,0.12);
}

.form-control::placeholder {
    color: var(--clr-text-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    margin-top: 0.3rem;
}

/* ── 12. STATUS BADGES ────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.75rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-pending  { background: var(--clr-warning-bg); color: var(--clr-warning); }
.badge-review   { background: var(--clr-info-bg);    color: var(--clr-info); }
.badge-approved { background: var(--clr-success-bg); color: var(--clr-success); }
.badge-rejected { background: var(--clr-danger-bg);  color: var(--clr-danger); }
.badge-withdrawn{ background: #f1f5f9;               color: #64748b; }
.badge-primary  { background: var(--clr-primary-light); color: var(--clr-primary); }

/* ── 13. ALERTS / TOASTS ──────────────────────────────────── */
/* Inline alerts (session flash messages) */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
}

.alert-success {
    background: var(--clr-success-bg);
    color: var(--clr-success);
    border-color: #86efac;
}

.alert-error {
    background: var(--clr-danger-bg);
    color: var(--clr-danger);
    border-color: #fca5a5;
}

.alert-warning {
    background: var(--clr-warning-bg);
    color: var(--clr-warning);
    border-color: #fcd34d;
}

.alert-info {
    background: var(--clr-info-bg);
    color: var(--clr-info);
    border-color: #7dd3fc;
}

/* Fixed toast container — always visible at bottom-right */
#toastContainer {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 260px;
    max-width: 380px;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    animation: toastIn 0.3s ease;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-success { background: #16a34a; color: #fff; }
.toast-error   { background: #dc2626; color: #fff; }
.toast-info    { background: var(--clr-primary); color: #fff; }

.toast.hiding {
    opacity: 0;
    transform: translateX(30px);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── 14. TABLES ───────────────────────────────────────────── */
.mikh-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.mikh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mikh-table th {
    background: var(--clr-bg);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-text-muted);
    padding: 0.75rem 1rem;
    text-align: left;
    white-space: nowrap;
}

.mikh-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--clr-border);
    color: var(--clr-text);
    vertical-align: middle;
}

.mikh-table tr:last-child td {
    border-bottom: none;
}

.mikh-table tbody tr:hover td {
    background: var(--clr-bg);
}

/* ── 15. JOB CARDS ────────────────────────────────────────── */
.job-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.job-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--clr-primary);
    transform: translateY(-2px);
}

.job-card.applied {
    border-color: #86efac;
    background: #f0fdf4;
}

.job-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-primary);
    margin-bottom: 0.4rem;
}

.job-card.applied .job-card__title {
    color: var(--clr-success);
}

.job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.85rem;
}

.job-card__meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.job-card__description {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.job-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--clr-border);
    flex-wrap: wrap;
}

/* Deadline pill */
.deadline-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}

.deadline-pill--ok     { background: var(--clr-success-bg); color: var(--clr-success); }
.deadline-pill--soon   { background: var(--clr-warning-bg); color: var(--clr-warning); }
.deadline-pill--urgent { background: var(--clr-danger-bg);  color: var(--clr-danger); }

/* Education indicator */
.edu-indicator {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    margin-bottom: 0.85rem;
    border-left: 3px solid transparent;
}

.edu-indicator--met  { background: var(--clr-success-bg); border-left-color: var(--clr-success); color: #166534; }
.edu-indicator--warn { background: var(--clr-warning-bg); border-left-color: var(--clr-warning); color: #92400e; }

/* ── 16. APPLICATION CARDS ────────────────────────────────── */
.application-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-left: 4px solid var(--clr-primary);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    transition: box-shadow 0.2s;
}

.application-card:hover {
    box-shadow: var(--shadow-md);
}

.application-card.pending     { border-left-color: var(--clr-warning); }
.application-card.under_review{ border-left-color: var(--clr-info); }
.application-card.approved    { border-left-color: var(--clr-success); }
.application-card.rejected    { border-left-color: var(--clr-danger); }
.application-card.withdrawn   { border-left-color: var(--clr-text-light); }

.application-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.application-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.25rem;
}

.application-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    font-size: 0.84rem;
    color: var(--clr-text-muted);
}

.application-card__actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ── 17. FILTERS BAR ──────────────────────────────────────── */
.mikh-filters {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.mikh-filters .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

/* ── 18. PAGINATION ───────────────────────────────────────── */
.mikh-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.mikh-pagination a,
.mikh-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    border: 1px solid var(--clr-border);
    background: var(--clr-surface);
    color: var(--clr-text-muted);
    transition: background 0.2s, color 0.2s;
}

.mikh-pagination a:hover { background: var(--clr-primary-light); color: var(--clr-primary); text-decoration: none; }
.mikh-pagination span.active { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

/* ── 19. NOTIFICATION CARDS ───────────────────────────────── */
.notif-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.notif-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.notif-card.unread {
    background: var(--clr-primary-light);
    border-color: var(--clr-primary);
    border-left: 4px solid var(--clr-primary);
}

.notif-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.notif-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.3rem;
}

.notif-card__body {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 0.85rem;
}

.notif-card__date {
    font-size: 0.8rem;
    color: var(--clr-text-light);
}

.notif-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notif-type-badge.interview_scheduled { background: #fef3c7; color: #92400e; }
.notif-type-badge.shortlisted         { background: var(--clr-info-bg); color: var(--clr-info); }
.notif-type-badge.status_changed      { background: var(--clr-primary-light); color: var(--clr-primary); }

/* ── 20. PROFILE ALERT BANNER ─────────────────────────────── */
.profile-alert-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(90deg, #fef3c7 0%, #fff9e6 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid var(--clr-warning);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}

.profile-alert-banner__icon { font-size: 1.4rem; flex-shrink: 0; }

.profile-alert-banner__text {
    flex: 1;
    font-weight: 600;
    color: #92400e;
    font-size: 0.92rem;
}

/* ── 21. EMPTY STATE ──────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--clr-text-muted);
}

.empty-state__icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* ── 22. MODAL ────────────────────────────────────────────── */
.mikh-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mikh-modal-overlay.open {
    display: flex;
}

.mikh-modal {
    background: var(--clr-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mikh-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--clr-border);
}

.mikh-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-text);
}

.mikh-modal__close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mikh-modal__close:hover { background: var(--clr-bg); }

.mikh-modal__body {
    padding: 1.5rem;
}

.mikh-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--clr-border);
}

/* ── 23. SETTINGS ─────────────────────────────────────────── */
.settings-section {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.settings-section + .settings-section {
    margin-top: 0; /* gap handled by flex container */
}

.settings-section__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 1.1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--clr-border);
}

.danger-zone {
    border: 1px solid #fca5a5;
    background: #fff8f8;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
}

.danger-zone__title {
    font-weight: 700;
    color: var(--clr-danger);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ── 24. AUTH PAGES (login / register / forgot-pw) ─────────── */
.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #2179ac 0%, #174f6a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    background: rgba(255,255,255,0.98);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: authIn 0.5s ease;
}

@keyframes authIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card--wide { max-width: 520px; }

.auth-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #2179ac, #dd9e5d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 24px rgba(33,121,172,0.3);
    overflow: hidden;
}

.auth-title {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.auth-divider {
    text-align: center;
    margin: 1.25rem 0;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* ── 25. PROFILE TABS (profile.php) ───────────────────────── */
.profile-hero {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.profile-hero__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2179ac, #dd9e5d);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.profile-hero__name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-primary);
    margin-bottom: 0.25rem;
}

.profile-tabs-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-tab-btn {
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 99px;
    background: rgba(33,121,172,0.10);
    color: var(--clr-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.profile-tab-btn:hover {
    background: rgba(33,121,172,0.18);
}

.profile-tab-btn.active {
    background: var(--clr-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(33,121,172,0.35);
}

.profile-section {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: none;
    animation: fadeUp 0.35s ease;
}

.profile-section.active {
    display: block;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.profile-section__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--clr-text);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--clr-primary);
}

/* Repeatable items (qualifications, employment etc.) */
.profile-entry {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.profile-entry__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.profile-entry__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--clr-text);
}

.btn-remove {
    background: var(--clr-danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.btn-add-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: var(--clr-primary-light);
    color: var(--clr-primary);
    border: 1px dashed var(--clr-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.btn-add-entry:hover {
    background: rgba(33,121,172,0.15);
}

.btn-save-next {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.85rem;
    background: linear-gradient(90deg, #16a34a, #15803d);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-save-next:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-save-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── 26. MOBILE NAV (bottom tab bar) ──────────────────────── */
.mikh-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    z-index: 300;
    height: 60px;
}

.mikh-mobile-nav__inner {
    display: flex;
    height: 100%;
}

.mikh-mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--clr-text-muted);
    font-size: 0.62rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.mikh-mobile-nav__item:hover,
.mikh-mobile-nav__item.active {
    color: var(--clr-primary);
    text-decoration: none;
}

.mikh-mobile-nav__item .icon {
    font-size: 1.2rem;
    line-height: 1;
}

.mikh-mobile-nav__badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    background: var(--clr-danger);
    color: #fff;
    border-radius: 99px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
}

/* ── 27. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
    .mikh-sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        z-index: 150;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        width: 240px;
    }

    .mikh-sidebar.open {
        transform: translateX(0);
    }

    .mikh-header__menu-toggle {
        display: flex;
    }

    .mikh-shell {
        display: block;
    }

    .mikh-main {
        padding: 1.25rem 1rem 5rem; /* bottom padding for mobile nav */
    }

    .mikh-mobile-nav {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .mikh-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    :root { --site-logo-max-width: 36px; }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .mikh-main {
        padding: 1rem 0.75rem 5rem;
    }

    .mikh-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .profile-hero__name {
        font-size: 1.2rem;
    }

    .mikh-header__brand-text p {
        display: none;
    }

    #toastContainer {
        bottom: 70px;
        right: 0.75rem;
        left: 0.75rem;
    }

    .toast {
        max-width: 100%;
        min-width: unset;
    }
}

/* ── 28. OVERLAY (sidebar backdrop on mobile) ─────────────── */
.mikh-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 140;
}

.mikh-overlay.open {
    display: block;
}

/* ── 29. UTILITIES ────────────────────────────────────────── */
.text-muted   { color: var(--clr-text-muted); }
.text-primary { color: var(--clr-primary); }
.text-success { color: var(--clr-success); }
.text-danger  { color: var(--clr-danger); }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.85rem; }
.font-bold    { font-weight: 700; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-1        { gap: 0.5rem; }
.gap-2        { gap: 1rem; }
.mt-1         { margin-top: 0.5rem; }
.mt-2         { margin-top: 1rem; }
.mb-0         { margin-bottom: 0; }
.w-full       { width: 100%; }