@charset "UTF-8";

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,600;0,700;1,400&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* ═══════════════════════════════════════════
   PIDE Brand Design System
   Reference: pide-need-based-scholarship
   ═══════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
    --pide-navy:       #192a3d;
    --pide-navy-deep:  #121f2e;
    --pide-blue:       #1559ed;
    --pide-blue-hover: #0e46c9;
    --pide-teal:       #0d9488;

    --bg-page:         #f1f5f9;
    --bg-elevated:     #ffffff;
    --surface-muted:   #f8fafc;
    --border:          #e2e8f0;
    --border-strong:   #cbd5e1;

    --text:            #1e293b;
    --muted:           #64748b;
    --danger:          #dc2626;
    --ok:              #15803d;
    --warning:         #d97706;
    --info:            #0284c7;

    --shadow-sm:       0 1px 2px rgba(25,42,61,0.06);
    --shadow-md:       0 8px 24px rgba(25,42,61,0.08);
    --shadow-lg:       0 20px 50px rgba(25,42,61,0.12);

    --radius:          12px;
    --radius-pill:     999px;
    --radius-sm:       8px;

    --font-sans:       "Lato", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-serif:      "Merriweather", Georgia, serif;

    --wrap-max:        min(1120px, 92vw);
    --sidebar-w:       260px;
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-page);
    background-image:
        radial-gradient(900px 420px at 80% -15%, rgba(21,89,237,0.07), transparent),
        radial-gradient(700px 380px at 0% 0%, rgba(13,148,136,0.06), transparent);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); color: var(--pide-navy); margin: 0 0 0.75rem; line-height: 1.3; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.12rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.92rem; }

a { color: var(--pide-blue); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--pide-blue-hover); text-decoration: underline; }

p { margin: 0 0 0.75rem; }
small, .small { font-size: 0.85rem; color: var(--muted); }
code { font-family: "Cascadia Code", "Fira Code", monospace; font-size: 0.85em; background: var(--surface-muted); padding: 0.15em 0.4em; border-radius: 4px; }

img { max-width: 100%; height: auto; }

/* ── Layout ── */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 1rem; }
.full-height { min-height: 100vh; }

#wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Top Header Bar ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
}
.brand:hover {
    text-decoration: none;
}
.brand__logo {
    height: 48px;
    width: auto;
    max-width: min(200px, 48vw);
    object-fit: contain;
    display: block;
}
.brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.25;
}
.brand__title {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    color: var(--pide-navy);
}
.brand__subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    text-transform: uppercase;
}
.nav {
    display: flex;
    gap: 0.65rem 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.94rem;
}
.nav > a:not(.btn) {
    color: var(--pide-navy);
    font-weight: 500;
}
.nav > a:not(.btn):hover {
    color: var(--pide-blue);
    text-decoration: none;
}
.nav__user {
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav__logout {
    display: inline;
    margin: 0;
    padding: 0;
}
.nav__logout button {
    font: inherit;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.75rem;
}
.nav__logout button:hover {
    color: var(--pide-navy);
    border-color: var(--border-strong);
    background: var(--surface-muted);
}

.site-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--pide-navy);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.sidebar-toggle:hover {
    background: var(--surface-muted);
    border-color: var(--border-strong);
    color: var(--pide-blue);
}

