:root {
    color-scheme: light;
    --st-background: #f5f2ea;
    --st-surface: rgba(255, 255, 255, 0.9);
    --st-surface-strong: #ffffff;
    --st-border: rgba(17, 24, 39, 0.08);
    --st-copy: #24324a;
    --st-copy-soft: #59657d;
    --st-pos-start: #1f63c2;
    --st-pos-end: #11998e;
    --st-admin-start: #16324f;
    --st-admin-end: #315d7d;
    --st-platform-start: #2a1569;
    --st-platform-end: #1b2f63;
    --st-warning: #b8652c;
    --st-warning-soft: #fff1e6;
    --st-success: #1b7d5f;
    --st-shadow: 0 24px 48px rgba(21, 36, 56, 0.08);
    --st-radius-xl: 28px;
    --st-radius-lg: 20px;
    --st-radius-md: 14px;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(17, 153, 142, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(31, 99, 194, 0.16), transparent 28%),
        var(--st-background);
    color: var(--st-copy);
    font-family: "Segoe UI", "Arial Nova", Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: none;
}

input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-md);
    background: #fff;
    box-sizing: border-box;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--st-accent, #14b8c6);
}

label {
    font-size: 0.92rem;
    font-weight: 600;
}

.hero-panel {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr);
    padding: 2rem;
    border-radius: var(--st-radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 242, 232, 0.88));
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: var(--st-shadow);
}

.hero-panel-pos {
    background: linear-gradient(135deg, rgba(31, 99, 194, 0.94), rgba(17, 153, 142, 0.9));
    color: #fff;
}

.hero-panel-admin {
    background: linear-gradient(135deg, rgba(22, 50, 79, 0.96), rgba(49, 93, 125, 0.92));
    color: #fff;
}

.hero-panel-side,
.landing-emphasis {
    align-self: end;
    padding: 1rem 1.25rem;
    border-radius: var(--st-radius-lg);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.shell-eyebrow {
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.74;
}

.shell-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
}

.shell-copy {
    margin: 0.9rem 0 0;
    max-width: 65ch;
    color: inherit;
    opacity: 0.84;
    line-height: 1.6;
}

.feature-stack,
.landing-shell {
    display: grid;
    gap: 1.5rem;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.metric-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card,
.section-panel,
.shell-card,
.receipt-card {
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-lg);
    background: var(--st-surface);
    box-shadow: var(--st-shadow);
}

.metric-card {
    padding: 1.25rem;
}

.metric-card-label {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--st-copy-soft);
}

.metric-card-value {
    margin-top: 0.45rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.metric-card-hint {
    margin-top: 0.55rem;
    color: var(--st-copy-soft);
    line-height: 1.45;
}

.content-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-panel {
    padding: 1.25rem 1.35rem;
}

.section-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.section-panel-header h2,
.receipt-card h2,
.admin-sidebar-brand h1,
.pos-header h1 {
    margin: 0;
}

.section-panel-header span {
    font-size: 0.85rem;
    color: var(--st-copy-soft);
}

.section-panel-body {
    display: grid;
    gap: 1rem;
}

.tile-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-tile {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: var(--st-radius-md);
    background: linear-gradient(135deg, rgba(31, 99, 194, 0.08), rgba(17, 153, 142, 0.12));
    border: 1px solid rgba(31, 99, 194, 0.1);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.action-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
}

.action-tile-title {
    font-weight: 700;
}

.action-tile-copy {
    color: var(--st-copy-soft);
    line-height: 1.5;
}

.form-stack {
    display: grid;
    gap: 0.7rem;
}

.connection-banner {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--st-radius-md);
    background: rgba(27, 125, 95, 0.11);
    color: #114a37;
}

.connection-banner-offline {
    background: var(--st-warning-soft);
    color: var(--st-warning);
}

.shell-link-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--st-pos-start), var(--st-pos-end));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.shell-link-button-inline {
    background: linear-gradient(135deg, var(--st-admin-start), var(--st-admin-end));
}

.shell-button-secondary {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--st-border);
    background: rgba(255, 255, 255, 0.94);
    color: var(--st-copy);
    font-weight: 700;
    cursor: pointer;
}

.shell-card {
    padding: 1.5rem;
}

.shell-card-warning {
    background: linear-gradient(135deg, #fff8f1, #fff0e4);
    border-color: rgba(184, 101, 44, 0.18);
}

.shell-list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 0.7rem;
    line-height: 1.55;
}

.shell-list-numbered {
    list-style: decimal;
}

.pos-shell {
    min-height: 100vh;
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem 1rem 6rem;
    box-sizing: border-box;
}

.pos-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1rem;
    border-radius: var(--st-radius-xl);
    color: #fff;
    background: linear-gradient(135deg, var(--st-pos-start), var(--st-pos-end));
    box-shadow: var(--st-shadow);
}

.pos-header p,
.admin-sidebar-brand p {
    margin: 0.35rem 0 0;
    opacity: 0.85;
}

.pos-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.capability-pill {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
}

.capability-pill-muted {
    background: rgba(36, 50, 74, 0.08);
    color: var(--st-copy-soft);
}

.pos-content,
.admin-content {
    display: grid;
    gap: 1.5rem;
}

.pos-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    width: min(940px, calc(100vw - 2rem));
    padding: 0.45rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}

