/* Shared workspace presentation. Keep the existing palette and all feature states. */
:root {
    --interface-font: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
    --interface-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}

html {
    font-family: var(--interface-font);
    font-size: 14px;
    line-height: 1.5;
}

.app-shell .main :is(h1, h2, h3, h4, legend),
.auth-card h1,
.app-shell :is(.stats-grid strong, .workspace-overview-stat strong,
    .workspace-credit strong, .workspace-payment-method strong,
    .payment-credit-overview h2, .topup-breakdown .total strong, .account-balance strong,
    .setup-log-summary strong, .attention-total, .account-billing-subhead) {
    font-family: var(--interface-font);
    font-weight: 700;
}

.app-shell .page-head {
    gap: 20px;
    margin-bottom: 22px;
}

.app-shell .page-head h1 {
    margin: 4px 0 6px;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.app-shell .page-head p {
    font-size: 13px;
    line-height: 1.6;
}

.app-shell .main .panel,
.app-shell .stats-grid article {
    border-radius: 8px;
    box-shadow: var(--interface-shadow);
}

.app-shell .panel > .panel-head {
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.app-shell .panel > .panel-head:has(+ .workspace-overview-list) {
    padding-bottom: 0;
    border-bottom: 0;
}

.app-shell .customer-service-orders {
    margin-top: 20px;
}

.app-shell .panel-head h2,
.app-shell .detail-grid h2 {
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -.015em;
}

.app-shell :is(.eyebrow, .label) {
    font-size: 10px;
    letter-spacing: .09em;
}

.app-shell .main :is(.button, input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-radius: 6px;
}

.app-shell .main .button {
    min-height: 36px;
    line-height: 1.35;
}

.app-shell .main .button:focus-visible,
.auth-card .button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.app-shell .main table {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.app-shell .main table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.app-shell .main table :is(th, td) {
    padding: 10px 16px;
    line-height: 1.5;
}

.app-shell .main table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, .015);
}

.app-shell .main table tbody tr:hover {
    background: rgba(0, 0, 0, .035);
}

.app-shell .main table td small {
    line-height: 1.5;
}

.app-shell .main table .button {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 12px;
}

/* Preserve the 20px panel inset: table-wrap uses matching negative margins. */
.app-shell .account-search > .account-filter-grid {
    display: grid;
    max-width: none;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr)) minmax(80px, .6fr);
    gap: 12px;
}

.app-shell .account-filter-grid input {
    min-width: 0;
}

.app-shell .account-search > .account-filter-actions {
    max-width: none;
}

.app-shell .sidebar {
    padding-top: 24px;
    padding-bottom: 20px;
}

.app-shell .sidebar nav a,
.app-shell .sidebar :is(.admin-nav-group, .customer-nav-group) > summary {
    border-radius: 6px;
}

.app-shell .sidebar .admin-nav {
    min-height: 0;
    margin-top: 24px;
    overflow-y: auto;
    align-content: start;
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}

.app-shell .sidebar .admin-nav > a,
.app-shell .sidebar .admin-nav-group > summary {
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 13px;
}

.app-shell .sidebar .admin-nav-group > div > a {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* A restrained, compact login card with the customer-friendly method first. */
.auth-page {
    padding: 32px 20px;
}

.auth-card {
    width: min(460px, 100%);
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .08);
}

.auth-card .auth-brand {
    margin-bottom: 26px;
}

.auth-card h1 {
    margin: 6px 0 10px;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.auth-card > .muted {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
}

.auth-card :is(input:not([type="checkbox"]):not([type="radio"]), select, .button) {
    border-radius: 6px;
}

.auth-card .form-stack {
    gap: 16px;
    margin-top: 20px;
}

.auth-card .button {
    min-height: 44px;
    font-size: 14px;
}

.auth-card .auth-email-code-action {
    display: flex;
    width: 100%;
    gap: 10px;
    padding: 12px 16px;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
    text-align: center;
    text-decoration: none;
}

.auth-card .auth-email-code-action:hover {
    background: #000;
    border-color: #000;
}

.auth-email-code-action svg {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
}

.auth-email-code-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.auth-method-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.auth-method-divider::before,
.auth-method-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-card .auth-link {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1200px) {
    .app-shell .account-search > .account-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .app-shell .page-head h1 {
        font-size: 25px;
    }

    .app-shell .sidebar {
        padding: 18px;
    }

    .app-shell .sidebar .admin-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        margin-top: 18px;
    }

    .app-shell .sidebar .admin-nav > :is(details, .admin-return) {
        grid-column: 1 / -1;
    }

    .app-shell .account-search > .account-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-page {
        padding: 24px 16px;
    }

    .auth-card {
        padding: 26px 22px;
    }
}

@media (max-width: 360px) {
    .auth-card .button {
        font-size: 13px;
    }

    .auth-email-code-action svg {
        display: none;
    }
}
