/* ==========================================================================
   ErlanMail Design System
   Light Graphite ramp, IBM Plex Sans + IBM Plex Mono, strict 4px spacing grid
   ========================================================================== */

:root {
    /* Neutral ramp (Cool Alabaster & Graphite) */
    --surface-page: #f3f4f8;
    --surface-card: #ffffff;
    --surface-raised: #eef0f6;
    --surface-active: #e3e6f0;
    --border-hairline: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.15);

    /* Three text roles */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Single accent (Cobalt Ink, contrast > 8:1 with white) */
    --accent: #1d4ed8;
    --accent-hover: #1e40af;
    --accent-tint: #eff6ff;

    /* Semantic (toned to sit inside ramp) */
    --positive: #15803d;
    --positive-bg: #f0fdf4;
    --positive-border: rgba(21, 128, 61, 0.22);
    --negative: #dc2626;
    --negative-bg: #fef2f2;
    --negative-border: rgba(220, 38, 38, 0.22);
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: rgba(180, 83, 9, 0.22);
    --star: #eab308;

    /* Type */
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Radii (nested scale: 16 outer -> 10 inner -> 6 micro) */
    --radius-xs: 6px;
    --radius-sm: 9px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Refined layered depth */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
    --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    --shadow-float: 0 16px 40px -6px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.05);

    /* Single motion curve */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 150ms;
    --dur-menu: 200ms;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.28) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background-color: rgba(100, 116, 139, 0.28);
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 116, 139, 0.45);
}

html, body {
    height: 100%;
    font-family: var(--font-sans);
    background-color: var(--surface-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

code, .mono {
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.tabular {
    font-variant-numeric: tabular-nums;
}

/* Focus ring for keyboard users */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Visually hidden utility (modern-web-guidance live region & captions) */
.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

/* Icons: uniform 16px box, text role color */
.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Signature detail: compact monospace keycap */
.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-strong);
    background-color: var(--surface-card);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 1px 0 var(--border-hairline);
}

/* Flat solid brand mark */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
}
.brand:hover {
    text-decoration: none;
}
.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background-color: var(--text-primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.brand-wordmark {
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-primary);
}
.brand-domain {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    color: var(--text-muted);
}

/* ==========================================================================
   Buttons (control radius 8px, height 36px default / 32px compact / 40px primary form)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
}
.btn:active:not(:disabled) {
    transform: scale(0.98);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-lg {
    height: 40px;
    padding: 0 20px;
}
.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}
.btn-xs {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    gap: 5px;
    border-radius: 7px;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.btn-primary {
    background-color: var(--text-primary);
    color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
    background-color: #2c2c2c;
}

.btn-accent {
    background-color: var(--accent);
    color: #ffffff;
}
.btn-accent:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--surface-card);
    border-color: var(--border-strong);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
    background-color: var(--surface-raised);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
    background-color: var(--surface-raised);
    color: var(--text-primary);
}

.btn-danger {
    background-color: transparent;
    border-color: var(--negative-border);
    color: var(--negative);
}
.btn-danger:hover:not(:disabled) {
    background-color: var(--negative-bg);
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
}
.icon-btn:hover:not(:disabled) {
    background-color: var(--surface-raised);
    color: var(--text-primary);
}
.icon-btn:active:not(:disabled) {
    transform: scale(0.97);
}
.icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================================================
   Forms & Modern After-Interaction Validation (:user-invalid + fallback)
   ========================================================================== */
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.field-label {
    font-size: 13px;
    line-height: 20px;
    font-weight: 500;
    color: var(--text-primary);
}
.field-hint {
    font-size: 12px;
    line-height: 16px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface-card);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.input::placeholder {
    color: var(--text-muted);
}
.input:hover {
    border-color: rgba(23, 23, 23, 0.28);
}
.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface-card);
    overflow: hidden;
    transition: border-color var(--dur-fast) var(--ease);
}
.input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}
.input-group input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: none;
    background: transparent;
    outline: none;
}
.input-addon {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background-color: var(--surface-raised);
    border-left: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}
.input-action-btn {
    border: none;
    border-left: 1px solid var(--border-hairline);
    background-color: transparent;
    color: var(--text-secondary);
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.input-action-btn:hover {
    background-color: var(--surface-raised);
    color: var(--text-primary);
}

/* Validate only after interaction (:user-invalid + JS fallback) */
.error-msg {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: var(--negative);
    font-size: 12px;
    line-height: 16px;
}
:is(.input:user-invalid, .input.user-invalid-fallback) {
    border-color: var(--negative);
    background-color: var(--negative-bg);
}
.field:has(:is(:user-invalid, .user-invalid-fallback)) .input-group {
    border-color: var(--negative);
    background-color: var(--negative-bg);
}
.field:has(:is(:user-invalid, .user-invalid-fallback)) .error-msg {
    display: flex;
}
:is(.input:user-valid, .input.user-valid-fallback) {
    border-color: var(--positive);
}

/* ==========================================================================
   Inline Status Banners
   ========================================================================== */
.banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hairline);
    font-size: 13px;
    line-height: 20px;
    margin-bottom: 20px;
}
.banner .icon {
    margin-top: 2px;
}
.banner-error {
    background-color: var(--negative-bg);
    border-color: var(--negative-border);
    color: var(--negative);
}
.banner-success {
    background-color: var(--positive-bg);
    border-color: var(--positive-border);
    color: var(--positive);
}
.banner-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}

/* ==========================================================================
   Login & Registration View (Clean Unslop Split Layout, Responsive All Ratios)
   ========================================================================== */