/* ── App Layout (Sidebar + Content) ── */
.app-layout {
    display: flex;
    min-height: calc(100vh - 80px - 120px);
}
.main-content {
    flex: 1;
    padding: 2rem 0;
    min-width: 0;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100%;
    flex-shrink: 0;
    background: var(--pide-navy);
    color: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, margin-left 0.25s ease;
    overflow: hidden;
}
.sidebar.collapsed {
    width: 0;
    min-height: 0;
    margin-left: 0;
    overflow: hidden;
}
.sidebar-overlay {
    display: none;
}
.sidebar--brand {
    padding: 1.25rem 1rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar--brand img { height: 32px; width: auto; }
.sidebar--brand span { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 700; color: #fff; }
.sidebar--nav { flex: 1; overflow-y: auto; padding: 0.75rem 0; }
.sidebar--nav .nav-section { padding: 0.5rem 1rem 0.25rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); }
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; border-left-color: var(--pide-blue); }
.sidebar .nav-link.active { background: rgba(21,89,237,0.15); color: #fff; border-left-color: var(--pide-blue); font-weight: 600; }
.sidebar--footer { padding: 0.75rem 1rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.sidebar--footer span { display: block; }

/* ── Site Footer ── */
.site-footer {
    border-top: none;
    padding: 2rem 0 2.5rem;
    background: var(--pide-navy);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
}
.site-footer a {
    color: #93c5fd;
}
.site-footer a:hover {
    color: #fff;
}
.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--pide-blue); outline-offset: 2px; }
.btn--primary { background: var(--pide-blue); color: #fff; border-color: var(--pide-blue); }
.btn--primary:hover { background: var(--pide-blue-hover); border-color: var(--pide-blue-hover); color: #fff; }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn--ghost { background: #fff; color: var(--pide-navy); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-muted); border-color: var(--pide-blue); color: var(--pide-navy); }
.btn--navy { background: var(--pide-navy); color: #fff; }
.btn--navy:hover { background: var(--pide-navy-deep); color: #fff; }
.btn--sm { font-size: 0.82rem; padding: 0.35rem 0.85rem; }
.btn--lg { font-size: 1rem; padding: 0.7rem 1.75rem; }
.btn--block { display: flex; width: 100%; }
.btn--link { background: none; border: none; color: var(--pide-blue); padding: 0; font-weight: 600; }
.btn--link:hover { color: var(--pide-blue-hover); }

/* ── Cards ── */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    font-size: 0.92rem;
}
.card--body { padding: 1.5rem; }
.card--header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-family: var(--font-serif); font-size: 1.08rem; font-weight: 700; color: var(--pide-navy); }
.card--subtle { background: var(--surface-muted); }
.card--interactive:hover { box-shadow: var(--shadow-md); border-color: var(--pide-blue); transform: translateY(-2px); transition: all 0.2s ease; }
.card--stats { text-align: center; padding: 1.25rem 1rem; }
.card--stats .stat-number { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--pide-blue); line-height: 1.1; }
.card--stats .stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--pide-blue);
    box-shadow: 0 0 0 3px rgba(21,89,237,0.12);
}
.field textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.25rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.form-check input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--pide-blue); cursor: pointer; }
.form-text { font-size: 0.8rem; color: var(--muted); }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table th {
    background: var(--pide-navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 0.85rem;
    text-align: left;
    white-space: nowrap;
}
table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
table td { padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--border); color: var(--text); }
table tbody tr:hover { background: var(--surface-muted); }
table tbody tr:last-child td { border-bottom: none; }
.table-wrap { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Status Badges ── */
.status {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.status--active { background: #ecfdf5; color: #065f46; }
.status--inactive { background: #fef2f2; color: #991b1b; }
.status--pending { background: #fffbeb; color: #92400e; }
.status--info { background: #eff6ff; color: #1e40af; }
.status--success { background: #ecfdf5; color: #065f46; }
.status--warning { background: #fffbeb; color: #92400e; }

/* ── Auth Pages ── */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
    background-image:
        radial-gradient(900px 420px at 80% -15%, rgba(21,89,237,0.07), transparent),
        radial-gradient(700px 380px at 0% 0%, rgba(13,148,136,0.06), transparent);
    padding: 1.5rem;
}
.auth-card {
    width: 100%;
    max-width: 28rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}
.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-brand img { height: 48px; width: auto; margin-bottom: 0.5rem; }
.auth-brand h1 { font-family: var(--font-serif); font-size: 1.25rem; color: var(--pide-navy); margin: 0.25rem 0; }
.auth-brand p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; color: var(--muted); font-size: 0.82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Dashboard ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.page-title { font-family: var(--font-serif); color: var(--pide-navy); margin-bottom: 1.25rem; }
.page-subtitle { font-size: 0.88rem; color: var(--muted); margin-top: -0.75rem; margin-bottom: 1.25rem; }

/* ── Wizard ── */
.wizard-steps { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.25rem; }
.wizard-steps a {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--surface-muted);
    color: var(--muted);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}
.wizard-steps a:hover { background: #e2e8f0; color: var(--text); text-decoration: none; }
.wizard-steps a.active { background: var(--pide-blue); color: #fff; border-color: var(--pide-blue); }
.wizard-steps a.done { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.wizard-progress { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.wizard-progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: var(--radius-pill); overflow: hidden; }
.wizard-progress-bar div { height: 100%; background: var(--pide-blue); border-radius: var(--radius-pill); transition: width 0.3s ease; }
.wizard-progress-pct { font-size: 0.82rem; font-weight: 600; color: var(--pide-blue); white-space: nowrap; }

/* ── Flash / Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.alert--success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert--danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert--warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert--info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Misc ── */
.badge { display: inline-block; padding: 0.18rem 0.55rem; border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 600; line-height: 1.5; }
.badge--blue { background: var(--pide-blue); color: #fff; }
.badge--navy { background: var(--pide-navy); color: #fff; }
.badge--teal { background: var(--pide-teal); color: #fff; }
.badge--gray { background: #e2e8f0; color: var(--text); }
.separator { height: 1px; background: var(--border); margin: 1.25rem 0; }
.text-muted { color: var(--muted); }
.text-navy { color: var(--pide-navy); }
.text-blue { color: var(--pide-blue); }
.text-teal { color: var(--pide-teal); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 0.75rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 0.75rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 0.75rem; } .gap-3 { gap: 1rem; }
.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-lg-block { display: block; }
.d-lg-none { display: none; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex: 1; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.ms-auto { margin-inline-start: auto; }
.ms-2 { margin-inline-start: 0.5rem; }
.h-100 { height: 100%; }
.w-100 { width: 100%; }
.d-inline { display: inline; }

/* ── Responsive ── */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        width: var(--sidebar-w);
        transform: translateX(-100%);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 49;
    }
    .sidebar-overlay.active {
        display: block;
    }
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .site-header .brand__title { display: none; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem 1rem; }
}

/* ── User Cell (list view) ── */
.user-cell { display: flex; align-items: flex-start; gap: 0.75rem; }
.user-cell__avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pide-blue), var(--pide-teal));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; flex-shrink: 0; letter-spacing: 0.02em;
}
.user-cell__name { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.user-cell__name a { color: inherit; }
.user-cell__name a:hover { color: var(--pide-blue); }
.user-cell__email { font-size: 0.8rem; color: var(--muted); }
.user-cell__designation { font-size: 0.78rem; color: var(--muted); font-style: italic; }

/* ── Org Tree (team hierarchy) ── */
.org-tree { margin: 0; padding: 0; list-style: none; }
.org-tree ul { margin-left: 20px; padding-left: 12px; border-left: 1px solid var(--border); }
.org-node { margin: 6px 0; }
.org-node__content {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border-radius: var(--radius-sm); background: var(--bg-elevated);
    border: 1px solid var(--border); transition: all 0.15s ease;
}
.org-node__content:hover { border-color: var(--pide-blue); box-shadow: var(--shadow-sm); }
.org-node__toggle {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong);
    background: var(--surface-muted); color: var(--pide-teal); font-size: 14px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    flex-shrink: 0; transition: all 0.15s ease; padding: 0; line-height: 1;
}
.org-node__toggle:hover { background: var(--pide-blue); color: #fff; border-color: var(--pide-blue); }
.org-node__toggle-spacer { width: 24px; flex-shrink: 0; display: inline-block; }
.org-node__avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pide-navy), var(--pide-blue));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; flex-shrink: 0; letter-spacing: 0.03em;
}
.org-node__info { flex: 1; min-width: 0; }
.org-node__name { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.org-node__meta { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.org-node__actions { margin-left: auto; flex-shrink: 0; }
.org-node__children { margin-top: 8px; }
.org-node__children.collapsed { display: none; }
.org-node__children.expanded { display: block; }

/* ── Profile View ── */
.profile-avatar-lg {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pide-navy), var(--pide-blue));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; flex-shrink: 0; letter-spacing: 0.03em;
}
.profile-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.5rem; }
.profile-detail { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.profile-detail:last-child, .profile-detail:nth-last-child(2) { border-bottom: none; }
.profile-detail__label { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Report List ── */
.report-list { display: flex; flex-direction: column; gap: 0.5rem; }
.report-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    text-decoration: none; color: inherit; transition: all 0.15s ease;
}
.report-item:hover { border-color: var(--pide-blue); background: var(--surface-muted); text-decoration: none; color: inherit; }
.report-item__avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pide-teal), var(--pide-blue));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.report-item__name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.report-item__meta { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 768px) {
    .profile-detail-grid { grid-template-columns: 1fr; }
}

/* ── User Popup Modal ── */
.user-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(25, 42, 61, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}
.user-popup-overlay.active {
    display: flex;
}
.user-popup {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: popupSlideIn 0.25s ease;
}
@keyframes popupSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.user-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    z-index: 1;
}
.user-popup__header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.user-popup__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.15s ease;
}
.user-popup__close:hover {
    background: var(--surface-muted);
    color: var(--danger);
    border-color: var(--danger);
}
.user-popup__body {
    padding: 1.5rem;
}
.user-popup__profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.user-popup__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pide-navy), var(--pide-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.user-popup__info h4 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}
.user-popup__info p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}
.user-popup__section {
    margin-bottom: 1.25rem;
}
.user-popup__section:last-child {
    margin-bottom: 0;
}
.user-popup__section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pide-navy);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.user-popup__section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--pide-blue);
    border-radius: 2px;
}
.user-popup__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}
.user-popup__detail {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.user-popup__detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.user-popup__detail-value {
    font-size: 0.9rem;
    color: var(--text);
}
.user-popup__tree {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
}
.user-popup__tree ul {
    margin-left: 16px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
    margin-top: 4px;
}
.user-popup__tree li {
    margin: 4px 0;
}
.user-popup__tree-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}
.user-popup__tree-item:hover {
    background: var(--surface-muted);
}
.user-popup__tree-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pide-teal), var(--pide-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.user-popup__tree-avatar--up {
    background: linear-gradient(135deg, var(--pide-navy), var(--pide-blue));
}
.user-popup__tree-name {
    font-weight: 600;
    color: var(--text);
}
.user-popup__tree-meta {
    font-size: 0.78rem;
    color: var(--muted);
}
.user-popup__empty {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    padding: 0.75rem;
    font-style: italic;
}
@media (max-width: 768px) {
    .user-popup__details { grid-template-columns: 1fr; }
    .user-popup { max-width: 95%; }
}

/* ── Document Upload Thumbnails ── */
.doc-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}
.doc-upload-item {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
}
.doc-upload-item:hover {
    border-color: var(--pide-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.doc-upload-item__thumb {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.doc-upload-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.doc-upload-item__thumb--pdf {
    background: #fff;
}
.doc-upload-item__thumb--pdf canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.doc-upload-item__thumb:hover img {
    transform: scale(1.05);
}
.doc-upload-item__thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(25, 42, 61, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
}
.doc-upload-item__thumb:hover .doc-upload-item__thumb-overlay {
    opacity: 1;
}
.doc-upload-item__icon {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    background: var(--surface-muted);
    transition: background 0.2s ease;
}
.doc-upload-item__icon:hover {
    background: #e2e8f0;
}
.doc-upload-item__icon svg {
    width: 40px;
    height: 40px;
}
.doc-upload-item__icon span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.doc-upload-item__info {
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--border);
}
.doc-upload-item__name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.doc-upload-item__meta {
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0.15rem 0 0;
}
.doc-upload-item__actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}
.doc-upload-item__actions .btn {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
}
.doc-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.doc-field-wrapper label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.doc-field-wrapper .file-input-wrap {
    margin-top: 0.25rem;
}
.doc-field-wrapper .file-input-wrap input[type="file"] {
    font-size: 0.82rem;
    color: var(--muted);
}
.doc-field-wrapper .doc-upload-grid {
    margin-bottom: 0.5rem;
}
.doc-field-wrapper .doc-upload-item {
    max-width: 100%;
}

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 31, 46, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    animation: lightboxFadeIn 0.2s ease;
}
.lightbox-overlay.active {
    display: flex;
}
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(25, 42, 61, 0.8);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 2001;
}
.lightbox-close:hover {
    background: var(--danger);
    border-color: var(--danger);
}
.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.lightbox-img.zoomed {
    cursor: zoom-out;
    transform: scale(1.8);
}
.lightbox-pdf {
    width: 85vw;
    height: 85vh;
    max-width: 1000px;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    background: #fff;
}
.lightbox-caption {
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
    max-width: 600px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lightbox-download {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--pide-blue);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}