.pos-bottom-nav a {
    padding: 0.7rem 0.35rem;
    border-radius: 999px;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.pos-bottom-nav a.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.admin-shell {
    display: grid;
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
    min-height: 100vh;
}

.platform-shell {
    display: grid;
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: relative;
    padding: 1.5rem 1.1rem;
    color: #fff;
    background: linear-gradient(180deg, var(--st-admin-start), var(--st-admin-end));
}

.admin-menu-button,
.admin-menu-close,
.admin-menu-backdrop {
    display: none;
}

.platform-sidebar {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.1rem;
    color: #fff;
    background: linear-gradient(180deg, var(--st-platform-start), var(--st-platform-end));
}

.admin-sidebar-brand {
    padding: 0.4rem 0.55rem 1.2rem;
}

.admin-nav {
    display: grid;
    gap: 0.35rem;
}

.admin-nav-note {
    margin-top: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.platform-nav {
    display: grid;
    gap: 0.35rem;
}

.admin-nav a {
    padding: 0.82rem 1rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.platform-nav a {
    padding: 0.82rem 1rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.platform-nav a.active,
.platform-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-main {
    padding: 1.5rem;
}

.platform-main {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-header-meta {
    display: grid;
    gap: 0.2rem;
    justify-items: end;
    color: var(--st-copy-soft);
}

.admin-header-meta strong {
    color: var(--st-copy);
}

.platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.platform-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.platform-sidebar-footer {
    display: grid;
    gap: 0.3rem;
    margin-top: auto;
    padding: 1rem 0.55rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar-footer {
    display: grid;
    gap: 0.3rem;
    margin-top: auto;
    padding: 1rem 0.55rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.platform-sidebar-footer strong {
    font-size: 1rem;
}

.platform-sidebar-footer span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
}

.admin-sidebar-footer span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
}

.admin-session-badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    margin: 0.35rem 0 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
}

.platform-login-shell {
    min-height: 100vh;
    padding: 1.25rem;
    box-sizing: border-box;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.26), transparent 32%),
        radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.2), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e1b4b 48%, #312e81 100%);
}

.admin-login-shell {
    background:
        radial-gradient(circle at top left, rgba(22, 50, 79, 0.34), transparent 32%),
        radial-gradient(circle at bottom right, rgba(49, 93, 125, 0.26), transparent 34%),
        linear-gradient(135deg, #102131, #16324f 48%, #315d7d 100%);
}

.platform-login-back {
    margin-bottom: 1rem;
}

.platform-login-card {
    width: min(560px, 100%);
    margin: 2rem auto;
    padding: 2rem;
    border-radius: var(--st-radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.32);
}

.platform-login-card h1,
.platform-login-card h2,
.platform-page-header h1,
.platform-page-header h2 {
    margin: 0;
}

.platform-login-copy {
    margin: 0.85rem 0 0;
    color: var(--st-copy-soft);
    line-height: 1.6;
}

.platform-login-panel {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.platform-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.platform-alert {
    padding: 0.95rem 1rem;
    border-radius: var(--st-radius-md);
    background: #fff3f0;
    border: 1px solid rgba(184, 101, 44, 0.22);
    color: #8f4a17;
}

.field-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-grid {
    align-items: start;
}

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-checklist {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.field-checkbox input {
    width: auto;
}

.platform-status-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.platform-status-active {
    background: rgba(27, 125, 95, 0.14);
    color: var(--st-success);
}

.platform-status-inactive {
    background: rgba(89, 101, 125, 0.16);
    color: var(--st-copy-soft);
}

.platform-empty-state {
    display: grid;
    gap: 0.8rem;
    padding: 1.4rem;
    border-radius: var(--st-radius-lg);
    background: rgba(22, 50, 79, 0.06);
    border: 1px dashed rgba(22, 50, 79, 0.18);
}

.platform-empty-state p {
    margin: 0;
    color: var(--st-copy-soft);
    line-height: 1.55;
}

.platform-page-header {
    display: grid;
    gap: 0.45rem;
}

.platform-search {
    width: min(360px, 100%);
}

.platform-meta-list {
    display: grid;
    gap: 0.8rem;
}

.platform-meta-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.platform-meta-row span {
    color: var(--st-copy-soft);
}

.platform-meta-row strong {
    text-align: right;
}

.platform-table-actions {
    white-space: nowrap;
}

.receipt-card {
    padding: 1.4rem;
}

.receipt-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.receipt-card-status {
    align-self: start;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(27, 125, 95, 0.12);
    color: var(--st-success);
    font-weight: 700;
}

.receipt-card-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.receipt-card-grid span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--st-copy-soft);
    font-size: 0.84rem;
}

.adapter-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.adapter-card {
    padding: 1rem;
    border-radius: var(--st-radius-md);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--st-border);
}

.adapter-card-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.6rem;
}

.adapter-card h3 {
    margin: 0;
    font-size: 1rem;
}

.adapter-card p,
.adapter-card small {
    margin: 0;
    color: var(--st-copy-soft);
    line-height: 1.5;
}

.permission-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
    color: var(--st-copy-soft);
    font-size: 0.9rem;
}

.shell-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.shell-table th,
.shell-table td {
    padding: 0.85rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.shell-table th {
    color: var(--st-copy-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 980px) {
    .content-grid,
    .content-grid-three,
    .hero-panel,
    .admin-shell,
    .platform-shell,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        display: block;
    }

    .admin-menu-button {
        display: inline-flex;
        position: sticky;
        top: 0.75rem;
        z-index: 30;
        margin: 0.75rem 1rem;
        padding: 0.7rem 1rem;
        border: 0;
        border-radius: 999px;
        color: #fff;
        background: var(--st-admin-start);
        font-weight: 800;
    }

    .admin-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 38;
        border: 0;
        background: rgba(15, 23, 42, 0.42);
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(84vw, 310px);
        overflow-y: auto;
        padding-bottom: 1rem;
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .admin-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .admin-menu-close {
        display: grid;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 2.5rem;
        height: 2.5rem;
        place-items: center;
        border: 0;
        border-radius: 50%;
        color: #fff;
        background: rgba(255, 255, 255, 0.14);
        font-size: 1.5rem;
    }

    .platform-sidebar {
        padding-bottom: 0.75rem;
    }

    .admin-main {
        padding-top: 0;
    }

    .platform-main {
        padding-top: 0;
    }
}

@media (max-width: 720px) {
    .pos-shell,
    .admin-main,
    .admin-sidebar,
    .platform-main,
    .platform-sidebar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .pos-header,
    .admin-header,
    .receipt-card-header,
    .platform-header,
    .platform-meta-row {
        flex-direction: column;
        align-items: start;
    }

    .pos-bottom-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 0.25rem;
        border-radius: 24px;
    }

    .platform-login-card {
        margin-top: 1rem;
        padding: 1.5rem;
    }
}

.pos-auth-card {
    padding: 1.6rem;
}

.pos-auth-card-muted {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 242, 248, 0.82));
}

.field-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--st-copy-soft);
}

.input-shell,
select.input-shell,
textarea.input-shell {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: var(--st-radius-md);
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: rgba(255, 255, 255, 0.96);
    box-sizing: border-box;
}

.input-shell:focus,
select.input-shell:focus,
textarea.input-shell:focus {
    outline: 2px solid rgba(31, 99, 194, 0.22);
    border-color: rgba(31, 99, 194, 0.36);
}

.shell-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.85rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--st-pos-start), var(--st-pos-end));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.shell-button:hover {
    filter: brightness(1.02);
}

.shell-button:disabled {
    opacity: 0.55;
    cursor: default;
}

.shell-button-secondary {
    background: rgba(36, 50, 74, 0.08);
    color: var(--st-copy);
}

.chip-row,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stacked-row {
    flex-direction: column;
}

.flow-banner {
    padding: 0.9rem 1rem;
    border-radius: var(--st-radius-md);
    border: 1px solid transparent;
    line-height: 1.5;
}

.flow-banner-success {
    background: rgba(27, 125, 95, 0.12);
    border-color: rgba(27, 125, 95, 0.18);
    color: var(--st-success);
}

.flow-banner-warning {
    background: var(--st-warning-soft);
    border-color: rgba(184, 101, 44, 0.22);
    color: var(--st-warning);
}

.flow-banner-neutral {
    background: rgba(22, 50, 79, 0.06);
    border-color: rgba(22, 50, 79, 0.12);
    color: var(--st-copy);
}

.stepper-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.step-pill {
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(36, 50, 74, 0.08);
    color: var(--st-copy-soft);
    text-align: center;
    font-size: 0.86rem;
    font-weight: 700;
}

.step-pill-active {
    background: linear-gradient(135deg, rgba(31, 99, 194, 0.16), rgba(17, 153, 142, 0.18));
    color: var(--st-copy);
}

.step-pill-complete {
    background: rgba(27, 125, 95, 0.12);
    color: var(--st-success);
}

.summary-grid,
.detail-grid,
.filter-grid {
    display: grid;
    gap: 0.85rem;
}

