/* Shared onboarding look-and-feel for the Tier 1 / Tier 2 (and future) review pages.
   Global (non-scoped) so every onboarding page reuses one source of truth. */

.ob-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--surface-text);
}

/* ---------- toolbar / tabs ---------- */
.ob-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ob-tabs {
    display: flex;
    gap: 10px;
}

.ob-grid-wrapper {
    position: relative;
}

/* ---------- card ---------- */
.ob-card {
    background: var(--surface-card-bg);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    overflow: hidden;
}

.ob-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--surface-text-muted);
}

.ob-alert {
    background: color-mix(in srgb, #d32f2f 14%, transparent);
    border: 1px solid color-mix(in srgb, #d32f2f 40%, transparent);
    color: #ef5350;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .88rem;
}

.ob-success {
    background: color-mix(in srgb, #2e7d32 14%, transparent);
    border: 1px solid color-mix(in srgb, #2e7d32 40%, transparent);
    color: #66bb6a;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .88rem;
}

/* ---------- status pills ---------- */
.ob-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.ob-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ob-pill-ok { background: color-mix(in srgb, #2e7d32 22%, transparent); color: #66bb6a; }
.ob-pill-bad { background: color-mix(in srgb, #d32f2f 22%, transparent); color: #ef5350; }
.ob-pill-wait { background: color-mix(in srgb, #f9a825 22%, transparent); color: #ffca28; }
.ob-pill-info { background: color-mix(in srgb, #1976d2 22%, transparent); color: #64b5f6; }

/* ---------- detail view ---------- */
.ob-back {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--surface-text-muted);
    cursor: pointer;
    font-size: .9rem;
    padding: 4px 0;
}

.ob-back:hover { color: var(--brand-pink); }

.ob-detail-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--surface-border);
}

.ob-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: color-mix(in srgb, var(--brand-pink) 18%, transparent);
    color: var(--brand-pink);
    flex-shrink: 0;
}

.ob-head-info { flex: 1; }
.ob-head-info h2 { margin: 0; font-size: 1.25rem; }
.ob-head-info p { margin: 4px 0 0; color: var(--surface-text-muted); font-size: .88rem; }

.ob-detail-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ob-section-title {
    color: var(--surface-text-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: 10px;
    padding-left: 11px;
    position: relative;
}

.ob-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    bottom: 1px;
    width: 3px;
    border-radius: 2px;
    background: var(--brand-pink);
}

.ob-doc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
}

.ob-doc-info { display: flex; align-items: center; gap: 12px; }
.ob-doc-info i { font-size: 1.3rem; color: var(--brand-pink); }
.ob-doc-info strong { display: block; font-size: .92rem; }
.ob-doc-info span { color: var(--surface-text-muted); font-size: .82rem; }
.ob-doc-actions { display: flex; gap: 8px; align-items: center; }

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

.ob-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-text) 2.5%, transparent);
    transition: border-color .15s ease, background .15s ease;
}

.ob-field:hover {
    border-color: color-mix(in srgb, var(--brand-pink) 45%, var(--surface-border));
    background: color-mix(in srgb, var(--brand-pink) 5%, transparent);
}

.ob-field-label {
    color: var(--surface-text-muted);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.ob-field-value { font-size: .95rem; font-weight: 500; line-height: 1.35; word-break: break-word; }

.ob-muted { color: var(--surface-text-muted); font-size: .82rem; }

/* ---------- footer action bar ---------- */
.ob-detail-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--surface-border);
    background: color-mix(in srgb, var(--surface-text) 2%, transparent);
}

/* ---------- buttons ---------- */
.ob-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: .86rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--surface-border);
    background: var(--surface-card-bg);
    color: var(--surface-text);
    transition: all .12s ease;
}

.ob-btn:disabled { opacity: .55; cursor: not-allowed; }
.ob-btn-ghost:hover { border-color: var(--brand-pink); color: var(--brand-pink); }

.ob-btn-primary {
    background: var(--brand-pink);
    border-color: var(--brand-pink);
    color: #fff;
}
.ob-btn-primary:hover { background: var(--brand-pink-dark); border-color: var(--brand-pink-dark); }

.ob-btn-danger {
    background: #d32f2f;
    border-color: #d32f2f;
    color: #fff;
}
.ob-btn-danger:hover { background: #b71c1c; border-color: #b71c1c; }

.ob-btn-success {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}
.ob-btn-success:hover { background: #1b5e20; border-color: #1b5e20; }

/* ---------- modals ---------- */
.ob-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: grid;
    place-items: center;
    z-index: 1200;
    padding: 20px;
}

.ob-modal {
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow: auto;
    background: var(--surface-card-bg);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}

.ob-modal-img { max-width: 560px; }

.ob-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--surface-border);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-pink) 7%, transparent), transparent);
}

.ob-modal-head h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ob-modal-head h3::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--brand-pink);
}

.ob-x {
    background: transparent;
    border: none;
    color: var(--surface-text-muted);
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    transition: all .12s ease;
}

.ob-x:hover { background: color-mix(in srgb, var(--surface-text) 8%, transparent); color: var(--surface-text); }

.ob-modal-body { padding: 22px; }
.ob-modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--surface-border);
}

.ob-nin-img { margin-top: 16px; text-align: center; }
.ob-nin-img img { max-width: 100%; border-radius: 10px; border: 1px solid var(--surface-border); }

/* ---------- image viewer ---------- */
.ob-img-toolbar { display: flex; justify-content: center; gap: 8px; padding: 14px 20px 6px; }

.ob-img-stage {
    margin: 8px 20px;
    height: 380px;
    border: 1px dashed var(--surface-border);
    border-radius: 12px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--surface-text) 4%, transparent);
}

.ob-img-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .12s ease;
    transform-origin: center center;
}

.ob-img-hint { text-align: center; color: var(--surface-text-muted); font-size: .8rem; margin: 0 0 16px; }

/* ---------- reject panel ---------- */
.ob-reject-intro { color: var(--surface-text-muted); font-size: .88rem; margin: 0 0 16px; }

.ob-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.ob-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: .88rem;
    transition: all .12s ease;
}

.ob-check:hover { border-color: color-mix(in srgb, var(--brand-pink) 45%, var(--surface-border)); }
.ob-check.checked { border-color: #d32f2f; background: color-mix(in srgb, #d32f2f 8%, transparent); }

.ob-label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--surface-text-muted); margin-bottom: 7px; }

.ob-textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    background: var(--surface-card-bg);
    color: var(--surface-text);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
}

.ob-textarea:focus { border-color: var(--brand-pink); }

@media (max-width: 760px) {
    .ob-grid, .ob-checks { grid-template-columns: 1fr; }
}

/* =====================================================================
   NIP-style transaction pages (NIP Manager, Inward Deposits, VAS…)
   Global so every transaction page shares one source of truth and is not
   dependent on per-component scoped CSS bundles.
   ===================================================================== */
.nip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.nip-header-text h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.nip-header-text p {
    margin: 4px 0 0;
    color: var(--surface-text-muted);
    font-size: .9rem;
}

.loan-report-page {
    --brand-pink: #0f766e;
    --brand-pink-dark: #0a4f49;
}

.loan-report-page .nip-header {
    padding: 20px 24px;
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-pink) 6%, transparent), transparent 70%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .03);
}

.loan-report-page .ob-card {
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .03);
}

.loan-report-page .nip-kpi {
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .025);
}

/* ---------- KPI tiles ---------- */
.nip-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.nip-kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--surface-card-bg);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
}

.nip-kpi-label {
    color: var(--surface-text-muted);
    font-size: .8rem;
    font-weight: 600;
}

