/* ============================
   SoonaPay Plus — Merchant Dashboard
   dashboard.soonapayplus.com
   namespace: dash-*
   ============================ */
:root {
    --dash-primary: #7C3AED;
    --dash-primary-dark: #6D28D9;
    --dash-primary-light: #8B5CF6;
    --dash-bg: #F4F4F9;
    --dash-card: #FFFFFF;
    --dash-border: #E8E8F0;
    --dash-text: #1E1B2E;
    --dash-muted: #7A7790;
    --dash-ok: #10B981;
    --dash-warn: #F59E0B;
    --dash-err: #EF4444;
    --dash-radius: 16px;
    --dash-font: 'Cairo', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body { font-family: var(--dash-font); background: var(--dash-bg); color: var(--dash-text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ---------- Auth ---------- */
.dash-auth-body {
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(124,58,237,.14), transparent 60%),
                radial-gradient(900px 500px at 10% 110%, rgba(139,92,246,.10), transparent 55%),
                var(--dash-bg);
    padding: 24px;
}
.dash-auth-wrap { width: 100%; max-width: 420px; }
.dash-auth-card {
    background: var(--dash-card);
    border: 1px solid var(--dash-border);
    border-radius: 24px;
    padding: 40px 36px 32px;
    box-shadow: 0 20px 60px -20px rgba(124,58,237,.18);
}
.dash-auth-brand { text-align: center; margin-bottom: 28px; }
.dash-auth-logo {
    height: 44px; margin-bottom: 16px;
    filter: brightness(0) invert(38%) sepia(12%) saturate(800%) hue-rotate(230deg) brightness(70%);
}
.dash-auth-title { font-size: 24px; font-weight: 800; color: var(--dash-text); }
.dash-auth-sub { font-size: 13px; color: var(--dash-muted); margin-top: 6px; }

.dash-alert { padding: 12px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.dash-alert-err { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.dash-alert-ok { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

.dash-auth-form { display: flex; flex-direction: column; gap: 18px; }
.dash-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--dash-text); }
.dash-input-wrap { position: relative; display: flex; align-items: center; }
.dash-input-wrap > svg {
    position: absolute; right: 14px; width: 19px; height: 19px;
    color: #A5A0BC; pointer-events: none;
}
.dash-input-wrap input {
    width: 100%; height: 50px;
    border: 1.5px solid var(--dash-border);
    border-radius: 14px;
    padding: 0 44px 0 44px;
    font-size: 15px;
    background: #FBFBFE;
    transition: border-color .2s, box-shadow .2s;
}
.dash-input-wrap input:focus {
    outline: none; border-color: var(--dash-primary-light);
    box-shadow: 0 0 0 4px rgba(139,92,246,.12);
    background: #fff;
}
.dash-eye {
    position: absolute; left: 12px;
    width: 34px; height: 34px; border: 0; background: none;
    display: flex; align-items: center; justify-content: center;
    color: #A5A0BC; border-radius: 8px;
}
.dash-eye:hover { color: var(--dash-primary); background: rgba(124,58,237,.07); }
.dash-eye svg { width: 19px; height: 19px; }

.dash-btn {
    border: 0; border-radius: 14px;
    font-size: 15px; font-weight: 700;
    padding: 14px 24px;
    transition: transform .15s, box-shadow .2s, background .2s;
}
.dash-btn-primary {
    background: linear-gradient(135deg, var(--dash-primary) 0%, var(--dash-primary-light) 100%);
    color: #fff; width: 100%; margin-top: 4px;
    box-shadow: 0 8px 20px -8px rgba(124,58,237,.5);
}
.dash-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(124,58,237,.55); }
.dash-btn-primary:active { transform: translateY(0); }
.dash-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.dash-btn-ghost { background: none; color: var(--dash-muted); font-weight: 600; padding: 8px 14px; font-size: 13px; }
.dash-btn-ghost:hover { color: var(--dash-err); }

.dash-auth-note {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 12px; color: var(--dash-muted);
    margin-top: 22px; line-height: 1.8;
}
.dash-auth-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; color: var(--dash-ok); }

.dash-auth-foot {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 24px; font-size: 12px; color: var(--dash-muted);
}
.dash-auth-foot-logo { height: 18px; opacity: .4; filter: brightness(0) grayscale(1); }

/* ---------- App shell ---------- */
.dash-topnav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--dash-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; height: 64px;
}
.dash-topnav-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 16px; }
.dash-topnav-brand img { height: 32px; filter: brightness(0) invert(38%) sepia(12%) saturate(800%) hue-rotate(230deg) brightness(70%); }
.dash-topnav-user { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.dash-merchant-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; border: 1px solid var(--dash-border); }

.dash-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px 60px; display: flex; flex-direction: column; gap: 24px; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dash-stat {
    background: var(--dash-card); border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius); padding: 20px 22px;
    display: flex; flex-direction: column; gap: 6px;
}
.dash-stat-label { font-size: 13px; color: var(--dash-muted); font-weight: 600; }
.dash-stat-value { font-size: 26px; font-weight: 800; }
.dash-stat-value small { font-size: 14px; color: var(--dash-muted); font-weight: 600; }

.dash-card { background: var(--dash-card); border: 1px solid var(--dash-border); border-radius: var(--dash-radius); overflow: hidden; }
.dash-card-head { padding: 18px 24px; border-bottom: 1px solid var(--dash-border); }
.dash-card-head h2 { font-size: 16px; font-weight: 800; }

