/* =====================================================================
   Wakala theme — on top of AdminLTE 3 / Bootstrap 4.
   Mobile first: bottom navigation, swipeable wallets, sticky actions.
   ===================================================================== */

:root {
    --wk-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --wk-primary: #0d9488;
    --wk-primary-600: #0f766e;
    --wk-primary-700: #115e59;
    --wk-primary-50: #f0fdfa;
    --wk-primary-100: #ccfbf1;
    --wk-accent: #f59e0b;

    --wk-ink: #0f172a;
    --wk-ink-2: #334155;
    --wk-muted: #64748b;
    --wk-faint: #94a3b8;
    --wk-bg: #f3f6fb;
    --wk-card: #ffffff;
    --wk-border: #e6ebf2;
    --wk-border-strong: #d5dce8;

    --wk-success: #15803d;
    --wk-success-bg: #dcfce7;
    --wk-danger: #b91c1c;
    --wk-danger-bg: #fee2e2;
    --wk-warning: #b45309;
    --wk-warning-bg: #fef3c7;
    --wk-info: #1d4ed8;
    --wk-info-bg: #dbeafe;
    --wk-neutral-bg: #eef2f7;

    --wk-radius: 18px;
    --wk-radius-sm: 12px;
    --wk-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .06);
    --wk-shadow-lg: 0 14px 40px rgba(15, 23, 42, .14);

    --wk-sidebar: #0b1424;
    --wk-sidebar-2: #0f2238;
    --wk-bottom-nav-h: 66px;
}

/* ---------- Base ---------- */
body {
    font-family: var(--wk-font);
    background: var(--wk-bg);
    color: var(--wk-ink);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -.005em;
}
.content-wrapper { background: var(--wk-bg); }
a { color: var(--wk-primary-600); }
a:hover { color: var(--wk-primary-700); }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { font-weight: 700; letter-spacing: -.02em; color: var(--wk-ink); }
.text-muted { color: var(--wk-muted) !important; }
.small, small { font-size: 82%; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.money, .table th.money { text-align: right; }
.text-negative { color: var(--wk-danger) !important; }
.text-positive { color: var(--wk-success) !important; }
::selection { background: var(--wk-primary-100); }

/* ---------- Top bar ---------- */
.main-header.wk-topbar {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--wk-border);
    min-height: 60px;
}
.wk-topbar .nav-link { color: var(--wk-ink-2); }
.wk-topbar-title { font-weight: 700; font-size: 1.02rem; color: var(--wk-ink); padding: .5rem .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; display: inline-block; }
.wk-pool-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--wk-primary-50); color: var(--wk-primary-700) !important;
    border: 1px solid var(--wk-primary-100);
    border-radius: 999px; padding: .32rem .8rem !important; margin-right: .35rem;
    font-size: .86rem; line-height: 1.2;
}
.wk-pool-pill strong { font-weight: 800; }
.wk-pool-pill .label { color: var(--wk-primary-600); font-weight: 600; }
.wk-avatar-btn { display: inline-flex !important; align-items: center; gap: .5rem; }
.dropdown-menu { border: 1px solid var(--wk-border); border-radius: 14px; box-shadow: var(--wk-shadow-lg); padding: .4rem; }
.dropdown-item { border-radius: 10px; padding: .5rem .75rem; }
.dropdown-item.active, .dropdown-item:active { background: var(--wk-primary); }