.nip-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.nip-kpi-ok { color: #66bb6a; }
.nip-kpi-wait { color: #ffca28; }
.nip-kpi-bad { color: #ef5350; }

.nip-kpi-hint {
    color: var(--surface-text-muted);
    font-size: .76rem;
}

/* ---------- filter bar ---------- */
.nip-filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
}

.nip-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.nip-filter-grow { flex: 1 1 220px; }
.nip-filter-check { justify-content: flex-end; }
.nip-check { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--surface-text);
    cursor: pointer; white-space: nowrap; }
.nip-check input { accent-color: var(--brand-pink); width: 15px; height: 15px; }

.nip-filter-field label {
    color: var(--surface-text-muted);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.nip-filter-actions {
    display: flex;
    align-items: flex-end;
}

/* ---------- chart card ---------- */
.nip-chart { padding: 18px 20px; }
.nip-chart h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}
.nip-chart-sub {
    margin: 4px 0 12px;
    color: var(--surface-text-muted);
    font-size: .82rem;
}

/* ---------- grid cells ---------- */
.nip-cell-primary { font-weight: 600; }
.nip-cell-sub { color: var(--surface-text-muted); font-size: .78rem; }

.nip-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
    color: var(--brand-pink);
}

.nip-narration {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.nip-requery { padding: 6px 12px; font-size: .82rem; }
.nip-requery:hover { border-color: var(--brand-pink); color: var(--brand-pink); }

@media (max-width: 980px) {
    .nip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .nip-kpis { grid-template-columns: 1fr; }
    .nip-filter-field { min-width: 100%; }
}

/* =========================================================================
   Account Opening wizard (.ao-*)
   ========================================================================= */
.ao-page .ob-card { padding: 20px 22px; }
.ao-page .ob-card h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; color: var(--surface-text); }
.ao-page .ob-card h4.ao-subhead { margin: 20px 0 8px; font-size: .92rem; font-weight: 700; color: var(--surface-text); border-top: 1px dashed var(--surface-border); padding-top: 14px; }

.ao-alert-ok {
    background: color-mix(in srgb, #2e7d32 14%, transparent);
    border-color: color-mix(in srgb, #2e7d32 40%, transparent);
    color: #66bb6a;
}

/* ---------- stepper ---------- */
.ao-stepper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--surface-card-bg);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 12px;
}
.ao-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 130px;
    transition: background .15s ease, border-color .15s ease;
    border: 1px solid transparent;
}
.ao-step:hover { background: color-mix(in srgb, var(--brand-pink) 8%, transparent); }
.ao-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--surface-border);
    color: var(--surface-text);
    font-weight: 700;
    font-size: .82rem;
    flex-shrink: 0;
}
.ao-step-label { font-size: .86rem; font-weight: 600; color: var(--surface-text-muted); }
.ao-step-active { border-color: var(--brand-pink); background: color-mix(in srgb, var(--brand-pink) 12%, transparent); }
.ao-step-active .ao-step-index { background: var(--brand-pink); color: #fff; }
.ao-step-active .ao-step-label { color: var(--surface-text); }
.ao-step-done .ao-step-index { background: #2e7d32; color: #fff; }

/* ---------- form grid ---------- */
.ao-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-top: 8px;
}
.ao-field { display: flex; flex-direction: column; gap: 6px; }
.ao-field-wide { grid-column: 1 / -1; }
.ao-field-check { flex-direction: row; align-items: center; gap: 10px; }
.ao-field label { font-size: .82rem; font-weight: 600; color: var(--surface-text-muted); }
.ao-field-check label { margin: 0; color: var(--surface-text); }
.ao-req { color: #ef5350; }
.ao-hint { font-size: .74rem; color: var(--surface-text-muted); }

/* ---------- verification block ---------- */
.ao-verify-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.ao-verify-row { display: flex; gap: 10px; align-items: stretch; }
.ao-verify-row > :first-child { flex: 1 1 auto; }
.ao-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .76rem; font-weight: 700; margin-top: 8px;
}
.ao-badge-ok { color: #66bb6a; }
.ao-identity {
    margin-top: 12px;
    display: grid;
    gap: 8px;
    background: color-mix(in srgb, var(--surface-border) 30%, transparent);
    border-radius: 10px;
    padding: 12px 14px;
}
.ao-identity > div { display: grid; grid-template-columns: 120px 1fr; font-size: .84rem; }
.ao-identity > div span { color: var(--surface-text-muted); font-weight: 600; }

/* ---------- resume ---------- */
.ao-resume-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* ---------- documents ---------- */
.ao-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 12px;
}
.ao-doc-card {
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ao-doc-head { padding: 10px 14px; font-weight: 600; font-size: .86rem; border-bottom: 1px solid var(--surface-border); }
.ao-doc-preview {
    height: 180px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--surface-border) 22%, transparent);
    overflow: hidden;
}
.ao-doc-preview img { width: 100%; height: 100%; object-fit: contain; }
.ao-doc-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--surface-text-muted); font-size: .8rem; }
.ao-doc-empty i { font-size: 1.8rem; }
.ao-doc-btn { justify-content: center; margin: 12px; cursor: pointer; }

/* ---------- review ---------- */
.ao-review {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 8px;
}
.ao-review-sec { border: 1px solid var(--surface-border); border-radius: 12px; padding: 14px 16px; }
.ao-review-sec h4 { margin: 0 0 10px; font-size: .86rem; font-weight: 700; color: var(--brand-pink); }
.ao-review-sec > div { display: grid; grid-template-columns: 110px 1fr; font-size: .84rem; margin-bottom: 6px; }
.ao-review-sec > div span { color: var(--surface-text-muted); font-weight: 600; }
.ao-review-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.ao-review-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--surface-border); }
.ao-submit-note { margin: 18px 0 12px; font-size: .84rem; color: var(--surface-text-muted); display: flex; gap: 8px; align-items: center; }
.ao-submit { margin-top: 6px; }

/* ---------- footer nav ---------- */
.ao-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ao-nav-right { display: flex; gap: 12px; }

@media (max-width: 780px) {
    .ao-grid, .ao-verify-block { grid-template-columns: 1fr; }
}

/* =========================================================================
   Account Opening — professional refinements
   ========================================================================= */
.ao-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ao-head h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; color: var(--surface-text); }
.ao-head p { margin: 0; color: var(--surface-text-muted); font-size: .9rem; }
.ao-head-progress { min-width: 200px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ao-head-step { font-size: .78rem; font-weight: 700; color: var(--brand-pink); }
.ao-progressbar { width: 200px; height: 6px; border-radius: 999px; background: var(--surface-border); overflow: hidden; }
.ao-progressbar span { display: block; height: 100%; background: var(--brand-pink); border-radius: 999px; transition: width .3s ease; }

/* stepper meta */
.ao-step-meta { display: flex; flex-direction: column; line-height: 1.2; }
.ao-step-sub { font-size: .7rem; color: var(--surface-text-muted); }
.ao-step-active .ao-step-sub { color: color-mix(in srgb, var(--brand-pink) 80%, var(--surface-text)); }

/* section headers with icon */
.ao-section-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.ao-section-head i { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--brand-pink) 14%, transparent); color: var(--brand-pink); font-size: 1rem; flex-shrink: 0; }
.ao-section-head h4 { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--surface-text); }
.ao-section-head-sub { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--surface-border); }
.ao-section-head-sub i { width: 28px; height: 28px; font-size: .9rem; }
.ao-section-head-sub h4 { font-size: .92rem; }
.ao-section-sub { margin: -6px 0 14px; color: var(--surface-text-muted); font-size: .84rem; }
.ao-req-tag { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--brand-pink); background: color-mix(in srgb, var(--brand-pink) 12%, transparent); padding: 4px 10px; border-radius: 999px; }

