/* ============================================================
   SUPER ADMIN — Krestapay Purple Theme
   ============================================================ */

:root {
    --sa-primary:      #7c3aed;
    --sa-primary-dark: #6d28d9;
    --sa-primary-light:#f5f3ff;
    --sa-bg:           #f9f7ff;
    --sa-bg-subtle:    #f4f5f7;
    --sa-sidebar-bg:   #13111c;
    --sa-topnav-bg:    #ffffff;
    --sa-text:         #1e1b4b;
    --sa-text-muted:   #64748b;
    --sa-border:       #ede9fe;
    --sa-card-bg:      #ffffff;
    --sa-input-bg:     #ffffff;
    --sa-hover-bg:      #f5f3ff;
    --sa-shadow:       0 1px 10px rgba(124,58,237,0.07);
    --sa-shadow-hover: 0 8px 28px rgba(124,58,237,0.14);
    --sa-radius:       14px;
    --sa-sidebar-w:    260px;
    --sa-ease:         cubic-bezier(.4,0,.2,1);
    --sa-focus-ring:   0 0 0 3px rgba(124,58,237,0.28);
    --sa-scrollbar-thumb: rgba(124,58,237,0.25);
    --sa-scrollbar-thumb-hover: rgba(124,58,237,0.45);
}

:root[data-theme="dark"] {
    --sa-primary:      #8b5cf6;
    --sa-primary-dark: #a78bfa;
    --sa-primary-light:#241c3d;
    --sa-bg:           #0f0d1a;
    --sa-bg-subtle:    #1b1830;
    --sa-sidebar-bg:   #0a0912;
    --sa-topnav-bg:    #17141f;
    --sa-text:         #f1eef9;
    --sa-text-muted:   #9691ad;
    --sa-border:       #2a2640;
    --sa-card-bg:      #17141f;
    --sa-input-bg:     #1c1830;
    --sa-hover-bg:      #241f3d;
    --sa-input-invalid-bg: rgba(239,68,68,0.08);
    --sa-shadow:       0 1px 10px rgba(0,0,0,0.35);
    --sa-shadow-hover: 0 8px 28px rgba(0,0,0,0.5);
    --sa-scrollbar-thumb: rgba(139,92,246,0.3);
    --sa-scrollbar-thumb-hover: rgba(139,92,246,0.5);
}

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

body, html { font-family: 'Nunito', sans-serif; height: 100%; }

::selection { background: rgba(124,58,237,0.22); color: inherit; }

:focus-visible {
    outline: 2px solid var(--sa-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Themed Scrollbars ---- */
.sa-main-wrapper,
.sa-sidebar-nav,
.sa-modal-body,
textarea {
    scrollbar-width: thin;
    scrollbar-color: var(--sa-scrollbar-thumb) transparent;
}
.sa-main-wrapper::-webkit-scrollbar,
.sa-modal-body::-webkit-scrollbar,
textarea::-webkit-scrollbar { width: 8px; height: 8px; }
.sa-main-wrapper::-webkit-scrollbar-track,
.sa-modal-body::-webkit-scrollbar-track { background: transparent; }
.sa-main-wrapper::-webkit-scrollbar-thumb,
.sa-modal-body::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background: var(--sa-scrollbar-thumb);
    border-radius: 20px;
}
.sa-main-wrapper::-webkit-scrollbar-thumb:hover,
.sa-modal-body::-webkit-scrollbar-thumb:hover { background: var(--sa-scrollbar-thumb-hover); }

body,
.sa-sidebar,
.sa-topnav,
.sa-card,
.sa-stat-card,
.sa-footer,
.sa-form-control,
.sa-dropdown {
    transition: background-color .2s var(--sa-ease), color .2s var(--sa-ease), border-color .2s var(--sa-ease);
}

/* ---- AUTH SPLIT LAYOUT ---- */
.sa-auth-body { min-height: 100vh; background: #0d0b1a; }

.sa-auth-split { display: flex; min-height: 100vh; }

/* ── Left: Brand Panel ── */
.sa-auth-brand {
    width: 460px; min-width: 380px; flex-shrink: 0;
    background: linear-gradient(160deg, #0d0b1a 0%, #1a1038 45%, #2d1b69 100%);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 60px 52px;
}
.sa-auth-blob {
    position: absolute; border-radius: 50%; pointer-events: none;
}
.sa-auth-blob-1 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, transparent 70%);
    top: -130px; right: -110px;
}
.sa-auth-blob-2 {
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(167,139,250,0.14) 0%, transparent 70%);
    bottom: -70px; left: -70px;
}
.sa-auth-blob-3 {
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(196,181,253,0.12) 0%, transparent 70%);
    bottom: 160px; right: 70px;
}
.sa-auth-brand-logo {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 56px; position: relative; z-index: 1;
}
.sa-auth-brand-logo img { height: 46px; width: auto; }
.sa-auth-brand-name {
    font-size: 18px; font-weight: 900; color: #f1f5f9; letter-spacing: 0.4px; line-height: 1.1;
}
.sa-auth-brand-name small {
    display: block; font-size: 9.5px; font-weight: 700;
    color: rgba(167,139,250,0.65); letter-spacing: 2.5px;
    text-transform: uppercase; margin-top: 3px;
}
.sa-auth-brand-headline {
    font-size: 29px; font-weight: 900; color: #fff; line-height: 1.28;
    margin-bottom: 13px; position: relative; z-index: 1;
}
.sa-auth-brand-headline span { color: #a78bfa; }
.sa-auth-brand-tagline {
    font-size: 13.5px; color: rgba(200,210,240,0.6); line-height: 1.65;
    margin-bottom: 44px; max-width: 320px; position: relative; z-index: 1;
}
.sa-auth-features { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.sa-auth-feature { display: flex; align-items: center; gap: 13px; }
.sa-auth-feature-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(124,58,237,0.22);
    border: 1px solid rgba(167,139,250,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #c4b5fd; flex-shrink: 0;
}
.sa-auth-feature-label { font-size: 13.5px; font-weight: 700; color: rgba(226,220,255,0.9); }
.sa-auth-feature-sub   { font-size: 11px; color: rgba(148,163,184,0.5); margin-top: 1px; }
.sa-auth-brand-footer {
    position: absolute; bottom: 28px; left: 52px;
    font-size: 11px; color: rgba(100,116,139,0.35);
    font-weight: 600; z-index: 1;
}

/* ── Right: Form Side ── */
.sa-auth-form-side {
    flex: 1; background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 48px; overflow-y: auto;
}
.sa-auth-form-wrap { width: 100%; max-width: 400px; }

/* Form top section */
.sa-auth-form-icon-wrap {
    width: 54px; height: 54px; border-radius: 16px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(124,58,237,0.28);
}
.sa-auth-form-title { font-size: 24px; font-weight: 900; color: #1e1b4b; margin: 0 0 7px; }
.sa-auth-form-desc  { font-size: 13.5px; color: #64748b; line-height: 1.55; margin: 0 0 28px; }

/* Security footer */
.sa-auth-secure {
    margin-top: 28px; display: flex; align-items: center;
    justify-content: center; gap: 7px;
    font-size: 11.5px; color: #94a3b8; font-weight: 600;
}
.sa-auth-secure i { color: #7c3aed; }

/* Responsive */
@media (max-width: 900px) {
    .sa-auth-brand { display: none; }
    .sa-auth-form-side { padding: 40px 28px; background: #f9f7ff; }
}
@media (max-width: 480px) {
    .sa-auth-form-side { padding: 36px 20px; align-items: flex-start; padding-top: 52px; }
}

/* Legacy aliases */
.sa-auth-wrapper { width: 100%; padding: 20px; display: flex; justify-content: center; }
.sa-auth-card {
    background: #fff; border-radius: 20px; padding: 40px 36px;
    width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(124,58,237,0.10); border: 1px solid #ede9fe;
}
.sa-auth-logo { text-align: center; margin-bottom: 28px; }
.sa-logo-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(124,58,237,0.25);
}
.sa-auth-logo h4 { font-size: 22px; font-weight: 800; color: var(--sa-text); margin-bottom: 2px; }
.sa-auth-logo p  { font-size: 13px; color: var(--sa-text-muted); margin: 0; }
.sa-auth-subtitle { font-size: 13px; color: var(--sa-text-muted); text-align: center; margin-bottom: 20px; margin-top: -10px; }

/* ---- FORM ---- */
.sa-form-label { font-size: 12px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block; }
.sa-input-group { position: relative; display: flex; align-items: center; }
.sa-input-icon { position: absolute; left: 14px; color: var(--sa-text-muted); font-size: 14px; z-index: 1; pointer-events: none; }
.sa-form-control {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--sa-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    color: var(--sa-text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sa-form-control:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.sa-form-control.is-invalid { border-color: #ef4444; }
.sa-eye-btn { position: absolute; right: 12px; background: none; border: none; color: var(--sa-text-muted); cursor: pointer; font-size: 14px; padding: 4px; }
.sa-eye-btn:hover { color: var(--sa-primary); }
.sa-field-error { font-size: 12px; color: #ef4444; margin-top: 4px; }
.sa-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--sa-text-muted); cursor: pointer; }
.sa-check input[type=checkbox] { accent-color: var(--sa-primary); width: 15px; height: 15px; cursor: pointer; }
.sa-link { font-size: 13px; font-weight: 600; color: var(--sa-primary); text-decoration: none; }
.sa-link:hover { color: var(--sa-primary-dark); text-decoration: underline; }
.sa-btn-primary {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff; border: none; padding: 12px 20px;
    border-radius: 10px; font-size: 14px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(124,58,237,0.25);
}
.sa-btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(124,58,237,0.35); }

/* ---- LAYOUT ---- */
.sa-body { background: var(--sa-bg); height: 100vh; overflow: hidden; }

.sa-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sa-sidebar-w); height: 100vh;
    background: #13111c;
    border-right: none;
    display: flex; flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
}

/* ---- Logo ---- */
.sa-sidebar-logo {
    padding: 22px 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; gap: 11px;
}
.sa-logo-icon-sm {
    width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}
.sa-sidebar-logo span {
    font-size: 15px; font-weight: 800;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}

/* ---- Nav ---- */
.sa-sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 10px 10px; scrollbar-width: none; }
.sa-sidebar-nav::-webkit-scrollbar { display: none; }

/* ---- Section Divider & Label ---- */
.sa-nav-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; padding: 6px 10px 3px; }
.sa-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 8px 6px;
}
.sa-nav-section-label {
    font-size: 9px;
    font-weight: 800;
    color: rgba(148,163,184,0.6);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 6px 12px 5px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.sa-nav-section-label::before {
    content: '';
    width: 14px; height: 1px;
    background: rgba(124,58,237,0.5);
    flex-shrink: 0;
}

/* ---- Sidebar Links ---- */
.sa-sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 10px;
    color: rgba(148,163,184,0.85); text-decoration: none;
    font-size: 13px; font-weight: 600; margin-bottom: 2px;
    transition: background 0.18s var(--sa-ease), color 0.18s var(--sa-ease), transform 0.18s var(--sa-ease);
    position: relative;
}
.sa-link-icon {
    width: 32px; height: 32px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    color: rgba(148,163,184,0.7);
    transition: background 0.18s var(--sa-ease), color 0.18s var(--sa-ease);
}
.sa-sidebar-link:hover {
    background: rgba(124,58,237,0.08);
    color: #e2e8f0;
    transform: translateX(2px);
}
.sa-sidebar-link:hover .sa-link-icon {
    background: rgba(124,58,237,0.18);
    color: #a78bfa;
}
.sa-sidebar-link.active {
    background: rgba(124,58,237,0.15);
    color: #c4b5fd;
}
.sa-sidebar-link.active::before {
    content: '';
    position: absolute; left: 0; top: 6px; bottom: 6px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: #7c3aed;
    box-shadow: 0 0 8px rgba(124,58,237,0.6);
}
.sa-sidebar-link.active .sa-link-icon {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: #fff;
    box-shadow: 0 3px 10px rgba(124,58,237,0.35);
}
.sa-sidebar-badge {
    margin-left: auto;
    background: rgba(124,58,237,0.18);
    color: #c4b5fd;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 20px;
    min-width: 20px; text-align: center;
}
.sa-sidebar-badge.sa-badge-warning {
    background: rgba(251,146,60,0.18);
    color: #fb923c;
}

/* ---- Footer ---- */
.sa-sidebar-footer {
    padding: 14px 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.2);
}
.sa-user-info { display: flex; align-items: center; gap: 10px; }
.sa-user-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(124,58,237,0.3);
}
.sa-user-avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #ddd6fe, #7c3aed);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.sa-user-name { font-size: 13px; font-weight: 700; color: #e2e8f0; line-height: 1.2; }
.sa-user-role { font-size: 11px; color: rgba(148,163,184,0.7); }