.lightbox-download:hover {
    background: var(--pide-blue-hover);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 768px) {
    .doc-upload-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
    .doc-upload-item__thumb, .doc-upload-item__icon { height: 90px; }
    .lightbox-pdf { width: 95vw; height: 80vh; }
    .lightbox-img.zoomed { transform: scale(1.4); }
}

/* ── Validation Modal ── */
.validation-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(25, 42, 61, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 1rem;
}
.validation-modal-overlay.active {
    display: flex;
}
.validation-modal {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: popupSlideIn 0.25s ease;
}
.validation-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    z-index: 1;
}
.validation-modal__header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.validation-modal__header h3 svg {
    color: var(--warning);
}
.validation-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.15s ease;
}
.validation-modal__close:hover {
    background: var(--surface-muted);
    color: var(--danger);
    border-color: var(--danger);
}
.validation-modal__body {
    padding: 1.5rem;
}
.validation-modal__message {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0 0 1rem;
    line-height: 1.5;
}
.validation-modal__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.validation-modal__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text);
}
.validation-modal__item svg {
    color: var(--pide-blue);
    flex-shrink: 0;
}
.validation-modal__item span {
    font-weight: 500;
}
.validation-modal__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .validation-modal { max-width: 95%; }
}

/* ── CNIC Verification Styles ── */
.cnic-verification-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1rem;
}

