:root {
    color-scheme: light;
    --brand-ink: #10201e;
    --brand-ink-2: #163331;
    --brand-lime: #b7e000;
    --brand-lime-soft: #e9f7a8;
    --surface: #ffffff;
    --surface-alt: #f3f6f2;
    --line: #dce4dd;
    --text: #17231f;
    --muted: #60706a;
    --danger: #a83838;
    --shadow: 0 18px 40px rgba(16, 32, 30, 0.08);
    font-family: Arial, Helvetica, sans-serif;
    background: var(--surface-alt);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(183, 224, 0, 0.08), rgba(243, 246, 242, 0) 280px),
        var(--surface-alt);
}

a {
    color: inherit;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 284px 1fr;
}

.sidebar {
    background: var(--brand-ink);
    color: #f7fbf2;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(183, 224, 0, 0.18);
}

.brand {
    display: block;
    text-decoration: none;
    margin-bottom: 22px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(183, 224, 0, 0.24);
    border-radius: 8px;
}

.brand img {
    display: block;
    width: 100%;
    height: auto;
}

.sidebar-product {
    display: grid;
    gap: 2px;
    padding: 0 12px 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-product span {
    color: var(--brand-lime);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-product strong {
    font-size: 1.05rem;
}

.sidebar-user {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #d9e2dd;
}

.sidebar-user strong {
    color: #ffffff;
}

.sidebar-user a,
.sidebar-user button {
    min-height: 32px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #d9e2dd;
    text-align: left;
    text-decoration: none;
    box-shadow: none;
}

.sidebar-user button:hover,
.sidebar-user a:hover {
    color: var(--brand-lime);
}

.brand small {
    display: block;
    color: #a8b5bf;
    margin-top: 2px;
}

nav {
    display: grid;
    gap: 6px;
}

nav a {
    text-decoration: none;
    color: #d9e2dd;
    padding: 11px 12px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid transparent;
}

nav a.active,
nav a:hover {
    background: rgba(183, 224, 0, 0.12);
    color: #ffffff;
    border-color: rgba(183, 224, 0, 0.28);
}

main {
    padding: 30px;
    min-width: 0;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--brand-ink-2);
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin-top: 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--brand-ink);
}

h2 {
    font-size: 1.1rem;
    color: var(--brand-ink);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.panel,
.metric,
.workflow {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric strong {
    display: block;
    font-size: 1.8rem;
    color: var(--brand-ink);
}

.metric span {
    color: var(--muted);
}

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

.form-grid.single {
    grid-template-columns: 1fr;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.88rem;
    color: #40514b;
    font-weight: 700;
}

.full,
textarea.full {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #c8d3da;
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(183, 224, 0, 0.48);
    border-color: var(--brand-ink-2);
}

textarea {
    resize: vertical;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check input {
    width: 18px;
    min-height: 18px;
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.wrap {
    flex-wrap: wrap;
}

.button,
button {
    border: 1px solid #bdc9c3;
    background: #fff;
    color: var(--brand-ink);
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
}

.button.primary {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    color: var(--brand-ink);
    box-shadow: 0 8px 18px rgba(183, 224, 0, 0.26);
}

.button.danger,
.icon-button.danger {
    border-color: #d8a8a8;
    color: var(--danger);
}

.button:hover,
button:hover {
    border-color: var(--brand-ink-2);
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    text-align: left;
    border-bottom: 1px solid #e6ede7;
    padding: 10px 8px;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    background: #f8faf7;
}

.row-actions {
    width: 92px;
    white-space: nowrap;
}

.icon-button {
    min-width: 32px;
    min-height: 32px;
    padding: 4px 8px;
    margin-left: 4px;
}

.status {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f5fbdf;
    border: 1px solid #d7eb7e;
}

.status.error {
    background: #fff0f0;
    border-color: #e5b7b7;
}

.status.muted {
    background: #f0f4f6;
    border-color: #d8e0e5;
}

.narrow-panel {
    max-width: 560px;
}

.inline-metric {
    box-shadow: none;
}

.auth-shell {
    min-height: 100vh;
    background: #eaf2fb;
}

.auth-topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 36px;
    background: #ffffff;
    border-bottom: 1px solid #d8e2ec;
    box-shadow: 0 2px 10px rgba(24, 39, 57, 0.08);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1a2b3c;
    font-weight: 800;
}

.auth-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.auth-topbar-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid #d5dfeb;
    border-radius: 8px;
    color: #1a2b3c;
    background: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-page {
    min-height: calc(100vh - 68px);
    display: grid;
    place-items: center;
    padding: 42px 24px;
}

.login-panel {
    width: min(100%, 418px);
    background: var(--surface);
    border: 1px solid #d8e2ec;
    border-radius: 14px;
    padding: 42px 32px 34px;
    box-shadow: 0 28px 60px rgba(24, 39, 57, 0.16);
}

.login-brand {
    display: grid;
    justify-items: center;
    gap: 0;
    margin-bottom: 28px;
    color: var(--brand-ink);
    font-weight: 900;
    line-height: 0.95;
    font-size: 1.35rem;
    font-style: italic;
}

.login-brand img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    margin-bottom: 6px;
}

.login-brand span {
    color: #2eb85c;
}

.login-heading {
    margin-bottom: 26px;
    text-align: center;
}

.login-heading h1 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.2;
    color: #102033;
}

.login-heading p {
    margin: 8px 0 0;
    color: #486177;
    font-size: 0.88rem;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    gap: 8px;
    color: #1e3347;
    font-size: 0.84rem;
}

.login-form input {
    min-height: 38px;
    border-color: #d2deea;
    border-radius: 8px;
    background: #eaf2ff;
}

.login-form input:focus {
    outline: 2px solid rgba(46, 184, 92, 0.22);
    border-color: #2f62ad;
}

.login-form .button.primary {
    width: 100%;
    min-height: 38px;
    margin-top: 4px;
    border-color: #2f62ad;
    background: #2f62ad;
    color: #ffffff;
    box-shadow: none;
}

.login-footnote {
    margin: 22px 0 0;
    text-align: center;
    color: #98a8ba;
    font-size: 0.76rem;
}

.bank-identification {
    display: grid;
    gap: 3px;
}

.bank-identification span,
.bank-identification small {
    color: var(--muted);
}

.json-output {
    max-height: 460px;
    overflow: auto;
    background: var(--brand-ink);
    color: #dceaf1;
    padding: 14px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.qr {
    width: 220px;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid #dde6eb;
    border-radius: 8px;
    padding: 10px;
    background: white;
    margin-bottom: 12px;
}

ol {
    padding-left: 22px;
}

li {
    margin: 8px 0;
}

@media (max-width: 900px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    main {
        padding: 18px;
    }

    .auth-topbar {
        height: 60px;
        padding: 0 18px;
    }

    .auth-page {
        min-height: calc(100vh - 60px);
        padding: 28px 16px;
    }

    .login-panel {
        padding: 34px 22px 28px;
    }

    .two-column,
    .metric-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