.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th {
    text-align: right; padding: 12px 24px;
    background: #FAFAFD; color: var(--dash-muted);
    font-size: 12px; font-weight: 700;
}
.dash-table td { padding: 14px 24px; border-top: 1px solid var(--dash-border); }
.dash-table tr:hover td { background: #FBFBFE; }

.dash-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #F1F0F7; color: var(--dash-muted); }
.dash-badge-ok { background: #ECFDF5; color: #047857; }
.dash-badge-warn { background: #FFFBEB; color: #B45309; }
.dash-badge-err { background: #FEF2F2; color: #B91C1C; }

@media (max-width: 640px) {
    .dash-topnav { padding: 0 16px; }
    .dash-main { padding: 20px 14px 48px; }
    .dash-auth-card { padding: 32px 22px 26px; }
    .dash-table { font-size: 12px; }
    .dash-table th, .dash-table td { padding: 10px 12px; }
}

/* ---------- Sidebar layout ---------- */
.dash-body { display: flex; min-height: 100vh; }
.dash-sidebar {
    width: 248px; flex-shrink: 0;
    background: var(--dash-card);
    border-inline-start: none; border-left: 1px solid var(--dash-border);
    display: flex; flex-direction: column;
    position: fixed; right: 0; top: 0; bottom: 0; height: 100vh; height: 100dvh;
    z-index: 60;
}
.dash-side-brand {
    display: flex; align-items: center; justify-content: center;
    padding: 22px 20px; border-bottom: 1px solid var(--dash-border);
}
.dash-side-brand img { height: 34px; filter: brightness(0) invert(38%) sepia(12%) saturate(800%) hue-rotate(230deg) brightness(70%); }
.dash-side-brand b { font-size: 15px; display: block; }
.dash-side-brand span { font-size: 11px; color: var(--dash-muted); }

.dash-side-nav { flex: 1; padding: 26px 14px 18px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.dash-side-group { font-size: 11px; font-weight: 700; color: #B4B0C8; padding: 0 10px 8px; letter-spacing: .5px; }

.dash-side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px;
    color: var(--dash-muted); text-decoration: none;
    font-size: 14px; font-weight: 600;
    transition: background .15s, color .15s;
    border: 0; background: none; width: 100%; text-align: right;
}
.dash-side-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.dash-side-link:hover { background: rgba(124,58,237,.07); color: var(--dash-primary); }
.dash-side-link.active {
    background: linear-gradient(135deg, var(--dash-primary) 0%, var(--dash-primary-light) 100%);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(124,58,237,.5);
}
.dash-side-link.soon { opacity: .55; pointer-events: none; }
.dash-side-link em {
    margin-right: auto; font-style: normal;
    font-size: 10px; background: rgba(124,58,237,.12); color: var(--dash-primary);
    padding: 2px 8px; border-radius: 10px;
}
.dash-side-link.active em { background: rgba(255,255,255,.25); color: #fff; }

.dash-side-foot { padding: 14px; border-top: 1px solid var(--dash-border); }
.dash-side-logout { color: var(--dash-err); }
.dash-side-logout:hover { background: #FEF2F2; color: var(--dash-err); }

.dash-side-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(30,27,46,.45); z-index: 55; backdrop-filter: blur(2px);
}

/* ---------- Shell ---------- */
.dash-shell { flex: 1; display: flex; flex-direction: column; min-width: 0; margin-right: 248px; }
.dash-topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(244,244,249,.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    display: flex; align-items: center; gap: 16px;
    padding: 16px 28px; border-bottom: 1px solid var(--dash-border);
}
.dash-page-title { font-size: 20px; font-weight: 800; flex: 1; }
.dash-topbar-user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.dash-burger {
    display: none; border: 0; background: var(--dash-card);
    width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--dash-border);
    align-items: center; justify-content: center; color: var(--dash-text);
}
.dash-burger svg { width: 20px; height: 20px; }

/* ---------- Home widgets ---------- */
.dash-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: linear-gradient(135deg, var(--dash-primary) 0%, var(--dash-primary-light) 100%);
    border-radius: var(--dash-radius); padding: 26px 28px; color: #fff;
    box-shadow: 0 16px 40px -16px rgba(124,58,237,.5);
}
.dash-hero h2 { font-size: 20px; font-weight: 800; }
.dash-hero p { font-size: 13px; opacity: .85; margin-top: 6px; }
.dash-hero-badge {
    background: rgba(255,255,255,.18); padding: 8px 18px;
    border-radius: 20px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.dash-hero-badge.ok { background: rgba(16,185,129,.35); }

.dash-stat { flex-direction: row; align-items: center; gap: 16px; }
.dash-stat-ic {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(124,58,237,.1); color: var(--dash-primary);
}
.dash-stat-ic svg { width: 22px; height: 22px; }
.dash-stat-ic.ok { background: #ECFDF5; color: var(--dash-ok); }
.dash-stat-ic.warn { background: #FFFBEB; color: var(--dash-warn); }
.dash-stat-ic.info { background: #EFF6FF; color: #3B82F6; }
.dash-stat { display: flex; }
.dash-stat > div { display: flex; flex-direction: column; gap: 4px; }

.dash-sdg {
    height: 1.05em; width: auto; vertical-align: -0.15em;
    filter: grayscale(1) brightness(.45);
    display: inline-block;
}

.dash-card-hint { font-size: 12px; color: var(--dash-muted); }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; }
.dash-table-wrap { overflow-x: auto; }
.dash-ref { font-family: monospace; font-size: 12px; letter-spacing: .3px; }
.dash-date { color: var(--dash-muted); font-size: 13px; white-space: nowrap; }
.dash-empty { text-align: center; color: #94A3B8; padding: 48px 20px !important; }

@media (max-width: 860px) {
    .dash-sidebar {
        position: fixed; right: -280px; top: 0; bottom: 0;
        transition: right .25s ease;
        visibility: hidden;
        box-shadow: -20px 0 60px rgba(30,27,46,.15);
    }
    .dash-side-open .dash-sidebar { right: 0; visibility: visible; }
    .dash-side-open .dash-side-overlay { display: block; }
    .dash-burger { display: flex; }
    .dash-shell { margin-right: 0; }
    .dash-hero { flex-direction: column; align-items: flex-start; }
}

/* ---------- Responsive hardening ---------- */
.dash-table { min-width: 640px; } /* يجبر الـ scroll بدل سحق الأعمدة */
.dash-ref { word-break: break-all; }

/* ---------- Tablet (860–1080px) ---------- */
@media (max-width: 1080px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-main { padding: 24px 20px 60px; }
}
@media (min-width: 1600px) {
    .dash-main { max-width: 1280px; }
}

/* ---------- Mobile (≤860px) — sidebar drawer ---------- */
/* موجود فوق: .dash-sidebar fixed drawer + burger */

/* ---------- Phones (≤600px) ---------- */
@media (max-width: 600px) {
    /* --- login --- */
    .dash-auth-body { padding: 14px; align-items: flex-start; padding-top: 8vh; }
    .dash-auth-card { padding: 26px 20px 22px; border-radius: 20px; }
    .dash-auth-logo { height: 34px; margin-bottom: 12px; }
    .dash-auth-title { font-size: 20px; }
    .dash-auth-sub { font-size: 12px; }
    .dash-input-wrap input { height: 46px; font-size: 14px; border-radius: 12px; }
    .dash-btn-primary { padding: 13px 20px; font-size: 14px; }
    .dash-auth-note { font-size: 11px; }
    .dash-auth-foot { font-size: 11px; }

    /* --- shell --- */
    .dash-sidebar { width: 232px; }
    .dash-topbar { padding: 10px 14px; gap: 10px; }
    .dash-page-title { font-size: 17px; }
    .dash-merchant-logo { width: 32px; height: 32px; }
    .dash-topbar-user span {
        font-size: 13px; max-width: 110px;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .dash-main { padding: 14px 12px 44px; gap: 14px; }

    /* --- hero --- */
    .dash-hero {
        flex-direction: column; align-items: flex-start; gap: 10px;
        padding: 18px; border-radius: 14px;
    }
    .dash-hero h2 { font-size: 16px; }
    .dash-hero p { font-size: 12px; }
    .dash-hero-badge { font-size: 11px; padding: 5px 12px; }

    /* --- stats: 2×2 مضغوطة --- */
    .dash-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dash-stat { padding: 12px 14px; border-radius: 14px; gap: 10px; }
    .dash-stat-ic { width: 38px; height: 38px; border-radius: 11px; }
    .dash-stat-ic svg { width: 18px; height: 18px; }
    .dash-stat-label { font-size: 11px; }
    .dash-stat-value { font-size: 18px; }
    .dash-stat-value small, .dash-stat-value .dash-sdg { font-size: 12px; }

    /* --- table --- */
    .dash-card { border-radius: 14px; }
    .dash-card-head { padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 2px; }
    .dash-card-head h2 { font-size: 14px; }
    .dash-table { min-width: 540px; font-size: 12px; }
    .dash-table th { padding: 9px 14px; font-size: 10px; }
    .dash-table td { padding: 11px 14px; }
    .dash-badge { font-size: 11px; padding: 3px 10px; }
    .dash-date { font-size: 11px; }
}

/* ---------- Very small (≤360px) ---------- */
@media (max-width: 360px) {
    .dash-stats { grid-template-columns: 1fr; }
    .dash-auth-card { padding: 22px 14px 18px; }
    .dash-topbar-user span { display: none; }
}

/* ---------- Overflow hardening (all devices) ---------- */
.dash-shell, .dash-main, .dash-hero, .dash-card, .dash-table-wrap { min-width: 0; max-width: 100%; }
.dash-main > * { min-width: 0; }
.dash-stat { min-width: 0; overflow: hidden; }
.dash-stat-txt { min-width: 0; overflow: hidden; }
.dash-stat-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dash-hero-txt { min-width: 0; }
.dash-num { white-space: nowrap; }
.dash-na { color: #B4B0C8; }
.dash-topbar-user { min-width: 0; }
.dash-topbar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Inner pages ---------- */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .dash-grid-2 { grid-template-columns: 1fr; } }

.dash-form { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.dash-form .dash-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.dash-form input[type=text], .dash-form input[type=email], .dash-form input[type=url], .dash-form input[type=tel], .dash-form input[type=password], .dash-form input[type=number] {
    width: 100%; height: 46px;
    border: 1.5px solid var(--dash-border); border-radius: 12px;
    padding: 0 14px; font-size: 14px; background: #FBFBFE;
    transition: border-color .2s, box-shadow .2s;
}
.dash-form input:focus { outline: none; border-color: var(--dash-primary-light); box-shadow: 0 0 0 4px rgba(139,92,246,.12); background: #fff; }
.dash-form .dash-btn-primary { width: auto; margin-top: 4px; }

.dash-form-logo { display: flex; align-items: center; gap: 14px; }
.dash-form-logo img, .dash-form-logo-ph {
    width: 64px; height: 64px; border-radius: 16px; object-fit: cover;
    border: 1px solid var(--dash-border);
}
.dash-form-logo-ph { background: repeating-linear-gradient(45deg,#F4F4F9,#F4F4F9 8px,#ECECF4 8px,#ECECF4 16px); }

.dash-btn-soft {
    background: rgba(124,58,237,.1); color: var(--dash-primary);
    padding: 9px 18px; font-size: 13px; border-radius: 12px;
    display: inline-flex; align-items: center; cursor: pointer;
}
.dash-btn-warn { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; padding: 11px 20px; font-size: 13px; border-radius: 12px; }
.dash-btn-warn:hover { background: #FEF3C7; }

.dash-form-note {
    margin: 0 24px 22px; padding: 14px 16px;
    background: #FBFBFE; border: 1px dashed var(--dash-border);
    border-radius: 12px; font-size: 13px; color: var(--dash-muted); line-height: 1.9;
}
.dash-muted { font-size: 13px; color: var(--dash-muted); line-height: 1.8; }

.dash-secret {
    display: inline-block; direction: ltr;
    background: #F4F4F9; border: 1px solid var(--dash-border);
    border-radius: 10px; padding: 10px 14px;
    font-family: monospace; font-size: 13px;
    cursor: copy; word-break: break-all;
}
.dash-secret:hover { border-color: var(--dash-primary-light); }
.dash-key-row { display: flex; flex-direction: column; gap: 8px; }
.dash-key-hint { font-size: 11px; color: var(--dash-muted); }
.dash-docs .dash-field input[readonly] { font-family: monospace; font-size: 12px; color: var(--dash-text); cursor: copy; }

/* filters */
.dash-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; border-radius: 20px;
    background: var(--dash-card); border: 1.5px solid var(--dash-border);
    color: var(--dash-muted); text-decoration: none;
    font-size: 13px; font-weight: 700;
    transition: all .15s;
}
.dash-chip b { font-size: 12px; }
.dash-chip:hover { border-color: var(--dash-primary-light); color: var(--dash-primary); }
.dash-chip.active { background: var(--dash-primary); border-color: var(--dash-primary); color: #fff; }

.dash-pagination { padding: 16px 24px; border-top: 1px solid var(--dash-border); }
.dash-pagination nav { display: flex; justify-content: center; }
.dash-pagination .pagination { display: flex; gap: 6px; list-style: none; }
.dash-pagination .page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    border-radius: 10px; border: 1px solid var(--dash-border);
    background: var(--dash-card); color: var(--dash-muted);
    font-size: 13px; text-decoration: none;
}
.dash-pagination .page-item.active .page-link { background: var(--dash-primary); color: #fff; border-color: var(--dash-primary); }
.dash-pagination .page-item.disabled .page-link { opacity: .45; }

/* ---------- Integration guide ---------- */
.dash-integration { padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 22px; }
.dash-step { display: flex; gap: 16px; }
.dash-step > div { flex: 1; min-width: 0; }
.dash-step h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.dash-step p { font-size: 13px; color: var(--dash-muted); line-height: 1.8; margin-bottom: 10px; }
.dash-step code { background: #F4F4F9; padding: 1px 7px; border-radius: 6px; font-size: 12px; }
.dash-step-n {
    width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
    background: rgba(124,58,237,.1); color: var(--dash-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    margin-top: 2px;
}
.dash-code {
    background: #1E1B2E; color: #E8E6F0;
    border-radius: 12px; padding: 16px 18px;
    overflow-x: auto;
}
.dash-code pre { font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.7; white-space: pre; }
.dash-code em { color: #8B8AA3; font-style: normal; }
.dash-code b { color: #C4B5FD; font-weight: 600; }
.dash-step-events { font-size: 12px !important; margin-top: 8px !important; margin-bottom: 0 !important; }
.dash-step-note {
    background: #FBFBFE; border: 1px dashed var(--dash-border);
    border-radius: 12px; padding: 14px 16px;
    font-size: 13px; color: var(--dash-muted); line-height: 2;
}
.dash-step-note code { background: #F1F0F7; padding: 1px 7px; border-radius: 6px; font-size: 12px; }
@media (max-width: 600px) { .dash-code pre { font-size: 11px; } }

/* ===== Dark mode ===== */
[data-theme="dark"] {
    --dash-bg: #0E0C1A;
    --dash-card: #171429;
    --dash-border: #28243E;
    --dash-text: #ECEAF6;
    --dash-muted: #9A94B8;
}
[data-theme="dark"] .dash-body,
[data-theme="dark"] .dash-auth-body {
    background: radial-gradient(1200px 600px at 80% -10%, rgba(124,58,237,.20), transparent 60%),
                radial-gradient(900px 500px at 10% 110%, rgba(139,92,246,.12), transparent 55%),
                var(--dash-bg);
}
[data-theme="dark"] .dash-auth-card { box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); }
[data-theme="dark"] .dash-auth-note,
[data-theme="dark"] .dash-auth-foot,
[data-theme="dark"] .dash-muted { color: var(--dash-muted); }
[data-theme="dark"] .dash-field input {
    background: #100D20; border-color: var(--dash-border); color: var(--dash-text);
}
[data-theme="dark"] .dash-field input:focus { background: #161229; }
[data-theme="dark"] .dash-field .dash-input-wrap svg { color: var(--dash-muted); }
[data-theme="dark"] .dash-topbar { background: rgba(14,12,26,.85); }
[data-theme="dark"] .dash-sidebar { background: var(--dash-card); }
[data-theme="dark"] .dash-side-group { color: #6E6890; }
[data-theme="dark"] .dash-code { background: #0B0917; border-color: var(--dash-border); }
[data-theme="dark"] .dash-code em { color: #7dd3a0; }
[data-theme="dark"] .dash-table thead th { background: #100D20; }
[data-theme="dark"] .dash-table tr:hover td { background: #1B1732; }
[data-theme="dark"] .dash-chip { background: var(--dash-card); color: var(--dash-muted); }
[data-theme="dark"] .dash-chip.active { background: var(--dash-primary); color: #fff; }
[data-theme="dark"] .dash-badge { background: #221E3A; }
[data-theme="dark"] .dash-badge-ok { background: rgba(16,185,129,.15); color: #34D399; }
[data-theme="dark"] .dash-badge-warn { background: rgba(245,158,11,.15); color: #FBBF24; }
[data-theme="dark"] .dash-badge-err { background: rgba(239,68,68,.15); color: #F87171; }
[data-theme="dark"] .dash-alert-err { background: rgba(239,68,68,.12); color: #FCA5A5; border-color: rgba(239,68,68,.3); }
[data-theme="dark"] .dash-alert-ok { background: rgba(16,185,129,.12); color: #6EE7B7; border-color: rgba(16,185,129,.3); }
[data-theme="dark"] .dash-stat-ic.ok { background: rgba(16,185,129,.15); }
[data-theme="dark"] .dash-stat-ic.warn { background: rgba(245,158,11,.15); }
[data-theme="dark"] .dash-stat-ic.info { background: rgba(59,130,246,.15); }
[data-theme="dark"] .dash-secret { background: #0B0917; color: #C4B5FD; }
[data-theme="dark"] .dash-form-note { color: var(--dash-muted); }
[data-theme="dark"] .dash-btn-soft { background: #221E3A; color: var(--dash-text); }
[data-theme="dark"] .dash-empty { color: #6E6890; }
[data-theme="dark"] .dash-key-hint { color: var(--dash-muted); }
[data-theme="dark"] .dash-pagination * { color: var(--dash-muted); }

/* theme toggle icon swap */
.dash-theme-sun { display: none; }
[data-theme="dark"] .dash-theme-moon { display: none; }
[data-theme="dark"] .dash-theme-sun { display: block; }

/* topbar actions */
.dash-topbar-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; margin-inline-end: 12px; }
.dash-topbar-actions form { margin: 0; display: flex; }
.dash-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; min-width: 36px; padding: 0 10px; border-radius: 10px;
    border: 1px solid var(--dash-border); background: var(--dash-card); color: var(--dash-muted);
    cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; transition: .2s;
}
.dash-icon-btn:hover { color: var(--dash-primary); border-color: var(--dash-primary-light, #8B5CF6); }
.dash-icon-btn svg { width: 18px; height: 18px; }
.dash-lang-btn { font-size: 13px; }

/* floating actions on login page */
.dash-auth-actions { position: fixed; top: 18px; inset-inline-end: 18px; display: flex; gap: 8px; z-index: 10; }
.dash-auth-actions form { margin: 0; display: flex; }

/* ===== LTR (English) ===== */
[dir="ltr"] .dash-shell { margin-right: 0; margin-left: 0; }
@media (min-width: 861px) {
    [dir="ltr"] .dash-sidebar { right: auto; left: 0; border-right: none; border-left: 1px solid var(--dash-border); }
    [dir="ltr"] .dash-shell { margin-right: 0; margin-left: 248px; }
}
@media (max-width: 860px) {
    [dir="ltr"] .dash-sidebar { right: auto; left: -280px; transition: left .3s; }
    [dir="ltr"] body.dash-side-open .dash-sidebar,
    [dir="ltr"] .dash-side-open .dash-sidebar { left: 0; }
}

/* ===== Page loader ===== */
.dash-loader {
    position: fixed; inset: 0; z-index: 999;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
    background: var(--dash-bg);
    transition: opacity .4s ease, visibility .4s;
}
.dash-loader-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.dash-loader-logo { width: 110px; height: 110px; object-fit: contain; filter: invert(.85); }

/* ===== White logo in dark mode (brand logo only — not merchant logo) ===== */
[data-theme="dark"] .dash-side-brand img,
[data-theme="dark"] .dash-auth-logo,
[data-theme="dark"] .dash-auth-foot-logo {
    filter: brightness(0) invert(1);
}
[data-theme="dark"] .dash-loader-logo { filter: none; }
[data-theme="dark"] .dash-sdg { filter: brightness(0) invert(1); }

/* ===== Filters / export bar ===== */
.dash-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-date-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-date-form input[type="date"] { padding: 8px 12px; border: 1px solid var(--dash-border); border-radius: 10px; background: var(--dash-card); color: var(--dash-text); font-family: inherit; font-size: 13px; }
.dash-filter-actions { display: flex; gap: 8px; }
.dash-btn-sm { padding: 8px 14px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.dash-btn-sm svg { width: 15px; height: 15px; }
.dash-row-link { cursor: pointer; }
.dash-back { display: inline-block; margin-bottom: 14px; color: var(--dash-muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.dash-back:hover { color: var(--dash-primary); }

/* ===== Key-value details ===== */
.dash-kv { display: grid; gap: 0; }
.dash-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--dash-border); font-size: 13.5px; }
.dash-kv > div:last-child { border-bottom: none; }
.dash-kv span { color: var(--dash-muted); }
.dash-kv b { font-weight: 700; text-align: end; word-break: break-all; display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.dash-code-inline { font-family: monospace; font-size: 11px; }
.dash-badge-muted { background: #F1F0F7; color: var(--dash-muted); }

/* ===== Timeline ===== */
.dash-timeline { list-style: none; margin: 0; padding: 4px 0 0; position: relative; }
.dash-timeline li { position: relative; padding-inline-start: 26px; padding-bottom: 18px; font-size: 13px; }
.dash-timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--dash-border); }
.dash-timeline li::after { content: ""; position: absolute; inset-inline-start: 8px; top: 16px; bottom: -2px; width: 1.5px; background: var(--dash-border); }
.dash-timeline li:last-child::after { display: none; }
.dash-timeline li.done::before { background: var(--dash-ok); }
.dash-timeline li.wait { color: var(--dash-muted); }
.dash-timeline li b { display: block; }
.dash-timeline li span { color: var(--dash-muted); font-size: 11.5px; }

/* ===== Chart ===== */
.dash-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.dash-chart-col { flex: 1; display: flex; align-items: flex-end; height: 100%; min-width: 0; }
.dash-chart-bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--dash-primary-light), var(--dash-primary)); opacity: .85; transition: .2s; }
.dash-chart-col:hover .dash-chart-bar { opacity: 1; }

/* ===== Notifications ===== */
.dash-notif { position: relative; }
.dash-notif-badge { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--dash-err); color: #fff; font-size: 10px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.dash-notif-menu {
    position: absolute; top: 46px; inset-inline-end: 0; width: 310px; max-height: 380px; overflow-y: auto;
    background: var(--dash-card); border: 1px solid var(--dash-border); border-radius: 14px;
    box-shadow: 0 16px 40px -12px rgba(0,0,0,.18); z-index: 60; display: none;
}
.dash-notif.open .dash-notif-menu { display: block; }
.dash-notif-head { padding: 12px 16px; font-weight: 800; font-size: 13px; border-bottom: 1px solid var(--dash-border); }
.dash-notif-item { display: block; padding: 11px 16px; text-decoration: none; border-bottom: 1px solid var(--dash-border); }
.dash-notif-item b { display: block; font-size: 12.5px; color: var(--dash-text); }
.dash-notif-item span { font-size: 11px; color: var(--dash-muted); }
.dash-notif-item.err { border-inline-start: 3px solid var(--dash-err); }
.dash-notif-item.warn { border-inline-start: 3px solid var(--dash-warn); }
.dash-notif-item:hover { background: rgba(124,58,237,.05); }
.dash-notif-empty { padding: 22px; text-align: center; color: var(--dash-muted); font-size: 12.5px; }

/* ===== Dark additions ===== */
[data-theme="dark"] .dash-date-form input[type="date"] { color-scheme: dark; }
[data-theme="dark"] .dash-notif-menu { box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); }
[data-theme="dark"] .dash-badge-muted { background: #221E3A; }
[data-theme="dark"] .dash-back:hover { color: var(--dash-primary-light); }

@media (max-width: 600px) {
    .dash-filter-bar { flex-direction: column; align-items: stretch; }
    .dash-filter-actions { justify-content: flex-start; }
    .dash-notif-menu { width: 270px; }
    .dash-chart { height: 100px; }
}

/* ===== Payment detail page ===== */
.dash-ptx-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: var(--dash-card); border: 1px solid var(--dash-border); border-radius: var(--dash-radius);
    padding: 22px 26px; margin-bottom: 18px;
}
.dash-ptx-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dash-ptx-ic { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-ptx-ic svg { width: 28px; height: 28px; }
.dash-ptx-ok .dash-ptx-ic { background: rgba(16,185,129,.14); color: var(--dash-ok); }
.dash-ptx-warn .dash-ptx-ic { background: rgba(245,158,11,.14); color: var(--dash-warn); }
.dash-ptx-err .dash-ptx-ic { background: rgba(239,68,68,.14); color: var(--dash-err); }
.dash-ptx-muted .dash-ptx-ic { background: #F1F0F7; color: var(--dash-muted); }
[data-theme="dark"] .dash-ptx-muted .dash-ptx-ic { background: #221E3A; }
.dash-ptx-amount { font-size: 30px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.dash-ptx-status { font-size: 13px; color: var(--dash-muted); font-weight: 600; margin-top: 2px; }
.dash-ptx-ref { text-align: end; display: flex; flex-direction: column; gap: 5px; }
.dash-ptx-ref code {
    font-family: monospace; font-size: 14px; font-weight: 700; cursor: pointer;
    background: var(--dash-bg); border: 1px dashed var(--dash-border); padding: 6px 14px; border-radius: 10px;
}
.dash-ptx-ref code:hover { border-color: var(--dash-primary); color: var(--dash-primary); }
.dash-ptx-ref span { font-size: 11.5px; color: var(--dash-muted); }

.dash-ptx-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.dash-ptx-side { display: grid; gap: 18px; }

/* webhook mini cards */
.dash-wh { border-top: 1px solid var(--dash-border); padding: 12px 0 4px; }
.dash-wh:first-of-type { border-top: none; padding-top: 0; }
.dash-wh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-wh-head code { font-size: 12px; font-weight: 700; }
.dash-wh-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dash-muted); margin: 6px 0; }
.dash-wh-payload summary { cursor: pointer; font-size: 11.5px; color: var(--dash-primary); font-weight: 700; user-select: none; }
.dash-wh-payload pre {
    margin: 8px 0 4px; background: var(--dash-bg); border: 1px solid var(--dash-border);
    border-radius: 10px; padding: 10px 12px; font-size: 10.5px; max-height: 220px; overflow: auto; white-space: pre-wrap;
}

@media (max-width: 1000px) { .dash-ptx-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .dash-ptx-hero { padding: 18px; }
    .dash-ptx-amount { font-size: 24px; }
    .dash-ptx-ref { text-align: start; width: 100%; }
}

/* ===== Test mode ===== */
.dash-test-pill { display: inline-block; background: #F59E0B; color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .8px; padding: 2px 8px; border-radius: 6px; vertical-align: middle; margin-inline-start: 6px; }
.dash-test-card { border-color: rgba(245,158,11,.5); }
.dash-chip-test { border-style: dashed !important; }
.dash-test-hint { font-size: 12px; color: #B45309; background: #FFFBEB; border: 1px dashed #F59E0B; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
[data-theme="dark"] .dash-test-hint { color: #FBBF24; background: rgba(245,158,11,.1); }
.dash-textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--dash-border); border-radius: 12px; background: var(--dash-bg); color: var(--dash-text); font-family: monospace; font-size: 13px; resize: vertical; }
.dash-textarea:focus { outline: none; border-color: var(--dash-primary); box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
.dash-ips-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ===== Confirm modal ===== */
.dash-modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(15,12,30,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: .25s;
}
.dash-modal-open { opacity: 1; visibility: visible; }
.dash-modal-box {
    background: var(--dash-card); border: 1px solid var(--dash-border);
    border-radius: 22px; padding: 30px 28px 24px; max-width: 380px; width: 100%;
    text-align: center; position: relative;
    transform: translateY(14px) scale(.95); transition: .3s cubic-bezier(.2,.9,.3,1.2);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
.dash-modal-box::before {
    content: ""; position: absolute; top: 0; inset-inline: 24px; height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, transparent, var(--dash-warn), transparent);
}
.dash-modal-open .dash-modal-box { transform: none; }
.dash-modal-ic {
    width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(245,158,11,.07));
    border: 1px solid rgba(245,158,11,.3);
    color: var(--dash-warn); display: flex; align-items: center; justify-content: center;
    animation: dashModalIc 2.4s ease-in-out infinite;
}
.dash-modal-ic svg { width: 30px; height: 30px; }
@keyframes dashModalIc { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.dash-modal-title { margin: 0 0 6px; font-size: 16.5px; font-weight: 800; color: var(--dash-text); }
.dash-modal-msg { font-size: 13.5px; color: var(--dash-muted); margin: 0 0 22px; line-height: 1.8; }
.dash-modal-btns { display: flex; gap: 10px; }
.dash-modal-btn-cancel, .dash-modal-btn-ok {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 0; border-radius: 12px; font-family: inherit; font-size: 13.5px;
    font-weight: 700; cursor: pointer; border: none; transition: .2s;
}
.dash-modal-btn-cancel { background: var(--dash-bg); color: var(--dash-muted); border: 1px solid var(--dash-border); }
.dash-modal-btn-cancel:hover { color: var(--dash-text); border-color: var(--dash-muted); }
.dash-modal-btn-ok { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; box-shadow: 0 8px 18px -6px rgba(239,68,68,.5); }
.dash-modal-btn-ok:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -6px rgba(239,68,68,.55); }
.dash-modal-btn-ok svg { width: 16px; height: 16px; }

/* ===== Login page — responsive split design ===== */
.dash-auth-body {
    display: flex; align-items: stretch; justify-content: center;
    min-height: 100vh; min-height: 100dvh; padding: 0;
    position: relative; overflow-x: hidden;
}
.dash-auth-body::before, .dash-auth-body::after {
    content: ""; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
    filter: blur(80px); opacity: .35;
}
.dash-auth-body::before { width: 460px; height: 460px; top: -160px; inset-inline-end: -140px; background: rgba(124,58,237,.4); }
.dash-auth-body::after { width: 380px; height: 380px; bottom: -140px; inset-inline-start: -120px; background: rgba(139,92,246,.28); }
[data-theme="dark"] .dash-auth-body::before { opacity: .22; }
[data-theme="dark"] .dash-auth-body::after { opacity: .16; }

.dash-auth-shell { display: flex; width: 100%; min-height: 100vh; min-height: 100dvh; position: relative; z-index: 1; }
[dir="rtl"] .dash-auth-shell { flex-direction: row-reverse; }

/* --- Branded panel (desktop) --- */
.dash-auth-panel {
    flex: 1.1; display: flex; align-items: center; justify-content: center;
    padding: clamp(32px, 5vw, 64px);
    background: linear-gradient(150deg, #5B21B6 0%, #7C3AED 45%, #8B5CF6 100%);
    background-size: 200% 200%;
    animation: dashAuthGrad 14s ease-in-out infinite;
    color: #fff; position: relative; overflow: hidden;
}
@keyframes dashAuthGrad { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.dash-auth-blob {
    position: absolute; opacity: .1; pointer-events: none; z-index: 0;
    object-fit: contain; filter: brightness(0) invert(1);
    animation: dashFloat 10s ease-in-out infinite;
}
.dash-auth-blob-1 { width: 220px; height: 220px; top: -60px; inset-inline-end: -60px; }
.dash-auth-blob-2 { width: 150px; height: 150px; bottom: -40px; inset-inline-start: -40px; animation-duration: 12s; animation-direction: reverse; opacity: .08; }
.dash-auth-blob-3 { width: 90px; height: 90px; top: 40%; inset-inline-end: 12%; animation-duration: 14s; animation-delay: 1.5s; opacity: .07; }
@keyframes dashFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-24px) rotate(4deg); } }
.dash-auth-panel-inner { position: relative; z-index: 1; max-width: 420px; }
.dash-auth-panel-logo { height: clamp(40px, 4vw, 56px); margin-bottom: clamp(18px, 3vh, 30px); filter: brightness(0) invert(1); }
.dash-auth-panel-inner h2 { margin: 0 0 10px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; }
.dash-auth-panel-inner p { margin: 0 0 clamp(20px, 3.5vh, 34px); font-size: clamp(13px, 1.1vw, 15px); opacity: .88; line-height: 1.85; }
.dash-auth-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.dash-auth-feats li { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 600; }
.dash-auth-feats svg { width: 26px; height: 26px; flex-shrink: 0; background: rgba(255,255,255,.16); border-radius: 8px; padding: 5px; }

/* --- Form side --- */
.dash-auth-formside {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px); gap: 18px;
}
.dash-auth-formside .dash-auth-card {
    width: 100%; max-width: 420px;
    padding: clamp(28px, 4vh, 44px) clamp(22px, 3.5vw, 40px);
    background: color-mix(in srgb, var(--dash-card) 88%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid color-mix(in srgb, var(--dash-border) 70%, transparent);
    transition: box-shadow .3s;
}
.dash-auth-formside .dash-auth-card:hover { box-shadow: 0 24px 70px -24px rgba(124,58,237,.3); }
.dash-auth-title { margin: 0 0 6px; font-size: clamp(21px, 2vw, 26px); font-weight: 800; color: var(--dash-text); }
.dash-auth-formside .dash-auth-sub { margin: 0 0 24px; font-size: 13.5px; color: var(--dash-muted); line-height: 1.7; }
.dash-auth-form .dash-field label { font-size: 12px; font-weight: 700; color: var(--dash-muted); letter-spacing: .3px; margin-bottom: 7px; display: block; }
.dash-input-wrap { position: relative; }
.dash-input-wrap input { transition: border-color .2s, box-shadow .2s; }
.dash-input-wrap input:focus { border-color: var(--dash-primary); box-shadow: 0 0 0 4px rgba(139,92,246,.14); }
.dash-input-wrap input::placeholder { color: #B4B0C8; }
[data-theme="dark"] .dash-input-wrap input::placeholder { color: #565172; }
.dash-auth-submit {
    margin-top: 6px; height: 48px; font-size: 15px; letter-spacing: .2px;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary-light));
    background-size: 160% 160%;
    transition: transform .18s, box-shadow .25s, background-position .4s;
}
.dash-auth-submit:hover { background-position: 90% 50%; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(124,58,237,.55); }
.dash-auth-submit:active { transform: translateY(0); }
.dash-auth-submit:disabled { opacity: .7; cursor: wait; }
.dash-auth-formside .dash-auth-foot { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dash-muted); margin: 0; }
.dash-auth-formside .dash-auth-foot svg { width: 15px; height: 15px; color: var(--dash-ok); }

/* --- Tablet & mobile: stacked / hidden panel --- */
@media (max-width: 1024px) {
    .dash-auth-panel { flex: 1; }
    .dash-auth-formside { flex: 1; }
}
@media (max-width: 860px) {
    .dash-auth-shell, [dir="rtl"] .dash-auth-shell { flex-direction: column; }
    .dash-auth-panel { flex: none; padding: clamp(30px, 7vh, 48px) 24px; }
    .dash-auth-panel-inner { max-width: 100%; text-align: center; }
    .dash-auth-panel-logo { height: 42px; margin-bottom: 14px; }
    .dash-auth-panel-inner h2 { font-size: 21px; }
    .dash-auth-panel-inner p { font-size: 12.5px; margin-bottom: 0; }
    .dash-auth-feats { display: none; }
    .dash-auth-formside { flex: 1; padding: 32px 18px 40px; justify-content: flex-start; }
}
@media (max-width: 480px) {
    .dash-auth-formside .dash-auth-card { border-radius: 18px; padding: 26px 20px 24px; }
    .dash-auth-title { font-size: 20px; }
    .dash-auth-formside .dash-auth-sub { font-size: 12.5px; margin-bottom: 20px; }
    .dash-auth-actions { top: 12px; inset-inline-end: 12px; }
    .dash-auth-panel { padding: 26px 20px; }
    .dash-input-wrap input { font-size: 16px; } /* prevents iOS zoom */
}
@media (max-width: 360px) {
    .dash-auth-formside .dash-auth-card { padding: 22px 16px 20px; }
}
@media (max-height: 620px) and (min-width: 861px) {
    .dash-auth-panel-inner h2 { font-size: 20px; }
    .dash-auth-panel-inner p { margin-bottom: 16px; font-size: 12.5px; }
    .dash-auth-feats { gap: 10px; }
    .dash-auth-feats li { font-size: 12.5px; }
}

/* ===== Developer docs ===== */
.dash-docs-hero {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
    padding: 28px 30px; margin-bottom: 18px;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary-light));
    border-radius: var(--dash-radius); color: #fff;
}
.dash-docs-hero h1 { margin: 10px 0 6px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.dash-docs-hero p { margin: 0; font-size: 14px; opacity: .88; max-width: 560px; line-height: 1.8; }
.dash-doc-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); padding: 3px 11px; border-radius: 20px; }
.dash-doc-base { text-align: end; }
.dash-doc-base small { display: block; font-size: 11px; opacity: .75; margin-bottom: 5px; }
.dash-doc-base code { display: inline-block; direction: ltr; font-size: 13px; background: rgba(0,0,0,.25); padding: 8px 14px; border-radius: 10px; }

.dash-doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dash-doc-chip {
    font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--dash-text);
    background: var(--dash-card); border: 1px solid var(--dash-border); border-radius: 20px;
    padding: 7px 15px; transition: border-color .2s, color .2s;
}
.dash-doc-chip:hover { border-color: var(--dash-primary); color: var(--dash-primary); }

.dash-doc { scroll-margin-top: 90px; margin-bottom: 18px; }
.dash-doc-body { padding: 22px 26px; }
.dash-doc-body p { margin: 0 0 14px; font-size: 14px; line-height: 1.9; color: var(--dash-text); }
.dash-doc-note { font-size: 13px; color: var(--dash-muted); border-inline-start: 3px solid var(--dash-primary); padding-inline-start: 12px; }

.dash-doc-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.dash-doc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dash-doc-table th { text-align: start; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--dash-muted); padding: 10px 14px; border-bottom: 1px solid var(--dash-border); }
.dash-doc-table td { padding: 11px 14px; border-bottom: 1px solid var(--dash-border); color: var(--dash-text); vertical-align: top; }
.dash-doc-table tr:last-child td { border-bottom: 0; }
.dash-doc-table code { font-size: 12.5px; background: color-mix(in srgb, var(--dash-primary) 10%, transparent); padding: 2px 7px; border-radius: 6px; }
.dash-doc-table .req { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--dash-ok); background: color-mix(in srgb, var(--dash-ok) 12%, transparent); padding: 1px 7px; border-radius: 10px; margin-inline-start: 5px; }

.dash-doc-codehead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--dash-muted); margin: 16px 0 7px; }
.dash-doc-copy { font-size: 11px; font-weight: 600; color: var(--dash-primary); background: none; border: 1px solid var(--dash-border); border-radius: 7px; padding: 3px 10px; cursor: pointer; transition: .2s; }
.dash-doc-copy:hover { border-color: var(--dash-primary); }

.dash-doc-code {
    direction: ltr; text-align: left; margin: 0;
    background: #12101f; color: #d8d4ee; border: 1px solid var(--dash-border);
    border-radius: 12px; padding: 16px 18px; font-size: 12.5px; line-height: 1.75;
    overflow-x: auto; font-family: 'SF Mono', Consolas, monospace;
}
.dash-doc-code code { font-family: inherit; background: none; padding: 0; }

.dash-doc-method { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; padding: 3px 9px; border-radius: 6px; margin-inline-end: 8px; vertical-align: middle; }
.dash-doc-method.post { background: rgba(22,163,74,.15); color: #16a34a; }
.dash-doc-method.get { background: rgba(59,130,246,.15); color: #3b82f6; }

.dash-btn-ghost { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--dash-primary); text-decoration: none; border: 1px solid var(--dash-border); border-radius: 10px; padding: 10px 18px; transition: .2s; }
.dash-btn-ghost:hover { border-color: var(--dash-primary); }

@media (max-width: 640px) {
    .dash-docs-hero { padding: 20px 18px; }
    .dash-doc-body { padding: 16px; }
    .dash-doc-table th, .dash-doc-table td { padding: 9px 10px; }
}