/* verify cards */
.ao-verify-card { border: 1px solid var(--surface-border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.ao-verify-card > label { font-size: .82rem; font-weight: 700; color: var(--surface-text); }

/* company documents – compact attach chips */
.ao-doc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 18px; }
.ao-attach { display: flex; align-items: center; gap: 12px; border: 1px dashed var(--surface-border); border-radius: 11px; padding: 12px 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ao-attach:hover { border-color: var(--brand-pink); }
.ao-attach.attached { border-style: solid; border-color: color-mix(in srgb, #2e7d32 55%, transparent); background: color-mix(in srgb, #2e7d32 8%, transparent); }
.ao-attach-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--brand-pink) 12%, transparent); color: var(--brand-pink); font-size: 1.05rem; flex-shrink: 0; }
.ao-attach.attached .ao-attach-icon { background: color-mix(in srgb, #2e7d32 16%, transparent); color: #2e7d32; }
.ao-attach-text { display: flex; flex-direction: column; line-height: 1.25; }
.ao-attach-text strong { font-size: .84rem; font-weight: 600; color: var(--surface-text); }
.ao-attach-text small { font-size: .72rem; color: var(--surface-text-muted); }

.ao-doc-grid-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 16px; }

/* directors chips */
.ao-dir-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 6px; }
.ao-dir-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text); cursor: pointer; font-size: .84rem; transition: border-color .15s ease, background .15s ease; }
.ao-dir-chip:hover { border-color: var(--brand-pink); }
.ao-dir-chip.active { border-color: var(--brand-pink); background: color-mix(in srgb, var(--brand-pink) 12%, transparent); }
.ao-dir-chip-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-pink); color: #fff; font-size: .74rem; font-weight: 700; }
.ao-dir-chip-name { font-weight: 600; }
.ao-dir-badge { font-size: .68rem; font-weight: 700; color: var(--brand-pink); background: color-mix(in srgb, var(--brand-pink) 14%, transparent); padding: 2px 8px; border-radius: 999px; }
.ao-dir-add { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px dashed var(--brand-pink); background: transparent; color: var(--brand-pink); cursor: pointer; font-size: .84rem; font-weight: 600; }
.ao-dir-add:hover { background: color-mix(in srgb, var(--brand-pink) 10%, transparent); }

.ao-dir-form { margin-top: 16px; border-top: 1px solid var(--surface-border); padding-top: 16px; }
.ao-dir-form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ao-dir-form-head span { font-weight: 700; font-size: .9rem; color: var(--surface-text); }
.ao-dir-remove { background: transparent; border: none; color: #ef5350; font-size: .82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ao-dir-remove:hover { text-decoration: underline; }
.ao-dir-empty { text-align: center; padding: 30px 20px; color: var(--surface-text-muted); }
.ao-dir-empty i { font-size: 2rem; display: block; margin-bottom: 8px; color: var(--brand-pink); }
.ao-dir-empty p { margin: 0; font-size: .86rem; }

/* contextual banner */
.ao-context { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 16px; font-size: .86rem; color: var(--surface-text); background: color-mix(in srgb, var(--surface-border) 28%, transparent); border: 1px solid var(--surface-border); }
.ao-context i { font-size: 1.15rem; color: var(--surface-text-muted); flex-shrink: 0; }
.ao-context-req { background: color-mix(in srgb, var(--brand-pink) 10%, transparent); border-color: color-mix(in srgb, var(--brand-pink) 40%, transparent); }
.ao-context-req i { color: var(--brand-pink); }

/* =========================================================================
   Terminal Mapping Console (.tm-*)
   ========================================================================= */
.tm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tm-head h1 { margin: 0 0 4px; font-size: 1.4rem; font-weight: 800; color: var(--surface-text); }
.tm-head p { margin: 0; color: var(--surface-text-muted); font-size: .9rem; }
.tm-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.tm-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--surface-text-muted); }
.tm-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tm-dot-pos { background: var(--brand-pink); } .tm-dot-va { background: #14b8a6; } .tm-dot-wallet { background: #8b5cf6; } .tm-dot-tid { background: #f59e0b; }
.tm-dot-live { background: #22c55e; } .tm-dot-off { background: var(--surface-border); }

.tm-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.tm-panel { background: var(--surface-card-bg); border: 1px solid var(--surface-border); border-radius: 14px; padding: 16px; }
.tm-right { display: flex; flex-direction: column; gap: 16px; }

/* POS list */
.tm-poslist { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.tm-add-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--brand-pink) 45%, transparent); background: color-mix(in srgb, var(--brand-pink) 10%, transparent); color: var(--brand-pink); font-weight: 600; font-size: .88rem; cursor: pointer; }
.tm-add-btn:hover { background: color-mix(in srgb, var(--brand-pink) 16%, transparent); }
.tm-addpos { display: flex; flex-direction: column; gap: 8px; }
.tm-addpos-actions { display: flex; gap: 8px; }
.tm-search { position: relative; display: flex; align-items: center; }
.tm-search > i { position: absolute; left: 12px; color: var(--surface-text-muted); font-size: .9rem; z-index: 1; pointer-events: none; }
.tm-search :is(.k-textbox, .k-input) { padding-left: 30px; }
.tm-pos-scroll { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; }
.tm-pos-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: background .12s ease; }
.tm-pos-item:hover { background: color-mix(in srgb, var(--surface-border) 26%, transparent); }
.tm-pos-item.selected { background: color-mix(in srgb, var(--brand-pink) 12%, transparent); border-color: color-mix(in srgb, var(--brand-pink) 40%, transparent); }
.tm-pos-selflag { font-size: .64rem; font-weight: 700; letter-spacing: .04em; color: var(--brand-pink); margin-bottom: 2px; }
.tm-pos-serial { font-weight: 700; font-size: .92rem; color: var(--surface-text); }
.tm-pos-va { font-size: .76rem; color: var(--surface-text-muted); margin-top: 2px; }

/* placeholder */
.tm-placeholder { text-align: center; padding: 60px 20px; color: var(--surface-text-muted); }
.tm-placeholder i { font-size: 2.4rem; display: block; margin-bottom: 10px; color: var(--surface-border); }
.tm-placeholder p { margin: 0; font-size: .9rem; }

