﻿@font-face {
    font-family: 'Speda';
    src: url('../fonts/Speda-Bold.ttf') format('truetype');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
    --bs-body-font-family: 'Speda', 'Segoe UI', system-ui, sans-serif;
    --bs-font-sans-serif: 'Speda', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Speda', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

button, input, select, textarea, .btn, .form-control, .form-select {
    font-family: inherit;
}

/* Responsive visibility â€” works even if Bootstrap utilities fail to load */
.hide-mobile { display: block; }
.show-mobile { display: none !important; }

@media (max-width: 767.98px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }

    .card-modern .card-body.p-0 {
        overflow-x: visible;
    }

    .mobile-list {
        width: 100%;
        max-width: 100%;
    }

    .form-section {
        padding: 1rem;
    }

    .form-section form > .btn-gradient,
    .form-section form > .btn-lg,
    .form-section form > .btn-success,
    .form-section form > .btn-warning {
        width: 100%;
        justify-content: center;
    }

    .form-section form > .btn + .btn,
    .form-section form > .btn + a.btn {
        margin-inline-start: 0 !important;
        margin-top: 0.5rem;
    }

    .toolbar-actions-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    .toolbar-actions-row .btn {
        width: 100%;
        justify-content: center;
    }

    .hold-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .hold-hero-actions .btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
    }

    .hold-hero-actions:has(> :only-child) {
        grid-template-columns: 1fr;
    }

    .hold-panel-bar .hold-search {
        flex: 1 1 100%;
        max-width: none;
    }

    .page-toolbar:has(> .btn + .btn) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .page-toolbar:has(> .btn + .btn) > .btn {
        width: 100%;
        justify-content: center;
    }

    .page-body {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .topbar {
        padding-top: max(0.75rem, env(safe-area-inset-top));
    }

    .hold-card-head {
        flex-wrap: wrap;
    }

    .hold-head-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .form-section form .d-flex {
        flex-wrap: wrap;
    }

    .form-section form .d-flex > .btn {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
    }

    .dash-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .table-stack thead {
        display: none;
    }

    .table-stack,
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }

    .table-stack tr {
        padding: 0.9rem 1rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .table-stack tr:last-child {
        border-bottom: none;
    }

    .table-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.32rem 0;
        border: 0;
        text-align: end;
        white-space: normal !important;
        max-width: none;
    }

    .table-stack td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.78rem;
        text-align: start;
        flex: 0 0 42%;
    }

    .table-modern {
        min-width: 0 !important;
    }

    .desktop-table-wrap:not(.hide-mobile) {
        overflow-x: visible;
    }
}

/* ===== APP SHELL ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--sidebar-bg);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-brand-link {
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    padding: 0.15rem;
    transition: background 0.2s ease;
}

.sidebar-brand-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
}

.sidebar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(96, 165, 250, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1.25rem;
    box-shadow: none;
    flex-shrink: 0;
}

.sidebar-brand .brand-title {
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.3;
}

.sidebar-brand .brand-sub {
    color: #94a3b8;
    font-size: 0.72rem;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.sidebar-group.has-divider {
    margin-top: 0.28rem;
    padding-top: 0.22rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-group-label {
    display: block;
    padding: 0.65rem 0.85rem 0.35rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.sidebar-nav {
    padding: 0;
    flex-wrap: nowrap !important;
    width: 100%;
    gap: 0.08rem;
}

.sidebar-nav .nav-item {
    width: 100%;
    flex-shrink: 0;
}

.sidebar-nav .nav-link {
    color: #cbd5e1;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    min-width: 0;
    min-height: 0;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav .nav-link span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav .nav-link i {
    width: 22px;
    height: auto;
    flex-shrink: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: transparent;
    color: inherit;
    opacity: 0.95;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link:hover i {
    background: transparent;
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.sidebar-nav .nav-link.active::before {
    display: none;
}

.sidebar-nav .nav-link.active i {
    background: transparent;
    color: #fff;
    box-shadow: none;
}

@media (max-height: 760px) {
    .sidebar-nav-wrap {
        overflow-y: auto;
        scrollbar-width: none;
    }

    .sidebar-nav-wrap::-webkit-scrollbar {
        display: none;
    }
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: #64748b;
    font-size: 0.8rem;
}

.sidebar-user {
    padding: 0.55rem 0.7rem 0.7rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.18);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0;
    padding: 0.45rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-name {
    color: #fff;
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-meta {
    color: #94a3b8;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-logout-form {
    margin-inline-start: auto;
    flex-shrink: 0;
}

.sidebar-logout-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logout-icon:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.sidebar-logout-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.main-content {
    flex: 1;
    margin-right: 270px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: calc(100vw - 270px);
}

.page-body {
    padding: 1.5rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.topbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 1.25rem;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 28px rgba(15, 23, 42, 0.04);
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-leading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.topbar-page {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.topbar-page-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.28);
    font-size: 1rem;
}

.topbar-title-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.05rem;
}

.topbar-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.2;
}

.topbar-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.topbar-back:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.topbar-back-label {
    display: none;
}

.topbar-back--trail {
    display: none;
}

.topbar-trailing {
    display: flex;
    flex-shrink: 0;
    margin-inline-start: 0.25rem;
    gap: 0.45rem;
    align-items: center;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 36px;
    max-width: 220px;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}

.topbar-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-chip i {
    color: #2563eb;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.topbar-logout-wrap {
    display: none;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.topbar-logout:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.topbar-logout-label {
    display: none;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ===== CARDS ===== */
.card-modern {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-modern .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-modern .card-body { padding: 1.25rem; }

.card-modern .card-body.p-0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    width: 100%;
    max-width: 100%;
}

.desktop-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-list-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-list-item:last-child {
    border-bottom: none;
}

.mobile-list-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.mobile-list-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.mobile-list-actions {
    flex-shrink: 0;
}

.mobile-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-kv-row:last-child {
    border-bottom: none;
}

.mobile-kv-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
    max-width: 42%;
}

.mobile-kv-value {
    text-align: end;
    font-weight: 500;
    min-width: 0;
    word-break: break-word;
}

.mobile-rate-field + .mobile-rate-field {
    margin-top: 0.75rem;
}