.summary-row,
.detail-pair {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.summary-row span,
.detail-pair span,
.transaction-meta {
    color: var(--st-copy-soft);
}

.compact-grid .summary-row,
.compact-detail-grid .detail-pair {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.transaction-stack,
.device-summary-list {
    display: grid;
    gap: 0.85rem;
}

.transaction-card,
.device-summary-item {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 24, 39, 0.08);
}

.funding-review-card {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.funding-review-card-selected {
    border-color: rgba(31, 99, 194, 0.42);
    box-shadow: 0 16px 34px rgba(31, 99, 194, 0.13);
}

.funding-history {
    display: grid;
    gap: 0.65rem;
    padding-top: 1rem;
    border-top: 1px solid var(--st-border);
}

.transaction-card-header,
.compact-card,
.device-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.compact-card {
    align-items: center;
}

.transaction-amount-block {
    display: grid;
    gap: 0.4rem;
    justify-items: end;
}

.status-chip {
    display: inline-flex;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(31, 99, 194, 0.12);
    color: var(--st-copy);
    font-size: 0.78rem;
    font-weight: 700;
}

.date-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .stepper-strip,
    .date-grid {
        grid-template-columns: 1fr;
    }

    .transaction-card-header,
    .compact-card,
    .summary-row,
    .detail-pair,
    .device-summary-item {
        flex-direction: column;
        align-items: start;
    }

    .transaction-amount-block {
        justify-items: start;
    }
}

/* ============================================
   Platform Admin — Design Match Overrides
   Matching the approved Figma/design reference
   ============================================ */

/* --- Layout: Sidebar redesign --- */

.platform-shell {
    display: flex;
    min-height: 100vh;
    background: #f9fafb;
}

.platform-sidebar {
    position: fixed;
    inset-block: 0;
    left: 0;
    width: 16rem;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: #fff;
    background: #312e81;
    z-index: 50;
    transform: translateX(0);
    transition: transform 300ms ease-in-out;
}

.platform-sidebar.sidebar-closed {
    transform: translateX(-100%);
}

.platform-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-bottom: 1px solid #3730a3;
}

.platform-sidebar-brand-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4338ca;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.platform-sidebar-brand-text h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
}

.platform-sidebar-brand-text p {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: #a5b4fc;
}

.platform-sidebar-console {
    padding: 0 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #a5b4fc;
}

.platform-sidebar-close {
    display: none;
    background: none;
    color: #a5b4fc;
    cursor: pointer;
    padding: 0.25rem;
}

.platform-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
}

.platform-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #c7d2fe;
    font-weight: 500;
    transition: background 150ms, color 150ms;
}

.platform-nav a:hover {
    background: rgba(67, 56, 202, 0.5);
    color: #fff;
}

.platform-nav a.active {
    background: #3730a3;
    color: #fff;
}

.platform-nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.platform-nav-chevron {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
}

.platform-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #3730a3;
    margin-top: auto;
}

.platform-sidebar-userbox {
    background: #3730a3;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.platform-sidebar-userbox .user-label {
    font-size: 0.75rem;
    color: #a5b4fc;
    margin-bottom: 0.25rem;
}

.platform-sidebar-userbox .user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.platform-sidebar-userbox .user-email {
    font-size: 0.75rem;
    color: #a5b4fc;
}

.platform-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: none;
    color: #c7d2fe;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms, color 150ms;
}

.platform-sidebar-logout:hover {
    background: #3730a3;
    color: #fff;
}

/* --- Layout: Main area --- */

.platform-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 16rem;
}

.platform-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.platform-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.platform-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.platform-hamburger {
    display: none;
    background: none;
    color: #4b5563;
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
}

.platform-topbar-title h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-topbar-title p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.platform-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.platform-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #f0fdf4;
    color: #15803d;
    font-size: 0.8125rem;
    border-radius: 999px;
}

.platform-status-pill .dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #22c55e;
    border-radius: 50%;
}

.platform-status-pill-compact {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.platform-status-pill-compact .dot {
    width: 0.375rem;
    height: 0.375rem;
}

.platform-page-content {
    flex: 1;
    padding: 1.5rem;
    overflow: auto;
}

.platform-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* --- Language Switcher --- */

.lang-switcher {
    display: flex;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    overflow: hidden;
}

.lang-switcher-btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    border: none;
    border-right: 1px solid #e5e7eb;
    transition: background 150ms, color 150ms;
}

.lang-switcher-btn:last-child {
    border-right: none;
}

.lang-switcher-btn.lang-active {
    background: #4f46e5;
    color: #fff;
}

.lang-switcher-btn:hover:not(.lang-active) {
    background: #f3f4f6;
}

/* --- Mobile sidebar overlay --- */

.platform-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.platform-sidebar-overlay.overlay-visible {
    display: block;
}

/* --- Cards (design-matching shadcn Card) --- */

.st-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- Info banner (indigo) --- */

.st-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
}

.st-info-banner-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    border-radius: 50%;
    flex-shrink: 0;
    color: #4f46e5;
}

.st-info-banner-icon-lg {
    width: 3rem;
    height: 3rem;
}

.st-info-banner h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #312e81;
}

.st-info-banner p {
    margin: 0;
    font-size: 0.8125rem;
    color: #4338ca;
    line-height: 1.5;
}

/* --- Stat Cards --- */

.st-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.st-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