.auth-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vw, 48px) clamp(14px, 3vw, 28px);
    background-color: #0b0d14;
    background-image: url('/images/landing/hero-scene-bg.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(11, 13, 20, 0.62);
    pointer-events: none;
}

.auth-split-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
}

.auth-showcase-aside {
    color: #eef0f5;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-back-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    background-color: #11141c;
    border: 1px solid rgba(238, 240, 245, 0.12);
    color: #eef0f5;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-back-pill:hover {
    background-color: #1a1e28;
    border-color: rgba(238, 240, 245, 0.24);
    color: #ffffff;
}

.auth-showcase-title {
    font-size: clamp(24px, 2.8vw, 36px);
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.auth-showcase-sub {
    font-size: 15px;
    line-height: 1.6;
    color: #a3a9b8;
    margin-top: 12px;
    max-width: 440px;
}

.auth-mini-3d-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auth-mini-3d-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background-color: #11141c;
    border: 1px solid rgba(238, 240, 245, 0.1);
}

.auth-mini-3d-card img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.auth-mini-title {
    font-size: 13.5px;
    font-weight: 500;
    color: #eef0f5;
}

.auth-mini-desc {
    font-size: 12px;
    color: #a3a9b8;
    margin-top: 2px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    padding: clamp(20px, 3.5vw, 28px);
    display: flex;
    flex-direction: column;
}

.auth-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 6px;
}

.auth-live-pill.is-neutral {
    background-color: #f5f7fa;
    color: #4b5565;
    border: 1px solid #e2e8f0;
}