.cnic-verification-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text);
}

.cnic-verification-card__header svg {
    color: var(--pide-blue);
}

.cnic-verification-card__status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.cnic-verification-card__status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cnic-verification-card__status-icon--verified {
    background: #d1fae5;
    color: #065f46;
}

.cnic-verification-card__status-icon--mismatch {
    background: #fee2e2;
    color: #991b1b;
}

.cnic-verification-card__status-icon--manual_review {
    background: #fef3c7;
    color: #92400e;
}

.cnic-verification-card__status-icon--pending {
    background: #e0e7ff;
    color: #3730a3;
}

.cnic-verification-card__status-icon--unavailable {
    background: #f3f4f6;
    color: #6b7280;
}

.cnic-verification-card__status-info {
    flex: 1;
}

.cnic-verification-card__status-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.cnic-verification-card__status-message {
    font-size: 0.875rem;
    color: var(--muted);
}

.cnic-verification-card__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cnic-verification-card__detail {
    background: var(--bg-elevated);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.cnic-verification-card__detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.cnic-verification-card__detail-value {
    font-size: 0.9375rem;
    color: var(--text);
    font-weight: 500;
}

.cnic-verification-card__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cnic-verification-card__alert {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.875rem;
}

.cnic-verification-card__alert--warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.cnic-verification-card__alert--danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.cnic-verification-card__alert--info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* CNIC Status Badge */
.cnic-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 600;
}