.st-stat-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.st-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.st-stat-icon-blue { background: #dbeafe; color: #2563eb; }
.st-stat-icon-green { background: #dcfce7; color: #16a34a; }
.st-stat-icon-purple { background: #f3e8ff; color: #9333ea; }
.st-stat-icon-amber { background: #fef3c7; color: #d97706; }
.st-stat-icon-red { background: #fee2e2; color: #dc2626; }

.st-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.st-stat-value-green { color: #16a34a; }
.st-stat-value-red { color: #dc2626; }
.st-stat-value-purple { color: #9333ea; }
.st-stat-value-amber { color: #d97706; }

.st-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.125rem;
}

.st-stat-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Compact stat variant (tenants page) */
.st-stat-compact .st-stat-card-inner {
    flex-direction: row;
    align-items: center;
}

.st-stat-compact .st-stat-icon {
    width: 2rem;
    height: 2rem;
}

/* --- Badges --- */

.st-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.st-badge-green {
    background: #dcfce7;
    color: #166534;
}

.st-badge-red {
    background: #fee2e2;
    color: #991b1b;
}

/* --- Tabs --- */

.st-tab-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 24rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f9fafb;
}

.st-tab-list-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 36rem;
}

.st-tab-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    cursor: pointer;
    transition: background 150ms, color 150ms;
}

.st-tab-trigger:hover {
    background: #e5e7eb;
}

.st-tab-trigger.tab-active {
    background: #fff;
    color: #111827;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.st-tab-icon {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 720px) {
    .st-tab-list-three {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

/* --- Form: select (matches design's dropdowns) --- */

.st-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.st-select-icon {
    color: #9ca3af;
    flex-shrink: 0;
}

.st-select select {
    flex: 1;
    height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    font: inherit;
    font-size: 0.875rem;
    color: #111827;
    cursor: pointer;
}

.st-select select:focus {
    outline: 2px solid #4f46e5;
    outline-offset: -1px;
    border-color: transparent;
}

/* Form input tweaks for design */
.st-form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.st-form-field label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.st-form-field input {
    height: 2.75rem;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.st-form-field input:focus {
    outline: 2px solid #4f46e5;
    outline-offset: -1px;
    border-color: transparent;
}

.st-form-hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Active checkbox in gray panel */
.st-checkbox-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.st-checkbox-panel input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #4f46e5;
    flex-shrink: 0;
}

.st-checkbox-panel .checkbox-text {
    flex: 1;
}

.st-checkbox-panel .checkbox-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.st-checkbox-panel .checkbox-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

/* --- Buttons: design match --- */

.st-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    height: 2.75rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 150ms;
    white-space: nowrap;
}

.st-btn-primary:hover:not(:disabled) {
    background: #4338ca;
}

.st-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.st-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    height: 2.75rem;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 150ms;
    white-space: nowrap;
}

.st-btn-outline:hover:not(:disabled) {
    background: #f9fafb;
}

.st-btn-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.st-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 150ms;
    white-space: nowrap;
}

.st-btn-ghost:hover {
    background: #f3f4f6;
}

.st-btn-destructive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 150ms;
    white-space: nowrap;
}

.st-btn-destructive:hover:not(:disabled) {
    background: #b91c1c;
}

.st-btn-sm {
    height: 2.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.st-btn-full {
    width: 100%;
    box-sizing: border-box;
}

.st-btn-icon {
    width: 1rem;
    height: 1rem;
}

/* --- Submit/Cancel button pair --- */

.st-form-buttons {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.st-form-buttons > * {
    flex: 1;
}

/* --- Admin Quick Action Rows --- */

.st-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.st-action-row-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.st-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.st-action-icon-blue { background: #dbeafe; color: #2563eb; }
.st-action-icon-purple { background: #f3e8ff; color: #9333ea; }
.st-action-icon-green { background: #dcfce7; color: #16a34a; }
.st-action-icon-red { background: #fee2e2; color: #dc2626; }

.st-action-text h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.st-action-text p {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
}

/* --- Activity Stats Grid --- */

.st-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.st-activity-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.st-activity-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.st-activity-value-red {
    color: #dc2626;
}

.st-activity-value-sm {
    font-size: 0.875rem;
}

/* --- Security Notice (amber) --- */

.st-security-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    color: #92400e;
}

.st-security-notice h4 {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: #78350f;
}

.st-security-notice p {
    margin: 0;
    font-size: 0.875rem;
}

.st-security-notice svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #d97706;
}

/* --- Bootstrap Notice (amber) --- */

.st-bootstrap-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
}

.st-bootstrap-notice svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #d97706;
}

.st-bootstrap-notice h4 {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: #78350f;
    font-size: 0.875rem;
}

.st-bootstrap-notice p {
    margin: 0;
    font-size: 0.8125rem;
    color: #92400e;
}

/* --- Login Page Redesign --- */

.st-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #312e81, #581c87, #3730a3);
}

.st-login-card {
    width: 100%;
    max-width: 28rem;
    padding: 2rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.st-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.st-login-icon {
    width: 4rem;
    height: 4rem;
    background: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
}

.st-login-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.st-login-header h2 {
    margin: 0.5rem 0 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.st-login-header p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.st-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.st-login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* --- Tenant List: Table --- */

.st-table {
    width: 100%;
    border-collapse: collapse;
}

.st-table thead {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.st-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.st-table th:last-child {
    text-align: right;
}

.st-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 150ms;
}

.st-table tbody tr:hover {
    background: #f9fafb;
}

.st-table td {
    padding: 1rem;
}

.st-table td:last-child {
    text-align: right;
}

.st-table-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.st-table-name-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    border-radius: 0.5rem;
    color: #4f46e5;
    flex-shrink: 0;
}

.st-table-name-text strong {
    display: block;
    color: #111827;
    font-weight: 500;
}

.st-table-name-text span {
    font-size: 0.8125rem;
    color: #6b7280;
}

.st-table-cell-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.st-table-cell-icon svg {
    color: #9ca3af;
}

/* --- Tenant List: Search Bar --- */

.st-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
}

.st-search-bar svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.st-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    outline: none;
    height: auto;
}

/* --- Dashboard: Recent Tenant List Items --- */

.st-tenant-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: background 150ms;
}

.st-tenant-list-item:hover {
    background: #f3f4f6;
}

.st-tenant-list-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #4b5563;
    flex-shrink: 0;
}

.st-tenant-list-text {
    flex: 1;
    min-width: 0;
}

.st-tenant-list-text strong {
    display: block;
    font-size: 0.875rem;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.st-tenant-list-text span {
    font-size: 0.75rem;
    color: #6b7280;
}

.st-tenant-list-right {
    text-align: right;
    flex-shrink: 0;
}

.st-tenant-list-right .st-badge {
    display: block;
    margin-bottom: 0.25rem;
}

.st-tenant-list-right span {
    font-size: 0.75rem;
    color: #6b7280;
}

/* --- Dashboard: Guardrails --- */

.st-guardrail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.st-guardrail-num {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4f46e5;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.st-guardrail-item p {
    margin: 0;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.5;
}

/* --- Editor: Preview Card --- */

.st-preview-field {
    margin-bottom: 0.75rem;
}

.st-preview-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.125rem;
}

.st-preview-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    word-break: break-all;
}

.st-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* --- Editor: Summary Meta --- */

.st-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0;
}

.st-meta-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

.st-meta-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #111827;
}

.st-meta-separator {
    margin: 0.75rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* --- Auto-active Notice (amber small) --- */

.st-auto-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
}

.st-auto-notice svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #d97706;
}

.st-auto-notice p {
    margin: 0;
    font-size: 0.75rem;
    color: #92400e;
}

/* --- Admin User Card --- */

.st-admin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.st-admin-detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.st-admin-detail-value {
    font-weight: 500;
    color: #111827;
    word-break: break-all;
}

.st-admin-timestamps {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.st-admin-timestamps > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Confirm Dialog (modal overlay) --- */

.st-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.st-dialog {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
}

.st-dialog h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.st-dialog p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.st-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* --- Mobile cards for tenant list --- */

.st-tenant-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.st-tenant-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.st-tenant-card-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.st-tenant-card-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.st-tenant-card-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #374151;
}

.st-tenant-card-detail svg {
    color: #9ca3af;
    width: 0.875rem;
    height: 0.875rem;
}

/* --- Desktop/Mobile visibility --- */

.st-desktop-only { display: block; }
.st-mobile-only { display: none; }

/* --- Utility: gap stack --- */

.st-stack { display: flex; flex-direction: column; gap: 1rem; }
.st-stack-sm { gap: 0.75rem; }
.st-stack-lg { gap: 1.5rem; }

.st-grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.st-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* --- Spinner --- */

.st-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: st-spin 0.6s linear infinite;
}

@keyframes st-spin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive for platform design ---- */

@media (min-width: 1024px) {
    .st-stat-grid { grid-template-columns: repeat(4, 1fr); }
    .platform-hamburger { display: none; }
    .platform-sidebar-close { display: none; }
}