.auth-live-pill.is-valid {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.auth-live-pill.is-invalid {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-quick-chip {
    border: 1px solid #bfdbfe;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-quick-chip:hover {
    background-color: #dbeafe;
}

.pw-strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 8px;
}

.pw-strength-seg {
    height: 4px;
    border-radius: 2px;
    background-color: #e2e8f0;
    transition: background-color 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.pw-strength-seg.is-on-1 { background-color: #dc2626; }
.pw-strength-seg.is-on-2 { background-color: #d97706; }
.pw-strength-seg.is-on-3 { background-color: #2563eb; }
.pw-strength-seg.is-on-4 { background-color: #1d4ed8; }

@media (max-width: 900px) {
    .auth-split-shell {
        grid-template-columns: 1fr;
        max-width: 440px;
        gap: 20px;
    }
    .auth-showcase-aside {
        gap: 14px;
    }
    .auth-showcase-title {
        font-size: 22px;
    }
    .auth-showcase-sub {
        font-size: 13.5px;
        margin-top: 6px;
    }
    .auth-mini-3d-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 16px 12px 28px;
        align-items: flex-start;
    }
    .auth-mini-3d-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .auth-card {
        padding: 18px 16px;
        border-radius: 14px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .auth-page {
        align-items: flex-start;
        padding: 16px;
    }
}

.auth-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-header-text {
    margin-bottom: 20px;
}

.auth-heading {
    font-size: 22px;
    line-height: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.auth-sub {
    font-size: 13px;
    line-height: 19px;
    color: var(--text-secondary);
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background-color: var(--surface-raised);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hairline);
    margin-bottom: 24px;
}
.segmented.segmented-3 {
    grid-template-columns: repeat(3, 1fr);
}
.segmented.segmented-4 {
    grid-template-columns: repeat(4, 1fr);
}
.segmented-btn {
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.segmented-btn[aria-selected="true"] {
    background-color: var(--surface-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-hairline);
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Webmail Application Shell (Fixed Non-Scrolling Header & Inset Workspace)
   ========================================================================== */
.app-shell {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--surface-page);
}

.topbar {
    height: 60px;
    padding: 0 18px;
    background-color: var(--surface-page);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
    z-index: 40;
}
.topbar-start {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.topbar-end {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.account-trigger-email {
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.search-field {
    flex: 1;
    max-width: 540px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 12px;
    background-color: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
    color: var(--text-primary);
}
.search-field input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--text-primary);
}
.search-field input::-webkit-search-cancel-button {
    display: none;
}
.search-clear-btn {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-xs);
    border: none;
    background: var(--surface-raised);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.search-clear-btn[hidden] {
    display: none;
}
.search-clear-btn:hover {
    background: var(--surface-active);
    color: var(--text-primary);
}

.workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-mobile-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-hairline);
}

.sidebar {
    width: 252px;
    flex-shrink: 0;
    padding: 8px 14px 16px 16px;
    background-color: var(--surface-page);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 220ms var(--ease),
                padding 220ms var(--ease),
                opacity 160ms var(--ease),
                transform 240ms var(--ease);
}
.sidebar.is-collapsed {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar-section-label {
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 20px 0 6px 12px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-item:hover {
    background-color: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
}
.nav-item.active {
    background-color: var(--surface-card);
    border-color: var(--border-hairline);
    color: var(--accent);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.nav-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.nav-item-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count {
    color: var(--accent);
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-hairline);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Main Content Pane (Floating Rounded Workspace Card, Fixed Toolbar) */
.content-pane {
    flex: 1;
    min-width: 0;
    margin: 0 12px 12px 0;
    background-color: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left 220ms var(--ease);
}
.sidebar.is-collapsed + .content-pane {
    margin-left: 12px;
}

.pane-toolbar {
    height: 50px;
    padding: 0 18px;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
}
.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-list {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.message-row {
    position: relative;
    display: grid;
    grid-template-columns: 32px 210px 1fr 84px;
    align-items: center;
    gap: 12px;
    height: 46px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-hairline);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
}
.message-row:hover {
    background-color: #f8faff;
}
.message-row.unread {
    background-color: #ffffff;
}
.message-row.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background-color: var(--accent);
}
.message-row.read {
    background-color: #fafbfd;
}
.message-row.unread .msg-sender,
.message-row.unread .msg-subject {
    font-weight: 600;
    color: var(--text-primary);
}
.msg-sender {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.msg-subject {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.msg-date {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.message-row.unread .msg-date {
    color: var(--text-primary);
    font-weight: 500;
}

.star-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.star-btn:hover {
    background-color: var(--surface-active);
    color: var(--text-primary);
}
.star-btn.starred {
    color: var(--star);
}
.star-btn.starred svg {
    fill: var(--star);
}

/* ==========================================================================
   Message Reader (Moment 1: Archival Letter Sheet)
   ========================================================================== */
.reader-view {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}
.reader-view.open {
    display: flex;
}
.reader-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 28px 48px;
    background-color: #fafbfd;
}
.letter-sheet {
    max-width: 880px;
    margin: 0 auto;
    background-color: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
}
.letter-subject {
    font-size: 20px;
    line-height: 28px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.letter-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-hairline);
}
.letter-sender {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: var(--surface-raised);
    border: 1px solid var(--border-hairline);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    object-fit: cover;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.color-swatch-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.color-swatch-label {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: transform var(--dur-fast) var(--ease);
}
.color-swatch-label:has(input:checked) {
    border-color: var(--text-primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #ffffff inset;
}
.letter-frame {
    width: 100%;
    min-height: 360px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background-color: #ffffff;
}
.letter-text {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 22px;
    color: var(--text-primary);
    padding: 20px;
    background-color: var(--surface-page);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
}
.attachments-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
    background-color: var(--surface-page);
    color: var(--text-primary);
    font-size: 13px;
}
.attachment-link:hover {
    background-color: var(--surface-raised);
    text-decoration: none;
}

/* ==========================================================================
   Native Popover Account Menu (modern-web-guidance Rule 3 + polyfill-safe)
   ========================================================================== */
.account-trigger {
    height: 36px;
    padding: 0 10px 0 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
    background-color: var(--surface-card);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
}
.account-trigger:hover {
    background-color: var(--surface-raised);
}

#accountMenu[popover] {
    inset: auto;
    top: 60px;
    right: 16px;
    width: 280px;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background-color: var(--surface-card);
    box-shadow: var(--shadow-float);
    color: var(--text-primary);
}
#accountMenu[popover]:is(:popover-open, .\:popover-open) {
    display: block;
}
@supports not selector(:popover-open) {
    [popover]:not(.\:popover-open) {
        display: none;
    }
}
.popover-section {
    padding: 8px;
    border-bottom: 1px solid var(--border-hairline);
    margin-bottom: 4px;
}
.popover-label {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 8px;
}
.menu-item {
    width: 100%;
    height: 36px;
    padding: 0 8px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background-color var(--dur-fast) var(--ease);
}
.menu-item:hover {
    background-color: var(--surface-raised);
    text-decoration: none;
}
.menu-item.danger {
    color: var(--negative);
}

/* ==========================================================================
   Native <dialog> Rules (modern-web-guidance Rule 1 & Rule 2)
   ========================================================================== */
dialog:modal {
    overscroll-behavior: contain;
    margin: auto;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background-color: var(--surface-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-float);
    max-width: min(440px, calc(100vw - 32px));
    width: 100%;
}
dialog.dialog-wide:modal {
    max-width: min(680px, calc(100vw - 24px));
}

.guide-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.guide-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hairline);
    background-color: var(--surface-page);
}
.guide-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.guide-steps li strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.guide-steps li p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.server-spec-box {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--surface-card);
}
.server-spec-head {
    padding: 10px 14px;
    background-color: var(--surface-raised);
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}
.server-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.server-spec-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-hairline);
    border-right: 1px solid var(--border-hairline);
}
.server-spec-item:nth-child(2n) {
    border-right: none;
}
.server-spec-item:nth-last-child(-n+2) {
    border-bottom: none;
}
.server-spec-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.server-spec-val {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.copy-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-strong);
    background-color: var(--surface-page);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
}
.copy-chip:hover {
    background-color: var(--surface-raised);
    color: var(--text-primary);
}
dialog::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
    background-color: rgba(23, 23, 23, 0.36);
}
.dialog-inner {
    padding: 24px;
}
.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.dialog-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
}

/* Non-modal Compose Pane: <dialog popover="manual"> (Rule 2) */
#composeDialog[popover] {
    inset: auto 24px 0 auto;
    width: min(520px, calc(100vw - 24px));
    padding: 0;
    border: 1px solid var(--border-strong);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background-color: var(--surface-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-float);
}
#composeDialog[popover]:is(:popover-open, .\:popover-open) {
    display: flex;
    flex-direction: column;
}
#composeDialog[popover].is-minimized form {
    display: none;
}
#composeDialog[popover].is-minimized #minimizeComposeBtn svg {
    transform: rotate(180deg);
}
.compose-head {
    height: 44px;
    padding: 0 12px 0 16px;
    background-color: var(--surface-page);
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.compose-head h2 {
    font-size: 14px;
    font-weight: 500;
}
.compose-row {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-hairline);
    gap: 8px;
}
.compose-row label {
    width: 56px;
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.compose-row input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
}
.compose-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: none;
    outline: none;
    resize: vertical;
    font-size: 14px;
    line-height: 22px;
}
.compose-foot {
    padding: 12px 16px;
    border-top: 1px solid var(--border-hairline);
    background-color: var(--surface-page);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ==========================================================================
   Admin Console (Fixed Non-Scrolling Glass Header & Elevated Cards)
   ========================================================================== */
.admin-shell {
    min-height: 100dvh;
    padding-top: 60px;
    background-color: var(--surface-page);
}
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 28px;
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-hairline);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 50;
}
.admin-main {
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 32px 64px;
}
.admin-dashboard-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 28px 64px;
    background-color: #fafbfd;
}
.admin-dashboard-inner {
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
}
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.page-title {
    font-size: 28px;
    line-height: 32px;
    font-weight: 500;
    color: var(--text-primary);
}
.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stat strip: compact numbers only */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-row.stat-row-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-hairline);
    background-color: var(--surface-raised);
    color: var(--text-secondary);
    white-space: nowrap;
}
.badge-pending {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}
.badge-approved {
    background-color: var(--positive-bg);
    border-color: var(--positive-border);
    color: var(--positive);
}
.badge-suspended,
.badge-rejected {
    background-color: var(--negative-bg);
    border-color: var(--negative-border);
    color: var(--negative);
}
.badge-admin {
    background-color: var(--accent-tint);
    border-color: rgba(30, 64, 175, 0.24);
    color: var(--accent);
}
.stat-card {
    background-color: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}