.cnic-status-badge--verified {
    background: #d1fae5;
    color: #065f46;
}

.cnic-status-badge--mismatch {
    background: #fee2e2;
    color: #991b1b;
}

.cnic-status-badge--manual_review {
    background: #fef3c7;
    color: #92400e;
}

.cnic-status-badge--pending {
    background: #e0e7ff;
    color: #3730a3;
}

.cnic-status-badge--unavailable {
    background: #f3f4f6;
    color: #6b7280;
}

.cnic-status-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Verification Progress Indicator */
.verification-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.verification-progress__bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.verification-progress__fill {
    height: 100%;
    background: var(--pide-blue);
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.verification-progress__fill--verified {
    background: var(--ok);
}

.verification-progress__fill--mismatch {
    background: var(--danger);
}

.verification-progress__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 40px;
    text-align: right;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    display: inline-block;
}

.notification-bell__btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    color: var(--pide-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.notification-bell__btn:hover {
    background: var(--surface-muted);
}

.notification-bell__badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger, #dc3545);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 350px;
    max-height: 400px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown__header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.notification-dropdown__list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-dropdown__item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: background var(--transition);
}

.notification-dropdown__item:hover {
    background: var(--surface-muted);
    text-decoration: none;
}

.notification-dropdown__item:last-child {
    border-bottom: none;
}