/* ---- MAIN ---- */
.sa-main-wrapper { margin-left: var(--sa-sidebar-w); height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sa-content { padding: 24px; flex: 1; }

/* ---- TOPNAV ---- */
.sa-topnav {
    background: color-mix(in srgb, var(--sa-topnav-bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--sa-border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--sa-shadow);
}
.sa-page-title { font-size: 16px; font-weight: 800; color: var(--sa-text); margin: 0; line-height: 1.2; }
.sa-breadcrumb { font-size: 11px; }
.sa-breadcrumb a { color: var(--sa-primary); text-decoration: none; font-weight: 600; }
.sa-breadcrumb .breadcrumb-item.active { color: var(--sa-text-muted); }
.sa-topnav-right { display: flex; align-items: center; gap: 10px; }
.sa-clock {
    display: flex; align-items: center; gap: 7px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    padding: 6px 13px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--sa-text);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px; white-space: nowrap;
}
.sa-clock i { color: var(--sa-primary); font-size: 13px; }
.sa-topnav-btn {
    position: relative; background: var(--sa-bg);
    border: 1px solid var(--sa-border); color: var(--sa-text-muted);
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 15px;
    transition: background 0.2s var(--sa-ease), color 0.2s var(--sa-ease),
                border-color 0.2s var(--sa-ease), transform 0.15s var(--sa-ease);
}
.sa-topnav-btn:hover { background: var(--sa-primary-light); color: var(--sa-primary); border-color: var(--sa-primary); transform: translateY(-1px); }
.sa-topnav-btn:active { transform: translateY(0) scale(0.95); }
.sa-badge { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sa-topnav-user {
    display: flex; align-items: center; gap: 8px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    padding: 5px 12px 5px 5px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--sa-text);
    cursor: pointer; transition: background 0.2s;
}
.sa-topnav-user:hover { background: var(--sa-hover-bg); }
.sa-topnav-user::after { display: none; }
.sa-dropdown { border: 1px solid var(--sa-border); border-radius: 12px; box-shadow: var(--sa-shadow-hover); padding: 6px; }
.sa-logout-btn { font-size: 13px; font-weight: 600; color: #ef4444; border-radius: 8px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; cursor: pointer; }
.sa-logout-btn:hover { background: #fef2f2; color: #dc2626; }
.sa-hamburger { display: none; background: none; border: none; font-size: 20px; color: var(--sa-text-muted); cursor: pointer; }

/* ---- FOOTER ---- */
.sa-footer { padding: 16px 24px; text-align: center; font-size: 12px; color: var(--sa-text-muted); border-top: 1px solid var(--sa-border); background: var(--sa-topnav-bg); }

/* ---- CARDS ---- */
.sa-stat-card {
    background: var(--sa-card-bg); border-radius: var(--sa-radius);
    padding: 20px; box-shadow: var(--sa-shadow);
    display: flex; align-items: center; justify-content: space-between;
    transition: transform 0.25s var(--sa-ease), box-shadow 0.25s var(--sa-ease), border-color 0.25s var(--sa-ease);
    border: 1px solid var(--sa-border);
}
.sa-stat-card:hover { transform: translateY(-3px); box-shadow: var(--sa-shadow-hover); border-color: var(--sa-primary); }
.sa-stat-icon {
    width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff; flex-shrink: 0;
    transition: transform 0.25s var(--sa-ease);
}
.sa-stat-card:hover .sa-stat-icon { transform: scale(1.08) rotate(-4deg); }
.sa-stat-info p { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.sa-stat-info h4 { font-size: 24px; font-weight: 800; color: var(--sa-text); margin: 0 0 2px; }
.sa-stat-info small { font-size: 11px; color: var(--sa-text-muted); }
.sa-card {
    background: var(--sa-card-bg); border-radius: var(--sa-radius);
    box-shadow: var(--sa-shadow); border: 1px solid var(--sa-border); overflow: hidden;
    transition: box-shadow 0.25s var(--sa-ease), border-color 0.25s var(--sa-ease);
}
.sa-card:hover { box-shadow: var(--sa-shadow-hover); }
.sa-card-head { padding: 18px 20px; border-bottom: 1px solid var(--sa-border); display: flex; align-items: center; justify-content: space-between; }
.sa-card-head h6 { font-size: 15px; font-weight: 800; color: var(--sa-text); margin: 0; }
.sa-card-head p { font-size: 12px; color: var(--sa-text-muted); margin: 2px 0 0; }
.sa-card-body { padding: 20px; }
.sa-badge-active { background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }

/* ---- OVERLAY ---- */
.sa-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 999; }
.sa-overlay.show { display: block; }

/* ---- TOAST ---- */
#toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: 9999; display: flex; flex-direction: column; gap: 10px;
    min-width: 300px; max-width: 360px;
}
.sa-toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    border-left: 4px solid;
    animation: toastIn 0.35s cubic-bezier(.22,1,.36,1) forwards;
    pointer-events: all;
}
.sa-toast.hiding { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0); } to { opacity:0; transform: translateX(40px); } }
.sa-toast-success { border-color: #22c55e; }
.sa-toast-error   { border-color: #ef4444; }
.sa-toast-warning { border-color: #f59e0b; }
.sa-toast-info    { border-color: #7c3aed; }
.sa-toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.sa-toast-success .sa-toast-icon { color: #22c55e; }
.sa-toast-error   .sa-toast-icon { color: #ef4444; }
.sa-toast-warning .sa-toast-icon { color: #f59e0b; }
.sa-toast-info    .sa-toast-icon { color: #7c3aed; }
.sa-toast-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.sa-toast-success .sa-toast-label { color: #15803d; }
.sa-toast-error   .sa-toast-label { color: #dc2626; }
.sa-toast-warning .sa-toast-label { color: #d97706; }
.sa-toast-info    .sa-toast-label { color: #6d28d9; }
.sa-toast-message { font-size: 13px; color: #475569; line-height: 1.4; margin: 0; }
.sa-toast-close { margin-left: auto; background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 0 0 0 8px; flex-shrink: 0; transition: color 0.2s; }
.sa-toast-close:hover { color: #475569; }
.sa-toast-progress { height: 3px; border-radius: 0 0 12px 12px; position: absolute; bottom: 0; left: 0; animation: progress 4s linear forwards; }
.sa-toast-success .sa-toast-progress { background: #22c55e; }
.sa-toast-error   .sa-toast-progress { background: #ef4444; }
.sa-toast-warning .sa-toast-progress { background: #f59e0b; }
.sa-toast-info    .sa-toast-progress { background: #7c3aed; }
@keyframes progress { from { width:100%; } to { width:0%; } }

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
    .sa-sidebar { transform: translateX(calc(-1 * var(--sa-sidebar-w))); }
    .sa-sidebar.open { transform: translateX(0); }
    .sa-main-wrapper { margin-left: 0; }
    .sa-hamburger { display: block; }
    .sa-overlay { background: rgba(0,0,0,0.5); }
}

/* ============================================================
   TENANT MODULE — Extended Theme Classes
   ============================================================ */

/* ---- Page Header ---- */
.sa-page-header { display: flex; align-items: center; justify-content: space-between; }
.sa-page-heading { font-size: 18px; font-weight: 800; color: var(--sa-text); margin: 0; line-height: 1.3; }
.sa-page-sub { font-size: 12px; color: var(--sa-text-muted); margin: 2px 0 0; }
.sa-back-btn {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--sa-text-muted); text-decoration: none; flex-shrink: 0;
    transition: background 0.2s var(--sa-ease), color 0.2s var(--sa-ease),
                border-color 0.2s var(--sa-ease), transform 0.15s var(--sa-ease);
}
.sa-back-btn:hover { background: var(--sa-hover-bg); color: var(--sa-primary-dark); border-color: var(--sa-primary); transform: translateX(-2px); }
.sa-back-btn:active { transform: translateX(-2px) scale(0.95); }

/* ---- Form Cards ---- */
.sa-form-card {
    background: var(--sa-card-bg);
    border-radius: var(--sa-radius);
    border: 1px solid var(--sa-border);
    box-shadow: var(--sa-shadow);
    overflow: hidden;
}
.sa-form-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sa-border);
    background: linear-gradient(135deg, #faf8ff, #f5f3ff);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sa-form-card-title { font-size: 14px; font-weight: 800; color: var(--sa-text); line-height: 1.3; }
.sa-form-card-sub   { font-size: 11px; color: var(--sa-text-muted); margin-top: 1px; }
.sa-form-card-body  { padding: 20px; }

/* ---- Step Badge ---- */
.sa-step-badge {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    box-shadow: 0 3px 10px rgba(124,58,237,0.3);
}

/* ---- Form Fields ---- */
.sa-form-label {
    font-size: 11px; font-weight: 700; color: var(--sa-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px; display: block;
}
.sa-required { color: #ef4444; }
.sa-field-wrap { position: relative; display: flex; align-items: center; }
.sa-field-icon {
    position: absolute; left: 13px;
    color: var(--sa-text-muted); font-size: 13px;
    pointer-events: none; z-index: 1;
}
.sa-field {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--sa-border);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'Nunito', sans-serif;
    color: var(--sa-text);
    background: var(--sa-input-bg);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sa-field:focus          { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.13); }
.sa-field.is-invalid     { border-color: #ef4444; background: var(--sa-input-invalid-bg, #fff8f8); }
.sa-field.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.sa-field::placeholder   { color: #b0c4d8; }
.sa-field-eye {
    position: absolute; right: 12px;
    background: none; border: none;
    color: var(--sa-text-muted); cursor: pointer;
    font-size: 13px; padding: 4px;
    transition: color 0.2s;
}
.sa-field-eye:hover { color: var(--sa-primary); }
.sa-field-error { font-size: 11.5px; color: #ef4444; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.sa-field-hint { font-size: 11.5px; color: var(--sa-text-muted); margin-top: 5px; line-height: 1.5; }
.sa-field-hint code { font-size: 11px; background: #f3f0ff; color: #7c3aed; padding: 1px 5px; border-radius: 4px; }

/* ---- Option Cards (visual radio-group, e.g. service Nature) ---- */
.sa-option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.sa-option-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1.5px solid var(--sa-border);
    border-radius: 12px;
    background: var(--sa-input-bg);
    cursor: pointer;
    transition: border-color 0.2s var(--sa-ease), background-color 0.2s var(--sa-ease), box-shadow 0.2s var(--sa-ease), transform 0.15s var(--sa-ease);
}
.sa-option-card:hover { border-color: var(--sa-primary); transform: translateY(-1px); }
.sa-option-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.sa-option-card-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: var(--sa-primary-light); color: var(--sa-primary);
}
.sa-option-card-body { flex: 1; min-width: 0; }
.sa-option-card-title { font-size: 13px; font-weight: 800; color: var(--sa-text); display: flex; align-items: center; gap: 6px; }
.sa-option-card-desc { font-size: 11.5px; color: var(--sa-text-muted); margin-top: 2px; line-height: 1.4; }
.sa-option-card-check {
    position: absolute; top: 10px; right: 10px;
    font-size: 15px; color: var(--sa-border);
    transition: color 0.2s var(--sa-ease);
}
.sa-option-card.is-selected {
    border-color: var(--sa-primary);
    background: var(--sa-primary-light);
    box-shadow: var(--sa-shadow);
}
.sa-option-card.is-selected .sa-option-card-check { color: var(--sa-primary); }
.sa-option-card.is-selected .sa-option-card-icon  { background: var(--sa-primary); color: #fff; }

/* ---- Icon Upload (square dropzone with hover-to-change preview) ---- */
.sa-icon-upload-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sa-icon-upload {
    position: relative;
    width: 76px; height: 76px;
    border-radius: 16px;
    border: 1.5px dashed var(--sa-border);
    background: var(--sa-bg-subtle);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s var(--sa-ease);
}
.sa-icon-upload:hover { border-color: var(--sa-primary); }
.sa-icon-upload.has-image { border-style: solid; }
.sa-icon-upload-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.sa-icon-upload-placeholder { color: var(--sa-text-muted); font-size: 20px; }
.sa-icon-upload-overlay {
    position: absolute; inset: 0;
    background: rgba(30, 27, 75, 0.62);
    color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 10px; font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s var(--sa-ease);
}
.sa-icon-upload:hover .sa-icon-upload-overlay { opacity: 1; }
.sa-icon-upload-overlay i { font-size: 14px; }
.sa-icon-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sa-icon-upload-remove {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: #ef4444;
    background: none; border: none; padding: 0; cursor: pointer;
}
.sa-icon-upload-remove:hover { text-decoration: underline; }
.sa-icon-upload-meta { font-size: 11.5px; color: var(--sa-text-muted); line-height: 1.5; max-width: 320px; }

/* ---- Password Rules ---- */
.sa-pwd-rules {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 14px;
    background: #faf8ff;
    border: 1px solid var(--sa-border);
    border-radius: 10px;
}
.sa-pwd-rule {
    font-size: 11px; font-weight: 600;
    color: #94a3b8;
    display: flex; align-items: center; gap: 4px;
    transition: color 0.2s;
}
.sa-pwd-rule.passed       { color: #16a34a; }
.sa-pwd-rule.passed i     { color: #16a34a; }

/* ---- Button Size Modifier ---- */
.sa-btn-sm { padding: 6px 14px !important; font-size: 12px !important; border-radius: 8px !important; }

/* ---- KYC Status Badges ---- */
.sa-kyc-pending       { background: #fef9c3; color: #a16207; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-kyc-approved,
.sa-kyc-verified      { background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-kyc-rejected      { background: #fef2f2; color: #dc2626; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-kyc-rekyc         { background: #fff7ed; color: #c2410c; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-kyc-not-submitted { background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }

/* ---- Aadhaar Photo (show page) ---- */
.sa-aadhaar-photo-wrap  { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.sa-aadhaar-photo       { width: 110px; height: 130px; object-fit: cover; border-radius: 12px; border: 2px solid var(--sa-border); box-shadow: 0 2px 10px rgba(0,0,0,0.08); background: #f1f5f9; }
.sa-aadhaar-photo-label { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); }

/* ---- KYC Check Dots (index table) ---- */
.sa-check-dot  { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.sa-check-ok   { background: #dcfce7; color: #16a34a; }
.sa-check-no   { background: #f1f5f9; color: #94a3b8; }

/* ---- KYC Checklist (show page sidebar) ---- */
.sa-kyc-checklist      { list-style: none; padding: 0; margin: 0; }
.sa-kyc-checklist li   { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--sa-border); }
.sa-kyc-checklist li:last-child { border-bottom: none; }
.sa-kyc-check-icon     { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.sa-kyc-check-ok .sa-kyc-check-icon   { background: #dcfce7; color: #16a34a; }
.sa-kyc-check-pending .sa-kyc-check-icon { background: #f1f5f9; color: #94a3b8; }

/* ---- KYC Document List (show page sidebar) ---- */
.sa-doc-list      { list-style: none; padding: 0; margin: 0; }
.sa-doc-item      { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--sa-border); }
.sa-doc-item:last-child { border-bottom: none; }
.sa-doc-icon      { width: 28px; height: 28px; border-radius: 7px; background: #ede9fe; color: #6d28d9; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }

/* ---- KYC Alert Banners ---- */
.sa-alert         { padding: 12px 16px; border-radius: 10px; font-size: 13.5px; }
.sa-alert-warning { background: #fff7ed; color: #92400e; border-left: 3px solid #f59e0b; }
.sa-alert-danger  { background: #fef2f2; color: #991b1b; border-left: 3px solid #ef4444; }

/* ---- KYC Action Type Cards (modal) ---- */
.sa-kyc-type-card       { cursor: pointer; display: block; }
.sa-kyc-type-card input { display: none; }
.sa-kyc-type-body       { border: 1.5px solid var(--sa-border); border-radius: 12px; padding: 16px; text-align: center; transition: border-color 0.2s, background 0.2s; }
.sa-kyc-type-card input:checked + .sa-kyc-type-body { border-color: var(--sa-primary); background: #f5f3ff; }
.sa-kyc-type-card:hover .sa-kyc-type-body { border-color: var(--sa-primary-dark); }

/* ---- Modal Styles ---- */
.sa-modal           { border: none; border-radius: 16px; overflow: hidden; }
.sa-modal-head      { background: var(--sa-bg); border-bottom: 1px solid var(--sa-border); padding: 16px 20px; }
.sa-modal-body      { padding: 20px; }
.sa-modal-foot      { background: var(--sa-bg); border-top: 1px solid var(--sa-border); padding: 12px 20px; }

/* ---- Stats Cards (KYC index, My Wallet, ...) ---- */
.sa-stat-card  {
    background: var(--sa-card-bg); border: 1px solid var(--sa-border); border-radius: 14px;
    padding: 18px; display: flex; align-items: center; gap: 16px;
    min-width: 0; /* let the card shrink below its content's natural width in a flex/grid column */
    transition: transform 0.25s var(--sa-ease), box-shadow 0.25s var(--sa-ease), border-color 0.25s var(--sa-ease);
}
.sa-stat-card:hover { transform: translateY(-3px); box-shadow: var(--sa-shadow-hover); border-color: var(--sa-primary); }
/* The icon (.sa-stat-icon) is flex-shrink:0 and fixed-size; this is its sibling text
   block (value + label) — without min-width:0 a flex child never shrinks below its
   content's natural width, so a long unbroken string (e.g. "₹1,100,030.3568") pushes
   past the card's border instead of wrapping inside it. */
.sa-stat-card > div:last-child { min-width: 0; flex: 1 1 auto; }
.sa-stat-value {
    font-size: 22px; font-weight: 800; color: var(--sa-text); line-height: 1.2;
    overflow-wrap: break-word; word-break: break-word;
}
.sa-stat-label { font-size: 12px; font-weight: 600; color: var(--sa-text-muted); margin-top: 2px; }
@media (max-width: 767px) {
    .sa-stat-value { font-size: 18px; }
}

/* ---- Buttons ---- */
.sa-btn-primary,
.sa-btn-ghost,
.sa-btn-outline,
.sa-btn-success,
.sa-btn-warning,
.sa-btn-danger {
    transition: opacity 0.2s var(--sa-ease), box-shadow 0.2s var(--sa-ease),
                transform 0.15s var(--sa-ease), background 0.2s var(--sa-ease),
                border-color 0.2s var(--sa-ease), color 0.2s var(--sa-ease);
}
.sa-btn-primary:active,
.sa-btn-ghost:active,
.sa-btn-outline:active,
.sa-btn-success:active,
.sa-btn-warning:active,
.sa-btn-danger:active,
.sa-icon-btn:active {
    transform: translateY(0) scale(0.97);
}
.sa-btn-primary:focus-visible,
.sa-btn-ghost:focus-visible,
.sa-btn-outline:focus-visible,
.sa-btn-success:focus-visible,
.sa-btn-warning:focus-visible,
.sa-btn-danger:focus-visible,
.sa-icon-btn:focus-visible,
.sa-back-btn:focus-visible,
.sa-topnav-btn:focus-visible {
    outline: none;
    box-shadow: var(--sa-focus-ring);
}
.sa-btn-primary:disabled, .sa-btn-primary.disabled,
.sa-btn-ghost:disabled, .sa-btn-ghost.disabled,
.sa-btn-outline:disabled, .sa-btn-outline.disabled,
.sa-btn-success:disabled, .sa-btn-success.disabled,
.sa-btn-warning:disabled, .sa-btn-warning.disabled,
.sa-btn-danger:disabled, .sa-btn-danger.disabled {
    opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none;
}

.sa-btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff; border: none;
    padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 14px rgba(124,58,237,0.25);
    white-space: nowrap;
}
.sa-btn-primary:hover { opacity: 0.9; box-shadow: 0 6px 20px rgba(124,58,237,0.35); transform: translateY(-1px); color: #fff; }

.sa-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--sa-text-muted);
    border: 1.5px solid var(--sa-border);
    padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    white-space: nowrap;
}
.sa-btn-ghost:hover { background: var(--sa-hover-bg); color: var(--sa-primary-dark); border-color: var(--sa-primary); transform: translateY(-1px); }

.sa-btn-outline {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sa-input-bg); color: var(--sa-primary-dark);
    border: 1.5px solid var(--sa-border);
    padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    white-space: nowrap;
}
.sa-btn-outline:hover { background: var(--sa-hover-bg); border-color: var(--sa-primary); color: var(--sa-primary-dark); transform: translateY(-1px); }

.sa-btn-success {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    color: #fff; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(22,163,74,0.2);
    white-space: nowrap;
}
.sa-btn-success:hover { opacity: 0.9; color: #fff; box-shadow: 0 6px 18px rgba(22,163,74,0.3); transform: translateY(-1px); }

.sa-btn-warning {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    color: #78350f; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(245,158,11,0.2);
    white-space: nowrap;
}
.sa-btn-warning:hover { opacity: 0.9; color: #78350f; box-shadow: 0 6px 18px rgba(245,158,11,0.3); transform: translateY(-1px); }

.sa-btn-danger {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fca5a5, #ef4444);
    color: #fff; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(239,68,68,0.2);
    white-space: nowrap;
}
.sa-btn-danger:hover { opacity: 0.9; color: #fff; box-shadow: 0 6px 18px rgba(239,68,68,0.3); transform: translateY(-1px); }

.sa-icon-btn {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--sa-text-muted); text-decoration: none; font-size: 13px;
    transition: background 0.2s var(--sa-ease), color 0.2s var(--sa-ease),
                border-color 0.2s var(--sa-ease), transform 0.15s var(--sa-ease);
    cursor: pointer;
}
.sa-icon-btn:hover { background: var(--sa-primary-light); color: var(--sa-primary-dark); border-color: var(--sa-primary); transform: translateY(-1px); }

/* ---- Onboarding Flow Steps (right panel) ---- */
.sa-flow-steps { list-style: none; padding: 4px 20px 20px; margin: 0; }
.sa-flow-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 12px 0;
    border-left: 2px solid var(--sa-border);
    margin-left: 10px;
    padding-left: 20px;
    position: relative;
}
.sa-flow-step:last-child { border-left-color: transparent; }
.sa-flow-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--sa-border); border: 2px solid #cbd5e1;
    position: absolute; left: -7px; top: 16px; flex-shrink: 0;
    transition: background 0.2s;
}
.sa-flow-step.active .sa-flow-dot {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124,58,237,0.15);
}
.sa-flow-label { font-size: 13px; font-weight: 700; color: var(--sa-text); line-height: 1.4; }
.sa-flow-desc  { font-size: 11.5px; color: var(--sa-text-muted); margin-top: 1px; }

/* ---- Info Box ---- */
.sa-info-box {
    background: linear-gradient(135deg, #faf8ff, #f5f3ff);
    border: 1px solid #ddd6fe;
    border-radius: var(--sa-radius);
    padding: 16px;
    display: flex; align-items: flex-start; gap: 12px;
}
.sa-info-box-icon { font-size: 18px; color: var(--sa-primary); flex-shrink: 0; margin-top: 1px; }
.sa-info-box-title { font-size: 13px; font-weight: 800; color: var(--sa-text); margin-bottom: 8px; }
.sa-info-list { list-style: none; padding: 0; margin: 0; }
.sa-info-list li {
    font-size: 12px; color: var(--sa-text-muted);
    display: flex; align-items: center; gap: 7px;
    padding: 3px 0;
}
.sa-info-list li i { color: #7c3aed; font-size: 11px; flex-shrink: 0; }
.sa-color-swatch {
    display: inline-block; width: 14px; height: 14px;
    background: #3b82f6; border-radius: 3px;
    vertical-align: middle; border: 1px solid #bfdbfe;
}

/* ---- Status Badges ---- */
.sa-badge-pending   { background: #fef9c3; color: #a16207; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-active    { background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-warning   { background: #fff7ed; color: #c2410c; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-info      { background: #f5f3ff; color: #6d28d9; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-suspended { background: #fef2f2; color: #dc2626; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-rejected  { background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-expired   { background: #fdf4ff; color: #7e22ce; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-lg { font-size: 13px !important; padding: 6px 18px !important; }

/* ---- Table ---- */
.sa-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sa-table thead tr { border-bottom: 2px solid var(--sa-border); }
.sa-table th {
    padding: 11px 16px; text-align: left;
    font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--sa-text-muted);
    background: linear-gradient(135deg, var(--sa-bg-subtle), var(--sa-hover-bg));
    white-space: nowrap;
}
.sa-table td { padding: 13px 16px; color: var(--sa-text); border-bottom: 1px solid var(--sa-border); vertical-align: middle; transition: background 0.15s var(--sa-ease); }
.sa-table tbody tr:last-child td { border-bottom: none; }
.sa-table tbody tr:hover td { background: var(--sa-hover-bg); }

/* Pins an Actions column to the right edge of a .table-responsive-wrapped .sa-table, so
   it's always visible even when the rest of the table needs to scroll horizontally on a
   narrower viewport — otherwise the row's action buttons can end up scrolled out of view
   with no obvious affordance that there's more to the right. Opt-in (not automatic on
   every text-end cell, which is also used for plain numeric alignment elsewhere) — add
   `sa-table-sticky-actions` alongside `text-end` on the Actions <th>/<td>. */
.sa-table-sticky-actions { position: sticky; right: 0; }
.sa-table thead th.sa-table-sticky-actions { background: linear-gradient(135deg, var(--sa-bg-subtle), var(--sa-hover-bg)); z-index: 2; }
.sa-table tbody td.sa-table-sticky-actions { background: var(--sa-card-bg); z-index: 1; box-shadow: -6px 0 8px -6px rgba(0,0,0,0.14); }
.sa-table tbody tr:hover td.sa-table-sticky-actions { background: var(--sa-hover-bg); }

/* ---- Pagination ---- */
.sa-pagination-wrap { padding: 14px 16px; border-top: 1px solid var(--sa-border); }
.sa-pagination-wrap .pagination { margin: 0; gap: 4px; }
.sa-pagination-wrap .page-link {
    border-radius: 8px !important; font-size: 12px; font-weight: 700;
    color: var(--sa-text-muted); border-color: var(--sa-border);
    background: var(--sa-card-bg);
    padding: 5px 11px;
    transition: background 0.2s var(--sa-ease), color 0.2s var(--sa-ease), border-color 0.2s var(--sa-ease), transform 0.15s var(--sa-ease);
}
.sa-pagination-wrap .page-item.active .page-link {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    border-color: transparent; color: #fff;
    box-shadow: 0 3px 8px rgba(124,58,237,0.25);
}
.sa-pagination-wrap .page-link:hover { background: var(--sa-hover-bg); color: var(--sa-primary-dark); border-color: var(--sa-primary); transform: translateY(-1px); }
.sa-pagination-wrap .page-item.disabled .page-link { opacity: 0.5; }

/* ---- Detail Labels (show page) ---- */
.sa-detail-label { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.sa-detail-value { font-size: 14px; font-weight: 600; color: var(--sa-text); }

/* ---- Input / Select (index filter) ---- */
.sa-input {
    padding: 9px 14px;
    border: 1.5px solid var(--sa-border);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'Nunito', sans-serif;
    color: var(--sa-text);
    background: var(--sa-input-bg);
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sa-input:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.sa-input:disabled { background: var(--sa-bg-subtle); color: var(--sa-text-muted); cursor: not-allowed; }
.sa-label { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; display: block; }

/* ============================================================
   SWEETALERT2 — Custom Theme (sa-* style match)
   ============================================================ */

.sa-swal-popup {
    border-radius: 18px !important;
    padding: 32px 28px 28px !important;
    font-family: 'Nunito', sans-serif !important;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.12) !important;
    border: 1px solid #ede9fe !important;
    max-width: 420px !important;
}

.sa-swal-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1e1b4b !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
}

.sa-swal-html {
    font-size: 13.5px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 4px 0 0 !important;
}

.sa-swal-html p { margin: 0 0 8px !important; }
.sa-swal-html p:last-child { margin-bottom: 0 !important; }
.sa-swal-html strong { color: #1e1b4b; }

/* ── Inline status badges inside SweetAlert ── */
.sa-swal-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    vertical-align: middle;
}
.sa-swal-badge-active    { background: #dcfce7; color: #16a34a; }
.sa-swal-badge-suspended { background: #fef2f2; color: #dc2626; }
.sa-swal-badge-rejected  { background: #f1f5f9; color: #475569; }

/* ── Warning note inside popup ── */
.sa-swal-warning-note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #c2410c;
    margin-top: 10px;
    text-align: left;
}

/* ── Buttons ── */
.swal2-actions { gap: 10px !important; margin-top: 24px !important; }

.sa-swal-confirm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: 'Nunito', sans-serif !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity 0.2s, transform 0.15s !important;
}
.sa-swal-confirm:hover { opacity: 0.88 !important; transform: translateY(-1px) !important; }

.sa-swal-confirm-success {
    background: linear-gradient(135deg, #4ade80, #16a34a) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25) !important;
}
.sa-swal-confirm-warning {
    background: linear-gradient(135deg, #fde68a, #f59e0b) !important;
    color: #78350f !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
}
.sa-swal-confirm-danger {
    background: linear-gradient(135deg, #fca5a5, #ef4444) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25) !important;
}

.sa-swal-cancel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: 'Nunito', sans-serif !important;
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1.5px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s !important;
}
.sa-swal-cancel:hover {
    background: #f5f3ff !important;
    color: #6d28d9 !important;
    border-color: #ddd6fe !important;
}

/* ── Icon sizing ── */
.swal2-icon { margin: 0 auto 16px !important; width: 56px !important; height: 56px !important; }
.swal2-icon .swal2-icon-content { font-size: 26px !important; }

/* ============================================================
   TENANT SETUP STEPS & DOMAIN MANAGEMENT
   ============================================================ */

/* ── Steps Wrapper ── */
.sa-steps-wrap { padding: 8px 0; }

.sa-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--sa-border);
    transition: background 0.2s;
}
.sa-step:last-child { border-bottom: none; }
.sa-step:hover { background: var(--sa-hover-bg); }

/* Step number/icon circle */
.sa-step-num {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0; margin-top: 2px;
    background: #f1f5f9; color: #94a3b8;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}
.sa-step-num.done {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    color: #fff; border-color: transparent;
    box-shadow: 0 3px 10px rgba(22,163,74,0.25);
}
.sa-step-num.current {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff; border-color: transparent;
    box-shadow: 0 3px 10px rgba(124,58,237,0.25);
}

.sa-step-content { flex: 1; min-width: 0; }
.sa-step-title {
    font-size: 14px; font-weight: 800; color: var(--sa-text);
    margin-bottom: 4px;
}
.sa-step-desc {
    font-size: 12.5px; color: var(--sa-text-muted); line-height: 1.5;
}
.sa-step-link {
    color: var(--sa-primary-dark); font-weight: 600;
    text-decoration: none; font-size: 12.5px;
}
.sa-step-link:hover { text-decoration: underline; }

.sa-step-remove-btn {
    background: none; border: none;
    color: #ef4444; font-size: 12px; font-weight: 600;
    cursor: pointer; padding: 3px 8px;
    border-radius: 6px; transition: background 0.2s;
}
.sa-step-remove-btn:hover { background: #fef2f2; }

/* ── Domain Pill ── */
.sa-domain-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: #ede9fe; color: #6d28d9;
    font-size: 12.5px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px;
    border: 1px solid #ddd6fe;
}

/* ── DNS Box ── */
.sa-dns-box {
    background: #faf8ff;
    border: 1px solid var(--sa-border);
    border-radius: 10px;
    overflow: hidden;
}
.sa-dns-box-head {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    padding: 8px 14px;
    font-size: 11px; font-weight: 800;
    color: var(--sa-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sa-border);
}
.sa-dns-record {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--sa-border);
    font-size: 12.5px;
}
.sa-dns-record:last-child { border-bottom: none; }
.sa-dns-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 5px;
    text-transform: uppercase; flex-shrink: 0;
}
.sa-dns-badge.a   { background: #dbeafe; color: #1d4ed8; }
.sa-dns-badge.txt { background: #fef9c3; color: #a16207; }
.sa-dns-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sa-dns-name  { color: var(--sa-text-muted); font-weight: 600; }
.sa-dns-arrow { color: #cbd5e1; }
.sa-dns-val   {
    font-family: 'Courier New', monospace;
    font-size: 11.5px; color: var(--sa-text);
    background: #fff; border: 1px solid #e2e8f0;
    padding: 2px 8px; border-radius: 5px;
    word-break: break-all;
}

/* ── DNS Check Result ── */
.sa-dns-result {
    background: #f8fafc;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    padding: 10px 14px;
}
.sa-dns-result-row { font-size: 12.5px; padding: 3px 0; }
.sa-dns-result-ok   { color: #16a34a; font-weight: 600; }
.sa-dns-result-fail { color: #dc2626; font-weight: 600; }

/* ── Credentials Banner ── */
.sa-credentials-banner {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: var(--sa-radius);
    padding: 18px 20px;
}
.sa-credentials-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
}
.sa-credentials-title {
    font-size: 14px; font-weight: 800; color: #15803d;
    margin-bottom: 10px;
}
.sa-credentials-grid {
    display: flex; flex-direction: column; gap: 6px;
}
.sa-cred-label {
    font-size: 11px; font-weight: 700;
    color: #166534; text-transform: uppercase;
    letter-spacing: 0.4px; margin-right: 8px;
}
.sa-cred-value {
    font-size: 13px; font-weight: 600; color: #15803d;
}
.sa-cred-value a { color: #16a34a; text-decoration: underline; }

/* ── DNS Raw Records Debug ── */
.sa-dns-raw {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px;
    background: #fff8f8;
    border: 1px solid #fecaca;
    border-radius: 6px;
    margin-top: 4px;
}
.sa-dns-raw-label {
    font-size: 11px; font-weight: 700;
    color: #dc2626; display: block; margin-bottom: 2px;
}
.sa-dns-raw-val {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #1e293b;
    background: #fff; border: 1px solid #fca5a5;
    padding: 2px 8px; border-radius: 4px;
    word-break: break-all; display: block;
}
.sa-dns-result-skip {
    color: #64748b; font-weight: 600; font-size: 12.5px;
}

/* ============================================================
   AUDIT LOGS
   ============================================================ */

.sa-audit-event {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #475569;
    background: #f1f5f9;
    padding: 2px 8px; border-radius: 5px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.sa-audit-role-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    background: #ede9fe; color: #6d28d9;
    white-space: nowrap; text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Module badges */
.sa-audit-module-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap;
}
.sa-audit-module-auth         { background: #fef9c3; color: #a16207; }
.sa-audit-module-tenant       { background: #dbeafe; color: #1d4ed8; }
.sa-audit-module-domain       { background: #dcfce7; color: #15803d; }
.sa-audit-module-ssl          { background: #f3e8ff; color: #6d28d9; }
.sa-audit-module-user         { background: #ffe4e6; color: #be123c; }
.sa-audit-module-registration { background: #e0f2fe; color: #0369a1; }
.sa-audit-module-otp          { background: #fce7f3; color: #a21caf; }
.sa-audit-module-kyc          { background: #ffedd5; color: #c2410c; }
.sa-audit-module-branding     { background: #f0fdfa; color: #0f766e; }
.sa-audit-module-payments     { background: #eef2ff; color: #4338ca; }
.sa-audit-module-export       { background: #f1f5f9; color: #334155; }
.sa-audit-module-staff        { background: #fdf4ff; color: #86198f; }
.sa-audit-module-admin_role   { background: #f7fee7; color: #3f6212; }

/* JSON diff blocks */
.sa-json-block {
    font-family: 'Courier New', monospace;
    font-size: 12px; line-height: 1.6;
    border-radius: 8px; padding: 14px;
    margin: 0; overflow-x: auto;
    white-space: pre-wrap; word-break: break-all;
}
.sa-json-old { background: #fff8f8; border: 1px solid #fecaca; color: #991b1b; }
.sa-json-new { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

.sa-audit-event {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #475569;
    background: #f1f5f9; padding: 2px 8px;
    border-radius: 5px; border: 1px solid #e2e8f0;
    white-space: nowrap; display: inline-block;
}

.sa-audit-role-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    background: #ede9fe; color: #6d28d9;
    white-space: nowrap; text-transform: uppercase;
    letter-spacing: 0.3px; display: inline-block;
}

.sa-audit-module-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap; display: inline-block;
}
.sa-audit-module-auth         { background: #fef9c3; color: #a16207; }
.sa-audit-module-tenant       { background: #dbeafe; color: #1d4ed8; }
.sa-audit-module-domain       { background: #dcfce7; color: #15803d; }
.sa-audit-module-ssl          { background: #f3e8ff; color: #6d28d9; }
.sa-audit-module-user         { background: #ffe4e6; color: #be123c; }
.sa-audit-module-registration { background: #e0f2fe; color: #0369a1; }
.sa-audit-module-otp          { background: #fce7f3; color: #a21caf; }
.sa-audit-module-kyc          { background: #ffedd5; color: #c2410c; }
.sa-audit-module-branding     { background: #f0fdfa; color: #0f766e; }
.sa-audit-module-payments     { background: #eef2ff; color: #4338ca; }
.sa-audit-module-export       { background: #f1f5f9; color: #334155; }
.sa-audit-module-staff        { background: #fdf4ff; color: #86198f; }
.sa-audit-module-admin_role   { background: #f7fee7; color: #3f6212; }

.sa-json-block {
    font-family: 'Courier New', monospace;
    font-size: 12px; line-height: 1.6;
    border-radius: 8px; padding: 14px; margin: 0;
    overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.sa-json-old { background: #fff8f8; border: 1px solid #fecaca; color: #991b1b; }
.sa-json-new { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

/* ── Impersonation Banner ───────────────────────────────────────── */
.sa-impersonation-bar {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(124,58,237,0.35);
}
.sa-impersonation-stop {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.sa-impersonation-stop:hover { background: rgba(255,255,255,0.35); }

/* ── Page Icon ──────────────────────────────────────────────────── */
.sa-page-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(124,58,237,0.12);
    color: #7c3aed;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}

/* ============================================================
   DARK THEME — Component Overrides
   Every "sa-*" badge / pill / info-box below was hand-tuned as a
   light pastel bg + saturated-dark text pair. None of that reads on
   a dark surface, so each gets a translucent-on-dark equivalent here
   instead of touching the light-mode rule above.
   ============================================================ */
:root[data-theme="dark"] {
    --sa-green-bg:  rgba(34,197,94,0.15);   --sa-green-text:  #4ade80;
    --sa-yellow-bg: rgba(234,179,8,0.15);   --sa-yellow-text: #fbbf24;
    --sa-red-bg:    rgba(239,68,68,0.15);   --sa-red-text:    #f87171;
    --sa-orange-bg: rgba(249,115,22,0.15);  --sa-orange-text: #fb923c;
    --sa-purple-bg: rgba(139,92,246,0.18);  --sa-purple-text: #c4b5fd;
    --sa-slate-bg:  rgba(148,163,184,0.15); --sa-slate-text:  #94a3b8;
    --sa-blue-bg:   rgba(59,130,246,0.15);  --sa-blue-text:   #93c5fd;
    --sa-pink-bg:   rgba(244,63,94,0.15);   --sa-pink-text:   #fb7185;
}

[data-theme="dark"] .sa-toast { background: var(--sa-card-bg); }
[data-theme="dark"] .sa-toast-message { color: var(--sa-text); }
[data-theme="dark"] .sa-toast-close:hover { color: var(--sa-text); }

[data-theme="dark"] .sa-badge-pending,
[data-theme="dark"] .sa-kyc-pending,
[data-theme="dark"] .sa-dns-badge.txt,
[data-theme="dark"] .sa-audit-module-auth        { background: var(--sa-yellow-bg); color: var(--sa-yellow-text); }

[data-theme="dark"] .sa-badge-active,
[data-theme="dark"] .sa-kyc-approved,
[data-theme="dark"] .sa-kyc-verified,
[data-theme="dark"] .sa-check-ok,
[data-theme="dark"] .sa-kyc-check-ok .sa-kyc-check-icon,
[data-theme="dark"] .sa-audit-module-domain      { background: var(--sa-green-bg); color: var(--sa-green-text); }

[data-theme="dark"] .sa-badge-warning,
[data-theme="dark"] .sa-kyc-rekyc,
[data-theme="dark"] .sa-alert-warning             { background: var(--sa-orange-bg); color: var(--sa-orange-text); }

[data-theme="dark"] .sa-badge-info,
[data-theme="dark"] .sa-doc-icon,
[data-theme="dark"] .sa-domain-pill,
[data-theme="dark"] .sa-audit-role-badge,
[data-theme="dark"] .sa-audit-module-ssl          { background: var(--sa-purple-bg); color: var(--sa-purple-text); }

[data-theme="dark"] .sa-badge-suspended,
[data-theme="dark"] .sa-kyc-rejected,
[data-theme="dark"] .sa-alert-danger,
[data-theme="dark"] .sa-json-old                  { background: var(--sa-red-bg); color: var(--sa-red-text); }

[data-theme="dark"] .sa-badge-rejected,
[data-theme="dark"] .sa-kyc-not-submitted,
[data-theme="dark"] .sa-check-no,
[data-theme="dark"] .sa-kyc-check-pending .sa-kyc-check-icon,
[data-theme="dark"] .sa-audit-event               { background: var(--sa-slate-bg); color: var(--sa-slate-text); }

[data-theme="dark"] .sa-badge-expired              { background: var(--sa-purple-bg); color: var(--sa-purple-text); }
[data-theme="dark"] .sa-dns-badge.a,
[data-theme="dark"] .sa-audit-module-tenant        { background: var(--sa-blue-bg); color: var(--sa-blue-text); }
[data-theme="dark"] .sa-audit-module-user          { background: var(--sa-pink-bg); color: var(--sa-pink-text); }
[data-theme="dark"] .sa-audit-module-registration,
[data-theme="dark"] .sa-audit-module-payments      { background: var(--sa-blue-bg); color: var(--sa-blue-text); }
[data-theme="dark"] .sa-audit-module-otp,
[data-theme="dark"] .sa-audit-module-staff         { background: var(--sa-purple-bg); color: var(--sa-purple-text); }
[data-theme="dark"] .sa-audit-module-kyc           { background: var(--sa-orange-bg); color: var(--sa-orange-text); }
[data-theme="dark"] .sa-audit-module-branding,
[data-theme="dark"] .sa-audit-module-admin_role    { background: var(--sa-green-bg); color: var(--sa-green-text); }
[data-theme="dark"] .sa-audit-module-export        { background: var(--sa-slate-bg); color: var(--sa-slate-text); }

[data-theme="dark"] .sa-json-new,
[data-theme="dark"] .sa-credentials-banner {
    background: var(--sa-green-bg);
    border-color: rgba(34,197,94,0.35);
    color: var(--sa-green-text);
}
[data-theme="dark"] .sa-credentials-title,
[data-theme="dark"] .sa-cred-label,
[data-theme="dark"] .sa-cred-value,
[data-theme="dark"] .sa-cred-value a               { color: var(--sa-green-text); }

[data-theme="dark"] .sa-dns-raw {
    background: var(--sa-red-bg);
    border-color: rgba(239,68,68,0.35);
}
[data-theme="dark"] .sa-dns-raw-label              { color: var(--sa-red-text); }
[data-theme="dark"] .sa-dns-raw-val                { background: var(--sa-input-bg); border-color: rgba(239,68,68,0.35); color: var(--sa-text); }

[data-theme="dark"] .sa-kyc-type-card input:checked + .sa-kyc-type-body,
[data-theme="dark"] .sa-info-box,
[data-theme="dark"] .sa-dns-box-head               { background: var(--sa-hover-bg); }

[data-theme="dark"] .sa-info-box                   { border-color: var(--sa-border); background: linear-gradient(135deg, var(--sa-bg-subtle), var(--sa-hover-bg)); }
[data-theme="dark"] .sa-form-card-header            { background: linear-gradient(135deg, var(--sa-bg-subtle), var(--sa-hover-bg)); }
[data-theme="dark"] .sa-dns-box,
[data-theme="dark"] .sa-dns-result,
[data-theme="dark"] .sa-aadhaar-photo               { background: var(--sa-bg-subtle); }
[data-theme="dark"] .sa-dns-val                     { background: var(--sa-input-bg); border-color: var(--sa-border); }

[data-theme="dark"] .sa-stat-card                   { background: var(--sa-card-bg); }

/* ---- Mini Stat (compact balance tiles — Wallet quick-card) ---- */
.sa-mini-stat-row { display: flex; gap: 12px; }
.sa-mini-stat { flex: 1; background: var(--sa-bg-subtle); border-radius: 10px; padding: 12px 14px; text-align: center; }
.sa-mini-stat-value { font-size: 17px; font-weight: 800; color: var(--sa-text); line-height: 1.2; }
.sa-mini-stat-label { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 3px; }

/* ---- Toggle Switch ---- */
.sa-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.sa-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.sa-switch-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 22px; cursor: pointer; transition: background .2s ease; }
.sa-switch-slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.sa-switch input:checked + .sa-switch-slider { background: var(--sa-primary); }
.sa-switch input:checked + .sa-switch-slider::before { transform: translateX(18px); }
.sa-switch input:disabled + .sa-switch-slider { opacity: .6; cursor: not-allowed; }

/* ---- Service Row (per-user/tenant service enable-disable list) ---- */
.sa-service-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid var(--sa-border); border-radius: 12px;
    background: var(--sa-card-bg); transition: border-color .15s ease, background .15s ease;
}
.sa-service-row:hover { border-color: var(--sa-primary); background: var(--sa-hover-bg); }
.sa-service-row.is-disabled { opacity: .65; }
.sa-service-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sa-service-icon {
    width: 34px; height: 34px; border-radius: 9px; background: var(--sa-bg-subtle);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.sa-service-icon img { width: 20px; height: 20px; object-fit: contain; }
.sa-service-icon i { color: var(--sa-primary); font-size: 14px; }
.sa-service-text { min-width: 0; }
.sa-service-name { font-size: 13.5px; font-weight: 700; color: var(--sa-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-service-count { font-size: 11px; font-weight: 700; color: var(--sa-primary-dark); background: var(--sa-primary-light); padding: 4px 12px; border-radius: 20px; white-space: nowrap; }

/* ---- Quick Link list (Wallet / Activity & Logs cards, etc.) ---- */
.sa-quick-link {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--sa-border); border-radius: 12px; text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.sa-quick-link:hover { border-color: var(--sa-primary); background: var(--sa-hover-bg); }
.sa-quick-link + .sa-quick-link { margin-top: 10px; }
.sa-quick-link-icon {
    width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center;
    justify-content: center; font-size: 15px; flex-shrink: 0;
}
.sa-quick-link-text { min-width: 0; }
.sa-quick-link-title { font-size: 13.5px; font-weight: 700; color: var(--sa-text); }
.sa-quick-link-desc { font-size: 11.5px; color: var(--sa-text-muted); margin-top: 1px; }
.sa-quick-link-arrow { margin-left: auto; color: var(--sa-text-muted); font-size: 13px; flex-shrink: 0; }

[data-theme="dark"] .sa-switch-slider { background: #3a3552; }
[data-theme="dark"] .sa-mini-stat { background: var(--sa-hover-bg); }

/* ---- Themed Tabs (show-page section switcher) ---- */
.sa-tabs {
    display: flex; gap: 4px; padding: 8px;
    background: var(--sa-bg-subtle);
    border-bottom: 1px solid var(--sa-border);
    overflow-x: auto;
}
.sa-tabs::-webkit-scrollbar { display: none; }
.sa-tab-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 9px;
    font-size: 12.5px; font-weight: 700;
    color: var(--sa-text-muted); background: transparent; border: none;
    cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background 0.2s var(--sa-ease), color 0.2s var(--sa-ease);
}
.sa-tab-link:hover { background: var(--sa-hover-bg); color: var(--sa-text); }
.sa-tab-link.active {
    background: var(--sa-card-bg); color: var(--sa-primary-dark);
    box-shadow: var(--sa-shadow);
}
.sa-tab-badge {
    background: var(--sa-primary-light); color: var(--sa-primary-dark);
    font-size: 10px; font-weight: 800;
    padding: 1px 7px; border-radius: 20px; line-height: 1.6;
}
.sa-tab-link.active .sa-tab-badge { background: var(--sa-primary); color: #fff; }
.sa-tab-section + .sa-tab-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--sa-border); }
.sa-tab-section-title { font-size: 13px; font-weight: 800; color: var(--sa-text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