.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.stat-value {
    font-family: var(--font-mono);
    font-size: 28px;
    line-height: 1;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}
.stat-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    display: inline-block;
    flex-shrink: 0;
}
.status-dot.online { background-color: var(--positive); }
.status-dot.warn { background-color: var(--warning); }
.status-dot.error { background-color: var(--negative); }

/* Asymmetric grid: wide table + narrower form column */
.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}
.admin-side-forms {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.card {
    background-color: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 24px;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.card-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--text-primary);
}
.card-desc {
    font-size: 13px;
    line-height: 20px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ==========================================================================
   Responsive Table (modern-web-guidance: sticky headers + @container stack)
   ========================================================================== */
.table-wrapper {
    overflow: auto;
    max-inline-size: 100%;
    max-block-size: min(520px, 70vh);
    container-type: inline-size;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
}
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.data-table thead {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
}
.data-table thead th {
    background-color: var(--surface-page);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-hairline);
    white-space: nowrap;
}
.data-table tbody th {
    position: sticky;
    inset-inline-start: 0;
    background-color: var(--surface-card);
    font-weight: 500;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-hairline);
    vertical-align: middle;
}
.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-hairline);
    vertical-align: middle;
    color: var(--text-secondary);
}
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
    background-color: var(--surface-raised);
}

.quota-track {
    width: 96px;
    height: 4px;
    border-radius: var(--radius-xs);
    background-color: var(--surface-active);
    overflow: hidden;
    margin-top: 6px;
}
.quota-fill {
    height: 100%;
    background-color: var(--accent);
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll .data-table {
    width: 100%;
    min-width: 640px;
}

.table-scroll .data-table th,
.table-scroll .data-table td {
    white-space: nowrap;
}

.table-scroll .data-table td:first-child,
.table-scroll .data-table td:nth-child(2) {
    white-space: normal;
}

/* Sembunyikan teks nama ErlanMail di header pada layar mobile (< 768px), hanya tampil di Tablet/iPad & Desktop */
@media (max-width: 767px) {
    .topbar .brand-wordmark,
    .landing-navbar .brand-wordmark {
        display: none;
    }
}

@media (max-width: 640px) {
    .table-scroll .data-table th,
    .table-scroll .data-table td {
        padding: 10px 10px;
        font-size: 12.5px;
    }
}

.app-shell {
    overflow-x: hidden;
    max-width: 100vw;
}

.workspace {
    min-width: 0;
    max-width: 100%;
}

.admin-grid > *,
.card,
.content-pane,
.admin-scroll-area {
    min-width: 0;
    max-width: 100%;
}

.topbar-start,
.topbar-end {
    min-width: 0;
}

/* ==========================================================================
   Toast & Empty States
   ========================================================================== */
.toast-stack {
    position: fixed;
    left: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 400;
}
.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background-color: var(--text-primary);
    color: #ffffff;
    font-size: 13px;
    box-shadow: var(--shadow-float);
    animation: toastIn var(--dur-menu) var(--ease);
}
.toast.error { background-color: var(--negative); }
.toast.success { background-color: #14532d; }

.empty-state {
    padding: 64px 24px;
    text-align: center;
    color: var(--text-secondary);
}
.empty-state-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

/* ==========================================================================
   Loading System: Top Progress Bar, Spinners & Shimmer Skeletons
   ========================================================================== */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
    background-color: transparent;
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
}
.top-progress-bar.active {
    opacity: 1;
    background-color: rgba(30, 64, 175, 0.14);
}
.top-progress-bar.active::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 42%;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-hover), transparent);
    animation: topProgressSlide 1.15s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes topProgressSlide {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(260%); }
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    animation: spin360 0.65s linear infinite;
}

.is-spinning svg,
svg.is-spinning {
    animation: spin360 0.75s linear infinite;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

@keyframes spin360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.skeleton {
    display: inline-block;
    border-radius: var(--radius-xs);
    background: linear-gradient(
        90deg,
        var(--surface-raised) 25%,
        var(--surface-active) 50%,
        var(--surface-raised) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.35s ease-in-out infinite;
}
.skeleton-icon {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-xs);
    flex-shrink: 0;
}
.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.skeleton-badge {
    width: 22px;
    height: 14px;
    border-radius: var(--radius-xs);
    margin-left: auto;
    flex-shrink: 0;
}
.skeleton-line {
    height: 13px;
}

.skeleton-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.skeleton-folder-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
}