.notification-dropdown__item-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--pide-navy);
    margin-bottom: 0.25rem;
}

.notification-dropdown__item-message {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

.notification-dropdown__item-time {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.notification-dropdown__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.notification-dropdown__footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.notification-dropdown__footer a {
    color: var(--pide-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.notification-dropdown__footer a:hover {
    text-decoration: underline;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.pagination__info {
    font-size: 0.82rem;
    color: var(--muted);
    margin-right: auto;
    white-space: nowrap;
}
.pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
}
.pagination__item:hover {
    background: var(--surface-muted);
    border-color: var(--pide-blue);
    color: var(--pide-blue);
    text-decoration: none;
}
.pagination__item:focus-visible {
    outline: 2px solid var(--pide-blue);
    outline-offset: 2px;
}
.pagination__item--active {
    background: var(--pide-blue);
    border-color: var(--pide-blue);
    color: #fff;
    cursor: default;
}
.pagination__item--active:hover {
    background: var(--pide-blue);
    border-color: var(--pide-blue);
    color: #fff;
}
.pagination__item--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.pagination__item--ellipsis {
    border: none;
    background: transparent;
    cursor: default;
    min-width: 24px;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.pagination__item--ellipsis:hover {
    background: transparent;
    border: none;
    color: var(--muted);
}
.pagination__item--nav {
    gap: 0.25rem;
    padding: 0 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.pagination__item--nav svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.pagination__size {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.pagination__size-label {
    font-size: 0.82rem;
    color: var(--muted, #64748b);
    white-space: nowrap;
}
.pagination__size-select {
    appearance: none;
    background: var(--bg-white, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 999px;
    padding: 0.3rem 1.8rem 0.3rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text, #1e293b);
    cursor: pointer;
    line-height: 1.2;
    transition: border-color 0.15s;
}
.pagination__size-select:hover {
    border-color: var(--blue, #1559ed);
}
.pagination__size-select:focus {
    outline: none;
    border-color: var(--blue, #1559ed);
    box-shadow: 0 0 0 2px rgba(21, 89, 237, 0.15);
}
@media (max-width: 640px) {
    .pagination { gap: 0.25rem; }
    .pagination__info { width: 100%; margin-bottom: 0.5rem; margin-right: 0; }
    .pagination__size { width: 100%; margin-bottom: 0.5rem; margin-left: 0; }
    .pagination__item { min-width: 32px; height: 32px; font-size: 0.78rem; }
    .pagination__item--nav { padding: 0 0.5rem; }
    .pagination__nav-label { display: none; }
}

/* ── Presentation Viewer ── */
#presentationApp {
    position: relative;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
}

.preso-progress {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    height: 4px;
    background: var(--border);
}
.preso-progress__fill {
    height: 100%;
    background: var(--pide-blue);
    transition: width 0.3s ease;
    width: 0;
}

.preso-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem 0;
}
.preso-slide-wrap {
    width: 100%;
    max-width: 1100px;
    position: relative;
    cursor: pointer;
}
.preso-slide {
    display: none;
    background: var(--bg-elevated, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-md);
    padding: 2.5rem 3rem;
    animation: presoFadeIn 0.3s ease;
}
.preso-slide--active {
    display: block;
}
.preso-slide__content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text, #1e293b);
}
.preso-slide__content h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--pide-navy);
    margin: 0 0 0.5rem;
}
.preso-slide__content h2 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--pide-navy);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--border);
}
.preso-slide__content h3 {
    font-size: 1.1rem;
    color: var(--pide-navy);
    margin: 1rem 0 0.5rem;
}
.preso-slide__content p { margin: 0.5rem 0; }
.preso-slide__content ul, .preso-slide__content ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.preso-slide__content li { margin: 0.25rem 0; }
.preso-slide__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.92rem;
}
.preso-slide__content th {
    background: var(--pide-navy);
    color: #fff;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
}
.preso-slide__content td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.preso-slide__content tr:last-child td { border-bottom: none; }
.preso-slide__content code {
    background: var(--surface-muted, #f1f5f9);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: monospace;
}
.preso-slide__content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.75rem 0;
}
.preso-slide__content pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.preso-slide__content blockquote {
    border-left: 4px solid var(--pide-blue);
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    background: rgba(21,89,237,0.05);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-style: italic;
}
.preso-slide__content hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.preso-slide__content strong { color: var(--pide-navy); }
.preso-slide__content a { color: var(--pide-blue); }

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

.preso-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    position: sticky;
    bottom: 0;
    background: var(--bg-elevated, #fff);
    border-top: 1px solid var(--border);
    z-index: 10;
}
.preso-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill, 999px);
    background: var(--bg-elevated, #fff);
    color: var(--pide-navy);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.preso-btn:hover {
    background: var(--pide-navy);
    color: #fff;
    border-color: var(--pide-navy);
}
.preso-btn--icon {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}
.preso-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 100px;
    text-align: center;
}

.preso-thumbs {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem 1rem 1rem;
    overflow-x: auto;
    justify-content: center;
    flex-wrap: wrap;
}
.preso-thumb {
    width: 34px;
    height: 28px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-elevated, #fff);
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.preso-thumb:hover {
    border-color: var(--pide-blue);
    color: var(--pide-blue);
}
.preso-thumb--active {
    background: var(--pide-blue);
    color: #fff;
    border-color: var(--pide-blue);
}

@media print {
    .site-header, .site-footer, .sidebar, .sidebar-overlay, .preso-controls,
    .preso-progress, .preso-thumbs, .sidebar-toggle { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .preso-main { padding: 0; }
    .preso-slide { display: block !important; page-break-after: always; box-shadow: none; border: none; padding: 1.5rem 0; }
    .preso-slide:last-child { page-break-after: auto; }
}

@media (max-width: 768px) {
    .preso-slide { padding: 1.5rem 1rem; }
    .preso-slide__content h1 { font-size: 1.4rem; }
    .preso-slide__content h2 { font-size: 1.1rem; }
    .preso-slide__content table { font-size: 0.78rem; }
    .preso-controls { gap: 0.5rem; }
    .preso-btn { padding: 0.4rem 0.75rem; font-size: 0.78rem; }
}

#presentationApp:fullscreen {
    background: #0f172a;
}
#presentationApp:fullscreen .preso-main {
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 2rem;
}
#presentationApp:fullscreen .preso-slide {
    border: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    border-radius: 16px;
}
#presentationApp:fullscreen .preso-controls {
    background: rgba(15,23,42,0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
}
#presentationApp:fullscreen .preso-btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #e2e8f0;
}
#presentationApp:fullscreen .preso-btn:hover {
    background: var(--pide-blue);
    border-color: var(--pide-blue);
    color: #fff;
}
#presentationApp:fullscreen .preso-counter { color: #94a3b8; }
#presentationApp:fullscreen .preso-thumb {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: #94a3b8;
}
#presentationApp:fullscreen .preso-thumb--active {
    background: var(--pide-blue);
    color: #fff;
    border-color: var(--pide-blue);
}
