/* KEMO MATTE DARK · V9.3.2
   Calm charcoal, inspired by minimalist dark workspaces.
   Purely visual overrides; no account, finance or Vault logic is changed.
   Remove this stylesheet to return to the base theme. */
:root {
  color-scheme: dark;
  --bg: #17191c;
  --bg2: #1c1f24;
  --panel: #24272c;
  --panel2: #2b2f36;
  --stroke: #383d46;
  --text: #e8ebef;
  --muted: #a6aeb9;
  --blue: #7599e6;
  --cyan: #9aaed2;
  --green: #86c5a3;
  --yellow: #dfbd7c;
  --red: #eaa0a9;
  --brand: #4163af;
  --brand-deep: #354f8a;
  accent-color: #789ce4;
}
html {background: #17191c; scrollbar-color: #535862 #17191c;}
body {background: var(--bg);color: var(--text);}
::selection {background: #4163af80;color: #fff;}
:focus-visible {outline: 2px solid #91b3f9; outline-offset: 2px;}
button,input,select,textarea {color-scheme:dark;}
::placeholder {color: #8994a2;}
.muted,.management-hint,.fine-print,.toolbar-hint {color: #a5afbc;}

/* Chrome-free workspace: avoid near-white fields and bright blue gradients. */
.workspace {background: #1a1c20;}
.workspace-header {background: #202227;border-bottom-color: #373b43;box-shadow: 0 2px 10px #00000012;}
.header-title h1,.user-chip strong {color: #edf0f5;}
.header-title p,.user-chip small {color: #a5afbb;}
.header-eyebrow,.eyebrow,.form-eyebrow {color: #b5c5df;}
.header-actions .user-chip {border-right-color:#3a4049;}
.avatar {background: #384d72;color:#f0f3fa;}
.sidebar {background:#15171b;border-left: 1px solid #30343b;box-shadow:-2px 0 13px #00000020;}
.sidebar-tag {border-top-color:#333942;color:#98a1b0;}
.sidebar-tag span {color:#c7d3e9;}
.sidebar-brand strong {color:#e7ebf2;}
.sidebar-brand small {color:#acb7c8;}
.nav-link {color:#b9c1ce;}
.nav-link:hover {color:#f5f6fa;background:#292d34;}
.nav-link.active {background:#303f5c;color:#edf2fb;border-color:#445678;box-shadow:none;}
.nav-icon {color:#a0b2d0;}
.nav-link.active .nav-icon {color:#b9cced;}
.sidebar-bottom {border-top-color:#343943;}
.read-only-pill {color:#b1b9c5;}
.read-only-pill span {color:#90c6aa;}
.logout-button {background:#20242a;color:#c1cbd7;border-color:#3d4550;}
.logout-button:hover {background:#2a3039;}
.icon-button,.menu-button {background:#2d323a;border-color:#414955;color:#cdd7e5;}
.icon-button:hover,.menu-button:hover {background:#393f48;}

/* Hero: muted deep slate rather than fluorescent brand blue. */
.welcome-banner {background:linear-gradient(112deg,#343e50,#282f3a 60%,#252b33);border:1px solid #465162;box-shadow:none;}
.welcome-banner h2 {color:#f2f4f8;}
.welcome-banner .eyebrow {color:#bacbe8;}
.welcome-banner p {color:#c3cbd8;}
.banner-brand,.brand-logo-frame {background:#eef0f3;border-color:#788594;box-shadow:none;}
.brand-logo-frame img,.banner-brand img {object-fit:contain;}

/* Cards and panels: layered charcoal so large areas aren't glaring. */
.stat-card,.content-panel,.game-card,.bulk-panel,.kemo-stage-panel,.finance-card,
.plus-stat,.plus-card,.plus-date-cell,.plus-slot-summary,.fin-period,.fin-metric,
.finance-flow-card,.fin-category,.management-detail-panel,.client-history-row,
.bulk-game-item,.empty-state,.dialog-card {
  background:#24272c;
  border-color:#3b4149;
  color:#e4e8ee;
  box-shadow:none;
}
.stat-card::before {background:#647fad;}
.stat-number,.stat-label,.stat-card strong,.stat-card h3 {color:#e7eaf0;}
.stat-label,.card-foot,.game-subtitle {color:#b1bbc7;}
.stat-icon,.game-monogram {background:#303c50;color:#afc4e8;border-color:#475b7b;}
.panel-heading h2,.section-heading h2,.series-header h3,.game-title,
.table-game,.plus-card-title h3 {color:#edf0f4;}
.panel-heading p,.section-heading p,.toolbar-hint,.management-hint,.fine-print {color:#a9b4c1;}
.panel-heading .outline-chip,.outline-chip,.series-count,.test-chip {background:#303844;border-color:#46505f;color:#c0d0e7;}
.card-foot {border-color:#393f48;}
.game-card:hover {background:#2a2e35;border-color:#596781;box-shadow:0 5px 16px #00000028;transform:none;}
.platform-tags span,.platform-tags .edition-tag {background:#313948;color:#b9cdec;border-color:#4a5668;}
.availability-chip {background:#203a32;border-color:#315c4c;color:#b3dac4;}
.availability-chip strong {color:#b5e6cb;}
.availability-chip.out-stock {background:#30333a;border-color:#454a52;color:#adb5c1;}
.empty-state strong {color:#edf1f6;}

/* Tables, including inventory, imported Excel and sales. */
.data-table-wrap {background:#24272c;border-color:#3d434d;}
.accounts-table th {background:#2c3037;color:#cdd6e2;border-bottom:1px solid #424854;}
.accounts-table td {background:#24272c;color:#e0e5ec;border-bottom:1px solid #383f48;}
.accounts-table tbody tr:hover,.accounts-table tbody tr:hover td {background:#30353d;}
.accounts-table tbody tr:nth-child(even) td {background:#262a30;}
.accounts-table tbody tr:nth-child(even):hover td {background:#30353d;}
.mono {color:#a6c3f8!important;}
.account-status {color:#b1bdca;}
.account-status.active {color:#94d3b2;}
.table-sale-game strong,.client-history-meta strong {color:#e7ecf2;}
.table-sale-game span,.client-history-meta span,.cancel-reason {color:#a9b5c6;}

/* Readable status pills on charcoal. */
.status-available,.plus-active {background:#203d32;color:#a5dfbc;}
.status-sold,.plus-expired {background:#4b2b36;color:#f6b7c1;}
.status-reserved,.plus-soon {background:#473b28;color:#efd39b;}
.status-disabled,.plus-unknown {background:#333941;color:#b5bfcc;}

/* Buttons use brand blue only where attention is needed. */
.btn-primary {background:#466bbb;border-color:#567ac7;color:#f8f9fd;box-shadow:none;}
.btn-primary:hover:not(:disabled) {background:#5276c7;border-color:#7797db;box-shadow:none;}
.btn-secondary {background:#303c50;color:#d1dff6;border-color:#4a5e7a;}
.btn-secondary:hover:not(:disabled) {background:#3b4a62;}
.btn-outline,.btn-mini {background:#2c323b;border-color:#49515d;color:#d0d9e6;}
.btn-outline:hover:not(:disabled),.btn-mini:hover {background:#363e49;}
.btn-danger {background:#593039;border-color:#79434d;color:#ffd1d5;}
.btn-danger:hover:not(:disabled) {background:#71404b;}
.btn-cancel-sale {color:#f3bdc7;border-color:#784753;background:#4b2d39;}
.inline-link,.plus-eyebrow {color:#a6bff0;}

/* Inputs, selects, datetime, textareas. */
.search-field,.controls-row select,.date-filter,.bulk-game-label select,
.field input,.field select,.field textarea,.login-card input {
  background:#1d2025;
  border-color:#434b56;
  color:#e4e8ef;
}
.search-field input,.date-filter input {background:transparent;color:#e4e8ef;color-scheme:dark;}
.search-field input::placeholder,.field input::placeholder,.field textarea::placeholder,.login-card input::placeholder {color:#97a2b1;}
.search-field span {color:#a2b5d2;}
.search-field:focus-within,.field input:focus,.field textarea:focus,.field select:focus,
.login-card input:focus,.controls-row select:focus {border-color:#7798d8;box-shadow:0 0 0 3px #668bd326;}
.field,.checkrow {color:#c8d2de;}
.checkrow input,.accounts-archive-toggle input,.handoff-code-choice input {accent-color:#7b9bda;}
.accounts-archive-toggle {background:#29323f;border-color:#45566f;color:#c6d7ed;}
.date-filter {color:#c8d4e3;}
input[type="date"],input[type="datetime-local"] {color-scheme:dark;}

/* Dialogs and detail sheet: no bright white document in an otherwise dark UI. */
.dialog-shade,.detail-shade,.detail-layer {background:#090b0dc9;backdrop-filter:blur(4px);}
.dialog-card {color:#e4e9f0;box-shadow:0 20px 66px #00000088;}
.dialog-heading h2,.drawer-header h2,.form-subheading {color:#f0f1f5;}
.dialog-actions {border-top-color:#3d424c;}
.account-cost-card,.sale-safety-note,.credential-placeholder,.plus-form-explainer,.plus-detail-banner {
  background:#2a3340;border-color:#46566a;color:#cbd6e6;
}
.account-cost-card .muted {color:#b3c2d3;}
.notice {background:#29354a;border-color:#496080;color:#c7d7ed;}
.notice.success {background:#203c33;border-color:#3b6a54;color:#b5e3c7;}
.notice.error {background:#493039;border-color:#7a4953;color:#f4bfca;}
.notice.warning {background:#483d2b;border-color:#74613f;color:#ead5a8;}
.account-drawer.account-document {background:#202328;color:#e7ebf0;border-color:#444c58;box-shadow:0 28px 90px #0000009c;}
.account-document .drawer-header {background:linear-gradient(110deg,#343f54,#27354e);color:#f0f2f7;border-bottom:1px solid #47566c;}
.account-document .drawer-header h2 {color:#f4f6fa;}
.account-document .drawer-header .form-eyebrow {color:#bfd0e9;}
.account-document .drawer-header .muted {color:#cad5e6;}
.account-document .drawer-header .icon-button {background:#394d6b;border-color:#6981a6;color:#f3f6fc;}
.account-document .info-row,.account-document .slot-row,.account-document .drawer-section {
  background:#292d33;border-color:#414853;
}
.account-document .info-row span {color:#a8b5c7;}
.account-document .info-row strong,.account-document .slot-row strong {color:#edf0f5;}
.account-document .slot-owner-name {color:#b7c3d0;}
.account-document .form-subheading,.account-document .drawer-section-head h3,
.account-sheet-heading strong,.paper-backup-heading strong {color:#e0e8f6;}
.account-sheet-heading {border-bottom-color:#454c57;}
.account-sheet-heading span {color:#adb9c8;}
.account-sheet-seal {background:#476cbb;}
.account-document .drawer-section .muted {color:#b6c2d1;}
.account-document .drawer-controls {border-top-color:#3d4652;}
.paper-field,.paper-backup-panel,.paper-code-tile,
.credential-row {background:#20252b;border-color:#414b57;}
.paper-field-title,.paper-code-index,.credential-label {color:#b6c3d2;}
.paper-field-value,.paper-code-value,.credential-value {color:#f0f2f7;}
.paper-code-counter,.backup-editor-counter {background:#324258;color:#c4d7f6;}
.account-document .btn-mini {background:#343e4c;border-color:#516078;color:#d4e2f6;}
.account-document .btn-mini:hover {background:#40516a;}
.handoff-toolbar {background:#2a3648;border-color:#526989;}
.handoff-toolbar strong {color:#e0e9f7;}
.handoff-toolbar p {color:#b8c9df;}
.handoff-code-choice {background:#222a33;border-color:#45576d;color:#d2deeb;}
.handoff-code-choice span:last-child {color:#c1d8fd;}
.handoff-code-number {color:#bac8da;}
.handoff-count-line,.handoff-count-line strong {color:#cadcf4;}
.handoff-warning {background:#443928;border-color:#78613b;color:#f0d4a0;}
.buyback-trigger {background:#203c33;border-color:#416954;color:#addbc3;}
.transfer-trigger {background:#303f58;border-color:#52678a;color:#bdd1f3;}
.account-document .otp-display {background:#222f42;border-color:#42597b;}
.account-document .otp-code {color:#dce8fc;}
.account-document .otp-caption {color:#bed1ec;}

/* Finance, subscriptions, import — same comfortable theme. */
.plus-stat strong,.plus-card-title h3,.plus-date-cell strong {color:#e9edf4;}
.plus-card-title small,.plus-date-cell span,.plus-slot-summary>span:first-child {color:#afbac9;}
.fin-period>span,.fin-period>small,.fin-metric-label,.finance-flow-head span,.finance-flow-card p {color:#b0becf;}
.fin-period>strong,.fin-metric-value {color:#ebeff6;}
.fin-featured {background:#2c3749;border-color:#536780;}
.finance-cash-row {border-bottom-color:#3d4550;}
.finance-cash-row:last-child {color:#bed1f0;}
.fin-category,.kemo-stage-panel {background:#262b32;border-color:#404a56;}
.fin-empty {color:#abb5c2;}
.fin-negative {color:#f0aeba!important;}
.finance-stock-info {background:linear-gradient(110deg,#313b4f,#293347);border-color:#55647d;box-shadow:none;}
.finance-stock-info strong {color:#f0f3fa;}
.finance-stock-eyebrow,.finance-stock-info .management-hint {color:#c0cee3;}
.bulk-upload {background:#29313d;border-color:#506078;color:#d2dfef;}
.bulk-upload:hover {background:#323d4c;border-color:#6f86a6;}
.bulk-upload-icon,.bulk-stat strong {color:#bed1f5;}
.bulk-stat {background:#292f38;border-color:#45505e;color:#e0e6ef;}
.bulk-stat span,.bulk-progress-row span,.bulk-game-label {color:#b7c2d0;}
.bulk-game-label select {color:#e2e9f2;}
.kemo-stage-panel .panel-heading h2 {color:#d9e5f7;}
.bulk-error {color:#f0aeba;}
.bulk-done {color:#a4dbc0;}
.bulk-progress-row progress {accent-color:#7192d2;}
.otp-display {background:#243042;border-color:#4a6081;}
.otp-code {color:#cedfff;}
.otp-caption,.otp-countdown {color:#b6c5da;}
.otp-progress-track {background:#3a4658;}
.otp-progress {background:#7798d6;}

/* Login: no glowing blue full-screen, no brilliant white login card. */
.login-scene {background:radial-gradient(ellipse at 22% 12%,#252b34 0%,#1b1e23 47%,#15171b 100%);}
.login-glow {background:#2c3a51;opacity:.05;}
.login-intro h1,.login-intro .eyebrow,.login-intro .logo-lockup strong {color:#f0f2f6;}
.login-intro h1 span {color:#b9c9e2;}
.login-intro p {color:#b6c1cf;}
.login-intro .logo-lockup small {color:#aebacd;}
.login-card {background:#24282e;border-color:#414b59;color:#e6eaf0;box-shadow:0 20px 55px #00000052;}
.login-card h2 {color:#f0f2f6;}
.login-card p,.login-card .muted,.login-card label {color:#bbc6d3;}
.login-card input {background:#191d22;border-color:#49515d;color:#ecf0f5;}
.login-footer {border-top-color:#3e4652;color:#aebacc;}
.small-action {color:#b7cbea;}
.intro-chips span {background:#252a32;border-color:#414b59;color:#bec8d7;}

/* Keep supplementary text, dates, labels legible across legacy screens. */
.game-editor-edition-help,.edition-help {color:#aabbd2;}
.paper-code-tile .paper-code-value {user-select:text;}
:disabled {opacity:.58;}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
}
@media (max-width:590px) {
  .workspace-header {background:#202227;}
  .stat-card,.content-panel,.game-card {box-shadow:none;}
}

/* KEMO V9.3.3 · Custom Edition Management; matte dark surfaces. */
.edition-actions {display:flex; flex-wrap:wrap; gap:8px; align-items:center;}
.edition-manager-card {width:min(700px,96vw);max-height:calc(100vh - 48px);overflow-y:auto; scrollbar-color:#4b5667 #252930;}
.edition-add-form {margin:12px 0 16px; padding:14px; background:#202329; border:1px solid #3a414c;border-radius:14px;}
.edition-add-form textarea {resize:vertical;min-height:84px;line-height:1.7;}
.edition-form-actions {margin-top:12px;padding:0;}
.edition-manager-tips {padding:12px 14px;border:1px solid #3a485f;background:#252f3f;color:#c4d3eb;border-radius:12px;font-size:.86rem;line-height:1.7;}
.edition-manage-controls {display:flex;gap:12px;align-items:center;justify-content:space-between;margin:14px 0;}
.edition-manage-controls .search-field {max-width:400px;flex:1;}
.edition-apply-check {display:flex;align-items:flex-start;gap:10px;margin:12px 0 16px;line-height:1.7;color:#d0dbea;font-size:.88rem;}
.edition-apply-check input {accent-color:#698bd0;margin-top:5px;}
.edition-manager-list {max-height:280px;overflow:auto;display:flex;flex-direction:column;gap:8px;margin-bottom:14px;scrollbar-color:#515c6b #272b32;}
.edition-option-row {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:#292d34;border:1px solid #444b56;border-radius:12px;}
.edition-option-details {min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;}
.edition-option-details strong {color:#ebeff5;}
.edition-option-details small {color:#a3adba;}
.edition-option-buttons {display:flex;gap:7px;flex-wrap:wrap;}
.edition-option-buttons .btn-mini {cursor:pointer;background:#354055;border:1px solid #52647f;color:#e5ecf8;border-radius:8px;padding:7px 10px;white-space:nowrap;}
.edition-option-buttons .btn-mini:hover {background:#435472;}
.edition-inactive {opacity:.72;}
.edition-muted-tag {font-size:.75rem;color:#f0c68b;}
@media (max-width:650px){.edition-option-row {align-items:flex-start;flex-direction:column;}.edition-manage-controls {flex-direction:column;align-items:stretch;}.edition-manager-card {max-height:94vh;}}

/* v9.3.4 - audited manual slot corrections */
.account-document .slot-inline-editor {display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-inline-start:auto}
.account-document .slot-inline-select {background:#24282e;color:#e6ecf5;border:1px solid #4a5566;border-radius:9px;padding:7px 11px;min-width:110px;font:inherit}
.account-document .slot-inline-select:focus-visible {outline:2px solid #5a83dc;outline-offset:2px}
.account-document .slot-manual-hint {font-size:11px;color:#a5b1c1;max-width:210px}
.account-document .slot-correction-button {background:#334b76;color:#f1f5fd;border:1px solid #5c78aa;border-radius:8px;padding:7px 10px}
@media(max-width:600px){.account-document .slot-inline-editor{width:100%;justify-content:flex-start}}

/* V9.3.5 · single-account game/edition reassignment, dark themed. */
.account-game-assignment { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:14px;
  margin:14px 0 22px; padding:16px 18px; border:1px solid rgba(111,139,193,.32);
  border-radius:14px; background:rgba(48,68,104,.16); }
.account-game-assignment strong {font-size:14px; color:#e0e7f4;}
.account-game-assignment .muted { margin:6px 0 0; max-width:580px; font-size:12px; line-height:1.75; }
.account-game-assignment button {white-space:nowrap;}
.move-current-game,.move-preview {padding:13px 15px;border:1px solid rgba(131,151,185,.25);
  border-radius:12px;background:#22262e;line-height:1.8;}
.move-current-game {display:grid;gap:4px;}
.move-current-game span {font-size:12px;color:#9ea9bd;}
.move-current-game strong {color:#e5eaf6;overflow-wrap:anywhere;}
.move-preview {color:#c3d4fa;font-size:13px;}
#account-game-move-layer .dialog-card {color:#e1e6ef;}
#account-game-move-layer select, #account-game-move-layer input {color-scheme:dark;}
@media(max-width:640px){ .account-game-assignment {align-items:stretch;}
  .account-game-assignment button {width:100%;} }
/* Account detail sheet is also open behind this dialog; keep picker on top. */
#account-game-move-layer {z-index:165;}


/* ── KEMO FINANCE CENTER · V9.3.5+ ─────────────────────────── */
.dashboard-main:has(#page-finance:not(.hidden)) {max-width:1870px;padding-inline:clamp(22px,3vw,58px);}
#page-finance {color:#e9edf4;}
#page-finance .finance-hero {position:relative;display:flex;align-items:center;justify-content:space-between;gap:32px;overflow:hidden;border-radius:22px;padding:36px clamp(25px,3.3vw,54px);background:linear-gradient(116deg,#292f39 0%,#222831 55%,#202329 100%);border:1px solid #444b59;margin-bottom:32px;}
#page-finance .finance-hero:before {content:"";position:absolute;inset:0 auto 0 0;width:150px;background:radial-gradient(circle at 0 100%,rgba(105,129,188,.13),transparent 70%);pointer-events:none;}
#page-finance .finance-hero-copy {position:relative;z-index:1;min-width:0;}
#page-finance .finance-kicker {font-size:11px;letter-spacing:.13em;font-weight:750;color:#bac9e3;display:flex;gap:10px;align-items:center;direction:ltr;justify-content:flex-end;}
#page-finance .finance-live-dot {width:7px;height:7px;border-radius:50%;background:#87c4a0;box-shadow:0 0 0 5px rgba(135,196,160,.1);}
#page-finance .finance-hero h2 {font-size:clamp(30px,3.4vw,48px);font-weight:850;letter-spacing:-.025em;color:#f1f3f6;line-height:1.3;margin:15px 0 12px;}
#page-finance .finance-hero h2 span {color:#b5c8ed;}
#page-finance .finance-hero p {margin:0;line-height:1.9;color:#b8c1d0;font-size:14px;max-width:690px;}
#page-finance .finance-hero-tags {display:flex;flex-wrap:wrap;gap:8px;margin-top:22px;}
#page-finance .finance-hero-tags span {background:#303844;border:1px solid #46505f;color:#bfcde0;border-radius:100px;padding:7px 11px;font-size:11px;}
#page-finance .finance-hero-actions {min-width:190px;display:flex;flex-direction:column;gap:13px;align-items:stretch;justify-content:center;z-index:1;}
#page-finance .finance-hero-caption {font-size:11px;color:#a8b4c4;text-align:center;}
#page-finance .finance-hero-actions .btn {font-size:13px;padding:15px 22px;background:#37465e;border-color:#5a6983;color:#eef3ff;}
#page-finance .finance-hero-actions .btn:hover {background:#455673;}
#page-finance .finance-section-title {display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px;color:#e8ebf2;}
#page-finance .finance-section-title>div {display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
#page-finance .finance-section-title strong {font-size:18px;font-weight:800;}
#page-finance .finance-section-title>small,#page-finance .finance-section-subtitle {color:#9ba8ba;font-size:12px;}
#page-finance .finance-section-icon {width:32px;height:32px;display:grid;place-items:center;background:#303c50;color:#adc4eb;border:1px solid #485a76;border-radius:10px;}
#page-finance .finance-period-strip {grid-template-columns:repeat(3,minmax(0,1fr));gap:19px;margin:0 0 29px;}
#page-finance .fin-period {min-height:158px;padding:23px 25px 20px;border-radius:18px;background:#24282f;border:1px solid #3e4652;position:relative;}
#page-finance .fin-period:before {content:"";position:absolute;right:24px;bottom:0;left:24px;height:2px;border-radius:3px;background:#617da9;opacity:.6;}
#page-finance .fin-period-top {display:flex;align-items:center;justify-content:space-between;gap:12px;color:#b7c2d2;}
#page-finance .fin-period-top>span:first-child {font-size:14px;font-weight:650;}
#page-finance .fin-period-symbol {font-size:19px;color:#9db5d9;}
#page-finance .fin-period>strong {font-size:clamp(23px,2.1vw,34px);color:#f0f3f8;margin:4px 0;letter-spacing:-.025em;white-space:normal;overflow-wrap:anywhere;}
#page-finance .fin-period>small {font-size:12px;color:#a7b6c9;}
#page-finance .finance-dashboard-columns {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(320px,1fr);gap:22px;align-items:start;}
#page-finance .finance-primary-column,#page-finance .finance-secondary-column {min-width:0;display:flex;flex-direction:column;gap:22px;}
#page-finance .finance-panel {margin:0;background:#24272c;border:1px solid #3b424c;border-radius:20px;padding:clamp(21px,2vw,32px);}
#page-finance .finance-panel-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px;}
#page-finance .finance-panel-heading h3,#page-finance .finance-flow-head h3 {font-size:clamp(20px,1.55vw,27px);line-height:1.4;color:#ecf0f5;margin:4px 0 7px;}
#page-finance .finance-panel-heading p {font-size:13px;color:#aeb8c6;line-height:1.8;margin:0;}
#page-finance .finance-overline {font-size:10px;letter-spacing:.14em;color:#98b1dd;font-weight:800;direction:ltr;display:block;text-align:right;}
#page-finance .finance-title-symbol {width:45px;height:45px;display:grid;place-items:center;font-size:24px;color:#b9ccec;background:#303b4c;border:1px solid #455570;border-radius:13px;flex-shrink:0;}
#page-finance .finance-presets {display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;}
#page-finance .finance-preset {cursor:pointer;border:1px solid #47505b;color:#bdc8d8;background:#2b3037;border-radius:9px;padding:11px 17px;font-size:12px;font-weight:750;}
#page-finance .finance-preset:hover {background:#344050;border-color:#65738c;color:#eaf0fa;}
#page-finance .finance-preset.active,#page-finance .finance-preset[aria-pressed="true"] {background:#3b4d69;border-color:#728bb6;color:#f0f4fc;}
#page-finance .finance-range-form {display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto;align-items:end;gap:10px;margin-bottom:12px;}
#page-finance .finance-range-form .field {min-width:0;}
#page-finance .finance-range-form button {min-height:47px;padding-inline:24px;}
#page-finance .finance-range-caption {font-size:11px;color:#aab9cd;margin:2px 0 20px;line-height:1.6;}
#page-finance .finance-report-subtitle {margin:24px 0 14px;border-top:1px solid #3c434d;padding-top:23px;}
#page-finance .finance-report-subtitle strong {font-size:17px;}
#page-finance .finance-kpis {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 24px;}
#page-finance .fin-metric {background:#20242a;border:1px solid #3e454f;border-radius:14px;padding:20px;min-height:116px;display:flex;flex-direction:column;justify-content:space-between;gap:14px;}
#page-finance .fin-metric-label {font-size:12px;color:#b2bdcd;}
#page-finance .fin-metric-value {font-size:clamp(19px,1.8vw,28px);white-space:normal;overflow-wrap:anywhere;line-height:1.3;color:#f0f2f7;}
#page-finance .fin-metric.fin-featured {grid-column:1/-1;min-height:135px;background:linear-gradient(112deg,#2d3a50,#242e3e);border-color:#607397;}
#page-finance .fin-metric.fin-featured .fin-metric-value {font-size:clamp(24px,2.4vw,38px);color:#d8e9ff;}
#page-finance .finance-breakdown-chart {background:#202329;border:1px solid #3e444e;border-radius:15px;padding:22px 23px;}
#page-finance .finance-chart-title {display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:24px;}
#page-finance .finance-chart-title h4 {margin:6px 0 0;font-size:16px;color:#e9edf4;}
#page-finance .finance-chart-title small {color:#a9b8cb;font-size:11px;}
#page-finance .finance-bars {display:grid;gap:19px;}
#page-finance .finance-bar-labels {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px;font-size:12px;color:#c3cbd6;}
#page-finance .finance-bar-labels strong {color:#e8edf5;font-size:12px;direction:ltr;white-space:nowrap;}
#page-finance .finance-bar-track {height:9px;border-radius:9px;overflow:hidden;background:#353b45;}
#page-finance .finance-bar-fill {height:100%;width:0;border-radius:inherit;background:#7fa0d8;transition:width .3s ease;}
#page-finance .finance-bar-row.income-alt .finance-bar-fill {background:#94c2b0;}
#page-finance .finance-bar-row.outflow .finance-bar-fill {background:#9d8fc4;}
#page-finance .finance-bar-row.expense .finance-bar-fill {background:#c49c83;}
#page-finance .finance-chart-footnote {font-size:11px;line-height:1.7;color:#9caab8;margin:18px 0 0;}
#page-finance .finance-stock-info {margin:0;min-height:220px;padding:25px;background:linear-gradient(130deg,#2d3543,#262e3a);border:1px solid #53617a;border-radius:19px;box-shadow:none;}
#page-finance .finance-stock-top {display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;}
#page-finance .finance-stock-eyebrow {font-size:14px;color:#d3e1f6;}
#page-finance .finance-stock-pill {font-size:10px;padding:7px 9px;background:#43516a;border:1px solid #627492;color:#cdddf2;border-radius:99px;}
#page-finance .finance-stock-info strong {font-size:clamp(26px,2.65vw,41px);color:#f3f5fa;margin:23px 0 12px;overflow-wrap:anywhere;line-height:1.3;}
#page-finance .finance-stock-divider {height:1px;background:#536077;margin-bottom:14px;}
#page-finance .finance-stock-info .management-hint {font-size:12px;color:#bac8db;max-width:none;margin:0;line-height:1.9;}
#page-finance .finance-stock-foot {font-size:11px;color:#aab9cc;margin-top:14px;line-height:1.7;}
#page-finance .finance-flow-card {margin:0;background:#252930;border:1px solid #404853;border-radius:19px;padding:25px;}
#page-finance .finance-flow-head {margin-bottom:17px;align-items:center;}
#page-finance .finance-flow-head h3 {font-size:22px;margin:5px 0 0;}
#page-finance .finance-flow-head>span {background:#303947;border-radius:50px;padding:7px 10px;color:#c1cbda;white-space:nowrap;}
#page-finance .finance-cash-row {padding:14px 0;border-color:#3e454e;font-size:12px;}
#page-finance .finance-cash-row span {color:#b9c5d1;}
#page-finance .finance-cash-row strong {font-size:13px;color:#e9edf5;}
#page-finance .finance-cash-row:last-child {background:#303f53;border:1px solid #4b6689;border-radius:11px;margin-top:13px;padding:15px 13px;color:#dae6f9;}
#page-finance .finance-cash-row:last-child strong {font-size:18px;}
#page-finance .finance-flow-card p {font-size:11px;color:#a4b3c6;line-height:2;margin-top:18px;}
#page-finance .finance-expense-panel {margin-top:22px;}
#page-finance .finance-expense-heading {margin-bottom:17px;}
#page-finance .finance-expense-breakdown {display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin-bottom:26px;}
#page-finance .fin-category {min-height:75px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;background:#20242a;border:1px solid #3e4650;border-radius:12px;padding:15px 17px;font-size:12px;}
#page-finance .fin-category>span {color:#adbbc9;}
#page-finance .fin-category>strong {font-size:17px;color:#e8edf5;}
#page-finance .finance-table-caption {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:13px;}
#page-finance .finance-table-caption strong {font-size:16px;}
#page-finance .finance-table-caption span {font-size:11px;color:#aab7c6;}
#page-finance .finance-expense-table {border:1px solid #3e4651;border-radius:13px;overflow-x:auto;}
#page-finance .finance-expense-table table {min-width:680px;}
#page-finance .finance-expense-table td {padding-block:15px;}
#page-finance .finance-expense-table tr:hover {background:#2f343d;}
#page-finance .finance-expense-panel>.management-hint {line-height:1.8;margin-top:16px;}
@media(max-width:1320px){#page-finance .finance-dashboard-columns {grid-template-columns:minmax(0,1.4fr) minmax(295px,1fr);}#page-finance .finance-panel {padding:22px;}#page-finance .finance-range-form {grid-template-columns:repeat(2,minmax(0,1fr));}#page-finance .finance-range-form button {grid-column:1/-1;}}
@media(max-width:1120px){#page-finance .finance-dashboard-columns {grid-template-columns:minmax(0,1fr);}#page-finance .finance-secondary-column {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}#page-finance .finance-stock-info,#page-finance .finance-flow-card {min-width:0;}}
@media(max-width:700px){#page-finance .finance-hero {flex-direction:column;align-items:stretch;gap:20px;padding:23px 20px;}#page-finance .finance-hero h2 {font-size:32px;}#page-finance .finance-hero-actions {min-width:0;align-items:stretch;}#page-finance .finance-period-strip {grid-template-columns:1fr;gap:12px;}#page-finance .fin-period {min-height:130px;padding:19px 20px;}#page-finance .finance-secondary-column {display:flex;flex-direction:column;}#page-finance .finance-section-subtitle {display:none;}#page-finance .finance-presets {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}#page-finance .finance-range-form {grid-template-columns:1fr;}#page-finance .finance-range-form button {grid-column:auto;}#page-finance .finance-kpis {grid-template-columns:1fr;}#page-finance .fin-metric.fin-featured {grid-column:auto;}#page-finance .finance-chart-title {flex-direction:column;align-items:flex-start;}#page-finance .finance-expense-heading {align-items:stretch;flex-direction:column;}#page-finance .finance-expense-heading button {width:100%;}#page-finance .finance-bar-labels strong {font-size:11px;}}
@media(prefers-reduced-motion:reduce){#page-finance .finance-bar-fill {transition:none;}}

/* V9.3.6 — destructive game action, matte dark and intentionally unobtrusive. */
.card-foot .btn-delete-empty-game {background:#38252b;border:1px solid #87505a;color:#f8c7cf;white-space:nowrap;}
.card-foot .btn-delete-empty-game:hover:not(:disabled),
.card-foot .btn-delete-empty-game:focus-visible {background:#513038;border-color:#c16e7d;color:#fff0f2;}
.card-foot .btn-delete-empty-game:disabled {background:#2b2d33;border:1px solid #454951;color:#87909d;opacity:.75;cursor:not-allowed;}