.skeleton-list {
    display: flex;
    flex-direction: column;
}
.skeleton-message-row {
    display: grid;
    grid-template-columns: 32px 200px 1fr 76px;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-hairline);
}
.skeleton-reader {
    padding: 8px 0;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton,
    .top-progress-bar.active::after,
    .spinner,
    .is-spinning svg {
        animation-duration: 2.5s;
    }
}

/* ==========================================================================
   2K / QHD & Ultra-Wide Scaling (1800px - 2560px+)
   ========================================================================== */
@media (min-width: 1800px) {
    body {
        font-size: 15px;
        line-height: 22px;
    }
    .topbar {
        height: 66px;
        padding: 0 24px;
    }
    .search-field {
        max-width: 680px;
        height: 40px;
    }
    .sidebar {
        width: 280px;
        padding: 12px 16px 20px 20px;
    }
    .nav-item {
        height: 40px;
        font-size: 14px;
    }
    .pane-toolbar {
        height: 54px;
        padding: 0 24px;
    }
    .message-row {
        grid-template-columns: 36px 260px 1fr 110px;
        height: 50px;
        padding: 0 24px;
    }
    .letter-sheet {
        max-width: 1120px;
        padding: 36px 44px;
    }
    .admin-dashboard-scroll {
        padding: 32px 40px 80px;
    }
    .admin-dashboard-inner {
        max-width: 2240px;
    }
    .admin-grid {
        grid-template-columns: minmax(0, 1fr) 440px;
        gap: 32px;
    }
    .stat-row.stat-row-4 {
        gap: 20px;
        margin-bottom: 28px;
    }
    .stat-card {
        padding: 24px 26px;
    }
    .stat-value {
        font-size: 32px;
    }
    .card {
        padding: 28px 30px;
        margin-bottom: 28px;
    }
    .data-table {
        font-size: 14px;
    }
    .data-table thead th,
    .data-table tbody th,
    .data-table tbody td {
        padding: 14px 20px;
    }
    .auth-card {
        max-width: 480px;
        padding: 42px 38px 32px;
    }
}

/* ==========================================================================
   Laptop & Medium Desktop (<= 1360px): Full-Width CRUD Tables + 2-Col Forms
   ========================================================================== */
@media (max-width: 1360px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .admin-side-forms {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        align-items: start;
    }
}

@media (max-width: 1180px) {
    .btn-label-responsive {
        display: none;
    }
    .topbar-end .btn-sm {
        padding: 0 9px;
    }
}

@media (max-width: 1120px) {
    .stat-row.stat-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Tablet & Mobile Drawer Breakpoint (<= 1040px)
   ========================================================================== */
@media (max-width: 1040px) {
    /* Slide-over Mobile/Tablet Sidebar with Translucent Backdrop */
    .sidebar-backdrop.open,
    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 60px 0 0 0;
        background-color: rgba(15, 23, 42, 0.38);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 55;
        animation: fadeInBackdrop 180ms var(--ease);
    }
    .sidebar {
        position: fixed;
        inset: 60px auto 0 0;
        width: min(284px, 84vw);
        z-index: 60;
        background-color: var(--surface-card);
        border-right: 1px solid var(--border-hairline);
        box-shadow: var(--shadow-float);
        transform: translateX(-104%);
        opacity: 1;
        pointer-events: auto;
        padding: 16px;
        transition: transform 220ms var(--ease);
    }
    .sidebar.is-collapsed {
        width: min(284px, 84vw);
        padding: 16px;
        opacity: 1;
        transform: translateX(-104%);
    }
    .sidebar.mobile-open,
    .sidebar.is-open {
        transform: translateX(0);
    }
    .sidebar-mobile-head {
        display: flex;
    }
    .content-pane {
        margin: 0 10px 10px 10px;
    }
    .sidebar.is-collapsed + .content-pane {
        margin-left: 10px;
    }
}