@media (max-width: 1023px) {
    .platform-sidebar {
        transform: translateX(-100%);
    }

    .platform-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .platform-main-wrapper {
        margin-left: 0;
    }

    .platform-hamburger {
        display: block;
    }

    .platform-sidebar-close {
        display: block;
    }

    .st-grid-2-1 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .st-desktop-only { display: none; }
    .st-mobile-only { display: block; }

    .st-admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .st-activity-grid {
        grid-template-columns: 1fr 1fr;
    }

    .st-form-buttons {
        flex-direction: column;
    }

    .st-info-banner {
        padding: 0.75rem 1rem;
    }

    .st-stat-card {
        padding: 0.75rem 1rem;
    }

    .st-stat-value {
        font-size: 1.25rem;
    }

    .st-stat-icon {
        width: 2rem;
        height: 2rem;
    }

    .platform-topbar {
        padding: 0.75rem 1rem;
    }

    .platform-page-content {
        padding: 1rem;
    }

    .platform-topbar-title h1 {
        font-size: 1.125rem;
    }

    .st-admin-timestamps {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================
   POS Redesign — flat palette + app shell
   Palette extracted from the approved fintech
   reference: teal primary, navy, pale gray-blue.
   Generic names are scoped under .pos-screen.
   Shell: fixed header, scrollable content,
   pinned bottom action bar, toasts, sheets.
   ============================================ */

.st-app {
  /* Color constants — single source of truth */
  --pos-primary: #14b8c6;
  --pos-primary-strong: #0d9aa6;
  --pos-primary-soft: #e5f7f9;
  --pos-navy: #16233a;
  --pos-navy-strong: #0d1626;
  --pos-navy-soft: #e8ecf3;
  --pos-fg: #101828;
  --pos-muted: #667085;
  --pos-bg: #eef2f6;
  --pos-card: #ffffff;
  --pos-border: #e4e9ef;
  --pos-input-bg: #f4f6f9;
  --pos-success: #0fa968;
  --pos-success-soft: #e4f7ee;
  --pos-warning: #b45309;
  --pos-warning-soft: #fef3c7;
  --pos-danger: #dc2626;
  --pos-danger-soft: #fee2e2;
  --pos-radius: 12px;
  --pos-radius-lg: 16px;

  background: var(--pos-bg);
  color: var(--pos-fg);
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pos-screen {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  .pos-screen { max-width: 430px; margin: 0 auto; width: 100%; box-shadow: 0 0 40px rgba(13, 22, 38, 0.18); }
}

/* ---------- Fixed header ---------- */
.st-app .flow-header {
  flex-shrink: 0;
  background: var(--pos-card);
  color: var(--pos-fg);
  padding: 14px 16px;
  border-bottom: 1px solid var(--pos-border);
}
.st-app .flow-header .header-row { display: flex; align-items: center; gap: 12px; }
.st-app .flow-header h1 { font-size: 1.2rem; font-weight: 700; margin: 0; color: var(--pos-fg); }
.st-app .flow-header .subtitle { font-size: .85rem; color: var(--pos-muted); margin: 2px 0 0; display: flex; align-items: center; gap: 6px; }

.st-app .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; min-width: 40px; border: none; border-radius: 10px;
  background: transparent; color: var(--pos-fg); cursor: pointer;
}
.st-app .icon-btn:hover { background: var(--pos-bg); }
.st-app .icon-btn svg { width: 22px; height: 22px; }

.st-app .progress { display: flex; gap: 8px; margin-top: 14px; }
.st-app .progress span { flex: 1; height: 4px; border-radius: 999px; background: var(--pos-border); }
.st-app .progress span.done { background: var(--pos-primary); }

/* ---------- Scrollable content ---------- */
.st-app .content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Pinned action bar ---------- */
.st-app .action-bar {
  flex-shrink: 0;
  background: var(--pos-card);
  border-top: 1px solid var(--pos-border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Cards ---------- */
.st-app .card {
  background: var(--pos-card); border: 1px solid var(--pos-border); border-radius: var(--pos-radius-lg);
  padding: 20px; box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}
.st-app .card.tight { padding: 16px; }
.st-app .card-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 600; margin: 0 0 16px; color: var(--pos-fg); }
.st-app .card-title svg { width: 20px; height: 20px; color: var(--pos-muted); }

/* ---------- Forms ---------- */
.pos-screen label.field { display: block; font-size: 1rem; margin-bottom: 8px; font-weight: 500; }
.st-app .hint { font-size: .875rem; color: var(--pos-muted); margin-top: 6px; }
.st-app .input,
.pos-screen select.input,
.pos-screen textarea.input {
  width: 100%; height: 56px; padding: 0 16px; font-size: 1.125rem;
  border: 1px solid var(--pos-border); border-radius: var(--pos-radius);
  background: var(--pos-input-bg); color: var(--pos-fg); outline: none;
  appearance: none; box-sizing: border-box;
}
.pos-screen textarea.input { height: auto; padding: 12px 16px; font-size: 1rem; }
.st-app .input:focus { border-color: var(--pos-primary); box-shadow: 0 0 0 3px rgba(20, 184, 198, .2); background: #fff; }
.st-app .input.big { font-size: 1.5rem; font-weight: 700; }
.st-app .input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; letter-spacing: .06em; }
.st-app .field-group { margin-bottom: 20px; }
.st-app .field-group:last-child { margin-bottom: 0; }
.pos-screen select.input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* ---------- Buttons — flat, two colors only ---------- */
.st-app .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; padding: 0 20px; font-size: 1.125rem; font-weight: 600;
  border-radius: var(--pos-radius); border: none; cursor: pointer;
  transition: background .12s ease, transform .05s ease; box-sizing: border-box;
  text-decoration: none;
}
.st-app .btn:active { transform: scale(.985); }
.st-app .btn svg { width: 20px; height: 20px; }
.st-app .btn-primary,
.st-app .btn-success { background: var(--pos-primary); color: #fff; }
.st-app .btn-primary:hover,
.st-app .btn-success:hover { background: var(--pos-primary-strong); }
.st-app .btn-indigo { background: var(--pos-navy); color: #fff; }
.st-app .btn-indigo:hover { background: var(--pos-navy-strong); }
.st-app .btn-outline { background: var(--pos-card); color: var(--pos-fg); border: 1px solid var(--pos-border); }
.st-app .btn-outline:hover { background: var(--pos-bg); }
.st-app .btn-outline.accent { border-color: var(--pos-primary); color: var(--pos-primary-strong); }
.st-app .btn-outline.accent:hover { background: var(--pos-primary-soft); }
.st-app .btn:disabled { background: #cfd6de; color: #fff; cursor: not-allowed; border: none; }
.st-app .btn-sm { height: 44px; font-size: .95rem; }
.st-app .content > .btn { margin: 6px 0; min-height: 56px; flex-shrink: 0; }
.st-app .content > .btn.btn-sm { min-height: 44px; }
.st-app .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-app .btn-stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Badges ---------- */
.st-app .badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.st-app .badge.success { background: var(--pos-success-soft); color: #0b7a45; }
.st-app .badge.pending { background: var(--pos-warning-soft); color: #92400e; }
.st-app .badge.cancelled { background: var(--pos-danger-soft); color: #991b1b; }
.st-app .badge.ready { background: var(--pos-primary-soft); color: var(--pos-primary-strong); }

/* ---------- Inline banners (contextual, persistent) ---------- */
.st-app .banner { border-radius: var(--pos-radius); padding: 12px 16px; font-size: .9rem; }
.st-app .banner-success { background: var(--pos-success-soft); border: 1px solid #b5e8cf; color: #0b7a45; }
.st-app .banner-warning { background: var(--pos-warning-soft); border: 1px solid #fde68a; color: #713f12; }
.st-app .banner-neutral { background: var(--pos-primary-soft); border: 1px solid #bde9ee; color: #0e5d66; }

/* ---------- Toasts (transient notifications) ---------- */
.st-app .toast {
  position: absolute; top: 74px; left: 16px; right: 16px; z-index: 95;
  border-radius: var(--pos-radius); padding: 12px 16px; font-size: .9rem;
  border: 1px solid; box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
  animation: pos-toast-in .2s ease; cursor: pointer;
}
.st-app .toast.ok { background: var(--pos-success-soft); border-color: #b5e8cf; color: #0b7a45; }
.st-app .toast.error { background: var(--pos-danger-soft); border-color: #fecaca; color: #991b1b; }
@keyframes pos-toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Bottom sheet ---------- */
.st-app .sheet-overlay { position: absolute; inset: 0; background: rgba(13, 22, 38, .5); z-index: 90; animation: pos-fade-in .2s ease; }
.st-app .sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 91;
  background: var(--pos-card); border-radius: var(--pos-radius-lg) var(--pos-radius-lg) 0 0;
  max-height: 88%; display: flex; flex-direction: column;
  animation: pos-sheet-in .25s ease;
}
.st-app .sheet-handle { width: 44px; height: 5px; border-radius: 999px; background: #d6dce3; margin: 10px auto 2px; flex-shrink: 0; }
.st-app .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 4px; flex-shrink: 0; }
.st-app .sheet-title { font-weight: 700; font-size: 1.1rem; }
.st-app .sheet-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px;
}
@keyframes pos-sheet-in { from { transform: translateY(30%); } }
@keyframes pos-fade-in { from { opacity: 0; } }

/* ---------- Dashboard header identity ---------- */
.st-app .agent-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.st-app .agent-id { display: flex; align-items: center; gap: 10px; }
.st-app .avatar {
  width: 40px; height: 40px; border-radius: 999px; background: var(--pos-primary-soft); color: var(--pos-primary-strong);
  display: flex; align-items: center; justify-content: center;
}
.st-app .avatar svg { width: 22px; height: 22px; }
.st-app .agent-id .role { font-size: .8rem; color: var(--pos-muted); margin: 0; }
.st-app .agent-id .name { font-weight: 600; margin: 0; }
.st-app .header-tools { display: flex; align-items: center; gap: 10px; }
.st-app .branch { text-align: center; }
.st-app .branch .branch-name { font-size: .9rem; color: var(--pos-muted); margin: 0; }

/* ---------- Balance card — flat navy ---------- */
.st-app .balance-card {
  background: var(--pos-navy); color: #fff; border: none;
  box-shadow: 0 10px 24px rgba(13, 22, 38, .25);
}
.st-app .balance-card .label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: #9fb0c9; margin-bottom: 8px; }
.st-app .balance-card .label svg { width: 20px; height: 20px; color: var(--pos-primary); }
.st-app .balance-card .amount { font-size: 2.2rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.st-app .balance-card .sub { font-size: .78rem; color: #9fb0c9; margin: 0; }

.st-app .section-heading { font-size: 1.1rem; font-weight: 600; margin: 10px 0 0; }

/* ---------- Quick actions ---------- */
.st-app .quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.st-app .quick-tile { text-align: center; cursor: pointer; transition: box-shadow .15s ease, transform .05s ease; text-decoration: none; color: inherit; display: block; }
.st-app .quick-tile:hover { box-shadow: 0 10px 24px rgba(16, 24, 40, .1); }
.st-app .quick-tile:active { transform: scale(.96); }
.st-app .quick-tile .tile-icon {
  width: 64px; height: 64px; border-radius: 999px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.st-app .quick-tile .tile-icon svg { width: 32px; height: 32px; }
.st-app .tile-icon.send { background: var(--pos-primary-soft); color: var(--pos-primary-strong); }
.st-app .tile-icon.receive { background: var(--pos-navy-soft); color: var(--pos-navy); }
.st-app .quick-tile .tile-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 2px; }
.st-app .quick-tile .tile-sub { font-size: .85rem; color: var(--pos-muted); margin: 0; }

/* ---------- Stat tiles — flat tints of the palette ---------- */
.st-app .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-app .stat { text-align: center; padding: 10px 12px; border-radius: var(--pos-radius); }
.st-app .stat .num { font-size: 1.35rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.st-app .stat .cap { font-size: .8rem; color: var(--pos-muted); margin: 2px 0 0; }
.st-app .stat.blue { background: var(--pos-primary-soft); } .st-app .stat.blue .num { color: var(--pos-primary-strong); }
.st-app .stat.green { background: var(--pos-success-soft); } .st-app .stat.green .num { color: var(--pos-success); }
.st-app .stat.purple { background: var(--pos-navy-soft); } .st-app .stat.purple .num { color: var(--pos-navy); }
.st-app .stat.orange { background: var(--pos-warning-soft); } .st-app .stat.orange .num { color: var(--pos-warning); }

/* ---------- Callouts ---------- */
.st-app .callout { display: flex; gap: 12px; padding: 16px; border-radius: var(--pos-radius); font-size: .9rem; }
.st-app .callout svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.st-app .callout.info { background: var(--pos-primary-soft); border: 1px solid #bde9ee; color: #0e5d66; }
.st-app .callout.warn { background: var(--pos-warning-soft); border: 1px solid #fde68a; color: #713f12; }
.st-app .callout p, .st-app .callout ol, .st-app .callout ul { margin: 0; }
.st-app .callout .callout-title { font-weight: 600; margin-bottom: 6px; }
.st-app .callout ol, .st-app .callout ul { padding-left: 18px; display: grid; gap: 4px; }

/* ---------- Key/value panels ---------- */
.st-app .kv-panel { border-radius: var(--pos-radius); padding: 16px; }
.st-app .kv-panel.plain { background: var(--pos-input-bg); }
.st-app .kv-panel.quote { background: var(--pos-primary-soft); border: 1px solid #bde9ee; }
.st-app .kv-panel.total { background: var(--pos-success-soft); border: 1px solid #b5e8cf; }
.st-app .kv-panel .kv-label { font-size: .85rem; color: var(--pos-muted); margin: 0 0 4px; }
.st-app .kv-panel .kv-value { font-weight: 600; font-size: 1.1rem; margin: 0; }
.st-app .kv-panel .kv-sub { font-size: .85rem; color: var(--pos-muted); margin: 2px 0 0; }
.st-app .kv-rows { display: grid; gap: 8px; }
.st-app .kv-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; gap: 16px; }
.st-app .kv-row .k { color: var(--pos-muted); font-size: .8rem; font-weight: 500; flex-shrink: 0; line-height: 1.5; }
.st-app .kv-row .v { font-weight: 500; font-size: .92rem; text-align: right; line-height: 1.5; overflow-wrap: anywhere; }
.st-app .kv-row .v.mono { font-size: .84rem; }
/* Detail sheets (plain panels): hairline rhythm + a clear hierarchy — only hero rows shout. */
.st-app .kv-panel.plain .kv-rows { gap: 0; }
.st-app .kv-panel.plain .kv-row { padding: 8px 0; border-bottom: 1px solid rgba(13, 22, 38, .06); }
.st-app .kv-panel.plain .kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.st-app .kv-panel.plain .kv-row:first-child { padding-top: 0; }
.st-app .kv-row.hero .k { color: var(--pos-fg); font-weight: 600; }
.st-app .kv-row.hero .v { font-size: 1.12rem; font-weight: 700; }
.st-app .kv-row.total-row { border-top: 1px solid var(--pos-border); padding-top: 10px; margin-top: 4px; }
.st-app .kv-row.total-row .k { font-weight: 700; color: var(--pos-fg); }
.st-app .kv-row.total-row .v { font-weight: 800; font-size: 1.25rem; color: var(--pos-primary-strong); }

/* ---------- Funding choice ---------- */
.st-app .choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-app .choice {
  border: 2px solid var(--pos-border); border-radius: var(--pos-radius); padding: 16px;
  text-align: center; cursor: pointer; transition: border-color .12s ease; background: var(--pos-card);
}
.st-app .choice svg { width: 32px; height: 32px; color: #9ca7b3; margin-bottom: 8px; }
.st-app .choice .choice-label { font-weight: 600; color: var(--pos-muted); margin: 0; }
.st-app .choice:hover { border-color: #cfd6de; }
.st-app .choice.selected.cash { border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.st-app .choice.selected.cash svg, .st-app .choice.selected.cash .choice-label { color: var(--pos-primary-strong); }
.st-app .choice.selected.bank { border-color: var(--pos-navy); background: var(--pos-navy-soft); }
.st-app .choice.selected.bank svg, .st-app .choice.selected.bank .choice-label { color: var(--pos-navy); }

/* ---------- History filter tabs (segmented) ---------- */
.st-app .filter-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; background: var(--pos-bg); border-radius: var(--pos-radius); padding: 4px; }
.st-app .filter-tabs button {
  height: 38px; border-radius: 9px; border: none; cursor: pointer;
  background: transparent; color: var(--pos-muted); font-size: .95rem; font-weight: 600;
}
.st-app .filter-tabs button:hover { color: var(--pos-fg); }
.st-app .filter-tabs button.active { background: var(--pos-primary); color: #fff; }

/* ---------- Transaction rows ---------- */
.st-app .tx-card { display: flex; gap: 12px; align-items: flex-start; }
.st-app .tx-icon {
  width: 48px; height: 48px; border-radius: 999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.st-app .tx-icon svg { width: 24px; height: 24px; }
.st-app .tx-icon.send { background: var(--pos-primary-soft); color: var(--pos-primary-strong); }
.st-app .tx-icon.receive { background: var(--pos-navy-soft); color: var(--pos-navy); }
.st-app .tx-body { flex: 1; min-width: 0; }
.st-app .tx-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.st-app .tx-name { font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-app .tx-route { font-size: .85rem; color: var(--pos-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-app .tx-amount { font-weight: 700; white-space: nowrap; }
.st-app .tx-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-app .tx-date { font-size: .78rem; color: var(--pos-muted); }
.st-app .tx-ref { border-top: 1px solid var(--pos-border); margin-top: 10px; padding-top: 8px; font-size: .78rem; color: var(--pos-muted); }
.st-app .tx-ref span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.st-app .tx-actions { margin-top: 10px; display: flex; gap: 8px; }
.st-app .tx-actions .btn { flex: 1 1 0; width: auto; min-width: 0; }

/* Paired actions sharing one row (receipt sheets, confirmations) */
.st-app .btn-duo { display: flex; gap: 10px; margin-top: 12px; }
.st-app .btn-duo .btn { flex: 1 1 0; width: auto; min-width: 0; margin: 0; }

/* ---------- Receive ---------- */
.st-app .amount-hero { background: var(--pos-primary-soft); border: 2px solid var(--pos-primary); border-radius: var(--pos-radius); padding: 20px; }
.st-app .amount-hero .label { display: flex; align-items: center; gap: 8px; color: var(--pos-muted); font-size: .9rem; margin-bottom: 6px; }
.st-app .amount-hero .label svg { width: 22px; height: 22px; color: var(--pos-primary-strong); }
.st-app .amount-hero .amount { font-size: 2.2rem; font-weight: 800; color: var(--pos-primary-strong); margin: 0; }

.st-app .qr-hero { width: 128px; height: 128px; background: var(--pos-primary-soft); border-radius: var(--pos-radius-lg); margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.st-app .qr-hero svg { width: 64px; height: 64px; color: var(--pos-primary-strong); }

/* ---------- End of day ---------- */
.st-app .diff-panel { border-radius: var(--pos-radius); border: 2px solid; padding: 16px; margin-top: 16px; }
.st-app .diff-panel.ok { background: var(--pos-success-soft); border-color: #b5e8cf; }
.st-app .diff-panel.off { background: var(--pos-warning-soft); border-color: #fde68a; }
.st-app .diff-panel .diff-head { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 6px; }
.st-app .diff-panel .diff-head svg { width: 24px; height: 24px; }
.st-app .diff-panel.ok .diff-head svg { color: var(--pos-success); }
.st-app .diff-panel.off .diff-head svg { color: var(--pos-warning); }
.st-app .diff-panel .diff-value { font-size: 1.5rem; font-weight: 800; margin: 0; }
.st-app .diff-panel.ok .diff-value { color: var(--pos-success); }
.st-app .diff-panel.off .diff-value { color: var(--pos-warning); }
.st-app .diff-panel .diff-note { font-size: .85rem; color: var(--pos-fg); margin: 6px 0 0; }

.st-app .ledger-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; border-radius: var(--pos-radius); margin-bottom: 10px;
}
.st-app .ledger-row:last-child { margin-bottom: 0; }
.st-app .ledger-row.neutral { background: var(--pos-input-bg); }
.st-app .ledger-row.expected { background: var(--pos-primary-soft); border: 2px solid #bde9ee; }
.st-app .ledger-row.expected .v { color: var(--pos-primary-strong); font-size: 1.25rem; }
.st-app .ledger-row .v { font-weight: 700; }

/* ---------- Login ---------- */
.st-app .login-screen { flex: 1; min-height: 0; overflow-y: auto; background: var(--pos-bg); display: flex; flex-direction: column; padding: 16px; box-sizing: border-box; }
.st-app .login-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.st-app .login-card { width: 100%; max-width: 430px; padding: 32px; }
.st-app .login-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; text-align: center; }
.st-app .login-brand .brand-icon {
  width: 80px; height: 80px; border-radius: 999px; background: var(--pos-primary-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.st-app .login-brand .brand-icon svg { width: 40px; height: 40px; color: var(--pos-primary-strong); }
.st-app .login-brand h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 6px; }
.st-app .login-brand p { color: var(--pos-muted); margin: 0; }
.st-app .login-footer { text-align: center; font-size: .85rem; color: var(--pos-muted); margin-top: 22px; }
.pos-screen details.advanced summary { cursor: pointer; font-size: .9rem; color: var(--pos-muted); margin: 12px 0; }
.pos-screen details.advanced[open] summary { margin-bottom: 8px; }

/* ---------- Connectivity pill ---------- */
.st-app .net-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; white-space: nowrap; color: var(--pos-muted); }
.st-app .net-pill .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--pos-success); box-shadow: 0 0 0 3px rgba(15, 169, 104, .2); }
.st-app .net-pill.offline .dot { background: var(--pos-warning); box-shadow: 0 0 0 3px rgba(180, 83, 9, .2); }

/* ============================================
   Admin Redesign — flat navy sidebar shell
   Shares the st-app design system with the POS.
   ============================================ */

.admin-screen {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
}

/* ---------- Sidebar ---------- */
.adm-sidebar {
  flex-shrink: 0;
  width: 250px;
  background: var(--pos-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.adm-brand { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.adm-brand h1 { font-size: 1.3rem; font-weight: 800; margin: 0; color: #fff; letter-spacing: -0.01em; }
.adm-brand p { font-size: .8rem; color: #9fb0c9; margin: 4px 0 0; }
.adm-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.adm-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  color: #9fb0c9; text-decoration: none; font-size: .95rem; font-weight: 500;
}
.adm-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.adm-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.adm-nav a.active { background: var(--pos-primary); color: #fff; font-weight: 600; }
.adm-sidebar-footer { padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, .1); }
.adm-sidebar-footer .who { font-size: .78rem; color: #9fb0c9; margin: 0; }
.adm-sidebar-footer .name { font-weight: 600; margin: 2px 0 0; color: #fff; font-size: .95rem; }
.adm-sidebar-footer .role-chip {
  display: inline-flex; margin-top: 6px; padding: 2px 10px; border-radius: 999px;
  background: rgba(20, 184, 198, .18); color: var(--pos-primary); font-size: .75rem; font-weight: 600;
}
.adm-logout {
  margin-top: 12px; display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; color: #9fb0c9; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; font-size: .95rem;
}
.adm-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.adm-logout svg { width: 18px; height: 18px; }

/* ---------- Main column ---------- */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--pos-bg); }
.adm-topbar {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--pos-card); border-bottom: 1px solid var(--pos-border);
  padding: 14px 24px; min-height: 64px; box-sizing: border-box;
}
.adm-topbar h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.adm-topbar .adm-topbar-sub { font-size: .82rem; color: var(--pos-muted); margin: 2px 0 0; }
.adm-topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.adm-content {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 24px; display: flex; flex-direction: column; gap: 20px;
}

/* Buttons sized for desktop admin */
.admin-screen .btn { width: auto; height: 38px; font-size: .92rem; padding: 0 16px; }
.admin-screen .btn-row { display: flex; gap: 10px; align-items: center; }
.admin-screen .input, .admin-screen select.input { height: 38px; font-size: .92rem; padding: 6px 12px; }
.admin-screen textarea.input { font-size: .92rem; }
.admin-screen label.field { font-size: .8rem; margin-bottom: 4px; }
.admin-screen .field-group { margin-bottom: 10px; }
.admin-screen .stat-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .admin-screen .stat-grid { grid-template-columns: 1fr 1fr; } }
.admin-screen .toast { max-width: 480px; left: auto; right: 24px; top: 76px; }
.admin-screen .sheet { max-width: 560px; left: auto; right: 0; border-radius: var(--pos-radius-lg) 0 0 0; }

/* ---------- Data table ---------- */
.st-app table.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.st-app table.data-table th {
  text-align: left; padding: 10px 12px; color: var(--pos-muted); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--pos-border);
  white-space: nowrap;
}
.st-app table.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--pos-border); vertical-align: middle; }
.st-app table.data-table tr:last-child td { border-bottom: none; }
.st-app table.data-table td.num, .st-app table.data-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-app table.data-table tbody tr.rowlink { cursor: pointer; }
.st-app table.data-table tbody tr.rowlink:hover td { background: var(--pos-primary-soft); }
.st-app .table-scroll { overflow-x: auto; }
.st-app .cell-main { font-weight: 600; margin: 0; }
.st-app .cell-sub { font-size: .78rem; color: var(--pos-muted); margin: 1px 0 0; }
.st-app .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Money stack (per-currency amounts) ---------- */
.st-app .money-stack { display: flex; flex-direction: column; gap: 1px; align-items: center; }
.st-app .money-stack .money-line { margin: 0; font-weight: 700; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-app .money-stack.multi .money-line { font-size: 1.02rem; }
.st-app .money-stack .cur { font-size: .68em; font-weight: 600; opacity: .65; margin-left: 4px; letter-spacing: .02em; }
.st-app .stat.blue .money-line { color: var(--pos-primary-strong); }
.st-app .stat.green .money-line { color: var(--pos-success); }
.st-app .stat.purple .money-line { color: var(--pos-navy); }
.st-app .stat.orange .money-line { color: var(--pos-warning); }

/* Actionable stat tiles */
.st-app a.stat { display: block; text-decoration: none; transition: filter .12s ease; }
.st-app a.stat:hover { filter: brightness(.96); }

/* ---------- Inline checkbox rows ---------- */
.st-app .check-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.st-app .check-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--pos-primary); flex-shrink: 0; }
.st-app .check-row label, .st-app .check-row span { font-size: .92rem; font-weight: 500; margin: 0; cursor: pointer; text-align: left; }

/* ---------- Compact filter bar ---------- */
.admin-screen .filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.admin-screen .filter-bar .field-group { margin: 0; }

/* ---------- Sticky table headers (desktop; mobile keeps horizontal scroll) ---------- */
@media (min-width: 901px) {
  .admin-screen .table-scroll { overflow: visible; }
  .admin-screen table.data-table thead th { position: sticky; top: -24px; background: var(--pos-card); z-index: 2; box-shadow: 0 1px 0 var(--pos-border); }

  /* Fixed page chrome: filters and stats stay put, only the table card scrolls */
  .admin-screen main.adm-content.fixed-chrome { overflow: hidden; }
  .admin-screen .card.fill { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  .admin-screen .card.fill .table-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  .admin-screen .card.fill .table-scroll thead th { top: 0; }
  .admin-screen .card.fill .pager { flex-shrink: 0; }
}

/* ---------- Base-currency equivalent line ---------- */
.st-app .money-equiv { font-size: .72rem; font-weight: 600; color: var(--pos-muted); margin: 3px 0 0; font-variant-numeric: tabular-nums; }

/* ---------- Sparkline ---------- */
.st-app .sparkline { display: block; width: 100%; height: 26px; margin-top: 6px; }

/* ---------- Segmented period control ---------- */
.st-app .seg { display: inline-flex; background: var(--pos-input-bg); border: 1px solid var(--pos-border); border-radius: 10px; padding: 3px; gap: 2px; }
.st-app .seg button { border: none; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--pos-muted); cursor: pointer; height: auto; width: auto; }
.st-app .seg button.active { background: var(--pos-card); color: var(--pos-fg); box-shadow: 0 1px 2px rgba(13, 22, 38, .12); }

/* ---------- Pager ---------- */
.st-app .pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 10px; font-size: .85rem; color: var(--pos-muted); }
.st-app .pager .btn { height: 32px; padding: 0 12px; font-size: .85rem; }

/* ---------- Topbar global search ---------- */
.admin-screen .adm-search { width: 280px; height: 36px; font-size: .88rem; }
@media (max-width: 900px) { .admin-screen .adm-search { display: none; } }

/* ---------- Mobile sidebar ---------- */
.adm-menu-button {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: 10px; background: transparent;
  color: var(--pos-fg); cursor: pointer;
}
.adm-menu-button svg { width: 22px; height: 22px; }
.adm-backdrop { display: none; }
@media (max-width: 900px) {
  .adm-sidebar { position: absolute; inset: 0 auto 0 0; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-backdrop.show { display: block; position: absolute; inset: 0; background: rgba(13, 22, 38, .5); z-index: 55; }
  .adm-menu-button { display: inline-flex; }
  .adm-topbar { padding: 12px 16px; }
  .adm-content { padding: 16px; }
  .admin-screen .toast { right: 16px; left: 16px; max-width: none; }
  .admin-screen .sheet { max-width: none; border-radius: var(--pos-radius-lg) var(--pos-radius-lg) 0 0; }
}

/* Legacy admin pages inside the new shell stay scrollable until converted. */
.adm-main > .feature-stack,
.adm-main > .shell-card {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 24px;
  box-sizing: border-box;
}
