/* NeuraRobot · DEV CONTROL visual system */
:root,
[data-theme="light"],
[data-theme="dark"] {
    --bg: #06111a;
    --panel: #0b1924;
    --panel-soft: #0e202d;
    --panel-tint: #102633;
    --line: #213746;
    --line-strong: #31586d;
    --text: #f3f7fa;
    --muted: #86a3b6;
    --brand: #32d7ff;
    --brand-dark: #5be3ff;
    --brand-ink: #07131c;
    --accent: #358cff;
    --accent-2: #ffbd55;
    --success: #45e0a4;
    --danger: #ff6678;
    --blue: #3b91ff;
    --amber: #ffbd55;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 10px 26px rgba(0, 0, 0, .18);
    --shadow-md: 0 18px 45px rgba(0, 0, 0, .3);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .42);
    --focus-ring: 0 0 0 3px rgba(50, 215, 255, .15);
    --scrollbar-track: #07131c;
    --scrollbar-thumb: #284353;
    --scrollbar-thumb-hover: #3a6176;
    color-scheme: dark !important;
}

html { background: var(--bg); }

/* Native selects must stay inside the dark product visual system on Windows too. */
select {
    color-scheme: dark !important;
}
select:not([multiple]) {
    appearance: none;
    padding-right: 38px !important;
    background-image:
        linear-gradient(45deg, transparent 50%, #78a9ba 50%),
        linear-gradient(135deg, #78a9ba 50%, transparent 50%) !important;
    background-position:
        calc(100% - 17px) 50%,
        calc(100% - 12px) 50% !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
}
select option,
select optgroup {
    background-color: #071923 !important;
    color: #eaf7fa !important;
}
select option:checked {
    background: linear-gradient(#155568, #155568) !important;
    color: #ffffff !important;
}
select option:disabled {
    color: #587785 !important;
}

body,
[data-theme="dark"] body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% -8%, rgba(37, 104, 139, .23), transparent 31%),
        var(--bg);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .16;
    background-image: linear-gradient(rgba(66, 214, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(66, 214, 255, .025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a { color: var(--brand); }
small { color: var(--muted); }

.shell { grid-template-columns: 270px minmax(0, 1fr); }
.shell.sidebar-collapsed,
.sidebar-collapsed-init .shell { grid-template-columns: 78px minmax(0, 1fr); }

.sidebar,
[data-theme="dark"] .sidebar {
    padding: 24px 18px 18px;
    border-right: 1px solid var(--line);
    background: rgba(5, 16, 25, .96);
    box-shadow: none;
}

.sidebar-top { margin-bottom: 28px; }
.brand { gap: 13px; }
.brand-mark,
[data-theme="dark"] .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 0;
    clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
    background: linear-gradient(145deg, var(--brand), var(--accent));
    color: #03131d;
    font-size: 14px;
    font-weight: 950;
    box-shadow: 0 0 34px rgba(50, 215, 255, .2);
}
.brand-text { display: grid; gap: 2px; }
.brand-text b { font-size: 14px; letter-spacing: .08em; }
.brand small { margin: 0; color: #62869c; font-size: 9px; letter-spacing: .14em; }
.sidebar-toggle { border-color: var(--line); background: #0b1b26; color: var(--muted); box-shadow: none; }

.nav { gap: 6px; }
.nav a,
.logout-form button,
.theme-form button {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #8daabd;
    font-weight: 540;
}
.nav a:hover {
    border-color: rgba(57, 109, 136, .35);
    background: #0d202d;
    color: #edfaff;
    text-decoration: none;
    transform: none;
}
.nav a.is-current,
[data-theme="dark"] .nav a.is-current {
    border-color: transparent;
    border-left-color: var(--brand);
    background: linear-gradient(90deg, #153143, #0e202d);
    color: #fff;
    box-shadow: inset 2px 0 var(--brand);
}
.nav-icon { color: #7ddff2; }
.nav-badge { background: #153d54; color: var(--brand); }
.sidebar-bottom { border-color: var(--line); }
.service-version-link { color: #527486; font-size: 10px; letter-spacing: .1em; }

.main { padding: 0 38px 60px; }
.topbar {
    width: auto;
    max-width: none;
    min-height: 88px;
    margin: 0 -38px 34px;
    padding: 0 38px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 17, 26, .82);
    backdrop-filter: blur(18px);
}
.topbar-title,
.identity {
    align-self: center;
}
.topbar-title::before {
    content: "NEURAROBOT CONTROL";
    display: block;
    margin-bottom: 2px;
    color: var(--brand);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
}
.topbar h1 { color: #f7fbfd; font-size: 23px; letter-spacing: -.025em; }
.topbar p { margin-top: 3px; color: #6f8da0; font-size: 12px; }
.identity-user,
.notification-trigger,
.topbar-logout-form button,
[data-theme="dark"] .identity-user,
[data-theme="dark"] .notification-trigger,
[data-theme="dark"] .topbar-logout-form button {
    border-color: var(--line);
    background: #0c1d29;
    box-shadow: none;
}
.identity-avatar { border-radius: 10px; background: #153b52; color: var(--brand); }

.panel,
.mini-card,
.stat,
.metrics article,
[data-theme="dark"] .panel,
[data-theme="dark"] .list-card,
[data-theme="dark"] .task-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(14, 31, 43, .98), rgba(9, 23, 33, .98));
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.panel { padding: 22px; margin-bottom: 20px; }
.panel h2 { color: #f5f9fc; font-size: 20px; letter-spacing: -.025em; }
.panel-head { border-color: var(--line); }
.panel-head > span,
.panel-head > a { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .06em; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.metrics article { position: relative; min-height: 136px; padding: 20px; overflow: hidden; }
.metrics article::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #133348;
    box-shadow: inset 0 0 0 1px #1e4d65;
}
.metrics article small { color: #83a9bd; font-size: 12px; }
.metrics article strong { color: #fff; font-size: clamp(23px, 2.3vw, 32px); letter-spacing: -.035em; }
.metrics article span { color: #76a5bd; }

.list-row { border-color: var(--line); background: rgba(7, 19, 28, .55); }
.empty { border-color: #254254; color: #7999ad; background: rgba(6, 20, 29, .35); }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-actions a { display: flex; min-height: 52px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #0d202c; color: #cfe4ed; }
.quick-actions a:hover { border-color: var(--brand); background: #113044; color: #fff; text-decoration: none; }

button,
.btn,
.btn.create-action {
    border-color: transparent;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #03131d;
    font-weight: 850;
    box-shadow: 0 10px 25px rgba(40, 159, 236, .16);
}
button:hover,
.btn:hover,
.btn.create-action:hover {
    border-color: #3c7080;
    background: linear-gradient(135deg, #173d49, #102f3b);
    color: #f4fcff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
.btn.secondary,
[data-theme="dark"] .btn.secondary,
.btn.secondary.icon-btn,
[data-theme="dark"] .btn.secondary.icon-btn {
    border-color: var(--line-strong);
    background: #102633;
    color: #d7ebf3;
    box-shadow: none;
}
.btn.secondary:hover { border-color: #3e7a96; background: #153243; color: #fff; }

input,
select,
textarea,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    border-color: var(--line);
    border-radius: 11px;
    background: #071821;
    color: var(--text);
}
input::placeholder,
textarea::placeholder { color: #547283; }
input:hover,
select:hover,
textarea:hover { border-color: #34566a; }

.table-wrap,
[data-theme="dark"] .table-wrap { border-color: var(--line); background: #091923; }
th,
[data-theme="dark"] th { background: #0e222f; color: #8fb1c3; }
td { border-color: var(--line); }
tbody tr:hover,
[data-theme="dark"] tbody tr:hover { background: #102633; }

.nr-command-hero {
    position: relative;
    display: flex;
    min-height: 310px;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 20px;
    overflow: hidden;
    padding: 42px 48px;
    border: 1px solid #29495c;
    border-radius: 20px;
    background: radial-gradient(circle at 78% 48%, rgba(34, 102, 135, .35), transparent 25%), linear-gradient(120deg, #102838, #0b1924 60%, #102331);
    box-shadow: var(--shadow-md);
}
.nr-command-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(90deg, #000, transparent 76%);
}
.nr-command-copy { position: relative; z-index: 2; max-width: 690px; }
.nr-eyebrow { color: var(--brand); font-size: 10px; font-weight: 950; letter-spacing: .2em; }
.nr-command-copy h2 { margin: 13px 0 18px; color: #f6f9fb; font-size: clamp(36px, 4.3vw, 58px); line-height: 1.03; letter-spacing: -.055em; }
.nr-command-copy h2 em { color: var(--brand); font-style: normal; }
.nr-command-copy p { max-width: 590px; margin: 0; color: #9ab1bf; font-size: 16px; line-height: 1.65; }
.nr-hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 27px; }
.nr-text-link { color: #9dd8e8; font-size: 12px; font-weight: 800; }
.nr-orbit { position: relative; display: grid; flex: 0 0 300px; height: 240px; place-items: center; }
.nr-orbit > i { position: absolute; inset: 20px 35px; border: 1px solid rgba(50, 215, 255, .22); border-radius: 50%; }
.nr-orbit > i:nth-child(2) { inset: 43px 9px; transform: rotate(17deg); }
.nr-orbit > i:nth-child(3) { inset: 12px 67px; transform: rotate(-18deg); }
.nr-orbit-core { z-index: 2; display: grid; width: 78px; height: 78px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--brand), var(--accent)); color: #03131d; font-size: 22px; font-weight: 950; box-shadow: 0 0 50px rgba(50, 215, 255, .35); }
.nr-node { position: absolute; z-index: 3; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #31586d; border-radius: 13px; background: #112c3b; color: var(--brand); font-size: 13px; }
.nr-node-finance { left: 26px; top: 45px; }
.nr-node-shopping { right: 24px; bottom: 39px; }
.nr-node-ai { right: 36px; top: 29px; color: var(--success); }

.shopping-hero,
.shopping-detail-head,
.shopping-add-item,
.shopping-item,
.shopping-empty,
.shopping-list-card {
    border-color: var(--line);
    border-radius: 15px;
    background: linear-gradient(145deg, #0e202d, #091923);
    box-shadow: var(--shadow-sm);
}
.shopping-hero { border-radius: 20px; background: radial-gradient(circle at 86% 20%, rgba(50, 215, 255, .17), transparent 30%), linear-gradient(130deg, #102838, #0a1924 68%); }
.shopping-eyebrow { border-color: #285469; background: #0e2a38; color: var(--brand); letter-spacing: .08em; text-transform: uppercase; }
.shopping-create-form { border-color: var(--line); border-radius: 13px; background: #091a24; }
.shopping-list-card { color: var(--text); }
.shopping-list-card::before { width: 3px; background: linear-gradient(var(--brand), var(--accent)); }
.shopping-list-card:hover,
.shopping-item:hover { border-color: #39718a; box-shadow: var(--shadow-md); }
.shopping-progress { background: #172b37; }
.shopping-progress i { background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* Finance control · debts v1 */
.finance-control { display: grid; gap: 22px; }
.finance-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); align-items: center; gap: 32px; min-height: 285px; overflow: hidden; padding: 38px 44px; border: 1px solid #29495c; border-radius: 20px; background: radial-gradient(circle at 80% 45%,rgba(34,120,153,.35),transparent 28%),linear-gradient(125deg,#102a3a,#091923 66%,#102632); box-shadow: var(--shadow-md); }
.finance-hero::before { content:""; position:absolute; inset:0; background-image:linear-gradient(#ffffff06 1px,transparent 1px),linear-gradient(90deg,#ffffff06 1px,transparent 1px); background-size:32px 32px; mask-image:linear-gradient(90deg,#000,transparent 72%); }
.finance-hero>div { position:relative; z-index:1; }
.finance-hero h2 { margin:12px 0 15px; font-size:clamp(38px,4.5vw,58px); line-height:1.02; letter-spacing:-.055em; }
.finance-hero h2 em { color:var(--brand); font-style:normal; }
.finance-hero p { max-width:680px; margin:0 0 24px; color:#98b0bd; line-height:1.65; }
.finance-hero-balance { display:grid; min-height:170px; align-content:center; padding:26px; overflow:hidden; border:1px solid #326077; border-radius:18px; background:rgba(8,27,38,.72); }
.finance-hero-balance span { color:#87aabd; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }
.finance-hero-balance strong { margin:8px 0 2px; font-size:34px; letter-spacing:-.04em; }
.finance-hero-balance i { position:absolute; right:-38px; bottom:-55px; width:150px; height:150px; border:1px solid #32d7ff36; border-radius:50%; box-shadow:0 0 55px #32d7ff18 inset; }
.finance-tabs { display:flex; gap:8px; overflow:auto; padding:6px; border:1px solid var(--line); border-radius:14px; background:#081821; }
.finance-tabs button { flex:0 0 auto; min-width:145px; border:1px solid transparent; background:transparent; color:#799bae; box-shadow:none; }
.finance-tabs button:hover { transform:none; border-color:#28485a; background:#0f2633; color:#dff7ff; box-shadow:none; }
.finance-tabs button.is-active { border-color:#316075; background:linear-gradient(145deg,#153849,#102835); color:#fff; box-shadow:inset 0 -2px var(--brand); }
.finance-tabs i { color:var(--brand); }
.finance-view { display:none; }
.finance-view.is-active { display:grid; gap:20px; }
.debt-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.debt-summary { position:relative; display:grid; min-height:130px; align-content:center; overflow:hidden; padding:20px; border:1px solid var(--line); border-radius:15px; background:linear-gradient(145deg,#0e202d,#091923); }
.debt-summary::after { content:""; position:absolute; right:18px; top:18px; width:30px; height:30px; border-radius:9px; background:#14354a; box-shadow:inset 0 0 0 1px #25536b; }
.debt-summary>span { color:#83a6b9; font-size:12px; }
.debt-summary strong { margin:8px 0 1px; color:#fff; font-size:27px; letter-spacing:-.035em; }
.debt-summary small { font-size:10px; }
.debt-summary-out strong { color:#ffcf7a; }.debt-summary-in strong { color:var(--success); }.debt-summary-alert strong { color:var(--danger); }
.debt-create-panel { display:grid; gap:20px; padding:25px; border:1px solid #32647b; border-radius:18px; background:linear-gradient(145deg,#102b39,#0a1c27); box-shadow:var(--shadow-md); }
.debt-form-head,.debt-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.debt-form-head h3,.debt-toolbar h3 { margin:4px 0 0; font-size:24px; }
.debt-form-close,.debt-more { width:36px; min-height:36px; padding:0; border:1px solid var(--line); background:#0b1c27; color:#8da8b7; box-shadow:none; font-size:21px; }
.debt-direction-picker { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.debt-direction-picker input { position:absolute; opacity:0; }
.debt-direction-picker label>span { display:grid; grid-template-columns:43px 1fr; gap:2px 12px; padding:15px; border:1px solid var(--line); border-radius:13px; background:#091a24; cursor:pointer; }
.debt-direction-picker i { grid-row:1/3; display:grid; width:43px; height:43px; place-items:center; border-radius:11px; background:#143548; color:var(--brand); font-size:20px; font-style:normal; }
.debt-direction-picker b { align-self:end; }.debt-direction-picker small { font-size:10px; }
.debt-direction-picker input:checked+span { border-color:var(--brand); background:#102c3a; box-shadow:0 0 0 3px #32d7ff0c; }
.debt-form-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:14px; }
.debt-form-grid label,.debt-payment-form label { display:grid; gap:7px; color:#9ab7c7; font-size:11px; font-weight:800; }
.debt-field-wide { grid-column:span 2; }.debt-money-input { position:relative; }.debt-money-input input { padding-right:36px; }.debt-money-input b { position:absolute; right:13px; top:11px; color:var(--brand); }
.counterparty-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:end; }.counterparty-picker label { min-width:0; }.counterparty-picker>button { display:grid; min-width:72px; min-height:42px; place-items:center; gap:2px; padding:6px 10px; border:1px solid #32647a; background:#102d3b; color:var(--brand); box-shadow:none; font-size:9px; }.counterparty-picker>button i { font-size:12px; }
.debt-create-panel footer { display:flex; align-items:center; justify-content:flex-end; gap:18px; }.debt-create-panel footer>span { color:var(--danger); }
.debt-toolbar { margin-top:5px; }
.debt-filters { display:flex; gap:6px; }.debt-filters button { min-height:34px; padding:7px 12px; border:1px solid var(--line); border-radius:20px; background:#0b1d28; color:#7697aa; box-shadow:none; font-size:11px; }.debt-filters button.is-active { border-color:var(--brand); background:var(--brand); color:#03131d; }
.debt-list { display:grid; gap:12px; }
.debt-card { position:relative; display:flex; min-width:0; flex-direction:column; gap:14px; overflow:hidden; padding:16px; border:1px solid #203d4c; border-radius:18px; background:linear-gradient(155deg,#102936 0%,#0a1d28 52%,#071720 100%); box-shadow:0 12px 26px rgba(0,0,0,.18); transition:.16s; }
.debt-card::before { position:absolute; inset:0 0 auto; height:3px; content:""; background:linear-gradient(90deg,var(--brand),transparent 82%); opacity:.78; }.debt-card[data-direction="i_owe"]::before { background:linear-gradient(90deg,var(--amber),transparent 82%); }.debt-card:hover { border-color:#37677e; transform:translateY(-1px); box-shadow:var(--shadow-sm); }.debt-card.is-overdue { border-color:#683744; box-shadow:0 12px 30px rgba(58,11,22,.22); }.debt-card.is-overdue::before { background:linear-gradient(90deg,var(--danger),#ffbd55 55%,transparent); opacity:1; }.debt-card.is-paid { opacity:.72; }
.debt-card-head { display:flex; align-items:center; gap:11px; min-width:0; }.debt-card-icon { display:grid; width:46px; height:46px; flex:0 0 46px; place-items:center; border:1px solid #2b5c71; border-radius:14px; background:linear-gradient(145deg,#17445a,#102d3d); color:var(--brand); box-shadow:inset 0 1px rgba(255,255,255,.06); font-size:17px; font-weight:900; }.debt-card[data-direction="i_owe"] .debt-card-icon { border-color:#66502b; background:linear-gradient(145deg,#44351d,#292716); color:#ffd17d; }
.debt-card-identity { display:grid; min-width:0; gap:5px; }.debt-card-kicker { display:flex; flex-wrap:wrap; gap:6px; }.debt-card-kicker span { padding:4px 8px; border-radius:20px; font-size:8px; font-weight:900; line-height:1; letter-spacing:.06em; text-transform:uppercase; }
.debt-direction.i_owe { background:#ffbd5518; color:#ffca70; }.debt-direction.owed_to_me { background:#45e0a418; color:var(--success); }.debt-overdue { background:#ff667718; color:var(--danger); }.debt-paid { background:#45e0a418; color:var(--success); }
.debt-card h4 { overflow:hidden; margin:0; color:#f5fbfd; font-size:17px; text-overflow:ellipsis; white-space:nowrap; }.debt-card-main { display:grid; min-width:0; gap:10px; }.debt-card-purpose { min-height:32px; margin:0; overflow:hidden; color:#91adbb; font-size:12px; line-height:1.4; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.debt-card-side { display:grid; grid-template-columns:1fr auto; align-items:end; gap:2px 9px; padding:12px 13px; border:1px solid #1e4050; border-radius:14px; background:linear-gradient(145deg,rgba(18,53,69,.82),rgba(9,31,42,.9)); text-align:left; }.debt-card-side span { align-self:center; color:#7192a4; font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.09em; }.debt-card-side strong { grid-row:2; color:#f7fcfe; font-size:25px; line-height:1; letter-spacing:-.035em; }.debt-card-side small { grid-column:2; grid-row:1/3; display:inline-flex; align-items:center; align-self:center; gap:5px; padding:6px 8px; border-radius:10px; background:#071923; color:#9ab5c3; font-size:9px; white-space:nowrap; }.debt-card-side small i { color:var(--brand); }.debt-card-side small.is-urgent { background:#ff667714; color:#ff8793; }.debt-card-side small.is-urgent i { color:var(--danger); }
.debt-progress-meta { display:flex; justify-content:space-between; gap:10px; color:#7899aa; font-size:9px; }.debt-progress-meta b { color:#b7d3df; }.debt-progress { height:6px; overflow:hidden; border-radius:10px; background:#172f3b; box-shadow:inset 0 1px 2px rgba(0,0,0,.35); }.debt-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand),var(--success)); box-shadow:0 0 9px rgba(50,215,255,.28); }.debt-card[data-direction="i_owe"] .debt-progress i { background:linear-gradient(90deg,#ffb84d,#ffe09a); box-shadow:0 0 9px rgba(255,184,77,.25); }
.debt-card-actions { display:grid; grid-template-columns:minmax(0,1fr) 40px 40px; gap:7px; }.debt-card-actions>button { min-width:0; min-height:40px; padding:0; border:1px solid #2d596d; border-radius:11px; background:#102f3e; color:var(--brand); box-shadow:none; font-size:10px; }.debt-card-actions>button:hover { transform:none; background:#163d4e; }.debt-card-actions .debt-pay { display:flex; align-items:center; justify-content:center; gap:8px; padding:8px 12px; font-weight:900; }.debt-card-actions .debt-edit { width:auto; min-height:40px; }.debt-card-actions .debt-more { width:auto; min-height:40px; border-color:#49323a; background:#241820; color:#d7838d; font-size:13px; }.debt-card.is-paid .debt-card-actions { grid-template-columns:1fr 1fr; }
.debt-payment-form { width:100%; display:grid; grid-template-columns:1fr 1fr 1.5fr auto; gap:10px; align-items:end; padding:14px; border:1px solid #2d5366; border-radius:12px; background:#071821; }.debt-payment-form[hidden]{display:none}.debt-payment-form button { min-height:40px; }
.debt-empty { display:grid; min-height:240px; place-items:center; align-content:center; gap:8px; padding:30px; border:1px dashed #2b4c5e; border-radius:16px; color:#7897a8; text-align:center; }.debt-empty>span { display:grid; width:54px; height:54px; place-items:center; border:1px solid #31586c; border-radius:15px; background:#102d3c; color:var(--brand); font-size:23px; font-weight:900; }.debt-empty h3,.debt-empty p { margin:0; }.debt-empty h3 { color:#eaf7fb; }
.finance-section-head { padding:24px 0 5px; }.finance-section-head h2 { margin:5px 0; font-size:34px; }.finance-section-head p { margin:0; color:var(--muted); }
.finance-timeline { display:grid; gap:10px; }.finance-date-row { display:grid; grid-template-columns:62px 12px 1fr auto; align-items:center; gap:13px; padding:16px 19px; border:1px solid var(--line); border-radius:14px; background:#0b1d28; }.finance-date-row time { display:grid; text-align:center; }.finance-date-row time b { color:#fff; font-size:22px; }.finance-date-row time span { color:#7495a7; font-size:9px; }.finance-date-row>i { width:9px; height:9px; border-radius:50%; background:var(--brand); box-shadow:0 0 12px #32d7ff99; }.finance-date-row>div { display:grid; }.finance-date-row>div small { color:var(--brand); font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }.finance-date-row.is-overdue { border-color:#6a3340; }.finance-date-row.is-overdue>i { background:var(--danger); box-shadow:0 0 12px #ff667799; }
.counterparty-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; }.counterparty-heading>div { min-width:0; }.counterparty-heading>button { flex:0 0 auto; }
.counterparty-create-panel { display:grid; gap:18px; margin-bottom:18px; padding:22px; border:1px solid #315b70; border-radius:17px; background:linear-gradient(145deg,#0e2633,#081923); box-shadow:var(--shadow-sm); }.counterparty-create-panel[hidden] { display:none; }.counterparty-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }.counterparty-form-grid label { display:grid; gap:7px; color:#89a7b7; font-size:10px; font-weight:800; }.counterparty-form-grid input,.counterparty-form-grid select,.counterparty-form-grid textarea { width:100%; }.counterparty-field-wide { grid-column:span 2; }.counterparty-create-panel footer { display:flex; align-items:center; justify-content:flex-end; gap:18px; }.counterparty-create-panel footer>span { color:var(--danger); }
.counterparty-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.counterparty-grid article { display:flex; gap:13px; align-items:center; padding:18px; border:1px solid var(--line); border-radius:14px; background:#0b1d28; }.counterparty-grid article>span { display:grid; width:45px; height:45px; flex:0 0 auto; place-items:center; border-radius:12px; background:#143649; color:var(--brand); font-weight:900; }.counterparty-grid article>div { display:grid; min-width:0; }.counterparty-grid strong,.counterparty-grid p { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.counterparty-grid small { color:#6f91a4; font-size:9px; text-transform:uppercase; }.counterparty-grid p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.finance-speed-dial,.finance-toast { display:none; }
.debt-workspace { display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px; align-items:start; }
.debt-control-rail { position:sticky; top:108px; display:grid; gap:12px; }
.debt-mobile-filter-toggle { display:none; }
.debt-rail-create { display:flex; justify-content:flex-start; gap:12px; min-height:64px; padding:12px; text-align:left; }
.debt-rail-create>i { display:grid; width:38px; height:38px; flex:0 0 auto; place-items:center; border-radius:10px; background:#07192355; }
.debt-rail-create>span { display:grid; }.debt-rail-create small { color:#164157; font-size:9px; }
.debt-rail-section { padding:15px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(145deg,#0d202c,#091923); }
.debt-rail-label { display:block; margin-bottom:10px; color:#66899c; font-size:9px; font-weight:900; letter-spacing:.11em; text-transform:uppercase; }
.debt-rail-filters { display:grid; gap:4px; }
.debt-rail-filters button { display:grid; grid-template-columns:8px 1fr auto; gap:9px; justify-content:start; min-height:38px; padding:8px 9px; border:1px solid transparent; background:transparent; color:#8ca9b9; box-shadow:none; text-align:left; }
.debt-rail-filters button:hover { transform:none; border-color:#27495a; background:#102734; color:#fff; box-shadow:none; }
.debt-rail-filters button.is-active { border-color:#30647a; background:#123242; color:#fff; }
.debt-rail-filters button>i { width:7px; height:7px; border-radius:50%; background:#35505f; }.debt-rail-filters button.is-active>i { background:var(--brand); box-shadow:0 0 10px var(--brand); }.debt-rail-filters button>b { color:var(--brand); font-size:11px; }
.debt-rail-calendar { position:relative; overflow:hidden; }.debt-rail-calendar time { display:flex; align-items:baseline; gap:7px; }.debt-rail-calendar time b { color:#fff; font-size:30px; }.debt-rail-calendar time span { color:var(--brand); font-size:10px; }.debt-rail-calendar p { margin:5px 0 1px; color:#e9f7fb; font-weight:800; }.debt-rail-calendar>small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.debt-rail-calendar>button { min-height:32px; margin-top:13px; padding:5px 0; border:0; background:transparent; color:var(--brand); box-shadow:none; font-size:10px; }
.debt-stream { display:grid; min-width:0; gap:18px; }
.debt-layout-switch { display:flex; gap:5px; }.debt-layout-switch button { width:38px; min-height:36px; padding:0; border:1px solid var(--line); background:#0a1c26; color:#7597a9; box-shadow:none; }.debt-layout-switch button.is-active { border-color:#387189; background:#123443; color:var(--brand); }
.debt-list { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; }
.debt-list.is-list { grid-template-columns:1fr; }.debt-list.is-list .debt-card { display:grid; grid-template-columns:minmax(220px,.75fr) minmax(300px,1.25fr) minmax(190px,.55fr); align-items:center; }.debt-list.is-list .debt-card-head { align-self:start; }.debt-list.is-list .debt-card-purpose { min-height:0; }.debt-list.is-list .debt-payment-form,.debt-list.is-list .debt-edit-form { grid-column:1/-1; }
.debt-edit { width:36px; min-height:36px; padding:0; border:1px solid var(--line); background:#0b1c27; color:#82a7b9; box-shadow:none; }
.debt-edit-form { width:100%; display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr; gap:10px; align-items:end; padding:14px; border:1px solid #35647a; border-radius:12px; background:#071821; }.debt-edit-form[hidden]{display:none}.debt-edit-form label { display:grid; gap:6px; color:#9ab7c7; font-size:10px; font-weight:800; }.debt-edit-note { grid-column:span 3; }
.finance-calendar-workspace { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(310px,.65fr); gap:18px; align-items:start; }
.calendar-board,.calendar-agenda { border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,#0d202c,#081923); box-shadow:var(--shadow-sm); }
.calendar-board { overflow:hidden; }.calendar-board>header { display:grid; grid-template-columns:42px 1fr 42px; align-items:center; gap:12px; padding:19px 22px; border-bottom:1px solid var(--line); }.calendar-board>header div { text-align:center; }.calendar-board>header h3 { margin:3px 0 0; font-size:24px; text-transform:capitalize; }.calendar-board>header button { min-height:38px; padding:0; border:1px solid var(--line); background:#102733; color:var(--brand); box-shadow:none; font-size:24px; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }.calendar-weekdays { padding:0 10px; border-bottom:1px solid var(--line); }.calendar-weekdays span { padding:11px 4px; color:#66899b; font-size:9px; font-weight:900; text-align:center; text-transform:uppercase; }
.calendar-grid { padding:10px; }.calendar-day { position:relative; min-height:94px; padding:8px; border-right:1px solid #1b303c; border-bottom:1px solid #1b303c; background:#091a24; }.calendar-day:nth-child(7n){border-right:0}.calendar-day.is-empty { opacity:.3; }.calendar-day>span { display:grid; width:25px; height:25px; place-items:center; border-radius:8px; color:#8ca8b7; font-size:11px; font-weight:800; }.calendar-day.is-today>span { background:var(--brand); color:#03131d; }.calendar-day.has-events { background:#0d2330; }
.calendar-event { display:grid; grid-template-columns:5px 1fr; width:100%; min-height:28px; margin-top:4px; padding:4px 5px; border:1px solid #284b5e; border-radius:7px; background:#102e3c; color:#dff5fb; box-shadow:none; text-align:left; }.calendar-event:hover { transform:none; background:#153847; box-shadow:none; }.calendar-event i { grid-row:1/3; align-self:center; width:4px; height:17px; border-radius:4px; background:var(--brand); }.calendar-event b,.calendar-event small { overflow:hidden; font-size:7px; text-overflow:ellipsis; white-space:nowrap; }.calendar-event small { color:#7699aa; }.calendar-event.i_owe i { background:var(--amber); }.calendar-event.owed_to_me i { background:var(--success); }.calendar-event.recurring i { background:#b99cff; }.calendar-day em { display:block; margin-top:4px; color:#6d8c9d; font-size:7px; font-style:normal; }
.calendar-agenda { position:sticky; top:108px; padding:20px; }.calendar-agenda>h3 { margin:4px 0 15px; }.calendar-agenda .finance-date-row { grid-template-columns:44px 8px 1fr; padding:10px 4px; border:0; border-top:1px solid var(--line); border-radius:0; background:transparent; }.calendar-agenda .finance-date-row>b { grid-column:3; color:var(--brand); font-size:11px; }.calendar-agenda .finance-date-row time b { font-size:18px; }.calendar-agenda .finance-date-row>div strong { font-size:10px; }

.login-body,
.user-login-body {
    background: radial-gradient(circle at 28% 36%, #17394d 0, #081721 45%, #050d14 76%);
    color: var(--text);
}
.login-body::before { opacity: .45; mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.7) 58%, transparent); }
.auth-shell {
    border-color: #294858;
    border-radius: 18px;
    background: #07131c;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .48);
}
.auth-visual { background: radial-gradient(circle at 42% 42%, #173b50, #091923 48%, #050d14 78%); }
.auth-visual::after { border-color: rgba(50, 215, 255, .2); box-shadow: inset 0 0 130px rgba(50, 215, 255, .07); }
.login-mark { border-radius: 0; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); background: linear-gradient(145deg, var(--brand), var(--accent)); color: #03131d; }
.auth-visual-copy span { color: var(--brand); }
.auth-signal-grid span { border-color: #274454; border-radius: 11px; background: rgba(14, 38, 51, .72); }
.auth-card,
.login-card.auth-card {
    border-color: #294858;
    border-radius: 16px;
    background: linear-gradient(145deg, #0e202d, #091923);
    box-shadow: var(--shadow-lg);
}
.auth-card-head h1 { color: #f7fbfd; }
.auth-password-field { color: #a9c1ce; }
.auth-card input,
.auth-card textarea,
.auth-card select { border-color: var(--line); background: #061721; color: var(--text); box-shadow: none; }
.auth-card > button,
.auth-card form > button[type="submit"] { border-color: transparent; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #03131d; }

@media (max-width: 1100px) {
    .nr-orbit { flex-basis: 240px; transform: scale(.88); }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .debt-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.debt-form-grid { grid-template-columns:1fr 1fr; }.debt-workspace { grid-template-columns:250px minmax(0,1fr); }.debt-list { grid-template-columns:repeat(2,minmax(0,1fr)); }.debt-card-actions { justify-content:flex-end; }.counterparty-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.counterparty-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.finance-calendar-workspace { grid-template-columns:1fr; }.calendar-agenda { position:static; }
}
@media (max-width: 900px) {
    .main { padding: 0 20px 44px; }
    .topbar { margin-inline: -20px; padding-inline: 20px; }
    .nr-command-hero { padding: 34px; }
    .nr-orbit { display: none; }
    .grid.two, .grid.three { grid-template-columns: 1fr; }
    .finance-hero { grid-template-columns:1fr; }.finance-hero-balance { display:none; }.debt-workspace { grid-template-columns:1fr; }.debt-control-rail { position:static; grid-template-columns:1fr 1fr; }.debt-rail-create { grid-column:1/-1; }.debt-card-side { text-align:left; }.debt-payment-form { grid-column:1/-1; grid-template-columns:1fr 1fr; }.debt-payment-note { grid-column:span 2; }
}
@media (max-width: 720px) {
    .main { padding: 0 14px 34px; }
    .topbar { min-height: 72px; margin: 0 -14px 22px; padding: 0 14px; }
    .topbar-title::before, .topbar p { display: none; }
    .nr-command-hero { min-height: 330px; padding: 29px 24px; border-radius: 16px; }
    .nr-command-copy h2 { font-size: 37px; }
    .nr-command-copy p { font-size: 14px; }
    .nr-hero-actions { align-items: flex-start; flex-direction: column; gap: 14px; }
    .metrics article { min-height: 120px; padding: 16px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-actions { grid-template-columns: 1fr; }
    .finance-control { gap:14px; padding-bottom:78px; }.finance-hero { min-height:315px; padding:25px 22px; }.finance-hero h2 { font-size:37px; }.finance-hero p { font-size:13px; }.finance-tabs { position:sticky; top:76px; z-index:8; display:grid; grid-template-columns:repeat(4,1fr); gap:3px; padding:5px; backdrop-filter:blur(16px); }.finance-tabs button { min-width:0; min-height:54px; display:grid; gap:2px; padding:7px 3px; font-size:9px; }.finance-tabs button span { display:block; }.finance-tabs button i { font-size:16px; }.debt-summary-grid { gap:9px; }.debt-summary { min-height:108px; padding:14px; }.debt-summary::after { width:24px; height:24px; right:12px; top:12px; }.debt-summary strong { font-size:21px; }.debt-control-rail { grid-template-columns:1fr; }.debt-mobile-filter-toggle { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; min-height:48px; padding:10px 14px; border:1px solid var(--line); background:#0b1d28; color:#a9c2cf; text-align:left; box-shadow:none; }.debt-mobile-filter-toggle b { display:grid; width:24px; height:24px; place-items:center; border-radius:8px; background:#143649; color:var(--brand); font-size:10px; }.debt-mobile-filter-toggle.is-active { border-color:#3a7188; color:#fff; }.debt-filter-panel { display:none; }.debt-filter-panel.is-open { display:block; }.debt-rail-section { padding:13px; }.debt-rail-filters { grid-template-columns:1fr 1fr; }.debt-rail-calendar { display:none; }.debt-create-panel { padding:18px 15px; margin-inline:-2px; }.debt-form-head,.debt-toolbar { align-items:flex-start; flex-direction:column; }.debt-direction-picker,.debt-form-grid { grid-template-columns:1fr; }.debt-field-wide { grid-column:auto; }.debt-direction-picker label>span { min-height:72px; }.debt-form-grid input,.debt-form-grid select { min-height:48px; }.debt-list { grid-template-columns:1fr; }.debt-card { padding:14px; gap:11px; }.debt-card h4 { font-size:16px; }.debt-card-side strong { font-size:20px; }.debt-card-actions { grid-column:1/-1; }.debt-card-actions>button:not(.debt-more) { flex:1; min-height:44px; }.debt-more,.debt-edit { width:44px; min-height:44px; }.debt-payment-form,.debt-edit-form { grid-template-columns:1fr; }.debt-payment-form input,.debt-payment-form button,.debt-edit-form input,.debt-edit-form select,.debt-edit-form button { min-height:48px; }.debt-payment-note,.debt-edit-note { grid-column:auto; }.calendar-board>header { padding:14px; }.calendar-grid { padding:5px; }.calendar-day { min-height:53px; padding:4px; }.calendar-event { min-height:8px; height:8px; padding:0; border:0; }.calendar-event i { grid-row:auto; width:100%; height:6px; }.calendar-event b,.calendar-event small,.calendar-day em { display:none; }.calendar-agenda { padding:15px; }.finance-date-row { grid-template-columns:50px 10px 1fr; }.finance-date-row>b { grid-column:3; }.counterparty-heading { align-items:stretch; flex-direction:column; }.counterparty-heading>button { width:100%; }.counterparty-create-panel { padding:17px 14px; }.counterparty-form-grid { grid-template-columns:1fr; }.counterparty-field-wide { grid-column:auto; }.counterparty-create-panel footer { align-items:stretch; flex-direction:column; }.counterparty-create-panel footer button { width:100%; min-height:48px; }.counterparty-grid { grid-template-columns:1fr; }.finance-mobile-fab { position:fixed; right:16px; bottom:16px; z-index:25; display:flex; min-height:52px; padding:0 18px; border-radius:999px; box-shadow:0 14px 35px #0009,0 0 0 4px #32d7ff12; }.finance-mobile-fab span { font-size:20px; }
    .panel { padding: 17px; }
}

/* Finance mobile command surface */
@media (max-width: 720px) {
    body.finance-sheet-open { overflow: hidden; }
    .finance-control { gap: 11px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
    .finance-control.has-mobile-sheet::after { position: fixed; inset: 0; z-index: 40; content: ""; background: rgba(2, 10, 15, .76); backdrop-filter: blur(4px); }
    .finance-hero { min-height: 0; padding: 18px 17px; border-radius: 16px; }
    .finance-hero::before { opacity: .35; }
    .finance-hero .nr-eyebrow { font-size: 8px; }
    .finance-hero h2 { margin: 7px 0 0; font-size: 29px; line-height: 1.02; }
    .finance-hero p,.finance-hero .create-action { display: none; }

    .finance-tabs { position: fixed; inset: auto 0 0 0; z-index: 30; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0; padding: 6px 7px calc(6px + env(safe-area-inset-bottom)); border: 1px solid #284a5b; border-width: 1px 0 0; border-radius: 0; background: rgba(6, 20, 29, .96); box-shadow: 0 -12px 35px rgba(0, 0, 0, .42); backdrop-filter: blur(18px); }
    .finance-tabs button { min-height: 52px; border-radius: 12px; }
    .finance-tabs button.is-active { background: #123544; }

    .debt-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
    .debt-summary { min-height: 82px; padding: 11px 12px; border-radius: 13px; }
    .debt-summary span { font-size: 8px; }
    .debt-summary strong { margin-top: 4px; font-size: 18px; }
    .debt-summary small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
    .debt-summary::after { width: 19px; height: 19px; }

    .debt-workspace,.debt-stream { gap: 11px; }
    .debt-control-rail { display: block; }
    .debt-rail-create,.debt-rail-calendar { display: none; }
    .debt-mobile-filter-toggle { width: 100%; }
    .debt-filter-panel { margin-top: 7px; }
    .debt-rail-filters { gap: 5px; }
    .debt-rail-filters button { min-height: 42px; }
    .debt-toolbar { margin: 4px 1px 0; flex-direction: row; align-items: center; }
    .debt-toolbar h3 { margin: 2px 0 0; font-size: 19px; }
    .debt-layout-switch { display: none; }
    .debt-list,.debt-list.is-list { grid-template-columns: 1fr; gap: 12px; }
    .debt-list.is-list .debt-card,.debt-card { display:flex; grid-template-columns:none; gap:14px; padding:16px; border-radius:22px; box-shadow:0 16px 36px rgba(0,0,0,.24); }
    .debt-card::before { height:4px; }
    .debt-card-head { gap:12px; }
    .debt-card-icon { width:50px; height:50px; flex-basis:50px; border-radius:16px; font-size:18px; }
    .debt-card-identity { gap:6px; }
    .debt-card h4 { font-size:18px; }
    .debt-card-kicker span { padding:5px 8px; font-size:8px; }
    .debt-card-main { gap:11px; }
    .debt-card-purpose { min-height:0; color:#a9c0cb; font-size:13px; line-height:1.45; }
    .debt-card-side { padding:14px; border-radius:16px; }
    .debt-card-side span { font-size:8px; }
    .debt-card-side strong { font-size:28px; }
    .debt-card-side small { padding:7px 9px; font-size:10px; }
    .debt-progress-meta { font-size:10px; }
    .debt-progress { height:7px; }
    .debt-card-actions { grid-template-columns:minmax(0,1fr) 46px 46px; gap:8px; }
    .debt-card-actions>button,.debt-card-actions .debt-edit,.debt-card-actions .debt-more { min-height:48px; border-radius:14px; }
    .debt-card-actions .debt-pay { padding-inline:14px; font-size:11px; }
    .debt-card-actions .debt-pay i { font-size:13px; }
    .debt-card.is-paid .debt-card-actions { grid-template-columns:1fr 1fr; }

    .finance-section-head { padding: 11px 2px 4px; }
    .finance-section-head h2 { font-size: 27px; }
    .finance-section-head p { font-size: 12px; line-height: 1.45; }
    .counterparty-heading { gap: 12px; }
    .counterparty-heading>button { display: none; }
    .counterparty-grid { gap: 8px; }
    .counterparty-grid article { min-height: 70px; padding: 12px; }

    .debt-create-panel,.counterparty-create-panel { position: fixed; inset: auto 0 0; z-index: 45; display: grid; max-height: calc(100dvh - 18px); margin: 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; border-radius: 24px 24px 0 0; background: linear-gradient(160deg,#102b39,#071720 55%); box-shadow: 0 -28px 80px rgba(0,0,0,.72); }
    .debt-create-panel[hidden],.counterparty-create-panel[hidden] { display: none; }
    .debt-form-head { position: sticky; top: -20px; z-index: 2; margin: -2px -2px 2px; padding: 2px 2px 11px; background: linear-gradient(#102b39 82%,transparent); }
    .debt-form-head h3 { margin: 3px 0 0; font-size: 23px; }
    .debt-form-close { width: 44px; min-height: 44px; border-radius: 50%; }
    .debt-direction-picker { gap: 7px; }
    .debt-direction-picker label>span { min-height: 66px; padding: 10px; }
    .debt-form-grid,.counterparty-form-grid { gap: 10px; }
    .debt-form-grid input,.debt-form-grid select,.debt-form-grid textarea,.counterparty-form-grid input,.counterparty-form-grid select,.counterparty-form-grid textarea { min-height: 50px; font-size: 16px; }
    .counterparty-picker { grid-column: auto; grid-template-columns: minmax(0,1fr) 58px; }
    .counterparty-picker>button { min-width: 58px; min-height: 50px; border-radius: 12px; }
    .counterparty-picker>button span { display: none; }
    .debt-create-panel footer,.counterparty-create-panel footer { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); z-index: 2; margin: 2px -2px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 2px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent,#071720 18%); }
    .debt-create-panel footer button,.counterparty-create-panel footer button { width: 100%; min-height: 52px; }

    .finance-speed-dial { position: fixed; right: 15px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 38; display: flex; width: max-content; align-items: flex-end; flex-direction: column; gap: 10px; pointer-events: none; }
    .finance-speed-trigger { pointer-events: auto; display: grid !important; width: 58px !important; min-width: 58px !important; max-width: 58px !important; height: 58px !important; min-height: 58px !important; max-height: 58px !important; flex: 0 0 58px !important; aspect-ratio: 1 / 1; place-items: center; padding: 0 !important; border: 1px solid #7cecff; border-radius: 999px !important; background: linear-gradient(145deg,var(--brand),#1aa5d9); color: #03131d; box-shadow: 0 15px 35px rgba(0,0,0,.52),0 0 0 5px rgba(50,215,255,.12); font-size: 21px; line-height: 1; }
    .finance-speed-trigger i { transition: transform .22s ease; }
    .finance-speed-dial.is-open .finance-speed-trigger i { transform: rotate(45deg); }
    .finance-speed-actions { display: flex; visibility: hidden; align-items: flex-end; flex-direction: column; gap: 9px; opacity: 0; transform: translateY(12px) scale(.94); transform-origin: bottom right; transition: .2s ease; pointer-events: none; }
    .finance-speed-dial.is-open .finance-speed-actions { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
    .finance-speed-actions button { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-height: 48px; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .finance-speed-actions button:hover { transform: none; box-shadow: none; }
    .finance-speed-actions button span { padding: 8px 11px; border: 1px solid #31586b; border-radius: 10px; background: rgba(7,24,34,.96); color: #e9f8fc; box-shadow: 0 9px 25px rgba(0,0,0,.38); font-size: 11px; font-weight: 800; white-space: nowrap; }
    .finance-speed-actions button i { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border: 1px solid #3c7087; border-radius: 50%; background: linear-gradient(145deg,#123b4c,#0a2430); color: var(--brand); box-shadow: 0 9px 25px rgba(0,0,0,.42); }
    .finance-speed-actions button[data-quick-action="debt"] i { background: linear-gradient(145deg,var(--brand),#208eb8); color: #04151d; }

    .finance-toast { position: fixed; left: 50%; bottom: calc(147px + env(safe-area-inset-bottom)); z-index: 60; display: block; max-width: calc(100vw - 32px); padding: 11px 15px; border: 1px solid #3c7086; border-radius: 12px; background: #0b2734; color: #eafaff; box-shadow: 0 16px 40px rgba(0,0,0,.48); font-size: 12px; font-weight: 800; transform: translateX(-50%); white-space: nowrap; }
    .finance-toast[hidden] { display: none; }
}

.debt-toolbar-actions{display:flex;align-items:flex-end;gap:9px}.debt-sort-control{display:grid;gap:4px;min-width:205px}.debt-sort-control>span{color:#789aaa;font-size:8px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.debt-sort-control select{width:100%;min-height:38px;padding:0 34px 0 11px;border:1px solid #294d5d;border-radius:11px;background:#0a202b;color:#cce2eb;font-size:11px;font-weight:750}
@media(max-width:720px){.debt-toolbar{align-items:stretch!important;flex-direction:column!important}.debt-toolbar-actions{width:100%}.debt-sort-control{width:100%;min-width:0}.debt-sort-control select{min-height:46px;font-size:13px}}
/* Near-edge mobile workspace gutters v11 */
@media(max-width:720px){
  .main{padding-left:6px;padding-right:6px;padding-bottom:28px}
  .topbar{margin-left:-6px;margin-right:-6px;margin-bottom:10px;padding-left:6px;padding-right:6px}
}

/* The application shell must never create a page-level horizontal scrollbar. */
html,body{max-width:100%;overflow-x:clip}
@supports(overflow:clip){html,body{overflow-x:clip}}
.shell,.main,.main>*{min-width:0;max-width:100%}
.main{overflow-x:clip}
@supports(overflow:clip){.main{overflow-x:clip}}
.table-wrap{max-width:100%;overflow-x:auto}
.brand-mark,
[data-theme="dark"] .brand-mark {
    overflow: visible;
    padding: 0;
    clip-path: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 13px rgba(57, 217, 194, .24));
}