@media (max-width: 960px) {
    .message-row {
        grid-template-columns: 28px 1fr auto;
        height: auto;
        padding: 12px 14px;
        row-gap: 4px;
    }
    .msg-subject {
        grid-column: 2 / 4;
        font-size: 13px;
    }
    .skeleton-message-row {
        grid-template-columns: 28px 120px 1fr 48px;
        padding: 0 14px;
    }
    .content-pane {
        margin: 0;
        border: none;
        border-top: 1px solid var(--border-hairline);
        border-radius: 0;
    }
    .sidebar.is-collapsed + .content-pane {
        margin-left: 0;
    }
    .reader-scroll,
    .admin-dashboard-scroll {
        padding: 16px 14px 40px;
    }
    .letter-sheet {
        padding: 18px 16px;
        border-radius: var(--radius-md);
    }
    .table-actions {
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Mobile Phones (<= 640px)
   ========================================================================== */
/* Sembunyikan teks nama ErlanMail di header pada layar mobile (< 768px), hanya tampil di Tablet/iPad & Desktop */
@media (max-width: 767px) {
    .topbar .brand-wordmark,
    .landing-navbar .brand-wordmark {
        display: none;
    }
}

@media (max-width: 640px) {
    .topbar {
        height: 54px;
        padding: 0 10px;
        gap: 6px;
        max-width: 100vw;
        overflow: hidden;
    }
    .topbar-start {
        gap: 6px;
        min-width: 0;
        flex-shrink: 1;
    }
    .topbar-end {
        gap: 4px;
        min-width: 0;
        flex-shrink: 0;
    }
    .topbar-end .btn-sm {
        padding: 0 8px;
        height: 32px;
        min-width: 32px;
        justify-content: center;
    }
    .search-field {
        min-width: 0;
        flex: 1 1 80px;
        height: 32px;
        padding: 0 8px;
    }
    .sidebar-backdrop.open,
    .sidebar-backdrop.is-open,
    .sidebar {
        top: 54px;
    }
    .topbar .brand-wordmark,
    .landing-navbar .brand-wordmark,
    .hide-mobile,
    .btn-label-responsive {
        display: none;
    }
    .topbar-end .btn-sm {
        padding: 0 9px;
    }
    .account-trigger-email {
        max-width: 88px;
    }
    .stat-row,
    .stat-row.stat-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 14px;
    }
    .stat-value {
        font-size: 22px;
    }
    .stat-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .stat-meta {
        font-size: 11px;
        margin-top: 6px;
    }
    .card {
        padding: 14px;
        border-radius: var(--radius-md);
        margin-bottom: 16px;
    }
    .pane-toolbar {
        height: auto;
        min-height: 46px;
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .letter-header {
        flex-direction: column;
        gap: 8px;
    }
    .letter-subject {
        font-size: 18px;
        line-height: 24px;
    }
    dialog:modal,
    dialog.dialog-wide:modal {
        margin: auto 0 0 0;
        max-width: 100vw;
        width: 100vw;
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
        border-bottom: none;
    }
    .dialog-inner {
        padding: 18px 16px 24px;
    }
    #composeDialog[popover] {
        inset: auto 0 0 0;
        width: 100%;
        max-height: 90dvh;
        border-left: none;
        border-right: none;
    }
    .compose-textarea {
        min-height: 160px;
    }
    .segmented.segmented-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .server-spec-grid {
        grid-template-columns: 1fr;
    }
    .server-spec-item {
        border-right: none;
    }
    .server-spec-item:nth-last-child(2) {
        border-bottom: 1px solid var(--border-hairline);
    }
    .auth-card {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }
    .toast-stack {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 380px) {
    .stat-row,
    .stat-row.stat-row-4 {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeInBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   SweetAlert2 Custom ErlanMail Modal Theme & Clean Dashboard Polish
   ========================================================================== */
.erlan-swal-popup.swal2-popup {
    font-family: var(--font-sans);
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    padding: 24px 22px 22px;
    max-width: 420px;
}

.erlan-swal-popup .swal2-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    padding: 4px 12px 0;
}

.erlan-swal-popup .swal2-html-container {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 10px 8px 0;
}

.erlan-swal-popup .swal2-actions {
    margin-top: 20px;
    gap: 10px;
}

.erlan-swal-popup .swal2-actions .btn {
    min-width: 112px;
    height: 38px;
}

/* ==========================================================================
   Driver.js Interactive Tour Theme (ErlanMail)
   ========================================================================== */
.driver-popover.erlan-driver-popover {
    font-family: var(--font-sans);
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    padding: 16px 18px;
    max-width: 340px;
}

.driver-popover.erlan-driver-popover .driver-popover-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.driver-popover.erlan-driver-popover .driver-popover-description {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.driver-popover.erlan-driver-popover .driver-popover-footer {
    margin-top: 14px;
    gap: 6px;
}

.driver-popover.erlan-driver-popover .driver-popover-progress-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.driver-popover.erlan-driver-popover button.driver-popover-next-btn,
.driver-popover.erlan-driver-popover button.driver-popover-prev-btn {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    text-shadow: none;
    transition: background var(--dur-fast) var(--ease);
}

.driver-popover.erlan-driver-popover button.driver-popover-next-btn {
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
}

.driver-popover.erlan-driver-popover button.driver-popover-next-btn:hover {
    background: var(--accent-hover);
}

.driver-popover.erlan-driver-popover button.driver-popover-prev-btn {
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.driver-popover.erlan-driver-popover button.driver-popover-prev-btn:hover {
    background: var(--surface-raised);
}

/* Dashboard User & Admin Unified Classes */
.admin-scroll-area {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    background: var(--surface-page);
}

.admin-container {
    max-width: 1520px;
    margin: 0 auto;
    padding: 24px 28px 48px;
}

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.015em;
}

.admin-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card-description {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-hairline);
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-hairline);
    background: var(--surface-page);
}

@media (max-width: 1100px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Sembunyikan teks nama ErlanMail di header pada layar mobile (< 768px), hanya tampil di Tablet/iPad & Desktop */
@media (max-width: 767px) {
    .topbar .brand-wordmark,
    .landing-navbar .brand-wordmark {
        display: none;
    }
}

@media (max-width: 640px) {
    .admin-container {
        padding: 16px 14px 36px;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .responsive-form-row-2-1,
    .responsive-form-row-3 {
        grid-template-columns: 1fr !important;
    }
    .account-trigger-email {
        display: none;
    }
    .account-trigger {
        padding: 0 6px;
        gap: 4px;
    }
}

.responsive-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.responsive-form-row-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.responsive-form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

/* ==========================================================================
   Unslop Clean Layout: Blue / Black / White Palette, Zero Slop, All Ratios
   ========================================================================== */
:root {
    --ink-black: #0b0d14;
    --ink-surface: #11141c;
    --ink-raised: #1a1e28;
    --ink-border: rgba(238, 240, 245, 0.08);
    --cobalt-blue: #1d4ed8;
    --cobalt-blue-hover: #1e40af;
    --cobalt-soft: #dbeafe;
    --slate-soft: #e8eef7;
    --pure-white: #ffffff;
    --page-light: #f5f7fa;
    --text-dark: #111827;
    --text-mid: #4b5565;
    --text-low: #6b7487;
}

.landing-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--pure-white);
    padding-top: 64px;
    overflow-x: hidden;
    color: var(--text-dark);
}

/* Quiet Fixed Solid Ink-Black Header (#0b0d14) */
.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 120;
    background-color: var(--ink-black);
    color: var(--pure-white);
    border-bottom: 1px solid var(--ink-border);
}

.landing-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
}