.mobile-rate-field .form-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 110px;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card-outgoing { border-right: 4px solid #2563eb; }
.stat-card-incoming { border-right: 4px solid #16a34a; }
.stat-card-pending { border-right: 4px solid #d97706; }
.stat-card-commission { border-right: 4px solid #7c3aed; }

.dashboard-welcome {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.dashboard-greeting {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.dash {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.dash-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem 1.6rem;
    border-radius: 22px;
    background:
        radial-gradient(1200px 180px at 100% 0%, rgba(96, 165, 250, 0.35), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #2563eb 100%);
    color: #fff;
    border: none;
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.24);
}

.dash-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #bfdbfe;
}

.dash-name {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
}

.dash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0.5rem 0 0;
    color: #cbd5e1;
    font-size: 0.86rem;
}

.dash-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.dash-kpi {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 0.7rem;
    row-gap: 0.12rem;
    align-items: start;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.9rem 0.95rem;
    box-shadow: var(--shadow);
    min-height: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dash-kpi:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.dash-kpi-icon {
    grid-row: 1 / span 3;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    align-self: center;
}

.dash-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.dash-kpi-value {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
}

.dash-kpi-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi.is-zero .dash-kpi-value {
    color: #94a3b8;
}

.dash-kpi.is-alert {
    border-color: #fdba74;
    background: #fffbeb;
}

.dash-kpi.tone-blue .dash-kpi-icon { background: #dbeafe; color: #1d4ed8; }
.dash-kpi.tone-teal .dash-kpi-icon { background: #ccfbf1; color: #0f766e; }
.dash-kpi.tone-amber .dash-kpi-icon { background: #fef3c7; color: #b45309; }
.dash-kpi.tone-violet .dash-kpi-icon { background: #ede9fe; color: #6d28d9; }
.dash-kpi.tone-green .dash-kpi-icon { background: #dcfce7; color: #15803d; }
.dash-kpi.tone-rose .dash-kpi-icon { background: #ffe4e6; color: #be123c; }
.dash-kpi.tone-slate .dash-kpi-icon { background: #e2e8f0; color: #334155; }

.dash-ops {
    overflow: hidden;
}

.dash-ops-head {
    padding: 0.85rem 1.1rem 0.15rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
}

.dash-ops-head i {
    color: var(--primary);
    margin-left: 0.2rem;
}

.dash-ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem 1.1rem;
}

.dash-op {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.9rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    text-decoration: none;
    color: var(--text-main);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dash-op:hover {
    background: #fff;
    border-color: #93c5fd;
    transform: translateY(-1px);
    color: var(--text-main);
}

.dash-op-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dash-op-icon.tone-blue { background: #dbeafe; color: #1d4ed8; }
.dash-op-icon.tone-teal { background: #ccfbf1; color: #0f766e; }
.dash-op-icon.tone-violet { background: #ede9fe; color: #6d28d9; }
.dash-op-icon.tone-green { background: #dcfce7; color: #15803d; }
.dash-op-icon.tone-rose { background: #ffe4e6; color: #be123c; }

.dash-op-label {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
}

@media (max-width: 1399.98px) {
    .dash-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dash-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 1.1rem 1.15rem;
    }

    .dash-name {
        font-size: 1.2rem;
    }

    .dash-hero-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .dash-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-kpi-value {
        font-size: 1.05rem;
    }
}

.wallet-card {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    text-align: center;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.wallet-card:hover {
    box-shadow: var(--shadow);
}

.wallet-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wallet-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.wallet-balance {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    word-break: break-word;
}

.wallet-symbol {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Dashboard compact panels */
.dashboard-panel-compact .card-header {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
}

.dashboard-panel-compact .card-body {
    padding: 0.75rem 1rem;
}

.dashboard-wallets .wallet-card-compact {
    padding: 0.65rem 0.4rem;
}

.dashboard-wallets .wallet-card-top {
    margin-bottom: 0.35rem;
    gap: 0.2rem;
}

.dashboard-wallets .wallet-code {
    font-size: 0.68rem;
}

.dashboard-wallets .wallet-balance {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.15;
}

.dashboard-wallets .wallet-symbol {
    font-size: 0.72rem;
    margin-top: 0.1rem;
}

.dashboard-wallets .currency-logo-md {
    width: 34px;
    height: 34px;
}

.vault-panel {
    overflow: hidden;
}

.vault-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem 0.95rem;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(37, 99, 235, 0.12), transparent 45%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
}

.vault-panel-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #93c5fd;
    margin-bottom: 0.2rem;
}

.vault-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.vault-panel-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.vault-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
}

.vault-link {
    color: #bfdbfe;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.vault-link:hover {
    color: #fff;
}

.vault-panel-body {
    padding: 0.25rem 0 0;
}

.vault-list {
    display: flex;
    flex-direction: column;
}

.vault-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.vault-row:last-child {
    border-bottom: 0;
}

.vault-row-hero {
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
}

.vault-row-id {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.vault-code {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-main);
}

.vault-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.vault-row-amt {
    text-align: end;
    min-width: 0;
}

.vault-amount {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
    word-break: break-word;
}

.vault-row-hero .vault-amount {
    font-size: 1.2rem;
}

.vault-unit {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.vault-idle {
    margin: 0.35rem 1rem 1rem;
    border-top: 1px dashed var(--border);
    padding-top: 0.65rem;
}

.vault-idle summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}

.vault-idle summary::-webkit-details-marker {
    display: none;
}

.vault-idle summary span {
    font-weight: 500;
}

.vault-idle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.vault-idle-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.vault-idle-chip .currency-logo-img {
    width: 14px;
    height: 14px;
}

@media (max-width: 575.98px) {
    .vault-row-hero .vault-amount,
    .vault-amount {
        font-size: 0.95rem;
    }

    .vault-name {
        max-width: 7rem;
    }
}

.dash-hold-list {
    display: flex;
    flex-direction: column;
}

.dash-hold-row {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem 1.05rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
}

.dash-hold-row:last-child {
    border-bottom: 0;
}

.dash-hold-row:hover {
    background: #f8fafc;
    color: inherit;
}

.dash-hold-who {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.dash-hold-name {
    font-weight: 800;
    line-height: 1.3;
}

.dash-hold-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dash-hold-funds {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dash-hold-ccy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    font-size: 0.75rem;
}

.dash-hold-ccy .currency-logo-sm {
    width: 16px;
    height: 16px;
}

.dash-kpi-value .money-cell {
    justify-content: flex-start;
}

.dash-hold-ccy span {
    font-weight: 700;
    color: var(--text-muted);
}

.dash-hold-ccy strong {
    font-variant-numeric: tabular-nums;
}

.dash-hold-ccy.is-held {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dash-hold-ccy.is-held strong {
    color: #166534;
}

.dash-hold-ccy.is-debt {
    background: #fef2f2;
    border-color: #fecaca;
}

.dash-hold-ccy.is-debt strong {
    color: #991b1b;
}

.dashboard-expense-summary .stat-icon-sm {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1rem;
}

.dashboard-expense-value {
    font-size: 1.25rem;
    line-height: 1.2;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.rose { background: #ffe4e6; color: #e11d48; }

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ===== TOOLBAR ===== */
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.search-box {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex: 1 1 320px;
    max-width: 100%;
    margin-inline-start: auto;
    justify-content: flex-end;
}

.search-box .form-control,
.search-box .form-select {
    min-width: 0;
    border-radius: var(--radius-sm);
    border-color: var(--border);
}

.search-box .search-input {
    flex: 1 1 180px;
    min-width: 120px;
    max-width: 280px;
}

.search-box .search-status {
    flex: 0 0 13.5rem;
    width: 13.5rem;
    min-width: 13.5rem;
    max-width: 16rem;
    padding-inline-end: 2.4rem;
    text-overflow: ellipsis;
}

.search-box .btn-search {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
}

.search-box .search-clear {
    flex-shrink: 0;
    align-self: center;
    text-decoration: none;
    color: var(--text-muted);
}

.search-box .search-clear:hover {
    color: var(--primary);
}

/* ===== TABLES ===== */
.table-modern {
    margin: 0;
}

.table-modern thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.875rem 1.25rem;
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 0.7rem 1.05rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody td.td-money {
    white-space: nowrap;
}

.table-modern tbody td.td-actions {
    width: 1%;
    white-space: nowrap;
}

.table-modern tbody td.td-actions .d-flex {
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.currency-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.currency-row-actions .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.currency-row-actions form {
    margin: 0;
}

.currency-toggle-form .form-check-input {
    cursor: pointer;
    width: 2.4em;
    height: 1.25em;
}

.currency-toggle-form .form-check-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.ccy-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
    gap: 0.4rem;
    max-height: 220px;
    overflow: auto;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.ccy-logo-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 10px;
    padding: 0.35rem 0.2rem;
    cursor: pointer;
}

.ccy-logo-pick span {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
}

.ccy-logo-pick:hover,
.ccy-logo-pick.is-active {
    border-color: var(--primary);
}

.confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.confirm-dialog[hidden] {
    display: none !important;
}

.confirm-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.confirm-dialog-card {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.35rem 1.25rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    text-align: center;
}

.confirm-dialog-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.85rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef2f2;
    color: #dc2626;
    font-size: 1.45rem;
}

.confirm-dialog-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 0.45rem;
    color: var(--text-main);
}

.confirm-dialog-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 1.2rem;
    line-height: 1.7;
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.6rem;
}

.confirm-dialog-actions .btn {
    flex: 1;
    font-weight: 700;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
}

/* ===== BADGES ===== */
.badge-status {
    padding: 0.35em 0.75em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #b45309; }
.badge-paid { background: #dcfce7; color: #15803d; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }
.badge-default { background: #e2e8f0; color: #475569; }

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.btn-gradient:hover {
    opacity: 0.96;
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

.login-submit {
    height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.auth-page .form-control {
    height: 48px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #f8fafc;
}

.auth-page .form-control:focus {
    background: #fff;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-page .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== FORMS ===== */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    padding: 0.625rem 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.375rem;
}

.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.form-section-title {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: visible;
    box-shadow: var(--shadow-lg);
}

.customer-modal .modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: 0;
    padding: 0.95rem 1.15rem;
}

.customer-modal .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.customer-modal .modal-body {
    background: #f8fafc;
    padding: 1.15rem;
}

.customer-modal .modal-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 0.85rem 1.15rem;
    gap: 0.5rem;
}

.customer-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.customer-field--full {
    grid-column: 1 / -1;
}

.customer-field {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
}

.customer-field:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.customer-field > i {
    width: 2.65rem;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f1f5f9;
    flex-shrink: 0;
    font-size: 1rem;
}

.customer-field .form-control,
.customer-field .form-select {
    border: 0;
    box-shadow: none !important;
    background: #fff;
    border-radius: 0;
    min-width: 0;
}

.customer-field.city-combo {
    overflow: visible;
    position: relative;
}

.customer-field.city-combo.is-open {
    z-index: 6;
}

.city-combo-body {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
    position: relative;
}

.city-combo-body .form-control {
    padding-inline-end: 2.4rem;
}

.city-combo-toggle {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 2.4rem;
    border: 0;
    background: transparent;
    color: #64748b;
    display: grid;
    place-items: center;
    padding: 0;
}

.city-combo-toggle:hover,
.city-combo-toggle:focus-visible {
    color: #2563eb;
}

.city-combo.is-open .city-combo-toggle i {
    transform: rotate(180deg);
}

.city-combo-toggle i {
    transition: transform 0.15s ease;
    font-size: 0.9rem;
}

.city-combo-list {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline: 0;
    z-index: 40;
    max-height: 240px;
    overflow: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.city-combo-list li {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.city-combo-list li:hover,
.city-combo-list li.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.city-combo-list li.is-hidden {
    display: none;
}

.city-combo-add {
    color: #2563eb;
    border-top: 1px dashed #e2e8f0;
    margin-top: 0.2rem;
    font-weight: 800 !important;
}

.city-combo--plain {
    position: relative;
}

.city-combo--plain.is-open {
    z-index: 6;
}

.city-combo--plain .city-combo-body {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.city-combo--plain .form-control {
    border: 0;
    box-shadow: none !important;
    background: transparent;
}

.city-combo--plain.is-open .city-combo-body,
.city-combo--plain:focus-within .city-combo-body {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.customer-sheet {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.customer-sheet-head {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 0.95rem 1.15rem;
}

.customer-sheet-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.customer-sheet-form {
    background: #f8fafc;
    padding: 1.15rem;
}

.customer-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.txn-sheet {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: visible;
    box-shadow: var(--shadow);
}

.txn-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 0.95rem 1.15rem;
    border-radius: 18px 18px 0 0;
}

.txn-sheet-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.txn-sheet-head-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.txn-sheet-pill {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}

.txn-sheet-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
}

.txn-sheet-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.txn-sheet-form {
    background: #f8fafc;
    padding: 1.15rem;
    border-radius: 0 0 18px 18px;
    border: 1px solid var(--border);
    border-top: 0;
}

.txn-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.txn-cust,
.txn-field--full {
    grid-column: 1 / -1;
}

.txn-cust {
    position: relative;
}

.txn-debts {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.txn-debt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.7rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eef2f7;
}

.txn-debt.is-debt {
    background: #fff7ed;
    border-color: #fed7aa;
}

.txn-debt.is-held {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.txn-debt-logo {
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.txn-debt-label {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: #334155;
}

.txn-debt-amt {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.cust-debt-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    margin-top: 0.28rem;
}

.cust-debt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.3;
}

.cust-debt-chip.is-debt {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.cust-debt-chip.is-held {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cust-debt-chip strong {
    font-weight: 800;
}

.txn-field {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
}

.txn-field:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.txn-field > i {
    width: 2.65rem;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f1f5f9;
    flex-shrink: 0;
    font-size: 1rem;
}

.txn-field .form-control,
.txn-field .form-select {
    border: 0;
    box-shadow: none !important;
    background: #fff;
    border-radius: 0;
    min-width: 0;
}

.txn-field-grow {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    gap: 0.05rem;
}

.txn-field-grow strong {
    font-size: 0.92rem;
    line-height: 1.2;
}

.txn-field-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.txn-field-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    border: 0;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    text-decoration: none;
}

.txn-field-action:hover {
    background: #dbeafe;
    color: #1e40af;
}

.txn-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.txn-stack .hawala-ccy-chips {
    margin-top: 0;
    padding-inline-start: 0.15rem;
}

.txn-sheet-hint {
    margin: 0.85rem 0 0;
    font-size: 0.76rem;
    color: #64748b;
}

.txn-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.txn-sheet-actions .btn-gradient {
    margin-inline-start: auto;
}

@media (max-width: 575.98px) {
    .txn-form-grid {
        grid-template-columns: 1fr;
    }

    .txn-sheet-actions {
        flex-direction: column;
    }

    .txn-sheet-actions .btn {
        width: 100%;
        justify-content: center;
        margin-inline-start: 0;
    }

    .txn-field-action {
        padding: 0 0.6rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 575.98px) {
    .customer-form-grid {
        grid-template-columns: 1fr;
    }

    .customer-modal .modal-footer,
    .customer-sheet-actions {
        flex-direction: column;
    }

    .customer-modal .modal-footer .btn,
    .customer-sheet-actions .btn {
        width: 100%;
        justify-content: center;
        margin-inline-start: 0;
    }
}

/* ===== ALERTS ===== */
.alert-modern {
    border: none;
    border-radius: var(--radius-sm);
    border-right: 4px solid;
}

.alert-success.alert-modern { border-right-color: #16a34a; background: #f0fdf4; }
.alert-danger.alert-modern { border-right-color: #dc2626; background: #fef2f2; }

/* ===== LOGIN ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 45%, #f1f5f9 100%);
    padding: 2rem;
    color: #0f172a;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.auth-card-header {
    background: transparent;
    padding: 2.25rem 2rem 0;
    text-align: center;
    color: #0f172a;
}

.auth-card-header .auth-logo {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.auth-card-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.auth-card-header p {
    color: #64748b;
}

.auth-card-body { padding: 1.75rem 2rem 2rem; }

.login-footer-note {
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f7;
    color: #94a3b8;
    font-size: 0.8rem;
}

.auth-page .alert-danger.alert-modern {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 12px;
}

.office-option {
    min-height: 56px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.office-option:has(input:checked) {
    border-color: var(--primary) !important;
    background: var(--primary-light);
}

.input-group-modern {
    position: relative;
}

.input-group-modern i {
    position: absolute;
    right: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 5;
}

.input-group-modern .form-control {
    padding-right: 2.75rem;
}

/* ===== REPORTS GRID ===== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.report-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.report-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--primary-dark);
}

.report-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.report-table-card {
    max-width: 100%;
}

.reports-hub-group {
    margin-bottom: 1.75rem;
}

.reports-hub-group-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.report-card .report-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.report-card .report-card-text span {
    font-weight: 800;
    line-height: 1.35;
}

.report-card .report-card-text small {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
}

.report-card i {
    flex-shrink: 0;
    margin-top: 0.12rem;
}

.report-money-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    align-items: center;
}

.dash-kpi-value .report-money-chips {
    font-size: 0.95rem;
}

.search-box.search-box-dates {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-inline-start: 0;
    max-width: none;
}

.search-box.search-box-dates .form-select {
    min-width: 11rem;
}

.report-table {
    white-space: nowrap;
}

.report-table td,
.report-table th {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-table td:last-child,
.report-table th:last-child {
    white-space: normal;
}

/* ===== TRANSFER DETAIL ===== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.detail-item .label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.detail-item .value {
    font-weight: 600;
    font-size: 1rem;
}

.receipt-sheet {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.35rem 1.25rem 1.15rem;
}

.receipt-page {
    background: var(--body-bg);
    min-height: 100vh;
    padding: 1.5rem 1rem 2.5rem;
}

.receipt-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.receipt-head {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.receipt-head h1 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.receipt-head p {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.receipt-muted {
    font-size: 0.78rem !important;
}

.receipt-kind {
    margin-top: 0.55rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.receipt-no {
    margin-top: 0.25rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: 0.03em;
}

.receipt-rows {
    display: flex;
    flex-direction: column;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.48rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.receipt-row:last-child {
    border-bottom: 0;
}

.receipt-row span {
    color: var(--text-muted);
    flex-shrink: 0;
}

.receipt-row strong {
    text-align: end;
    font-weight: 600;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}

.receipt-foot {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--border);
}

.receipt-signs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.receipt-signs i {
    display: block;
    height: 2.4rem;
    border-bottom: 1px solid #cbd5e1;
}

.receipt-signs span {
    display: block;
    margin-top: 0.4rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

/* ===== MOBILE ===== */
.sidebar-toggle {
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    color: #334155;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

@media (max-width: 1199.98px) {
    .topbar-chip--date {
        display: none;
    }
}

@media (min-width: 992px) {
    .topbar-trailing {
        display: flex;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
        width: min(320px, 86vw);
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    }

    .sidebar-brand {
        flex-shrink: 0;
    }

    .sidebar-user {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        background: var(--sidebar-bg);
    }

    .sidebar-nav-wrap {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .sidebar-nav-wrap::-webkit-scrollbar {
        display: none;
    }

    .topbar-back--lead {
        display: none !important;
    }

    .topbar-back--trail {
        display: inline-flex !important;
    }

    .topbar-logout-wrap {
        display: none !important;
    }

    .topbar-trailing {
        display: flex;
        align-items: center;
    }

    .topbar-chip,
    .topbar-kicker {
        display: none;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-right: 0;
        max-width: 100%;
        width: 100%;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .page-body {
        padding: 1rem;
    }

    .topbar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .topbar > .d-flex:first-child,
    .topbar-leading {
        min-width: 0;
        flex: 1;
    }

    .topbar-title {
        font-size: 1.05rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .stat-card {
        padding: 1rem;
        min-height: auto;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .form-section {
        padding: 1rem;
    }

    .dashboard-welcome {
        padding: 1rem;
    }

    .dashboard-greeting {
        font-size: 1.15rem;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .page-toolbar .search-box,
    .search-box {
        margin-inline-start: 0;
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
        align-items: center;
    }

    .search-box .search-status {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 auto;
    }

    .search-box .search-input {
        grid-column: 1;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .search-box .btn-search {
        grid-column: 2;
        width: auto;
        min-width: 44px;
    }

    .search-box .search-clear {
        grid-column: 1 / -1;
        justify-self: start;
        width: auto;
    }

    .search-box .search-clear span {
        display: none;
    }

    .search-box.search-box-dates {
        display: flex;
        flex-wrap: wrap;
        grid-template-columns: none;
    }

    .search-box.search-box-dates input[type="date"]:nth-of-type(1),
    .search-box.search-box-dates input[type="date"]:nth-of-type(2),
    .search-box.search-box-dates .btn-search,
    .search-box.search-box-dates button[type="button"] {
        grid-column: auto;
    }

    .search-box.search-box-dates .form-control,
    .search-box.search-box-dates .form-select {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 140px;
        max-width: none;
        width: auto;
    }

    .search-box.search-box-dates .btn {
        flex: 1 1 auto;
        min-width: 44px;
    }

    .table-modern {
        min-width: 520px;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem 0.875rem;
        font-size: 0.85rem;
    }

    .receipt-sheet {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .page-body {
        padding: 0.75rem;
    }

    .topbar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .topbar-page-icon {
        display: none;
    }

    .topbar-back-label {
        display: none;
    }

    .topbar-logout-label {
        display: none;
    }

    .stat-card {
        flex-direction: row;
        gap: 0.75rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 12px;
    }

    .form-control,
    .form-select,
    .btn {
        font-size: 16px;
    }

    .btn {
        min-height: 44px;
    }

    .auth-page {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 1.5rem;
    }

    .auth-card {
        max-width: 100%;
    }

    .auth-card-header,
    .auth-card-body {
        padding: 1.25rem;
    }

    .search-box.search-box-dates {
        grid-template-columns: 1fr 1fr;
    }

    .search-box.search-box-dates .btn-search {
        grid-column: 1;
    }

    .search-box.search-box-dates button[type="button"] {
        grid-column: 2;
    }

    .page-toolbar .btn,
    .page-toolbar .btn-gradient,
    .page-toolbar > .btn {
        width: 100%;
        justify-content: center;
    }

    .page-toolbar .toolbar-actions-row .btn {
        width: 100%;
    }

    .card-modern .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .dashboard-expense-value {
        font-size: 1.1rem;
    }

    .report-table {
        min-width: 480px;
    }
}

@media print {
    .no-print, .sidebar, .topbar, .confirm-dialog, .rate-ticker, .page-toolbar { display: none !important; }
    .main-content { margin: 0 !important; }
    body, .receipt-page { background: #fff !important; padding: 0 !important; }
    .hide-mobile { display: block !important; }
    .show-mobile { display: none !important; }
    .table-stack thead { display: table-header-group !important; }
    .table-stack,
    .table-stack tbody {
        display: table !important;
        width: 100% !important;
    }
    .table-stack tr {
        display: table-row !important;
        padding: 0 !important;
        border: 0 !important;
    }
    .table-stack td {
        display: table-cell !important;
        width: auto !important;
        padding: 0.4rem 0.5rem !important;
        text-align: inherit !important;
    }
    .table-stack td::before { display: none !important; }
    .receipt-sheet {
        max-width: none;
        border: none;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }
    @page { margin: 10mm; }
}

/* Currency logos */
.currency-logo-img {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.currency-logo-sm { width: 28px; height: 28px; }
.currency-logo-md { width: 40px; height: 40px; }
.currency-logo-lg { width: 52px; height: 52px; }

.currency-logo-square {
    border-radius: 12px;
    object-fit: contain;
    background: #1e3a8a;
    padding: 4px;
}

.currency-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.5rem;
    letter-spacing: -0.03em;
    color: #fff;
    background: #334155;
    text-transform: uppercase;
    line-height: 1;
}

.currency-logo-md.currency-logo-fallback { font-size: 0.62rem; }
.currency-logo-lg.currency-logo-fallback { font-size: 0.72rem; }

.hawala-ccy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.hawala-ccy-chip {
    border: 2px solid transparent;
    background: transparent;
    padding: 2px;
    border-radius: 50%;
    line-height: 0;
    cursor: pointer;
}

.hawala-ccy-chip:has(.currency-logo-square) {
    border-radius: 14px;
}

.hawala-ccy-chip:hover,
.hawala-ccy-chip.is-active {
    border-color: var(--primary);
}

.currency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.currency-badge span {
    line-height: 1;
}

.money-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    max-width: 100%;
}

.money-cell-amt {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.money-cell .currency-logo-sm,
.table-modern .currency-logo-sm {
    width: 18px;
    height: 18px;
}

.money-cell .currency-badge {
    gap: 0.28rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.stat-card .currency-logo-lg,
.wallet-card-top .currency-logo-lg {
    flex-shrink: 0;
}

/* ===== EXCHANGE RATES ===== */
.rate-formula {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
}

.exchange-rates-card .card-header {
    padding: 1rem 1.35rem;
}

.exchange-rates-base-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.exchange-rates-base-pill strong {
    color: var(--text-main);
}

.exchange-rates-list {
    display: flex;
    flex-direction: column;
}

.exchange-rate-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 1rem 1.5rem;
    align-items: start;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
}

.exchange-rate-item:last-child {
    border-bottom: none;
}

.exchange-rate-item--main {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    box-shadow: inset 3px 0 0 var(--primary);
}

[dir="rtl"] .exchange-rate-item--main {
    box-shadow: inset -3px 0 0 var(--primary);
}

.exchange-rate-item-currency {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
    padding-inline-end: 0.25rem;
}

.exchange-rate-item-text {
    min-width: 0;
    flex: 1;
}

.exchange-rate-item-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.exchange-rate-item-title strong {
    font-size: 1rem;
}

.exchange-rate-main-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.exchange-rate-item-formula {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.3;
}

.exchange-rate-item-example {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.exchange-rate-item-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.exchange-rate-item-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    min-width: 0;
}

.exchange-rate-field {
    min-width: 0;
}

.exchange-rate-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.exchange-rate-field--buy .exchange-rate-field-label {
    color: #15803d;
}

.exchange-rate-field--sell .exchange-rate-field-label {
    color: #b45309;
}

.exchange-rates-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-inline: 0.1rem;
}

.rate-input-group {
    direction: ltr;
    flex-wrap: nowrap;
    width: 100%;
}

.rate-input-group .form-control,
.rate-input-group .rate-input-field {
    font-weight: 600;
    min-width: 0;
    flex: 1 1 auto;
    text-align: start;
    padding: 0.55rem 0.75rem;
}

.rate-input-group .input-group-text,
.rate-input-group .rate-input-suffix {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    min-width: 3.25rem;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 0.55rem 0.65rem;
}

@media (max-width: 767.98px) {
    .exchange-rate-item {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding: 1rem 1.1rem;
    }

    .exchange-rate-item-currency {
        padding-inline-end: 0;
    }

    .exchange-rate-item-fields {
        grid-template-columns: 1fr;
    }
}

/* ===== EXCHANGE FORM ===== */
.desk-strip {
    display: grid;
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.desk-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.desk-kpis--page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desk-kpi {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.85rem 0.95rem;
    box-shadow: var(--shadow);
    min-width: 0;
}

.desk-kpi-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.desk-kpi-icon.tone-violet { background: #ede9fe; color: #6d28d9; }
.desk-kpi-icon.tone-green { background: #dcfce7; color: #15803d; }
.desk-kpi-icon.tone-rose { background: #ffe4e6; color: #be123c; }

.desk-kpi-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.desk-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.desk-kpi-value {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

.desk-kpi-value.is-zero { color: #94a3b8; }
.desk-kpi-value.is-gain { color: #15803d; }
.desk-kpi-value.is-loss { color: #b91c1c; }

.desk-vault {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.75rem 0.95rem 0.85rem;
    box-shadow: var(--shadow);
    min-width: 0;
}

.desk-vault-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.desk-vault-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.desk-vault-title i { color: #2563eb; }

.desk-vault-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: none;
}

.desk-vault-link:hover { text-decoration: underline; }

.desk-vault-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.desk-vault-funds {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.desk-fund {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.desk-fund.is-hero {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.desk-fund-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.desk-fund-code {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
}

.desk-fund-amt {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

.desk-idle {
    margin-top: 0.55rem;
}

.desk-idle summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.desk-idle summary::-webkit-details-marker { display: none; }

.desk-idle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.desk-idle-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
}

.exchange-form-card .card-body {
    padding: 1.25rem;
}

.exchange-currency-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.exchange-currency-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    min-width: 0;
}

.exchange-currency-picker {
    position: relative;
    cursor: pointer;
    min-height: 108px;
    padding-bottom: 0.25rem;
}

.exchange-currency-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.exchange-currency-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    inset-inline: 0;
    z-index: 30;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    max-height: 220px;
    overflow-y: auto;
    padding: 0.3rem;
}

.exchange-currency-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-sm);
    text-align: start;
    cursor: pointer;
}

.exchange-currency-menu-item:hover,
.exchange-currency-menu-item.is-active {
    background: #eff6ff;
}

.exchange-menu-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: none;
}

.exchange-menu-logo.currency-logo-square {
    border-radius: 8px;
    padding: 3px;
    object-fit: contain;
}

.exchange-menu-text {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    line-height: 1.2;
    text-align: start;
    padding-inline-end: 0.15rem;
}

.exchange-menu-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.exchange-menu-text span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exchange-currency-picker:focus-within {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.exchange-currency-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.exchange-currency-visual {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    pointer-events: none;
}

.exchange-currency-change {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    pointer-events: none;
}

.exchange-visual-symbol {
    display: inline-block;
    margin-top: 0.1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    unicode-bidi: isolate;
}

.exchange-visual-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.exchange-visual-text {
    min-width: 0;
    line-height: 1.3;
}

.exchange-visual-text strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-main);
}

.exchange-visual-text span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exchange-swap-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1.75rem;
}

.exchange-swap-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.exchange-swap-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary);
    transform: rotate(180deg);
}

.exchange-rate-bar {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #dbeafe;
    border-radius: var(--radius-sm);
    text-align: center;
}

.exchange-rate-bar-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.exchange-rate-bar-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.exchange-rate-bar-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.exchange-rate-code {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    min-width: 2.5rem;
}

.exchange-rate-logo,
.exchange-amount-logo {
    flex-shrink: 0;
}

.exchange-amount-code {
    min-width: 5.5rem;
}

.exchange-amount-code-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
}

.exchange-rate-eq {
    font-weight: 600;
    color: var(--text-muted);
}

.exchange-rate-bar .exchange-rate-input {
    max-width: 140px;
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
}

.exchange-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.exchange-field-box {
    min-width: 0;
}

.exchange-rate-input,
.exchange-amount-input {
    font-weight: 600;
    font-size: 1.05rem;
}

.exchange-amount-result {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.exchange-amount-group .input-group-text {
    background: #f8fafc;
    font-weight: 700;
    min-width: 3.5rem;
    justify-content: center;
}

.exchange-form-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 991.98px) {
    .exchange-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .desk-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .exchange-currency-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .exchange-swap-wrap {
        padding-top: 0;
        order: 2;
    }

    .exchange-swap-btn {
        width: 100%;
        border-radius: var(--radius-sm);
        min-height: 44px;
        transform: none !important;
    }

    .exchange-currency-box:first-child {
        order: 1;
    }

    .exchange-currency-box:last-child {
        order: 3;
    }
}

.exchange-list-table .exchange-no {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.exchange-amount-flow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    unicode-bidi: isolate;
}

.exchange-amount-arrow {
    color: var(--text-muted);
    font-weight: 700;
}

.exchange-mobile-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    direction: ltr;
}

.exchange-mobile-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
}

.exchange-list-item .exchange-amount-arrow {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ===== EXCHANGE LIST ===== */
.exchange-list {
    display: flex;
    flex-direction: column;
}

.exchange-row {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.exchange-row:last-child {
    border-bottom: none;
}

.exchange-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.exchange-row-head .exchange-no {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.exchange-row-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.exchange-row-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.75rem 1rem;
    align-items: end;
}

.exchange-row-col {
    min-width: 0;
}

.exchange-row-col--receive {
    text-align: left;
}

.exchange-row-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.exchange-row-value {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.exchange-row-col:not(.exchange-row-col--receive) .exchange-row-value {
    justify-content: flex-end;
}

.exchange-row-col--receive .exchange-row-value {
    justify-content: flex-start;
}

.exchange-row-value strong {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.exchange-row-col--receive .exchange-row-value strong {
    color: #15803d;
}

.exchange-row-arrow {
    align-self: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.exchange-row-foot {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.exchange-row-foot .rate-formula {
    font-size: inherit;
    font-weight: inherit;
}

@media (max-width: 575.98px) {
    .exchange-row-main {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .exchange-row-col--receive {
        text-align: inherit;
    }

    .exchange-row-col:not(.exchange-row-col--receive) .exchange-row-value,
    .exchange-row-col--receive .exchange-row-value {
        justify-content: flex-start;
    }

    .exchange-row-arrow {
        justify-self: center;
    }
}

.status-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.22rem;
    border-radius: 999px;
    background: #e8eef5;
    width: fit-content;
    max-width: 100%;
}

.status-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
}

.status-tab:hover {
    color: var(--text-main);
}

.status-tab.active {
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.wallet-mini {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    background: #f8fafc;
    height: 100%;
}

.wallet-mini-credit {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.wallet-mini-debt {
    background: #fef2f2;
    border-color: #fecaca;
}

.tiny-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.hold-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hold-hero {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(37, 99, 235, 0.08), transparent 46%),
        #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.2rem 1.35rem 1.15rem;
    box-shadow: var(--shadow);
}

.hold-hero-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem 1.25rem;
}

.hold-hero-text {
    margin: 0;
    max-width: 38rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.hold-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hold-hero-actions .btn {
    border-radius: 12px;
    font-weight: 700;
    padding-inline: 1rem;
}

.hold-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.hold-stat {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 9.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.hold-stat.is-people {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.hold-stat.is-money {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.hold-stat-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #1d4ed8;
    flex-shrink: 0;
}

.hold-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
}

.hold-stat-value {
    display: block;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
}

.hold-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hold-panel-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.hold-panel-bar .hold-search {
    margin-inline-start: auto;
    background: #fff;
}

.hold-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.hold-intro-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 42rem;
}

.hold-intro-actions,
.hold-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hold-toolbar .btn {
    white-space: nowrap;
}

.hold-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 220px;
    min-width: min(100%, 220px);
    max-width: 28rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted);
}

.hold-search input {
    border: 0;
    outline: 0;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-main);
}

.hold-search input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.hold-search input[type="search"]::-webkit-search-decoration,
.hold-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.hold-search--kpi {
    margin-inline-start: auto;
    min-width: min(100%, 240px);
}

.hold-filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.hold-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.hold-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 7rem;
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
}

.hold-kpi span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.hold-kpi strong {
    font-size: 1.15rem;
}

.hold-kpi.is-held {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.hold-kpi.is-debt {
    background: #fef2f2;
    border-color: #fecaca;
}

a.hold-kpi {
    color: inherit;
}

button.hold-kpi {
    border: 1px solid var(--border);
    text-align: start;
    cursor: pointer;
    font: inherit;
}

button.hold-kpi.is-on {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.hold-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.22rem;
    border-radius: 999px;
    background: #e8eef5;
    width: fit-content;
    max-width: 100%;
    flex-shrink: 0;
}

.hold-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.hold-tab:hover {
    color: var(--text-main);
}

.hold-tab.is-active {
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.hold-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 1rem;
}

.hold-grid--list {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.35rem 0.55rem 0.65rem;
}

.hold-grid--list .hold-card {
    border: 0;
    border-radius: 16px;
    box-shadow: none;
    background: transparent;
}

.hold-grid--list .hold-card + .hold-card {
    border-top: 1px solid #f1f5f9;
}

.hold-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hold-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.05rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

.hold-card--amanat .hold-card-head {
    border-bottom: 0;
    padding-bottom: 0.35rem;
}

.hold-who {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.hold-avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    font-weight: 800;
    flex-shrink: 0;
}

.hold-name {
    display: block;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.3;
}

.hold-name:hover {
    color: var(--primary-dark);
}

.hold-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.hold-code {
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hold-phone {
    color: var(--text-muted);
    text-decoration: none;
}

.hold-phone:hover {
    color: var(--primary);
}

.hold-head-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.hold-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.hold-pill.is-held {
    background: #dcfce7;
    color: #166534;
}

.hold-pill.is-debt {
    background: #fee2e2;
    color: #991b1b;
}

.hold-pill.is-out {
    background: #ffedd5;
    color: #9a3412;
}

.hold-funds {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem 1.05rem;
}

.hold-card--amanat .hold-funds {
    padding-top: 0.45rem;
}

.hold-ccy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.hold-ccy-side {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    min-width: 0;
}

.hold-ccy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.hold-ccy-actions .btn {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.hold-ccy.is-hero {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.hold-ccy.is-held {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.hold-ccy.is-debt {
    background: #fef2f2;
    border-color: #fecaca;
}

.hold-ccy-id {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.hold-ccy-code {
    display: block;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.hold-ccy-state {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.hold-ccy-amt {
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: end;
    word-break: break-word;
    letter-spacing: -0.02em;
}

.hold-ccy-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    justify-content: flex-end;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.vault-panel + .hold-page {
    margin-top: 1.25rem;
}

.hold-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.hold-empty-panel {
    text-align: center;
    padding: 2.75rem 1rem;
    color: var(--text-muted);
}

.hold-empty-panel i {
    display: block;
    font-size: 2.1rem;
    opacity: 0.4;
    margin-bottom: 0.65rem;
}

.hold-empty-panel p {
    margin: 0;
    font-weight: 600;
}

.hold-idle {
    margin: 0 1.05rem 1rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
}

.hold-idle summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.hold-idle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.hold-idle-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hold-idle-chip .currency-logo-img {
    width: 18px;
    height: 18px;
}

.hold-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
}

.hold-moves {
    display: flex;
    flex-direction: column;
}

.hold-move {
    display: grid;
    grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid #f1f5f9;
}

.hold-move:last-child {
    border-bottom: 0;
}

.hold-move-who {
    min-width: 0;
}

.hold-move-who strong {
    display: block;
    font-weight: 800;
    line-height: 1.3;
}

.hold-move-who .hold-mono {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.hold-move-sum {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-variant-numeric: tabular-nums;
}

.hold-move-sum strong {
    font-size: 1.02rem;
}

.hold-move-time {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.hold-move-gap {
    width: 34px;
}

.hold-move-amt {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-inline-end: 0.35rem;
}

@media (max-width: 767.98px) {
    .hold-move {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "pill who print"
            "sum sum sum"
            "time time time";
    }

    .hold-move .hold-pill { grid-area: pill; }
    .hold-move-who { grid-area: who; }
    .hold-move-sum { grid-area: sum; }
    .hold-move-time { grid-area: time; }
    .hold-move > .btn,
    .hold-move-gap { grid-area: print; }
}

.position-kv {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
}

.position-kv:last-of-type {
    border-bottom: 0;
}

.stat-card.text-decoration-none {
    color: inherit;
}

.rate-ticker {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #070b14;
    color: #e2e8f0;
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
    height: 48px;
}

.rate-ticker-viewport {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}

.rate-ticker-rail {
    display: flex;
    width: max-content;
    height: 100%;
    direction: ltr;
    animation: ticker-pan var(--ticker-duration, 40s) linear infinite;
}

.rate-ticker:hover .rate-ticker-rail {
    animation-play-state: paused;
}

.rate-ticker-group {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
}

@keyframes ticker-pan {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 100%;
    padding: 0 1.05rem;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    white-space: nowrap;
}

.fx-chip .currency-logo-img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.fx-chip-pair {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #f8fafc;
}

.fx-chip-rate {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    font-variant-numeric: tabular-nums;
}

.fx-chip-rate em {
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 700;
    opacity: 0.72;
}

.fx-chip-rate b {
    font-size: 0.82rem;
    font-weight: 800;
}

.fx-chip-buy {
    color: #86efac;
}

.fx-chip-sell {
    color: #93c5fd;
}

.fx-chip-main {
    background: rgba(37, 99, 235, 0.14);
}

.fx-chip-unit {
    font-size: 0.68rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.rate-ticker-more {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 0.95rem;
    border-right: 1px solid #1e293b;
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    background: #0b1220;
    z-index: 1;
}

.rate-ticker-more:hover {
    color: #fff;
    background: #111827;
}

@media (max-width: 767.98px) {
    .rate-ticker {
        height: 44px;
    }

    .rate-ticker-more {
        display: none;
    }

    .fx-chip {
        padding: 0 0.8rem;
        gap: 0.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rate-ticker-rail {
        animation: none;
    }
}

.exchange-profit-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin: 0.85rem 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.exchange-profit-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.exchange-profit-value {
    font-size: 1.2rem;
}

.exchange-profit-value.is-gain { color: #15803d; }
.exchange-profit-value.is-loss { color: #b91c1c; }

.exchange-profit-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exchange-pnl {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.exchange-pnl.is-gain {
    background: #dcfce7;
    color: #166534;
}

.exchange-pnl.is-loss {
    background: #fee2e2;
    color: #991b1b;
}

.rate-board-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.86rem;
}

.rate-board-row:last-child { border-bottom: 0; }

.rate-board-prices {
    display: flex;
    gap: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.xfer-bar .search-box {
    flex: 1 1 16rem;
    margin-inline-start: auto;
}

.xfer-bar .search-box .search-input {
    max-width: none;
}

.xfer-row {
    grid-template-columns: minmax(9rem, 0.95fr) minmax(0, 1.4fr) minmax(0, 1fr) auto;
}

.xfer-ref {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}

.xfer-ref .hold-mono {
    font-size: 0.82rem;
    color: var(--text-main);
}

.xfer-row .hold-move-who span {
    display: block;
}

.xfer-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.xfer-actions .btn {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
}

.xfer-actions--decide {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.xfer-actions--decide .btn {
    width: auto;
    height: auto;
    min-height: 2.15rem;
    padding: 0.35rem 0.7rem;
}

.xfer-row--in {
    grid-template-columns: minmax(8rem, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.9fr) auto;
}

@media (max-width: 767.98px) {
    .xfer-bar .search-box {
        flex: 1 1 100%;
    }

    .xfer-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "ref actions"
            "who who"
            "sum sum";
    }

    .xfer-ref { grid-area: ref; }
    .xfer-row .hold-move-who { grid-area: who; }
    .xfer-row .hold-move-sum { grid-area: sum; }
    .xfer-actions { grid-area: actions; }

    .xfer-row--in {
        grid-template-columns: 1fr;
        grid-template-areas:
            "ref"
            "who"
            "sum"
            "actions";
    }

    .xfer-row--in .xfer-actions {
        justify-content: stretch;
    }

    .xfer-row--in .xfer-actions form {
        flex: 1 1 calc(50% - 0.2rem);
    }

    .xfer-row--in .xfer-actions .btn {
        width: 100%;
    }
}

.xfer-sheet {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.xfer-hero {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(37, 99, 235, 0.1), transparent 50%),
        #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem 1.35rem 1.2rem;
    box-shadow: var(--shadow);
}

.xfer-hero--paid {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(22, 163, 74, 0.12), transparent 50%),
        #fff;
}

.xfer-hero--cancelled {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(185, 28, 28, 0.1), transparent 50%),
        #fff;
}

.xfer-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.85rem;
}

.xfer-hero-ref {
    font-size: 0.92rem;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.2rem 0.5rem;
}

.xfer-hero-no {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.xfer-hero-amt .money-cell {
    font-size: 1.85rem;
    gap: 0.6rem;
}

.xfer-hero-amt .money-cell .currency-logo-sm {
    width: 28px;
    height: 28px;
}

.xfer-hero-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.1rem;
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.xfer-hero-split .money-cell {
    font-size: 0.82rem;
}

.xfer-hero-split .money-cell .currency-logo-sm {
    width: 14px;
    height: 14px;
}

.xfer-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.xfer-hero-actions .btn {
    border-radius: 12px;
    font-weight: 700;
}

.xfer-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.xfer-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
}

.xfer-party {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.xfer-party--recv {
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 42%);
}

.xfer-party-role {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.xfer-party-who {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.xfer-party-who strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    word-break: break-word;
}

.xfer-party-phone {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.15rem;
    text-decoration: none;
}

a.xfer-party-phone:hover {
    color: var(--primary);
}

.xfer-avatar {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
    flex-shrink: 0;
}

.xfer-avatar--recv {
    background: #dcfce7;
    color: #15803d;
}

.xfer-party-office {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.7rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.88rem;
    font-weight: 700;
}

.xfer-route-bridge {
    display: grid;
    place-items: center;
    color: #2563eb;
    font-size: 1.25rem;
}

.xfer-facts {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 0.35rem 0.25rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.xfer-fact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid #f1f5f9;
}

.xfer-fact:nth-child(odd) {
    border-inline-end: 1px solid #f1f5f9;
}

.xfer-facts .xfer-fact:last-child,
.xfer-facts .xfer-fact:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
}

.xfer-fact span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.xfer-fact strong {
    font-size: 0.92rem;
    text-align: end;
}

.xfer-notes {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 1rem 1.15rem;
}

.xfer-notes p {
    margin: 0;
    font-weight: 600;
    line-height: 1.7;
}

.xfer-notes p + p {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #e2e8f0;
}

.xfer-notes span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

@media (max-width: 767.98px) {
    .xfer-route {
        grid-template-columns: 1fr;
    }

    .xfer-route-bridge {
        transform: rotate(-90deg);
        padding: 0.1rem 0;
    }

    .xfer-facts {
        grid-template-columns: 1fr;
    }

    .xfer-fact:nth-child(odd) {
        border-inline-end: 0;
    }

    .xfer-facts .xfer-fact {
        border-bottom: 1px solid #f1f5f9;
    }

    .xfer-facts .xfer-fact:last-child {
        border-bottom: 0;
    }

    .xfer-hero-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
    }

    .xfer-hero-amt .money-cell {
        font-size: 1.45rem;
    }
}

/* ===== BACKUP / IMPORT ===== */
.settings-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    max-width: 760px;
    margin: 0 auto;
}

.settings-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.settings-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.45rem 0.55rem;
    border-radius: 12px;
    color: #475569;
    font-weight: 800;
    font-size: 0.82rem;
    text-decoration: none;
    text-align: center;
}

.settings-tab i {
    font-size: 1rem;
}

.settings-tab:hover {
    background: #f8fafc;
    color: #1e293b;
}

.settings-tab.is-on {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.settings-panel {
    display: none;
}

.settings-panel.is-active {
    display: block;
}

.settings-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.settings-page-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.settings-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfd;
}

.settings-form-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    background: #fef3c7;
    color: #d97706;
}

.settings-form-section-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.settings-form-section-head p {
    margin: 0.15rem 0 0;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.settings-form-section-body {
    padding: 1rem 1.15rem 1.15rem;
}

.settings-form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.settings-backup-section {
    overflow: hidden;
    padding: 0;
}

.settings-account-icon {
    background: #eff6ff;
    color: #2563eb;
}

.settings-cities-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.settings-city-add {
    margin-bottom: 1rem;
}

.settings-city-add-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.settings-city-add-row .form-control {
    flex: 1;
    min-width: 0;
}

.settings-city-add-row .btn {
    white-space: nowrap;
}

.settings-city-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.settings-city-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}

.settings-city-name {
    font-weight: 800;
    color: var(--text-main);
}

.settings-city-list form {
    margin: 0;
    flex-shrink: 0;
}

.settings-backup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.settings-backup-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fafbfd;
    min-height: 100%;
}

.settings-backup-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
}

.settings-backup-import-icon {
    background: #fef2f2;
    color: #dc2626;
}

.settings-backup-card h4 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}

.settings-backup-card p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    flex: 1 1 auto;
}

.settings-backup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 46px;
    font-weight: 700;
    border-radius: 12px;
    margin-top: auto;
}

.settings-import-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.15rem;
}

.settings-import-field {
    margin: 0;
}

.settings-import-confirm {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.45;
    cursor: pointer;
}

.settings-import-confirm input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .settings-page-title {
        font-size: 1.15rem;
    }

    .settings-backup-grid {
        grid-template-columns: 1fr;
    }

    .settings-tab {
        flex-direction: column;
        gap: 0.15rem;
        min-height: 58px;
        padding: 0.4rem 0.25rem;
        font-size: 0.72rem;
    }

    .settings-tab i {
        font-size: 1.05rem;
    }

    .settings-city-add-row {
        flex-direction: column;
    }

    .settings-city-add-row .btn {
        width: 100%;
        justify-content: center;
    }

    .settings-import-field .form-control {
        font-size: 16px;
        min-height: 46px;
    }
}

/* ===== Currency Exchange compatibility ===== */
.card-soft {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.btn-gold { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); border: 0; color: #fff; font-weight: 600; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28); }
.btn-gold:hover { color: #fff; opacity: 0.96; }
.btn-ink { background: #0f172a; color: #fff; border: 0; }
.btn-ink:hover { color: #fff; background: #1e293b; }
.badge-buy { background: #dcfce7; color: #15803d; }
.badge-sell { background: #fee2e2; color: #b91c1c; }
.search-results {
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 0;
    top: calc(100% + 6px);
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 20;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border);
}
.search-results button { display: block; width: 100%; text-align: start; border: 0; background: transparent; padding: 10px 14px; }
.search-results button:hover { background: var(--primary-light); }
.customer-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
}
.print-only { display: none; }
@media print {
    .sidebar, .topbar, .sidebar-overlay, .no-print { display: none !important; }
    .main-content { margin: 0 !important; max-width: none; }
    .print-only { display: block; }
}
.rate-adjust-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem;
}
.rate-adjust-card h3 { color: var(--primary-dark); font-weight: 800; }
.rate-seg { display: flex; gap: 0.4rem; }
.rate-seg-item { flex: 1; margin: 0; cursor: pointer; }
.rate-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.rate-seg-item span {
    display: flex; align-items: center; justify-content: center;
    min-height: 42px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-weight: 700;
}
.rate-seg-item input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.js-rate-final { background: #eff6ff; font-weight: 700; color: var(--primary-dark); }
.pagination-bar {
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--border);
}
.txn-pane {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.txn-pane--out {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.stat-card .label { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.stat-card .value { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.card-modern .alert { margin: 1rem; }

.statement-sheet {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem 1.6rem 2rem;
}

.statement-head {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef2f7;
}

.statement-head h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.statement-head h2 {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.statement-block {
    margin-top: 1.25rem;
}

.statement-block h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

@media print {
    .statement-sheet {
        border: 0;
        border-radius: 0;
        padding: 0;
        max-width: none;
    }
}