/* ---------- Sidebar ---------- */
.main-sidebar.wk-sidebar { background: linear-gradient(180deg, var(--wk-sidebar) 0%, var(--wk-sidebar-2) 100%); box-shadow: none !important; }
.wk-sidebar .brand-link { border-bottom: 1px solid rgba(255, 255, 255, .07) !important; display: flex; align-items: center; gap: .65rem; padding: .95rem 1rem; color: #fff; }
.wk-sidebar .brand-link .brand-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 800 !important; font-size: 1rem; }
.wk-sidebar .brand-link .brand-text small { font-weight: 500; color: #8ea0b8; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; margin-top: .15rem; }
.wk-logo { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 6px 18px rgba(20, 184, 166, .35); }
.wk-logo svg { width: 22px; height: 22px; }
.wk-user { display: flex; align-items: center; gap: .7rem; margin: 1rem .6rem .5rem; padding: .7rem; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.wk-user .name { color: #fff; font-weight: 700; font-size: .9rem; line-height: 1.15; }
.wk-user .role { color: #8ea0b8; font-size: .74rem; }
.sidebar-collapse .wk-user .meta, .sidebar-collapse .wk-user { display: none; }
.wk-sidebar .nav-header { color: #6f819b !important; font-size: .68rem !important; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 1rem 1rem .4rem !important; }
.wk-sidebar .nav-sidebar .nav-link { color: #c3cedd; border-radius: 12px; margin: 1px .5rem; width: calc(100% - 1rem); padding: .55rem .8rem; transition: background .15s, color .15s; }
.wk-sidebar .nav-sidebar .nav-link p { font-weight: 500; font-size: .9rem; }
.wk-sidebar .nav-sidebar .nav-link .nav-icon { color: #7d90aa; font-size: .95rem; }
.wk-sidebar .nav-sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.wk-sidebar .nav-sidebar .nav-link.active,
.wk-sidebar .nav-pills .nav-link.active { background: linear-gradient(135deg, #14b8a6, #0d9488) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(13, 148, 136, .35); }
.wk-sidebar .nav-sidebar .nav-link.active .nav-icon { color: #fff; }
.wk-sidebar .nav-link .badge.right { top: .65rem; }
.wk-sidebar .os-scrollbar-handle { background: rgba(255, 255, 255, .15) !important; }

/* ---------- Page header ---------- */
.content-header { padding: 1.4rem .5rem .6rem; }
.content-header h1 { font-size: 1.55rem; margin: 0; }
.wk-subtitle { color: var(--wk-muted); font-size: .9rem; margin-top: .2rem; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--wk-border); border-radius: var(--wk-radius); box-shadow: var(--wk-shadow); margin-bottom: 1.25rem; }
.card-outline { border-top: 1px solid var(--wk-border) !important; }
.card-header { background: transparent; border-bottom: 1px solid var(--wk-border); padding: .95rem 1.25rem; }
.card-header .card-title { font-weight: 700; font-size: 1rem; color: var(--wk-ink); }
.card-header .card-title .fas, .card-header .card-title .fab { color: var(--wk-primary); }
.card-body { padding: 1.25rem; }
.card-footer { background: #fafbfd; border-top: 1px solid var(--wk-border); border-radius: 0 0 var(--wk-radius) var(--wk-radius) !important; }
.card > .card-body.p-0 > .table:last-child, .card > .card-body.p-0 > table:last-child { border-radius: 0 0 var(--wk-radius) var(--wk-radius); overflow: hidden; }
.op-card { max-width: 680px; }
.wk-section-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--wk-muted); margin: 1.6rem 0 .75rem; display: flex; align-items: center; justify-content: space-between; }
.wk-section-title a { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .85rem; }

/* Form card header (icon tile + intro) */
.wk-form-head { display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--wk-border);
    background: linear-gradient(180deg, var(--wk-primary-50), rgba(255, 255, 255, 0)); border-radius: var(--wk-radius) var(--wk-radius) 0 0; }
.wk-icon-tile { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.15rem;
    color: #fff; background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 8px 18px rgba(13, 148, 136, .28); }
.wk-icon-tile.amber { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 8px 18px rgba(217, 119, 6, .25); }
.wk-icon-tile.blue { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }
.wk-icon-tile.violet { background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 8px 18px rgba(109, 40, 217, .25); }
.wk-icon-tile.rose { background: linear-gradient(135deg, #fb7185, #be123c); box-shadow: 0 8px 18px rgba(190, 18, 60, .22); }
.wk-form-head .intro { color: var(--wk-ink-2); font-size: .9rem; margin: .1rem 0 0; }
.wk-form-head .head-title { font-weight: 800; font-size: 1.05rem; margin: 0; }

/* ---------- Forms ---------- */
label { font-weight: 600 !important; font-size: .86rem; color: var(--wk-ink-2); margin-bottom: .35rem; }
.form-control, .custom-select { border-radius: var(--wk-radius-sm); border: 1px solid var(--wk-border-strong); color: var(--wk-ink); height: calc(2.6rem + 2px); padding: .5rem .85rem; transition: border-color .15s, box-shadow .15s; }
.form-control-lg, .custom-select-lg { height: calc(3rem + 2px); font-size: 1rem; }
textarea.form-control { height: auto; }
.form-control-file { font-size: .88rem; }
.form-control:focus, .custom-select:focus { border-color: var(--wk-primary); box-shadow: 0 0 0 4px rgba(13, 148, 136, .14); }
.input-group-text { background: var(--wk-neutral-bg); border: 1px solid var(--wk-border-strong); color: var(--wk-muted); font-weight: 700; font-size: .85rem; border-radius: var(--wk-radius-sm); }
.input-group > .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-append > .btn, .input-group > .input-group-append > .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.money-input.form-control-lg { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.custom-control-label { font-weight: 500 !important; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--wk-primary); border-color: var(--wk-primary); }
.custom-switch .custom-control-input:focus ~ .custom-control-label::before, .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 4px rgba(13, 148, 136, .14); }
.invalid-feedback { font-weight: 500; }

/* Radio choices as tappable cards */
.wk-choice { display: block; position: relative; border: 1.5px solid var(--wk-border-strong); border-radius: 14px; padding: .8rem 1rem .8rem 2.75rem; cursor: pointer; margin-bottom: .6rem; transition: border-color .15s, background .15s; }
.wk-choice input { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); accent-color: var(--wk-primary); width: 18px; height: 18px; }
.wk-choice:has(input:checked) { border-color: var(--wk-primary); background: var(--wk-primary-50); }
.wk-choice .t { font-weight: 700; display: block; }
.wk-choice .d { color: var(--wk-muted); font-size: .83rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--wk-radius-sm); font-weight: 700; letter-spacing: -.005em; padding: .5rem 1rem; transition: transform .08s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .78rem 1.2rem; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: .3rem .65rem; border-radius: 10px; font-weight: 600; }
.btn-primary { background: linear-gradient(135deg, #14b8a6, #0d9488); border: 0; box-shadow: 0 8px 18px rgba(13, 148, 136, .28); }
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, #0d9488, #0f766e); box-shadow: 0 10px 22px rgba(13, 148, 136, .34); }
.btn-primary:disabled { background: #94a3b8; box-shadow: none; }
.btn-success { background: linear-gradient(135deg, #22c55e, #15803d); border: 0; box-shadow: 0 8px 18px rgba(21, 128, 61, .25); }
.btn-default { background: #fff; border: 1px solid var(--wk-border-strong); color: var(--wk-ink-2); }
.btn-default:hover { background: var(--wk-neutral-bg); }
.btn-outline-primary { color: var(--wk-primary-600); border-color: var(--wk-primary); }
.btn-outline-primary:hover { background: var(--wk-primary); border-color: var(--wk-primary); }
.btn-outline-danger, .btn-outline-success, .btn-outline-secondary { border-width: 1.5px; }

/* Sticky actions: the save button stays in reach on a phone */
.wk-form-actions { margin-top: 1.25rem; }
@media (max-width: 767.98px) {
    .wk-form-actions { position: sticky; bottom: calc(var(--wk-bottom-nav-h) + env(safe-area-inset-bottom) + 10px); z-index: 10;
        padding-top: .6rem; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 35%); margin: 1rem -1.25rem -1.25rem; padding: .9rem 1.25rem 1.1rem; border-radius: 0 0 var(--wk-radius) var(--wk-radius); }
}

/* ---------- Tables ---------- */
.table { color: var(--wk-ink); margin-bottom: 0; }
.table thead th, .table thead.thead-light th { background: #f8fafc; color: var(--wk-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 1px solid var(--wk-border); border-top: 0; white-space: nowrap; }
.table td, .table th { border-top: 1px solid #eef2f7; vertical-align: middle; padding: .7rem .9rem; }
.table-sm td, .table-sm th { padding: .5rem .75rem; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-striped tbody tr:nth-of-type(odd) { background: #fbfcfe; }
.table tfoot td, .table tfoot th { border-top: 1px solid var(--wk-border); background: #f8fafc; }
.table-ledger td, .table-ledger th { vertical-align: middle; }
.row-reversed td { color: var(--wk-faint); text-decoration: line-through; }
.table-danger, .table-danger > td { background: #fff1f2 !important; }

/* ---------- Badges & alerts (soft) ---------- */
.badge { font-weight: 700; border-radius: 8px; padding: .32em .6em; font-size: 72%; letter-spacing: .01em; }
.badge-success { background: var(--wk-success-bg); color: var(--wk-success); }
.badge-danger { background: var(--wk-danger-bg); color: var(--wk-danger); }
.badge-warning { background: var(--wk-warning-bg); color: var(--wk-warning); }
.badge-info { background: var(--wk-info-bg); color: var(--wk-info); }
.badge-primary { background: var(--wk-primary-100); color: var(--wk-primary-700); }
.badge-secondary, .badge-light { background: var(--wk-neutral-bg); color: var(--wk-ink-2); border: 0 !important; }
.badge-dark { background: #1e293b; color: #fff; }
.wk-sidebar .badge-warning { background: var(--wk-accent); color: #1f2937; }
.wk-sidebar .badge-danger { background: #ef4444; color: #fff; }
.alert { border: 1px solid transparent; border-radius: 14px; font-weight: 500; }
.alert-success { background: #ecfdf5; border-color: #bbf7d0; color: #14532d; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert .btn-dark { background: #0f172a; border: 0; }
.alert .close { color: inherit; opacity: .5; }
.progress { border-radius: 999px; background: #edf1f6; }
.progress-bar { border-radius: 999px; }
.pagination .page-link { border-radius: 10px !important; margin: 0 2px; border: 1px solid var(--wk-border); color: var(--wk-ink-2); }
.pagination .page-item.active .page-link { background: var(--wk-primary); border-color: var(--wk-primary); }

/* Callout (dashboard notices) */
.wk-callout { display: flex; align-items: center; gap: .85rem; border-radius: 16px; padding: .85rem 1rem; margin-bottom: .8rem; border: 1px solid; }
.wk-callout .ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; }
.wk-callout .tx { flex: 1; font-weight: 600; font-size: .9rem; }
.wk-callout.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.wk-callout.warn .ic { background: #fde68a; color: #92400e; }
.wk-callout.danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.wk-callout.danger .ic { background: #fecaca; color: #991b1b; }
.wk-callout .btn { white-space: nowrap; }

/* ---------- Avatars ---------- */
.wk-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; letter-spacing: .02em; }
.wk-avatar.sm { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; font-size: .74rem; }
.wk-avatar.round { border-radius: 50%; }
.wk-avatar.user { background: linear-gradient(135deg, #14b8a6, #0f766e); }

/* ---------- Dashboard ---------- */
.wk-greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .3rem 0 1.1rem; }
.wk-greet h2 { margin: 0; font-size: 1.5rem; }
.wk-greet .date { color: var(--wk-muted); font-weight: 500; }

.wk-hero { position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 1.5rem 1.5rem 1.25rem;
    background: radial-gradient(1200px 400px at 110% -40%, rgba(255, 255, 255, .18), transparent 60%),
                linear-gradient(135deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
    box-shadow: 0 18px 40px rgba(13, 148, 136, .30); margin-bottom: 1.25rem; }
.wk-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 40px rgba(255, 255, 255, .04); }
.wk-hero .eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; display: flex; align-items: center; gap: .4rem; }
.wk-hero .amount { font-size: clamp(2rem, 7vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: .45rem 0 .35rem; font-variant-numeric: tabular-nums; }
.wk-hero .amount .cur { font-size: .45em; font-weight: 700; opacity: .8; margin-right: .3rem; vertical-align: .55em; }
.wk-hero .hint { opacity: .85; font-size: .86rem; max-width: 34rem; }
.wk-hero .stats { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; position: relative; z-index: 1; }
.wk-hero .stat { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: .55rem .8rem; min-width: 8.5rem; }
.wk-hero .stat .k { font-size: .72rem; opacity: .85; font-weight: 600; }
.wk-hero .stat .v { font-weight: 800; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.wk-hero .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.1rem; position: relative; z-index: 1; }
.wk-hero .actions .btn { background: #fff; color: var(--wk-primary-700); border: 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.wk-hero .actions .btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .25); }

.wk-stat { background: var(--wk-card); border: 1px solid var(--wk-border); border-radius: var(--wk-radius); box-shadow: var(--wk-shadow); padding: 1.1rem 1.15rem; display: flex; gap: .9rem; align-items: center; margin-bottom: 1.25rem; height: calc(100% - 1.25rem); }
.wk-stat .k { color: var(--wk-muted); font-size: .8rem; font-weight: 600; }
.wk-stat .v { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wk-stat .d { color: var(--wk-faint); font-size: .76rem; }

/* Wallet cards — swipe on phones, grid on larger screens */
.wk-wallets { display: grid; gap: .85rem; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: .2rem .1rem 1rem; margin: 0 -.1rem; scrollbar-width: none; }
.wk-wallets::-webkit-scrollbar { display: none; }
@media (min-width: 576px) { .wk-wallets { grid-auto-columns: 46%; } }
@media (min-width: 992px) { .wk-wallets { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; } }
.wk-wallet { scroll-snap-align: start; background: var(--wk-card); border: 1px solid var(--wk-border); border-radius: var(--wk-radius); box-shadow: var(--wk-shadow);
    padding: 1rem 1.05rem; position: relative; overflow: hidden; color: var(--wk-ink); display: block; transition: transform .15s, box-shadow .15s; }
.wk-wallet:hover { transform: translateY(-2px); box-shadow: var(--wk-shadow-lg); color: var(--wk-ink); text-decoration: none; }
.wk-wallet .top { display: flex; align-items: center; gap: .65rem; }
.wk-wallet .nm { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.wk-wallet .tp { color: var(--wk-muted); font-size: .74rem; }
.wk-wallet .bal { font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em; margin: .85rem 0 .5rem; font-variant-numeric: tabular-nums; }
.wk-wallet .bar { height: 6px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.wk-wallet .bar span { display: block; height: 100%; border-radius: 999px; }
.wk-wallet .foot { display: flex; justify-content: space-between; margin-top: .45rem; color: var(--wk-muted); font-size: .74rem; }
.wk-wallet.low { border-color: #fcd34d; }
.wk-wallet .low-tag { position: absolute; top: .8rem; right: .8rem; }

/* Company cards */
.wk-company { background: var(--wk-card); border: 1px solid var(--wk-border); border-radius: var(--wk-radius); box-shadow: var(--wk-shadow); padding: 1rem 1.1rem; height: calc(100% - 1rem); margin-bottom: 1rem; }
.wk-company .head { display: flex; align-items: center; gap: .7rem; }
.wk-company .nm { font-weight: 700; line-height: 1.2; }
.wk-company .pos { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin: .8rem 0 .55rem; font-variant-numeric: tabular-nums; }
.wk-company .split { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #edf1f6; gap: 2px; }
.wk-company .split span { display: block; height: 100%; }
.wk-company .legend { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .76rem; color: var(--wk-muted); }
.wk-company .legend b { color: var(--wk-ink); font-weight: 700; }
.wk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }

/* Activity feed */
.wk-feed { list-style: none; margin: 0; padding: 0; }
.wk-feed li { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.15rem; border-top: 1px solid #eef2f7; }
.wk-feed li:first-child { border-top: 0; }
.wk-feed .ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; font-size: .9rem; }
.wk-feed .main { flex: 1; min-width: 0; }
.wk-feed .t { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-feed .s { color: var(--wk-muted); font-size: .76rem; }
.wk-feed .amt { font-weight: 800; font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-feed li.reversed .t, .wk-feed li.reversed .amt { text-decoration: line-through; color: var(--wk-faint); }
.ic-in { background: #dcfce7; color: #15803d; }
.ic-out { background: #fee2e2; color: #b91c1c; }
.ic-move { background: #dbeafe; color: #1d4ed8; }
.ic-own { background: #ede9fe; color: #6d28d9; }
.ic-neutral { background: #eef2f7; color: #475569; }

/* Chart */
.wk-chart { position: relative; height: 260px; }
.wk-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--wk-ink-2); font-weight: 600; }
.wk-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.wk-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Empty state */
.wk-empty { text-align: center; padding: 2rem 1rem; color: var(--wk-muted); }
.wk-empty .ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto .75rem; background: var(--wk-neutral-bg); color: var(--wk-faint); font-size: 1.3rem; }
.wk-empty .t { font-weight: 700; color: var(--wk-ink-2); }

/* Mobile list (cards instead of wide tables on phones) */
.wk-list { list-style: none; margin: 0; padding: 0; }
.wk-list li { border-top: 1px solid #eef2f7; }
.wk-list li:first-child { border-top: 0; }
.wk-list a, .wk-list .row-in { display: flex; gap: .8rem; align-items: center; padding: .85rem 1rem; color: var(--wk-ink); text-decoration: none; }
.wk-list a:active { background: #f8fafc; }
.wk-list .main { flex: 1; min-width: 0; }
.wk-list .t { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-list .s { color: var(--wk-muted); font-size: .77rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-list .r { text-align: right; }
.wk-list .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-list .reversed .t, .wk-list .reversed .amt { text-decoration: line-through; color: var(--wk-faint); }

/* Mini stat tiles (account book, reports) */
.wk-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 768px) { .wk-tiles { grid-template-columns: repeat(4, 1fr); } }
.wk-tile { background: var(--wk-card); border: 1px solid var(--wk-border); border-radius: 16px; padding: .85rem 1rem; box-shadow: var(--wk-shadow); }
.wk-tile .k { color: var(--wk-muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.wk-tile .v { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: .2rem; letter-spacing: -.01em; }

/* ---------- Bottom navigation (phones) ---------- */
.wk-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; display: flex; align-items: stretch;
    height: calc(var(--wk-bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--wk-border); box-shadow: 0 -8px 24px rgba(15, 23, 42, .06); }
.wk-bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: var(--wk-faint);
    font-size: .68rem; font-weight: 700; text-decoration: none; position: relative; }
.wk-bottom-nav a i { font-size: 1.15rem; }
.wk-bottom-nav a.active { color: var(--wk-primary-600); }
.wk-bottom-nav a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--wk-primary); }
.wk-bottom-nav .badge { position: absolute; top: 8px; left: calc(50% + 6px); font-size: .6rem; padding: .2em .45em; background: var(--wk-accent); color: #1f2937; }
.wk-bottom-nav .fab { flex: 0 0 auto; width: 64px; }
.wk-bottom-nav .fab span.btn-fab { width: 54px; height: 54px; border-radius: 18px; margin-top: -22px; display: grid; place-items: center; color: #fff; font-size: 1.3rem;
    background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 10px 22px rgba(13, 148, 136, .40); border: 4px solid var(--wk-bg); }
.wk-bottom-nav .fab small { color: var(--wk-primary-600); }

@media (max-width: 767.98px) {
    .content-wrapper { padding-bottom: calc(var(--wk-bottom-nav-h) + env(safe-area-inset-bottom) + 12px); }
    .main-footer { display: none; }
    .content-header { padding: 1rem .25rem .4rem; }
    .content-header h1 { font-size: 1.3rem; }
    .card-body { padding: 1rem; }
    .card-header { padding: .8rem 1rem; }
    .wk-form-head { padding: 1rem; }
    .wk-hero { border-radius: 20px; padding: 1.25rem 1.1rem 1.1rem; }
    .wk-hero .stat { min-width: 0; flex: 1 1 40%; }
    .wk-hero .actions .btn { flex: 1 1 auto; }
    .table td, .table th { padding: .55rem .65rem; }
    .container-fluid { padding-left: .85rem; padding-right: .85rem; }
}

/* ---------- Guest pages (login, two-factor) ---------- */
.wk-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--wk-bg); }
@media (min-width: 992px) { .wk-auth { grid-template-columns: 1.05fr 1fr; } }
.wk-auth-hero { position: relative; overflow: hidden; color: #fff; padding: 2.2rem 1.5rem 4.5rem;
    background: radial-gradient(900px 500px at 0% 0%, rgba(255, 255, 255, .16), transparent 55%), linear-gradient(140deg, #0b1424 0%, #0f3b47 45%, #0d9488 100%); }
.wk-auth-hero::before, .wk-auth-hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.wk-auth-hero::before { width: 380px; height: 380px; right: -120px; top: -120px; }
.wk-auth-hero::after { width: 260px; height: 260px; left: -90px; bottom: -110px; }
.wk-auth-hero .brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.15rem; position: relative; z-index: 1; }
.wk-auth-hero .headline { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 2rem 0 .8rem; max-width: 28rem; position: relative; z-index: 1; }
.wk-auth-hero .lead { opacity: .85; max-width: 26rem; font-size: 1rem; position: relative; z-index: 1; }
.wk-auth-hero .features { list-style: none; padding: 0; margin: 2rem 0 0; display: none; position: relative; z-index: 1; }
@media (min-width: 992px) {
    .wk-auth-hero { padding: 3rem 3.5rem; display: flex; flex-direction: column; justify-content: center; }
    .wk-auth-hero .features { display: block; }
}
.wk-auth-hero .features li { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; font-weight: 600; }
.wk-auth-hero .features i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.wk-auth-panel { display: flex; align-items: flex-start; justify-content: center; padding: 0 1rem 2rem; margin-top: -3rem; position: relative; z-index: 2; }
@media (min-width: 992px) { .wk-auth-panel { align-items: center; margin-top: 0; padding: 2rem; } }
.wk-auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--wk-border); border-radius: 24px; box-shadow: var(--wk-shadow-lg); padding: 1.75rem 1.5rem; }
.wk-auth-card h1 { font-size: 1.45rem; margin-bottom: .3rem; }
.wk-auth-card .sub { color: var(--wk-muted); margin-bottom: 1.4rem; font-size: .92rem; }
.wk-lang { display: flex; justify-content: center; gap: .4rem; margin-top: 1.2rem; }
.wk-lang button { border: 1px solid var(--wk-border-strong); background: #fff; border-radius: 999px; padding: .3rem .85rem; font-size: .8rem; font-weight: 700; color: var(--wk-ink-2); }
.wk-lang button.on { background: var(--wk-primary); border-color: var(--wk-primary); color: #fff; }
.wk-otp { letter-spacing: .5em; text-align: center; font-size: 1.6rem !important; font-weight: 800; }

/* ---------- Print ---------- */
@media print {
    .main-header, .main-sidebar, .main-footer, .no-print, .wk-bottom-nav { display: none !important; }
    .content-wrapper { margin-left: 0 !important; background: #fff !important; padding-bottom: 0 !important; }
    .card, .wk-stat, .wk-tile { box-shadow: none !important; }
    body { background: #fff; }
}
.min-w-0 { min-width: 0; }

/* ---------- Phone refinements ---------- */
@media (max-width: 767.98px) {
    /* The top bar already shows the page title. */
    .content-header h1 { display: none; }
    .content-header:not(:has(.wk-subtitle)):not(:has(.no-print > *)) { padding: .25rem 0 0; }
    .wk-hero .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
    .wk-hero .stat { padding: .5rem .55rem; border-radius: 12px; }
    .wk-hero .stat .k { font-size: .66rem; line-height: 1.2; min-height: 1.6em; }
    .wk-hero .stat .v { font-size: .92rem; }
}
@media (max-width: 575.98px) {
    .wk-stat { flex-direction: column; align-items: flex-start; gap: .55rem; padding: .9rem; }
    .wk-stat .wk-icon-tile { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; font-size: .95rem; }
    .wk-stat .v { font-size: 1.08rem; }
    .wk-stat .k { font-size: .74rem; line-height: 1.25; }
}

/* Pool banner on money forms */
.wk-pool-banner { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: 14px;
    background: linear-gradient(135deg, var(--wk-primary-50), #fff); border: 1px solid var(--wk-primary-100); color: var(--wk-primary-700); font-weight: 600; font-size: .88rem; }
.wk-pool-banner strong { font-size: 1.15rem; font-weight: 800; color: var(--wk-ink); }

/* Receipt / screenshot upload box */
.wk-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; cursor: pointer;
    border: 2px dashed var(--wk-border-strong); border-radius: 16px; padding: 1.1rem 1rem; background: #fafbfd; color: var(--wk-muted); transition: border-color .15s, background .15s; }
.wk-upload:hover { border-color: var(--wk-primary); background: var(--wk-primary-50); }
.wk-upload i { font-size: 1.4rem; color: var(--wk-primary); }
.wk-upload .wk-upload-text { font-weight: 700; color: var(--wk-ink-2); word-break: break-all; }
.wk-upload small { font-size: .74rem; }
.wk-upload.has-file { border-style: solid; border-color: var(--wk-primary); background: var(--wk-primary-50); }
.wk-upload.is-invalid { border-color: #ef4444; }

/* Daily closing: banknote grid + running total */
.wk-denoms { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-bottom: 1rem; }
@media (min-width: 576px) { .wk-denoms { grid-template-columns: repeat(4, 1fr); } }
.wk-denom { display: flex; align-items: center; border: 1px solid var(--wk-border-strong); border-radius: 12px; overflow: hidden; margin: 0; background: #fff; }
.wk-denom span { background: var(--wk-neutral-bg); font-weight: 800; font-size: .82rem; color: var(--wk-ink-2); padding: .55rem .6rem; min-width: 4.4rem; text-align: center; }
.wk-denom .form-control { border: 0; border-radius: 0; height: 2.4rem; text-align: right; font-weight: 700; box-shadow: none !important; }
.wk-sticky-sum { position: sticky; top: 68px; z-index: 20; display: flex; justify-content: space-between; align-items: center; margin: -.25rem 0 1rem;
    background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: .6rem 1rem; box-shadow: var(--wk-shadow-lg); font-weight: 600; font-size: .86rem; }
.wk-sticky-sum strong { font-size: 1.05rem; font-weight: 800; color: #fff; }
.wk-sticky-sum .text-negative { color: #fca5a5 !important; }
.wk-sticky-sum .text-positive { color: #86efac !important; }
.wk-ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; font-size: .9rem; }
.wk-list .badge { margin-top: .2rem; }

/* Incoming funding card */
.wk-incoming { border-color: #fde68a; }
.wk-incoming-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #fef3c7;
    background: linear-gradient(135deg, #fffbeb, #fff); border-radius: var(--wk-radius) var(--wk-radius) 0 0; }
.wk-incoming-head .amount { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.wk-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.wk-chips span { display: inline-flex; align-items: center; gap: .35rem; background: var(--wk-neutral-bg); border-radius: 999px; padding: .28rem .7rem; font-size: .78rem; font-weight: 600; color: var(--wk-ink-2); }
.wk-chips i { color: var(--wk-faint); font-size: .72rem; }
@media (max-width: 575.98px) {
    .wk-incoming-head { flex-wrap: wrap; }
    .wk-incoming-head .amount { margin-left: 0 !important; width: 100%; font-size: 1.6rem; padding-left: calc(40px + .75rem); }
}

/* Top bar on narrow phones: the title shrinks, the pool pill and avatar stay visible. */
.wk-topbar > .navbar-nav:first-child { min-width: 0; flex: 1 1 auto; }
.wk-topbar > .navbar-nav:first-child .nav-item:last-child { min-width: 0; }
.wk-topbar-title { max-width: 100%; }
.wk-topbar > .navbar-nav.ml-auto { flex: 0 0 auto; }
@media (max-width: 420px) {
    .wk-pool-pill { font-size: .78rem; padding: .25rem .55rem !important; gap: .3rem; margin-right: .15rem; }
    .wk-pool-pill i { display: none; }
    .wk-topbar .nav-link { padding-left: .4rem; padding-right: .4rem; }
    .wk-topbar-title { font-size: .95rem; }
}

/* Ellipsis inside feed titles */
.wk-feed .t a { display: block; overflow: hidden; text-overflow: ellipsis; }

/* Tiles never overflow on phones */
.wk-tile { min-width: 0; }
.wk-tile .v { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .wk-tile { padding: .7rem .75rem; }
    .wk-tile .v { font-size: 1rem; }
    .wk-tile .k { font-size: .66rem; }
}