.landing-navbar .brand-wordmark {
    color: var(--pure-white);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.landing-domain-badge {
    border-radius: 6px;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 400;
    background-color: var(--ink-surface);
    border: 1px solid var(--ink-border);
    color: #a3a9b8;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 400;
    flex: 1 1 auto;
    min-width: 0;
}

.landing-nav-links a {
    color: #a3a9b8;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 0;
    transition: color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-nav-links a:hover {
    color: var(--pure-white);
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.landing-nav-login-link {
    color: #eef0f5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 4px;
    transition: color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-nav-login-link:hover {
    color: #93c5fd;
}

.landing-nav-cta {
    height: 36px !important;
    padding: 0 16px !important;
    font-size: 13.5px !important;
    border-radius: 8px !important;
}

/* Solid Blue, Black & White Buttons (8-10px Unslop Control Radius, Zero Gradients) */
.btn-ink-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    background-color: var(--pure-white);
    color: var(--ink-black);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--pure-white);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s cubic-bezier(0.22, 1, 0.36, 1), transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ink-white:hover {
    background-color: #e2e8f0;
    color: var(--ink-black);
}

.btn-cobalt-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    background-color: var(--cobalt-blue);
    color: var(--pure-white);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--cobalt-blue);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s cubic-bezier(0.22, 1, 0.36, 1), transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-cobalt-solid:hover {
    background-color: var(--cobalt-blue-hover);
    color: var(--pure-white);
}

.btn-ink-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    background-color: var(--ink-surface);
    color: #eef0f5;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(238, 240, 245, 0.14);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ink-outline:hover {
    background-color: var(--ink-raised);
    border-color: rgba(238, 240, 245, 0.28);
    color: var(--pure-white);
}

.landing-mobile-menu-btn {
    display: none;
    color: var(--pure-white);
}

.landing-mobile-drawer {
    border-top: 1px solid var(--ink-border);
    background-color: var(--ink-black);
    padding: 16px 20px 20px;
}

.landing-mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.landing-mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 500;
    color: #eef0f5;
    text-decoration: none;
}

.landing-mobile-link:hover {
    background-color: var(--ink-surface);
    color: #93c5fd;
}

.landing-mobile-drawer-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--ink-border);
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ==========================================================================
   Full-Bleed Scene Hero Stage (Calm Space, Asymmetric Split, Responsive)
   ========================================================================== */
.gojek-hero-stage {
    background-color: var(--ink-black);
    background-image: url('/images/landing/hero-scene-bg.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    color: var(--pure-white);
    padding: clamp(48px, 7vw, 88px) 0;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 64px;
}

.gojek-hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(11, 13, 20, 0.48);
    pointer-events: none;
}

.gojek-hero-inner {
    position: relative;
    z-index: 2;
}

.gojek-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 4.5vw, 56px);
    align-items: center;
}

.gojek-hero-copy-box {
    max-width: 540px;
}

.landing-hero-title {
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--pure-white);
    margin-bottom: 16px;
}

.landing-hero-desc {
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.6;
    color: #a3a9b8;
    margin-bottom: 28px;
    max-width: 480px;
}

.landing-hero-ctas {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Product Window Preview Framed Cleanly */
.gojek-phone-showcase {
    background-color: var(--ink-surface);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(238, 240, 245, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.landing-illustration-frame {
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--pure-white);
    border: 1px solid #e2e8f0;
}

.landing-illustration-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Clean 2-Card Value Section (No Overlapping Gimmicks)
   ========================================================================== */
.gojek-curved-sheet {
    background-color: var(--pure-white);
    padding: clamp(40px, 6vw, 64px) 0 16px;
}

.gojek-stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.gojek-stat-card {
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.gojek-stat-card.is-blue {
    background-color: var(--page-light);
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
}

.gojek-stat-card.is-dark {
    background-color: var(--ink-black);
    color: var(--pure-white);
    border: 1px solid #1e293b;
}

.gojek-stat-pop-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background-color: var(--pure-white);
}

.gojek-stat-number {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 6px;
    letter-spacing: -0.015em;
}

.gojek-stat-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-mid);
}

.gojek-stat-card.is-dark .gojek-stat-desc {
    color: #a3a9b8;
}

/* ==========================================================================
   Product Showcase, Privacy Block, Price Slider & FAQ (Blue / Black / White)
   ========================================================================== */
.landing-section {
    padding: clamp(44px, 6vw, 72px) 0;
    scroll-margin-top: 64px;
}

.landing-section-dark {
    background-color: var(--ink-black);
    color: var(--pure-white);
    border-radius: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 56px) clamp(16px, 3vw, 32px);
    border: 1px solid #1e293b;
}

.landing-section-head {
    text-align: center;
    max-width: 580px;
    margin: 0 auto 28px;
}

.landing-section-title {
    font-size: clamp(22px, 2.6vw, 32px);
    font-weight: 500;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.landing-section-dark .landing-section-title {
    color: var(--pure-white);
}

.landing-section-sub {
    font-size: 14.5px;
    color: var(--text-mid);
    margin-top: 8px;
    line-height: 1.6;
}

/* Segmented Switcher */
.landing-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.landing-feature-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background-color: var(--page-light);
    border: 1px solid #e2e8f0;
}

.landing-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    background-color: transparent;
    border: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-mid);
    cursor: pointer;
    transition: background-color 0.15s cubic-bezier(0.22, 1, 0.36, 1), color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-tab-btn.active {
    background-color: var(--ink-black);
    color: var(--pure-white);
}

