/* ============================================================
   iMali Loans — Admin System CSS
   Brand: #be2025 (red), #0d2233 (navy), #323435 (charcoal)
============================================================ */

:root {
    --red:    #be2025;
    --red-dk: #9e1a1e;
    --navy:   #0d2233;
    --char:   #323435;
    --bg:     #f4f5f7;
    --white:  #ffffff;
    --border: #e5e8ec;
    --text:   #1a1f2e;
    --sub:    #6b7280;
    --sidebar-w: 256px;
    --topbar-h:  60px;
    --radius:    10px;
    --shadow:    0 1px 4px rgba(0,0,0,0.08), 0 2px 12px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Login page ─────────────────────────────────────────── */
.adm-login-body {
    background: linear-gradient(135deg, #0d2233 0%, #1a3a55 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.adm-login-wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.adm-login-card {
    background: var(--white);
    border-radius: 18px;
    padding: 44px 40px 36px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.adm-login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.adm-login-logo img { max-height: 52px; width: auto; }
.adm-login-brand { font-size: 1.5rem; color: var(--navy); }
.adm-login-brand strong { color: var(--red); }
.adm-login-title { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; text-align: center; }
.adm-login-sub { font-size: 0.82rem; color: var(--sub); text-align: center; margin-bottom: 28px; }
.adm-login-form { display: flex; flex-direction: column; gap: 18px; }
.adm-login-footer { color: rgba(255,255,255,0.4); font-size: 0.75rem; text-align: center; }

/* ── Sidebar ─────────────────────────────────────────────── */
.adm-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    z-index: 300;
    overflow-y: auto;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.adm-sidebar-logo {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.adm-sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.adm-sidebar-logo img { height: 36px; width: auto; }
.adm-logo-text { font-size: 1.1rem; color: rgba(255,255,255,0.9); }
.adm-logo-text strong { color: #ffcdd0; }
.adm-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

/* Nav */
.adm-nav { padding: 16px 12px; flex: 1; }
.adm-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 0 8px;
    margin: 0 0 6px;
}
.adm-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    font-size: 0.87rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}
.adm-nav-item i { width: 16px; text-align: center; font-size: 0.9rem; }
.adm-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.adm-nav-item.active { background: rgba(190,32,37,0.25); color: #fff; }
.adm-nav-item.active i { color: #ffcdd0; }

/* Sidebar footer */
.adm-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.adm-user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.adm-user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.adm-user-name { font-size: 0.82rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-user-role { font-size: 0.72rem; color: rgba(255,255,255,0.45); }
.adm-logout-btn {
    color: rgba(255,255,255,0.45);
    font-size: 1rem;
    transition: color 0.15s;
    flex-shrink: 0;
    padding: 6px;
}
.adm-logout-btn:hover { color: #ffcdd0; text-decoration: none; }

/* ── Main layout ─────────────────────────────────────────── */
.adm-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.adm-topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.adm-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--char);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}
.adm-menu-btn:hover { background: var(--bg); }
.adm-topbar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    flex: 1;
}
.adm-topbar-right { display: flex; align-items: center; gap: 10px; }
.adm-branch-pill {
    background: #e8f0ff;
    color: #2455be;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Content */
.adm-content { padding: 28px 24px; flex: 1; max-width: 1300px; }

/* ── Buttons ─────────────────────────────────────────────── */
.adm-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.adm-btn-primary { background: var(--red); color: #fff; }
.adm-btn-primary:hover { background: var(--red-dk); color: #fff; transform: translateY(-1px); text-decoration: none; }
.adm-btn-ghost { background: var(--bg); color: var(--sub); border: 1px solid var(--border); }
.adm-btn-ghost:hover { background: var(--border); color: var(--text); text-decoration: none; }
.adm-btn-search { background: var(--navy); color: #fff; }
.adm-btn-search:hover { background: #0a1b2a; color: #fff; text-decoration: none; }
.adm-btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 0.95rem; }
.adm-btn-xs { font-size: 0.75rem; padding: 5px 10px; border-radius: 6px; background: var(--bg); color: var(--sub); border: 1px solid var(--border); }
.adm-btn-xs:hover { background: var(--red); color: #fff; border-color: var(--red); text-decoration: none; }

/* ── Forms ───────────────────────────────────────────────── */
.adm-field { display: flex; flex-direction: column; gap: 6px; }
.adm-label { font-size: 0.82rem; font-weight: 600; color: var(--char); }
.adm-input-wrap { position: relative; }
.adm-input-icon {
    position: absolute;
    top: 50%; left: 13px;
    transform: translateY(-50%);
    color: var(--sub);
    font-size: 0.85rem;
    pointer-events: none;
}
.adm-input {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.adm-input-icon-left { padding-left: 38px; }
.adm-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(190,32,37,0.1); }
.adm-pw-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--sub);
    cursor: pointer;
    padding: 4px 6px;
}
.adm-textarea {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}
.adm-textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(190,32,37,0.1); }

/* ── Alerts ──────────────────────────────────────────────── */
.adm-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius);
    font-size: 0.87rem;
    margin-bottom: 20px;
}
.adm-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.adm-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.adm-alert i { margin-top: 1px; flex-shrink: 0; }

/* ── Stat cards ──────────────────────────────────────────── */
.adm-stat-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.adm-stat-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.adm-stat-card:hover { border-color: #c4cadb; box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.adm-stat-card.active { border-color: var(--red); }
.adm-stat-icon { font-size: 1.4rem; flex-shrink: 0; }
.adm-stat-num { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1; }
.adm-stat-label { font-size: 0.75rem; color: var(--sub); margin-top: 3px; }
.stat-total   .adm-stat-icon { color: #6366f1; }
.stat-new     .adm-stat-icon { color: #f59e0b; }
.stat-contacted .adm-stat-icon { color: #3b82f6; }
.stat-approved .adm-stat-icon { color: #22c55e; }
.stat-declined .adm-stat-icon { color: #ef4444; }
.stat-total.active   { background: #f5f3ff; border-color: #6366f1; }
.stat-new.active     { background: #fffbeb; border-color: #f59e0b; }
.stat-contacted.active { background: #eff6ff; border-color: #3b82f6; }
.stat-approved.active { background: #f0fdf4; border-color: #22c55e; }
.stat-declined.active { background: #fef2f2; border-color: #ef4444; }

/* ── Filter bar ──────────────────────────────────────────── */
.adm-filter-bar { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.adm-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.adm-search-wrap { position: relative; flex: 1; min-width: 200px; }
.adm-search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--sub);
    font-size: 0.85rem;
    pointer-events: none;
}
.adm-search {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 14px 9px 36px;
    font-size: 0.88rem;
    outline: none;
    color: var(--text);
    transition: border-color 0.15s;
}
.adm-search:focus { border-color: var(--red); }
.adm-select {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 14px;
    font-size: 0.88rem;
    color: var(--text);
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.adm-select:focus { border-color: var(--red); }
.adm-results-meta { font-size: 0.8rem; color: var(--sub); }
.adm-results-meta strong { color: var(--text); }

/* ── Table ───────────────────────────────────────────────── */
.adm-table-wrap {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-bottom: 20px;
}
.adm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.adm-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sub);
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.adm-table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid #f2f4f7;
    vertical-align: middle;
    font-size: 0.87rem;
}
.adm-table-row:last-child td { border-bottom: none; }
.adm-table-row:hover td { background: #fafbfd; }
.th-action { width: 80px; }
.td-ref { font-family: 'SF Mono', 'Fira Mono', monospace; }
.adm-ref { font-size: 0.78rem; color: var(--sub); font-weight: 600; }
.td-applicant .adm-applicant-name { font-weight: 600; color: var(--navy); }
.td-applicant .adm-applicant-sub { font-size: 0.78rem; color: var(--sub); }
.td-date div { color: var(--sub); font-size: 0.82rem; }
.td-date .adm-date-time { font-size: 0.75rem; color: #b0b8c8; }

/* Empty table */
.adm-table-empty {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--sub);
}
.adm-table-empty i { font-size: 2.5rem; color: var(--border); display: block; margin-bottom: 14px; }
.adm-table-empty p { margin: 0; font-size: 0.9rem; }

/* ── Badges ──────────────────────────────────────────────── */
.adm-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 50px;
    letter-spacing: 0.04em;
}
.badge-new        { background: #fff8e6; color: #b45309; }
.badge-contacted  { background: #eff6ff; color: #1d4ed8; }
.badge-approved   { background: #f0fdf4; color: #166534; }
.badge-declined   { background: #fef2f2; color: #b91c1c; }
.badge-no-contact { background: #f9fafb; color: #6b7280; }

.adm-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 50px;
}
.type-loan    { background: #fff0f0; color: #be2025; }
.type-funeral { background: #f0f4ff; color: #2455be; }

/* ── Pagination ──────────────────────────────────────────── */
.adm-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.adm-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 7px;
    background: var(--white);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.14s, border-color 0.14s;
}
.adm-page-btn:hover { background: var(--bg); text-decoration: none; }
.adm-page-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.adm-page-ellipsis { color: var(--sub); font-size: 0.85rem; padding: 0 4px; }
.adm-page-info { font-size: 0.78rem; color: var(--sub); margin-left: 8px; }

/* ── Application detail ──────────────────────────────────── */
.adm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--sub);
    margin-bottom: 18px;
    transition: color 0.14s;
}
.adm-back-link:hover { color: var(--red); text-decoration: none; }
.adm-app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.adm-app-ref { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.adm-app-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-locked-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
}
.adm-app-submitted { font-size: 0.8rem; color: var(--sub); }
.adm-app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.adm-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow);
}
.adm-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sub);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.adm-card-title i { color: var(--red); }
.adm-detail-list { display: flex; flex-direction: column; gap: 0; }
.adm-detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f2f4f7;
}
.adm-detail-row:last-child { border-bottom: none; }
.adm-detail-label { font-size: 0.8rem; color: var(--sub); font-weight: 600; flex-shrink: 0; }
.adm-detail-value { font-size: 0.88rem; color: var(--text); font-weight: 500; text-align: right; }
.adm-detail-value a { color: var(--red); }
.adm-amount { font-size: 1rem; font-weight: 800; color: var(--red); }
.adm-mono { font-family: 'SF Mono', 'Fira Mono', monospace; font-size: 0.78rem; }
.adm-pill-yes { color: #166534; font-weight: 600; font-size: 0.8rem; }
.adm-pill-no  { color: #b91c1c; font-weight: 600; font-size: 0.8rem; }

/* ── Workflow steps ──────────────────────────────────────── */
.adm-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
    position: relative;
    padding-left: 24px;
}
.adm-steps::before {
    content: '';
    position: absolute;
    left: 9px; top: 16px;
    width: 2px;
    height: calc(100% - 32px);
    background: var(--border);
}
.adm-step {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 20px;
}
.adm-step:last-child { padding-bottom: 0; }
.adm-step-dot {
    position: absolute;
    left: -24px;
    top: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--white);
    flex-shrink: 0;
    z-index: 2;
}
.adm-step.done .adm-step-dot     { background: #22c55e; }
.adm-step.done-green .adm-step-dot { background: #22c55e; }
.adm-step.done-red .adm-step-dot  { background: #ef4444; }
.adm-step-title { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.adm-step-meta  { font-size: 0.8rem; color: var(--sub); }
.adm-decline-reason {
    margin-top: 8px;
    background: #fff8f8;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #7f1d1d;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

/* ── Workflow form ───────────────────────────────────────── */
.adm-workflow-form { display: flex; flex-direction: column; gap: 14px; }
.adm-wf-label { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.adm-radio-group { display: flex; flex-direction: column; gap: 8px; }
.adm-radio-label { cursor: pointer; }
.adm-radio-label input[type=radio] { display: none; }
.adm-radio-box {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--sub);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.adm-radio-label input:checked + .adm-radio-yes {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #166534;
}
.adm-radio-label input:checked + .adm-radio-no {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}
.adm-radio-box:hover { border-color: var(--red); color: var(--text); }
.adm-decline-wrap { animation: fadeIn 0.2s ease; }
.adm-wf-warning {
    font-size: 0.75rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    padding: 8px 12px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

/* Locked / HO notices */
.adm-locked-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    font-size: 0.85rem;
    color: var(--sub);
}
.adm-locked-notice i { color: var(--sub); }
.adm-ho-notice { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.adm-ho-notice i { color: #0369a1; }

/* ── Documents ───────────────────────────────────────────── */
.adm-card-docs { grid-column: 1 / -1; }
.adm-docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.adm-doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.adm-doc-card:hover { border-color: var(--red); box-shadow: 0 4px 16px rgba(190,32,37,0.1); text-decoration: none; }
.adm-doc-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.doc-pdf { background: #fff0f0; color: var(--red); }
.doc-img { background: #f0f4ff; color: #2455be; }
.adm-doc-name { font-size: 0.87rem; font-weight: 600; color: var(--navy); }
.adm-doc-ext { font-size: 0.75rem; color: var(--sub); margin-top: 2px; }

/* ── Overlay ─────────────────────────────────────────────── */
.adm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
}

/* ── Misc ────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .adm-stat-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .adm-app-grid { grid-template-columns: 1fr; }
    .adm-docs-grid { grid-template-columns: repeat(2, 1fr); }
    .adm-stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .adm-sidebar {
        width: 256px;
        transform: translateX(-256px);
    }
    .adm-sidebar.open {
        transform: translateX(0);
    }
    .adm-overlay.open { display: block; }
    .adm-sidebar-close { display: block; }
    .adm-menu-btn { display: flex; }
    .adm-main { margin-left: 0; }
    .adm-content { padding: 16px; }
    .adm-docs-grid { grid-template-columns: 1fr; }
    .adm-stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .adm-stat-row { grid-template-columns: 1fr 1fr; }
    .adm-login-card { padding: 32px 24px; }
    .adm-filter-form { flex-direction: column; }
    .adm-search-wrap { min-width: 100%; }
}