/* linkage breadcrumb */
.tm-linkage-label { font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: var(--surface-text-muted); margin-bottom: 10px; }
.tm-chain { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-sep { color: var(--surface-text-muted); font-size: .8rem; }
.tm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; font-size: .84rem; font-weight: 600; font-family: ui-monospace, "Cascadia Code", monospace; }
.tm-chip-pos { background: color-mix(in srgb, var(--brand-pink) 12%, transparent); color: var(--brand-pink); border: 1px solid color-mix(in srgb, var(--brand-pink) 35%, transparent); }
.tm-chip-va { background: color-mix(in srgb, #14b8a6 12%, transparent); color: #14b8a6; border: 1px solid color-mix(in srgb, #14b8a6 35%, transparent); }
.tm-chip-wallet { background: color-mix(in srgb, #8b5cf6 12%, transparent); color: #8b5cf6; border: 1px solid color-mix(in srgb, #8b5cf6 35%, transparent); }
.tm-chip-empty { background: transparent; color: var(--surface-text-muted); border: 1px dashed var(--surface-border); }

/* tabs */
.tm-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; background: var(--surface-card-bg); border: 1px solid var(--surface-border); border-radius: 12px; padding: 6px; }
.tm-tab { padding: 12px; border-radius: 8px; border: none; background: transparent; color: var(--surface-text-muted); font-weight: 700; font-size: .88rem; cursor: pointer; }
.tm-tab.active { background: var(--brand-pink); color: #fff; }

/* status bar */
.tm-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .86rem; flex-wrap: wrap; }
.tm-primary-tag { color: #f59e0b; font-weight: 700; }
.tm-unlink { padding: 8px 14px; }

/* steps + lists */
.tm-step-title { font-weight: 700; font-size: .92rem; color: var(--surface-text); margin-bottom: 12px; }
.tm-search-inline { margin-bottom: 10px; }
.tm-list { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; }
.tm-list::-webkit-scrollbar { width: 8px; }
.tm-list::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 8px; }
.tm-list::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--brand-pink) 40%, var(--surface-border)); }
/* Section-2 VA list: compact fixed-height scroll pane so the Create & attach footer stays visible instead of the panel growing endlessly. */
.tm-va-list { max-height: 232px; border: 1px solid var(--surface-border); border-radius: 12px; padding: 2px 10px; background: color-mix(in srgb, var(--surface-card-bg) 60%, transparent); }
.tm-va-list .tm-list-row { padding: 11px 4px; }
.tm-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--surface-border); }
.tm-list-row:last-child { border-bottom: none; }
.tm-wallet-row { cursor: pointer; border-radius: 8px; padding: 12px; }
.tm-wallet-row:hover { background: color-mix(in srgb, #8b5cf6 8%, transparent); }
.tm-list-name { font-weight: 600; font-size: .9rem; color: var(--surface-text); }
.tm-list-sub { font-size: .78rem; color: var(--surface-text-muted); font-family: ui-monospace, monospace; }
.tm-va-info { display: flex; flex-direction: column; gap: 2px; }
.tm-va-no { font-weight: 700; font-family: ui-monospace, monospace; color: var(--surface-text); display: inline-flex; align-items: center; gap: 6px; }
.tm-star { color: #f59e0b; }
.tm-attach-btn { padding: 7px 18px; background: var(--brand-pink); color: #fff; border-color: var(--brand-pink); }
.tm-attach-btn:hover { background: var(--brand-pink-dark); border-color: var(--brand-pink-dark); }
.tm-linked { background: color-mix(in srgb, #22c55e 20%, transparent); color: #16a34a; border-color: transparent; cursor: default; }
.tm-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.tm-selected-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: color-mix(in srgb, #8b5cf6 8%, transparent); border: 1px solid color-mix(in srgb, #8b5cf6 30%, transparent); border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, monospace; color: #8b5cf6; font-weight: 600; font-size: .88rem; }
.tm-link-btn { background: transparent; border: none; color: #8b5cf6; font-weight: 600; font-size: .84rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

.tm-create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.tm-create-btn { width: 100%; justify-content: center; background: var(--brand-pink); color: #fff; border-color: var(--brand-pink); }
.tm-create-btn:hover { background: var(--brand-pink-dark); border-color: var(--brand-pink-dark); }

/* add-POS dialog */
.tm-dialog { display: flex; flex-direction: column; gap: 8px; }
.tm-dialog label { font-size: .82rem; font-weight: 600; color: var(--surface-text-muted); }
.tm-dialog-hint { margin: 2px 0 0; font-size: .76rem; color: var(--surface-text-muted); }
.tm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.tm-note { font-size: .84rem; color: var(--surface-text-muted); padding: 6px 0; }
.tm-tid { display: inline-flex; align-items: center; gap: 10px; }
.tm-tid-no { font-weight: 700; font-family: ui-monospace, monospace; color: var(--surface-text); }
.tm-badge { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: color-mix(in srgb, var(--surface-border) 40%, transparent); color: var(--surface-text-muted); }
.tm-empty { padding: 16px; text-align: center; color: var(--surface-text-muted); font-size: .82rem; }

@media (max-width: 900px) {
    .tm-layout { grid-template-columns: 1fr; }
    .tm-poslist { position: static; }
    .tm-create-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Posting Manager (Cash Deposit / Withdrawal)  .pm-*
   ============================================================ */
.pm-page { max-width: 1180px; }
.pm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pm-head h1 { margin: 0; }
.pm-head p { margin: 4px 0 0; color: var(--surface-text-muted); font-size: .9rem; }
.pm-cash-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .82rem; letter-spacing: .3px; color: var(--brand-pink-dark); background: color-mix(in srgb, var(--brand-pink) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand-pink) 30%, transparent); white-space: nowrap; }

.pm-shell { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: start; }

/* left tab rail */
.pm-rail { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; }
.pm-rail-tab { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .15s ease; }
.pm-rail-tab i { font-size: 1.05rem; color: var(--surface-text-muted); }
.pm-rail-tab:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand-pink) 45%, var(--surface-border)); }
.pm-rail-tab.active { background: linear-gradient(135deg, var(--brand-pink), var(--brand-pink-dark)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px var(--brand-pink); }
.pm-rail-tab.active i { color: #fff; }
.pm-rail-disabled { opacity: .5; cursor: not-allowed; }

/* main card */
.pm-card { background: var(--surface-card-bg); border: 1px solid var(--surface-border); border-radius: 16px; padding: 22px 24px; }
.pm-card-title { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.15rem; text-align: center; color: var(--surface-text); margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--surface-border); }

.pm-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; }
.pm-col { display: flex; flex-direction: column; gap: 13px; }

.pm-field { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 12px; }
.pm-field > label { font-size: .82rem; font-weight: 600; color: var(--surface-text-muted); }
.pm-field .k-input, .pm-field .k-textbox, .pm-field .k-numerictextbox { width: 100%; }

.pm-readonly, .pm-textarea, .pm-words { width: 100%; border: 1px solid var(--surface-border); border-radius: 8px; background: color-mix(in srgb, var(--surface-card-bg) 55%, transparent); color: var(--surface-text); font: inherit; font-size: .88rem; padding: 8px 11px; }
.pm-readonly { color: var(--surface-text-muted); }
.pm-textarea { resize: vertical; min-height: 44px; }
.pm-words { min-height: 44px; font-style: italic; color: var(--brand-pink-dark); background: color-mix(in srgb, var(--brand-pink) 6%, transparent); display: flex; align-items: center; }

.pm-acct-row { display: flex; gap: 8px; }
.pm-lookup-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 0 14px; border-radius: 8px; border: none; background: var(--brand-pink); color: #fff; font-weight: 600; font-size: .82rem; cursor: pointer; }
.pm-lookup-btn:hover:not(:disabled) { background: var(--brand-pink-dark); }
.pm-lookup-btn:disabled { opacity: .6; cursor: default; }

/* overdraft facility panel (withdrawal only) */
.pm-od { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #e0a800 10%, transparent); border: 1px solid color-mix(in srgb, #e0a800 30%, transparent); transition: background .15s ease, border-color .15s ease; }
.pm-od.on { background: color-mix(in srgb, #e0a800 18%, transparent); border-color: color-mix(in srgb, #e0a800 55%, transparent); }
.pm-od.off { opacity: .6; }
.pm-od-head { display: flex; align-items: center; gap: 9px; font-size: .84rem; font-weight: 600; color: var(--surface-text); }
.pm-od-hint { margin-top: 6px; padding-left: 26px; font-size: .76rem; color: var(--surface-text-muted); }
.pm-od-amt { color: #b98900 !important; }

/* live amount validation */
.pm-amt-err { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 600; color: #d64550; }

/* withdrawal limit panel */
.pm-limit { margin-top: 16px; border: 1px solid color-mix(in srgb, var(--brand-pink) 35%, transparent); border-radius: 12px; padding: 14px 16px; background: color-mix(in srgb, var(--brand-pink) 6%, transparent); transition: border-color .15s ease, background .15s ease; }
.pm-limit.over { border-color: color-mix(in srgb, #d64550 55%, transparent); background: color-mix(in srgb, #d64550 8%, transparent); }
.pm-limit-title { font-family: "Space Grotesk", sans-serif; font-style: italic; font-weight: 600; color: var(--brand-pink-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.pm-limit-max { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding: 9px 0 7px; border-top: 2px solid color-mix(in srgb, var(--brand-pink) 30%, transparent); font-size: .9rem; }
.pm-limit-max > span { color: var(--surface-text-muted); font-weight: 600; }
.pm-limit-max > b { color: var(--brand-pink-dark); font-weight: 800; }
.pm-limit.over .pm-limit-max > b { color: #d64550; }

/* hard-stop banner */
.pm-block { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 11px 14px; border-radius: 10px; font-size: .84rem; font-weight: 600; color: #d64550; background: color-mix(in srgb, #d64550 10%, transparent); border: 1px solid color-mix(in srgb, #d64550 32%, transparent); }

/* awaiting-checker banner — amber, deliberately NOT the green "posted" alert:
   the entry is parked in the approval queue and no ledger row exists yet. */
.pm-alert-pending { display: flex; align-items: center; gap: 9px; color: #9a6207; background: color-mix(in srgb, #e8a33d 14%, transparent); border: 1px solid color-mix(in srgb, #e8a33d 42%, transparent); }
.pm-alert-pending > i { font-size: 1rem; flex: 0 0 auto; }

/* identification */
.pm-ident { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pm-ident-box { position: relative; border: 1px solid var(--surface-border); border-radius: 12px; background: color-mix(in srgb, var(--surface-card-bg) 55%, transparent); aspect-ratio: 1 / 1.1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pm-ident-label { position: absolute; top: 6px; left: 8px; font-size: .68rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--surface-text-muted); }
.pm-ident-box img { width: 100%; height: 100%; object-fit: cover; }
.pm-ident-empty { color: color-mix(in srgb, var(--surface-text-muted) 55%, transparent); font-size: 2.4rem; }

/* account info */
.pm-info { margin-top: 16px; border: 1px solid var(--surface-border); border-radius: 12px; padding: 14px 16px; background: color-mix(in srgb, var(--surface-card-bg) 40%, transparent); }
.pm-info-title { font-family: "Space Grotesk", sans-serif; font-style: italic; font-weight: 600; color: var(--brand-pink-dark); margin-bottom: 10px; }
.pm-info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--surface-border); font-size: .85rem; }
.pm-info-row:last-child { border-bottom: none; }
.pm-info-row > span { color: var(--surface-text-muted); }
.pm-info-row > b { color: var(--surface-text); font-weight: 600; text-align: right; }
.pm-avail { color: var(--brand-pink-dark) !important; }
.pm-ref { font-family: ui-monospace, monospace; font-size: .8rem; }
.pm-status.ok { color: #1a9c54 !important; }
.pm-status.bad { color: #d64550 !important; }

/* submit */
.pm-submit { margin-top: 20px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px; border: none; border-radius: 12px; font-weight: 700; font-size: .98rem; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--brand-pink), var(--brand-pink-dark)); box-shadow: 0 8px 20px -8px var(--brand-pink); transition: filter .15s ease; }
.pm-submit:hover:not(:disabled) { filter: brightness(1.06); }
.pm-submit:disabled { opacity: .55; cursor: default; box-shadow: none; }

@media (max-width: 980px) {
    .pm-shell { grid-template-columns: 1fr; }
    .pm-rail { flex-direction: row; position: static; }
    .pm-rail-tab { flex: 1; justify-content: center; }
    .pm-grid { grid-template-columns: 1fr; }
    .pm-field { grid-template-columns: 120px 1fr; }
}

/* ============================================================
   Distribute to Multiple Accounts (split voucher)  .mp-*
   Builds on .pm-* (shares card / field / submit styles).
   ============================================================ */
.mp-modes { display: flex; gap: 12px; }
.mp-mode { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text); font-weight: 600; font-size: .92rem; cursor: pointer; transition: all .15s ease; }
.mp-mode small { font-weight: 500; color: var(--surface-text-muted); }
.mp-mode i { font-size: 1.15rem; }
.mp-mode:hover:not(.active) { border-color: color-mix(in srgb, var(--brand-pink) 45%, var(--surface-border)); }
.mp-mode.active { background: linear-gradient(135deg, var(--brand-pink), var(--brand-pink-dark)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px var(--brand-pink); }
.mp-mode.active small { color: rgba(255,255,255,.85); }

.mp-commission { margin-top: 6px; border: 1px solid var(--surface-border); border-radius: 12px; padding: 12px 14px 4px; background: color-mix(in srgb, var(--brand-pink) 5%, transparent); display: flex; flex-direction: column; gap: 13px; }
.mp-commission-title { font-weight: 600; font-size: .82rem; color: var(--brand-pink-dark); }
.mp-commission-title small { color: var(--surface-text-muted); font-weight: 500; }

.mp-grid-title { margin: 20px 0 10px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1rem; color: var(--surface-text); padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--surface-text) 5%, transparent); }

.mp-table-wrap { overflow-x: auto; border: 1px solid var(--surface-border); border-radius: 12px; }
.mp-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .86rem; }
.mp-table thead th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--surface-text-muted); padding: 10px 10px; border-bottom: 1px solid var(--surface-border); background: color-mix(in srgb, var(--surface-text) 3%, transparent); }
.mp-table td { padding: 7px 10px; border-bottom: 1px solid var(--surface-border); vertical-align: middle; }
.mp-table tbody tr:hover { background: color-mix(in srgb, var(--brand-pink) 4%, transparent); }
.mp-num { text-align: right; }
.mp-idx { color: color-mix(in srgb, var(--brand-pink) 60%, transparent); text-align: center; }
.mp-name { color: var(--surface-text); font-weight: 500; }
.mp-muted { color: var(--surface-text-muted); font-family: ui-monospace, monospace; font-size: .8rem; }
.mp-net { font-weight: 600; color: var(--brand-pink-dark); font-family: ui-monospace, monospace; }
.mp-row-bad td { background: color-mix(in srgb, #d32f2f 8%, transparent); }
.mp-row-bad .mp-name { color: #ef5350; }

.mp-in { width: 100%; border: 1px solid var(--surface-border); border-radius: 7px; background: var(--surface-card-bg); color: var(--surface-text); font: inherit; font-size: .85rem; padding: 7px 9px; }
.mp-in:focus { outline: none; border-color: var(--brand-pink); }
.mp-in-num { text-align: right; font-family: ui-monospace, monospace; }

.mp-del { border: none; background: transparent; color: var(--surface-text-muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.mp-del:hover { color: #ef5350; background: color-mix(in srgb, #d32f2f 12%, transparent); }

.mp-table tfoot td { padding: 11px 10px; border-top: 2px solid var(--surface-border); }
.mp-total-label { text-align: right; font-weight: 600; color: var(--surface-text-muted); text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; }
.mp-total { font-weight: 700; font-family: ui-monospace, monospace; color: var(--surface-text); }

.mp-add { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; border: 1px dashed color-mix(in srgb, var(--brand-pink) 50%, var(--surface-border)); background: transparent; color: var(--brand-pink-dark); font-weight: 600; font-size: .85rem; cursor: pointer; }
.mp-add:hover { background: color-mix(in srgb, var(--brand-pink) 8%, transparent); }

.mp-page .pm-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) {
    .mp-modes { flex-direction: column; }
    .mp-page .pm-grid { grid-template-columns: 1fr; }
}

/* ---------- Batch Journal Entry  .bj-* (reuses .mp-* / .pm-*) ---------- */
.bj-cot-toggle { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 11px 14px; margin-bottom: 16px; border-radius: 10px; background: color-mix(in srgb, var(--brand-pink) 7%, transparent); border: 1px solid color-mix(in srgb, var(--brand-pink) 25%, transparent); font-weight: 600; font-size: .88rem; color: var(--surface-text); }
.bj-cot-toggle small { font-weight: 500; color: var(--surface-text-muted); flex-basis: 100%; padding-left: 26px; }
.bj-cot-box { margin: 4px 0 8px; }
.bj-cot-row { display: grid; grid-template-columns: 1.4fr 1.4fr .8fr; gap: 14px; }
.bj-cot-row .pm-field { grid-template-columns: 1fr; align-items: stretch; }
.bj-cot-row .pm-field > label { margin-bottom: 4px; }
.bj-avail { display: block; font-size: .72rem; color: var(--surface-text-muted); font-family: ui-monospace, monospace; }
.bj-err { color: #ef5350 !important; }
.bj-table { min-width: 900px; }
@media (max-width: 980px) { .bj-cot-row { grid-template-columns: 1fr; } }

/* ============================================================
   Terminal Manager browse lists  .tl-*  (reuses .mp-table / .ob-pill)
   ============================================================ */
.tl-page { max-width: 1180px; }
.tl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tl-head h1 { margin: 0; }
.tl-head p { margin: 4px 0 0; color: var(--surface-text-muted); font-size: .9rem; }
.tl-refresh { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text); font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.tl-refresh:hover:not(:disabled) { border-color: var(--brand-pink); color: var(--brand-pink); }
.tl-refresh:disabled { opacity: .6; cursor: default; }

.tl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.tl-stat { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); cursor: pointer; transition: all .15s ease; border-left: 3px solid var(--surface-border); }
.tl-stat:hover { border-color: color-mix(in srgb, var(--brand-pink) 40%, var(--surface-border)); }
.tl-stat.sel { border-color: var(--brand-pink); box-shadow: 0 4px 14px -8px var(--brand-pink); }
.tl-stat-n { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--surface-text); line-height: 1; }
.tl-stat-l { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--surface-text-muted); }
.tl-stat.tl-ok { border-left-color: #1a9c54; }
.tl-stat.tl-bad { border-left-color: #d64550; }
.tl-stat.tl-info { border-left-color: var(--brand-pink); }
.tl-stat.tl-star { border-left-color: #e0a800; }

.tl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.tl-search { position: relative; flex: 1; min-width: 240px; }
.tl-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--surface-text-muted); }
.tl-search input { width: 100%; padding: 10px 12px 10px 36px; border-radius: 10px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text); font: inherit; font-size: .88rem; }
.tl-search input:focus { outline: none; border-color: var(--brand-pink); }
.tl-chips { display: flex; gap: 6px; }
.tl-chip { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text-muted); font-weight: 600; font-size: .8rem; cursor: pointer; }
.tl-chip:hover { color: var(--surface-text); }
.tl-chip.on { background: var(--brand-pink); border-color: var(--brand-pink); color: #fff; }

.tl-tablewrap { border: 1px solid var(--surface-border); border-radius: 12px; overflow-x: auto; }
.tl-table { min-width: 720px; }
/* Modifier for lists too long to show in full (posting/charge rules run into the
   hundreds) — caps the height and pins the header instead of paging. */
.tl-tablewrap-tall { max-height: 62vh; overflow-y: auto; }
.tl-tablewrap-tall thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-card-bg); }

/* Click-to-sort header, for the plain HTML tables that aren't a TelerikGrid. */
.tl-table th.tl-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.tl-table th.tl-sortable:hover { color: var(--brand-pink); }
.tl-table th.tl-sortable i { margin-left: 4px; font-size: .74rem; }
.tl-table th.tl-sortable i.tl-sort-idle { opacity: .35; }
.tl-table tbody tr:hover { background: color-mix(in srgb, var(--brand-pink) 4%, transparent); }
.tl-idx { color: var(--surface-text-muted); text-align: center; font-size: .8rem; }
.tl-mono { font-family: ui-monospace, monospace; font-size: .84rem; }
.tl-strong { font-weight: 700; color: var(--surface-text); }
.tl-muted { color: var(--surface-text-muted); }
.tl-action-btn { padding: 5px 12px; font-size: .8rem; white-space: nowrap; }
.tl-count { display: inline-block; min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand-pink) 12%, transparent); color: var(--brand-pink-dark); font-weight: 700; font-size: .8rem; }
.tl-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--surface-text) 8%, transparent); font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.tl-star-i { color: #e0a800; margin-right: 4px; }
.tl-empty { text-align: center; color: var(--surface-text-muted); padding: 30px 12px; }
.tl-table td .ob-pill { margin-right: 5px; }
.tl-foot { font-size: .82rem; color: var(--surface-text-muted); }

/* ============================================================
   Journal View (contra entries) dialog  .jv-*
   ============================================================ */
.nip-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.jv-open { white-space: nowrap; }
.jv-open i { color: var(--brand-pink); }

.jv-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; }
.jv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--surface-border); }
.jv-head-main { display: flex; flex-direction: column; gap: 2px; }
.jv-ref-label { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--surface-text-muted); }
.jv-ref { font-family: ui-monospace, monospace; font-size: 1.05rem; font-weight: 700; color: var(--surface-text); }
.jv-sub { font-size: .82rem; color: var(--surface-text-muted); }
.jv-head-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.jv-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.jv-badge.jv-ok { background: color-mix(in srgb, #1a9c54 18%, transparent); color: #1a9c54; }
.jv-badge.jv-bad { background: color-mix(in srgb, #d64550 18%, transparent); color: #d64550; }
.jv-badge.jv-neutral { background: color-mix(in srgb, var(--surface-text) 8%, transparent); color: var(--surface-text-muted); }

.jv-tablewrap { border: 1px solid var(--surface-border); border-radius: 10px; overflow-x: auto; }
.jv-table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 720px; }
.jv-table thead th { text-align: left; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--surface-text-muted); padding: 9px 12px; background: color-mix(in srgb, var(--surface-text) 3%, transparent); border-bottom: 1px solid var(--surface-border); }
.jv-table td { padding: 9px 12px; border-bottom: 1px solid var(--surface-border); vertical-align: top; }
.jv-table tbody tr:hover { background: color-mix(in srgb, var(--brand-pink) 4%, transparent); }
.jv-num { text-align: right; font-family: ui-monospace, monospace; }
/* Right-align the DR/CR column HEADERS over their numbers (beats `.jv-table thead th`'s left). */
.jv-table thead th.jv-num { text-align: right; }
.jv-idx { color: var(--surface-text-muted); text-align: center; }
.jv-acctname { font-weight: 600; color: var(--surface-text); }
.jv-mono { font-family: ui-monospace, monospace; color: var(--surface-text-muted); }
.jv-muted { color: var(--surface-text-muted); }
.jv-narr { color: var(--surface-text-muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jv-dr { color: #d64550; }
.jv-cr { color: #1a9c54; }
.jv-dr-row td:first-child { box-shadow: inset 3px 0 0 color-mix(in srgb, #d64550 55%, transparent); }
.jv-cr-row td:first-child { box-shadow: inset 3px 0 0 color-mix(in srgb, #1a9c54 55%, transparent); }
.jv-hold { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; font-size: .62rem; font-weight: 800; letter-spacing: .04em; background: color-mix(in srgb, #e0a800 20%, transparent); color: #b8860b; }
.jv-table tfoot td { padding: 11px 12px; border-top: 2px solid var(--surface-border); font-weight: 800; }
.jv-total-label { text-align: right; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; color: var(--surface-text-muted); }
.jv-total { font-size: .92rem; }
.jv-empty { text-align: center; color: var(--surface-text-muted); padding: 34px 12px; }
.jv-empty i { font-size: 1.4rem; display: block; margin-bottom: 8px; opacity: .6; }
.jv-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jv-foot-hint { font-size: .8rem; color: var(--surface-text-muted); }

/* ── Financial Reports ─────────────────────────────────────────────────── */
.rpt-page .nip-kpi-bad { color: #d64550; }
.rpt-dr { color: #d64550; font-family: ui-monospace, monospace; }
.rpt-cr { color: #1a9c54; font-family: ui-monospace, monospace; }

/* Trial Balance drilldown: GL2 → GL account → ledger. Nested grids get a subtle
   inset + tint so each level reads as a child of the row above it. */
.tb-subgrid { margin: 6px 0 6px 8px; border-left: 3px solid color-mix(in srgb, var(--brand-pink) 35%, transparent); }
.tb-subgrid .tb-subgrid { border-left-color: color-mix(in srgb, var(--brand-pink) 20%, transparent); }
.tb-ledger { padding: 4px 0 4px 8px; }
.tb-count { font-size: .72rem; color: var(--surface-text-muted); }
.tb-detail-msg { padding: 12px 14px; font-size: .82rem; color: var(--surface-text-muted); }

/* Report/log filter dropdowns — match the TelerikDatePicker height in .nip-filters. */
.rpt-select { width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; font-size: .84rem;
    border: 1px solid var(--surface-border); background: var(--surface-card); color: var(--surface-text); }
.rpt-select:focus { outline: none; border-color: var(--brand-pink); }

/* Audit Log status/action pills + the workflow-steps reference card. */
.aud-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800;
    letter-spacing: .03em; text-transform: uppercase; }
.aud-ok { background: color-mix(in srgb, #1a9c54 16%, transparent); color: #1a9c54; }
.aud-bad { background: color-mix(in srgb, #d64550 16%, transparent); color: #d64550; }
.aud-pending { background: color-mix(in srgb, #e0a800 20%, transparent); color: #b8860b; }
.aud-steps { margin-top: 16px; }
.aud-steps h3 { font-size: .95rem; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.aud-steps h3 i { color: var(--brand-pink); }
.aud-steps-hint { font-size: .8rem; color: var(--surface-text-muted); margin: 0 0 12px; }

/* Profit & Loss: stacked Income / Expenses sections + a net profit/loss banner. */
.pl-wrapper { position: relative; }
.pl-section { margin-bottom: 18px; }
.pl-heading { font-size: .95rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.pl-heading-income i { color: #1a9c54; }
.pl-heading-expense i { color: #d64550; }
.pl-net { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
    border-radius: 10px; font-weight: 800; }
.pl-net-label { text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; }
.pl-net-value { font-size: 1.15rem; font-family: ui-monospace, monospace; }
.pl-net-profit { background: color-mix(in srgb, #1a9c54 14%, transparent); color: #1a9c54; }
.pl-net-loss { background: color-mix(in srgb, #d64550 14%, transparent); color: #d64550; }

/* ── Chart of Accounts setup (GL Class / Group / Account / System Wallet) ── */
/* Full-width like the customer pages — override .tl-page's max-width cap. */
.coa-page { max-width: none; }
.coa-head-actions { display: flex; align-items: center; gap: 10px; }
.coa-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px; margin-bottom: 14px; border-radius: 10px; font-size: .82rem; line-height: 1.45;
    background: color-mix(in srgb, var(--brand-pink) 7%, transparent); border: 1px solid color-mix(in srgb, var(--brand-pink) 20%, transparent); color: var(--surface-text); }
.coa-note i { color: var(--brand-pink); font-size: 1rem; margin-top: 1px; }
.coa-edit { padding: 4px 10px; font-size: .78rem; }
.coa-sub { font-size: .72rem; margin-top: 2px; }
/* Normal-balance pills: Debit (asset/expense) vs Credit (liability/equity/income) */
.ob-pill.coa-dr { background: color-mix(in srgb, #d64550 15%, transparent); color: #d64550; }
.ob-pill.coa-cr { background: color-mix(in srgb, #1a9c54 15%, transparent); color: #1a9c54; }

/* Add/edit dialog form */
.coa-form { display: flex; flex-direction: column; gap: 15px; padding: 4px 2px; }
.coa-field { display: flex; flex-direction: column; gap: 6px; }
.coa-field > label { font-size: .78rem; font-weight: 600; color: var(--surface-text); }
.coa-req { color: var(--brand-pink); }
.coa-hint { font-size: .72rem; color: var(--surface-text-muted); }
/* A hint that explains why a control is empty/disabled, rather than describing it. */
.coa-hint-warn { color: #9a6207; font-weight: 600; }
.coa-field-inline { flex-direction: row; align-items: center; gap: 8px; }
.coa-inline-label { font-size: .82rem; font-weight: 500; color: var(--surface-text); margin: 0; }
.coa-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ── Account Control Center ─────────────────────────────────────────────── */
.acc-page { max-width: 940px; }
.acc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.acc-head h1 { margin: 0; }
.acc-head p { margin: 2px 0 0; color: var(--surface-text-muted); font-size: .86rem; }
.acc-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--brand-pink); white-space: nowrap; padding-top: 4px; }

.acc-picker { margin-bottom: 14px; }
.acc-search { display: flex; align-items: center; gap: 8px; background: var(--surface-card); border: 1px solid var(--surface-border); border-radius: 10px; padding: 6px 8px 6px 12px; }
.acc-search > i { color: var(--surface-text-muted); }
.acc-search input { flex: 1; border: none; background: transparent; outline: none; color: var(--surface-text); font-size: .9rem; }
.acc-search-btn { padding: 6px 16px; }
.acc-results { margin-top: 6px; border: 1px solid var(--surface-border); border-radius: 10px; overflow: hidden; max-height: 260px; overflow-y: auto; }
.acc-result { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 14px; background: var(--surface-card); border: none; border-bottom: 1px solid var(--surface-border); cursor: pointer; }
.acc-result:last-child { border-bottom: none; }
.acc-result:hover { background: color-mix(in srgb, var(--brand-pink) 6%, transparent); }
.acc-result-id { font-family: ui-monospace, monospace; font-weight: 700; color: var(--surface-text); min-width: 130px; }
.acc-result-name { color: var(--surface-text-muted); font-size: .86rem; }

.acc-empty { text-align: center; color: var(--surface-text-muted); padding: 48px 12px; }
.acc-empty i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: .5; }

.acc-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface-card); border: 1px solid var(--surface-border); border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; }
.acc-summary-main { display: flex; align-items: center; gap: 12px; }
.acc-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-pink), color-mix(in srgb, var(--brand-pink) 55%, #6b2b4d)); }
.acc-name { font-weight: 700; font-size: 1.02rem; color: var(--surface-text); }
.acc-meta { font-size: .82rem; color: var(--surface-text-muted); font-family: ui-monospace, monospace; }
.acc-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ob-pill.acc-pill-warn { background: color-mix(in srgb, #e0a800 18%, transparent); color: #b8860b; }

.acc-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: .83rem; line-height: 1.45; margin-bottom: 12px;
    background: color-mix(in srgb, var(--surface-text) 4%, transparent); border: 1px solid var(--surface-border); color: var(--surface-text); }
.acc-note i { margin-top: 1px; }
.acc-note-bad { background: color-mix(in srgb, #d64550 10%, transparent); border-color: color-mix(in srgb, #d64550 30%, transparent); }
.acc-note-bad i { color: #d64550; }
.acc-note-info { background: color-mix(in srgb, #3b82f6 10%, transparent); border-color: color-mix(in srgb, #3b82f6 30%, transparent); }
.acc-note-info i { color: #3b82f6; }

.acc-panel { display: flex; flex-direction: column; gap: 14px; }
.acc-card { background: var(--surface-card); border: 1px solid var(--surface-border); border-radius: 12px; padding: 18px 20px; }
.acc-card h3 { margin: 0 0 3px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.acc-card h3 i { color: var(--brand-pink); }
.acc-card-sub { margin: 0 0 16px; font-size: .84rem; color: var(--surface-text-muted); line-height: 1.45; }
.acc-danger-text { color: #d64550; }

.acc-toggle-row { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.acc-toggle { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--surface-text); cursor: pointer; }
.acc-toggle span b { font-weight: 700; }

.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.acc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.acc-field > label { font-size: .78rem; font-weight: 600; color: var(--surface-text); }
.acc-field-half { max-width: 260px; }
/* TelerikTextArea has no Rows param in 2.24 — give the rendered textarea a sensible height. */
.acc-card textarea { min-height: 60px; resize: vertical; }
.acc-req { color: var(--brand-pink); }
.acc-actions { display: flex; gap: 10px; margin-top: 4px; }

@media (max-width: 640px) {
    .acc-grid { grid-template-columns: 1fr; }
    .acc-summary { flex-direction: column; align-items: flex-start; }
    .acc-badges { justify-content: flex-start; }
}

/* ── Customer Wallet Administration (enquiry panels) ────────────────────── */
.wa-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wa-tile { border: 1px solid var(--surface-border); border-radius: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--surface-text) 2%, transparent); }
.wa-tile-l { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--surface-text-muted); }
.wa-tile-v { display: block; margin-top: 4px; font-size: 1.15rem; font-weight: 800; font-family: ui-monospace, monospace; color: var(--surface-text); }
.wa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.wa-cell { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--surface-border); }
.wa-l { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--surface-text-muted); }
.wa-v { font-size: .9rem; color: var(--surface-text); font-weight: 500; }
.wa-docs { margin-top: 2px; }
.wa-imgs { display: flex; gap: 16px; margin-top: 14px; }
.wa-imgs figure { margin: 0; text-align: center; }
.wa-imgs img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--surface-border); background: var(--surface-card); }
.wa-imgs figcaption { margin-top: 5px; font-size: .72rem; color: var(--surface-text-muted); }
@media (max-width: 640px) { .wa-tiles, .wa-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Transaction Routing setup  .rt-*  (reuses .tl-* / .coa-* / .ob-*)
   Rules, processors, BIN directory, card schemes, wallet binding.
   ============================================================ */
.rt-page { max-width: none; }
.rt-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rt-usage { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rt-danger { color: #d64550; }
.rt-danger:hover { border-color: #d64550; color: #d64550; }
.rt-badge-fallback { background: color-mix(in srgb, var(--brand-pink) 14%, transparent); color: var(--brand-pink-dark); }
.rt-scheme-pill { font-family: ui-monospace, monospace; letter-spacing: .03em; }
.rt-warn { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: .72rem; font-weight: 700; color: #b8860b; }
.rt-window .rt-confirm-text { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--surface-text); }
.rt-dialog-subject { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px;
    background: color-mix(in srgb, var(--surface-text) 4%, transparent); border: 1px solid var(--surface-border); }
.rt-dialog-subject-id { font-family: ui-monospace, monospace; font-weight: 700; color: var(--surface-text); }
.rt-dialog-subject-name { font-size: .82rem; color: var(--surface-text-muted); }

/* Precedence strip on the rule list — shows the order conditions are evaluated in. */
.rt-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 16px; margin: 4px 0 2px;
    border-radius: 12px; background: var(--surface-card-bg); border: 1px solid var(--surface-border); }
.rt-flow-step { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px;
    font-size: .78rem; font-weight: 700; background: color-mix(in srgb, var(--surface-text) 5%, transparent); color: var(--surface-text); }
.rt-flow-step i { font-size: .92rem; }
.rt-flow-1 i { color: var(--brand-pink); }
.rt-flow-2 i { color: #6366f1; }
.rt-flow-3 i { color: #0ea5e9; }
.rt-flow-4 i { color: #64748b; }
.rt-flow-sep { color: var(--surface-text-muted); font-size: .8rem; }

/* Designer: condition panels on the left, transaction simulator on the right. */
.rt-crumb-link { cursor: pointer; text-decoration: none; color: inherit; }
.rt-crumb-link:hover { text-decoration: underline; }
.rt-designer { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.rt-designer-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.rt-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.rt-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--surface-border); background: var(--surface-card-bg); color: var(--surface-text-muted);
    font-weight: 600; font-size: .85rem; transition: all .15s ease; }
.rt-tab:hover { color: var(--surface-text); border-color: color-mix(in srgb, var(--brand-pink) 40%, var(--surface-border)); }
.rt-tab.on { background: var(--brand-pink); border-color: var(--brand-pink); color: #fff; }
.rt-tab-order { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; font-size: .68rem; font-weight: 800;
    background: color-mix(in srgb, var(--surface-text) 10%, transparent); color: var(--surface-text); }
.rt-tab.on .rt-tab-order { background: rgba(255,255,255,.28); color: #fff; }
.rt-tab-count { padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800;
    background: color-mix(in srgb, var(--surface-text) 8%, transparent); }
.rt-tab.on .rt-tab-count { background: rgba(255,255,255,.22); }

.rt-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.rt-panel-head h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.rt-panel-head h3 i { color: var(--brand-pink); }
.rt-panel-head p { margin: 3px 0 0; font-size: .82rem; color: var(--surface-text-muted); max-width: 560px; }
.rt-cond-table { min-width: 620px; }

.rt-fallback { display: flex; align-items: center; gap: 13px; padding: 13px 17px; border-radius: 12px;
    background: var(--surface-card-bg); border: 1px solid var(--surface-border); border-left: 3px solid #64748b; }
.rt-fallback > i { font-size: 1.25rem; color: #64748b; }
.rt-fallback > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-fallback-label { font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--surface-text-muted); }
.rt-fallback-value { font-size: .89rem; font-weight: 600; color: var(--surface-text); }
.rt-fallback-missing { border-left-color: #e0a800; }
.rt-fallback-missing > i { color: #e0a800; }

/* Simulator card */
.rt-sim { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px;
    border-radius: 12px; background: var(--surface-card-bg); border: 1px solid var(--surface-border); }
.rt-sim h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.rt-sim h3 i { color: var(--brand-pink); }
.rt-sim-hint { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--surface-text-muted); }
.rt-sim .coa-field { gap: 5px; }
.rt-sim-actions { display: flex; justify-content: flex-end; gap: 9px; }

.rt-sim-result { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 11px; }
.rt-sim-ok { background: color-mix(in srgb, #1a9c54 12%, transparent); border: 1px solid color-mix(in srgb, #1a9c54 32%, transparent); }
.rt-sim-bad { background: color-mix(in srgb, #d64550 12%, transparent); border: 1px solid color-mix(in srgb, #d64550 32%, transparent); }
.rt-sim-verdict { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rt-sim-ok .rt-sim-verdict { color: #1a9c54; }
.rt-sim-bad .rt-sim-verdict { color: #d64550; }
.rt-sim-proc { font-family: "Space Grotesk", sans-serif; font-size: 1.3rem; font-weight: 700; line-height: 1.1; color: var(--surface-text); }
.rt-sim-procname { font-size: .82rem; color: var(--surface-text-muted); }
.rt-sim-by { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--surface-text-muted); }
.rt-sim-warn { margin: 5px 0 0; }
.rt-sim-why { margin: 7px 0 0; font-size: .81rem; line-height: 1.45; color: var(--surface-text); }

.rt-trace { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.rt-trace li { font-size: .78rem; line-height: 1.4; color: var(--surface-text-muted); }

@media (max-width: 1100px) {
    .rt-designer { grid-template-columns: 1fr; }
    .rt-sim { position: static; }
}

/* ── Cashier till on the Posting Manager (PostingConsole.razor) ─────────
   The head chip turns teal when the operator is moving their OWN till
   rather than the shared MAIN CASH account, and the slip spells out the
   two legs the posting will write. */
.pm-cash-chip-till { color: #00838f; background: color-mix(in srgb, #00acc1 14%, transparent); border-color: color-mix(in srgb, #00acc1 34%, transparent); }

.pm-entry { margin-top: 16px; border: 1px dashed var(--surface-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.pm-entry-title { display: flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--surface-text-muted); }
.pm-entry-title i { color: var(--brand-pink); }
.pm-entry-text { font-size: .84rem; font-weight: 700; color: var(--surface-text); line-height: 1.45; }
.pm-entry-note { display: flex; align-items: flex-start; gap: 7px; font-size: .74rem; line-height: 1.45; color: var(--surface-text-muted); }
.pm-entry-note i { margin-top: 2px; }