.landing-tab-panel {
    width: 100%;
    border-radius: 16px;
    padding: clamp(20px, 3.5vw, 36px);
    background-color: var(--page-light);
    border: 1px solid #e2e8f0;
}

.landing-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 40px);
    align-items: center;
}

.landing-panel-title {
    font-size: clamp(19px, 2vw, 23px);
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 10px;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.landing-panel-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-mid);
    margin-bottom: 16px;
}

.landing-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dark);
}

.landing-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.landing-checklist li .icon {
    color: var(--cobalt-blue);
    margin-top: 2px;
    flex-shrink: 0;
}

.gojek-frame-blue {
    background-color: var(--pure-white);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.gojek-frame-dark {
    background-color: var(--ink-surface);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(238, 240, 245, 0.1);
}

/* Calculator Card */
.landing-calculator-card {
    padding: clamp(20px, 3.5vw, 36px);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background-color: var(--page-light);
}

.landing-calc-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.landing-calc-presets .btn {
    border-radius: 8px;
    font-weight: 500;
}

.landing-calc-result {
    padding: 24px;
    border-radius: 12px;
    background-color: var(--pure-white);
    border: 1px solid #e2e8f0;
}

.landing-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: var(--text-mid);
}

.landing-calc-row strong {
    font-weight: 500;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.landing-calc-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 16px 0 20px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-dark);
}

.landing-calc-total strong {
    font-size: 24px;
    font-weight: 600;
    color: var(--cobalt-blue);
    font-variant-numeric: tabular-nums;
}

/* FAQ Accordion */
.landing-faq-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.landing-faq-item {
    background-color: var(--page-light);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    align-self: start;
}

.landing-faq-item[open] {
    background-color: var(--pure-white);
    border-color: #cbd5e1;
}

.landing-faq-item summary {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
}

.landing-faq-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-mid);
    margin-top: 8px;
}

/* ==========================================================================
   Solid Ink-Black Footer (#0b0d14)
   ========================================================================== */
.landing-footer {
    margin-top: auto;
    padding: 56px 0 36px;
    background-color: var(--ink-black);
    color: var(--pure-white);
}

.gojek-footer-top {
    padding-bottom: 36px;
    border-bottom: 1px solid var(--ink-border);
}

.gojek-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.gojek-footer-brand .brand-wordmark {
    color: var(--pure-white);
    font-size: 18px;
    font-weight: 600;
}

.gojek-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.c-footer__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--pure-white);
    margin-bottom: 12px;
}

.c-footer__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.c-footer__link {
    color: #a3a9b8;
    font-size: 13.5px;
    text-decoration: none;
}

.c-footer__link:hover {
    color: var(--pure-white);
}

.gojek-footer-bottom {
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #7a8296;
}

/* ==========================================================================
   Multi-Ratio Responsive Breakpoints (Tablet, Mobile Portrait, Compact, Landscape)
   ========================================================================== */
@media (max-width: 980px) {
    .landing-nav-links {
        display: none;
    }
    .landing-mobile-menu-btn {
        display: inline-flex;
    }
    .gojek-hero-grid,
    .gojek-stat-cards-grid,
    .landing-panel-grid,
    .landing-faq-list {
        grid-template-columns: 1fr;
    }
    .gojek-hero-copy-box {
        max-width: 100%;
    }
    .landing-hero-desc {
        max-width: 100%;
    }
    .gojek-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .landing-section-dark {
        margin: 0 16px;
    }
}

@media (min-width: 981px) {
    .landing-mobile-drawer {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .topbar .brand-wordmark {
        display: none;
    }
    .landing-domain-badge {
        display: none;
    }
}

@media (max-width: 640px) {
    .landing-nav-inner,
    .landing-container {
        padding: 0 16px;
    }
    .landing-hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }
    .landing-hero-ctas > a,
    .landing-hero-ctas > button {
        width: 100%;
    }
    .gojek-stat-card {
        padding: 18px;
        gap: 16px;
    }
    .gojek-stat-pop-img {
        width: 64px;
        height: 64px;
    }
    .landing-feature-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .landing-tab-btn {
        padding: 0 10px;
        font-size: 13px;
    }
    .landing-calc-result {
        padding: 18px 16px;
    }
    .gojek-footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gojek-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .landing-navbar .brand-wordmark {
        font-size: 15px;
    }
    .gojek-stat-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .landing-feature-tabs {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   phpMyAdmin-Style Table Filter, Column Sorting & Pagination Controls
   ========================================================================== */
.pma-filter-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-page);
    border: 1px solid var(--border-hairline);
}

.pma-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pma-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.pma-filter-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pma-table-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    background: var(--surface-page);
    border: 1px solid var(--border-hairline);
}

.pma-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.pma-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.pma-sortable-th {
    cursor: pointer;
    user-select: none;
    transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}

.pma-sortable-th:hover {
    color: var(--accent);
    background-color: var(--accent-tint);
}

.pma-sortable-th.is-sorted {
    color: var(--accent);
}

.pma-sort-indicator {
    display: inline-block;
    font-size: 10px;
    margin-left: 3px;
    opacity: 0.65;
}

.pma-sortable-th.is-sorted .pma-sort-indicator {
    opacity: 1;
}

.pma-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-page);
    border: 1px solid var(--border-hairline);
}

.pma-pagination-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.pma-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pma-pagination-controls .btn.is-disabled,
.pma-pagination-controls .btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
}

.pma-page-jump-form,
.pma-perpage-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.pma-page-select,
.pma-perpage-select {
    height: 28px !important;
    width: auto !important;
    font-size: 11.5px !important;
    padding: 0 8px !important;
}

.pma-perpage-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-left: 4px;
}
