/* ============================================================
   НАЛИЧНЫЕ РАСХОДЫ — Premium Liquid Glass
   Visual layer only. Business logic stays in expenses.js/server.js.
   ============================================================ */

:root {
  --exp-text-primary: #111827;
  --exp-text-secondary: #4B5563;
  --exp-text-muted: #7C8491;

  --exp-stroke: rgba(255, 255, 255, 0.66);

  --exp-violet: #8B5CF6;
  --exp-cyan: #38D9D1;
  --exp-blue: #3B82F6;
  --exp-amber: #E5A300;
  --exp-green: #22C55E;
  --exp-red: #EF4444;

  --exp-radius-lg: 26px;
  --exp-radius-xl: 34px;

  --exp-shadow: 0 18px 42px rgba(31, 41, 55, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.72), inset 0 -1px 1px rgba(255, 255, 255, 0.24);
}

body.expenses-page {
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 205, 145, 0.80) 0%, transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(110, 122, 158, 0.62) 0%, transparent 42%),
    radial-gradient(circle at 62% 36%, rgba(139, 92, 246, 0.30) 0%, transparent 32%),
    radial-gradient(circle at 80% 64%, rgba(56, 217, 209, 0.30) 0%, transparent 36%),
    radial-gradient(circle at 20% 88%, rgba(255, 142, 219, 0.20) 0%, transparent 34%),
    linear-gradient(135deg, #EEDFCB 0%, #D9CDD8 45%, #9CA6BE 100%) fixed;
  background-attachment: scroll;
}

body.expenses-page .bg-orbs {
  display: none;
}

.exp-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1600px;
  gap: 16px;
  padding-top: 16px !important;
  padding-bottom: 20px !important;
}

.exp-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0;
}

.exp-topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.035em;
  color: var(--exp-text-primary);
}

.exp-subtitle {
  margin: 3px 0 0;
  color: var(--exp-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

/* ---- shared glass surface ---- */
.exp-glass {
  position: relative;
  border-radius: var(--exp-radius-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12));
  border: 1px solid var(--exp-stroke);
  box-shadow: var(--exp-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(1.03);
  backdrop-filter: blur(22px) saturate(180%) brightness(1.03);
}

.exp-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.44), transparent 46%);
  mix-blend-mode: screen;
}

.exp-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(255, 255, 255, 0.28) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ---- balances ---- */
.exp-balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.exp-balance-card {
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 30px;
}

.exp-balance-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.exp-balance-name {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--exp-text-primary);
}

.exp-balance-position {
  margin-top: 2px;
  color: var(--exp-text-muted);
  font-size: 11px;
  font-weight: 700;
}

.exp-balance-hero {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.exp-balance-hero-label {
  display: block;
  color: var(--exp-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.exp-balance-hero-value {
  display: block;
  margin-top: 5px;
  font-size: 27px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.05em;
  color: var(--exp-text-primary);
}

.exp-balance-hero[data-tone="debt"] .exp-balance-hero-value { color: var(--exp-amber); text-shadow: 0 0 20px rgba(229,163,0,.22); }
.exp-balance-hero[data-tone="advance"] .exp-balance-hero-value { color: var(--exp-blue); text-shadow: 0 0 20px rgba(59,130,246,.22); }
.exp-balance-hero[data-tone="settled"] .exp-balance-hero-value { color: var(--exp-green); text-shadow: 0 0 20px rgba(34,197,94,.20); }

.exp-balance-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.exp-split {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.44);
}

.exp-split span {
  display: block;
  color: var(--exp-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.exp-split b {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--exp-text-primary);
}

.exp-split small {
  display: block;
  margin-top: 1px;
  color: var(--exp-text-muted);
  font-size: 10px;
  font-weight: 700;
}

.exp-split[data-tone="debt"] b { color: var(--exp-amber); }
.exp-split[data-tone="advance"] b { color: var(--exp-blue); }

.exp-requisites {
  position: relative;
  z-index: 1;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(129, 143, 172, 0.24);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.exp-req-label {
  color: var(--exp-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.exp-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.32);
  color: var(--exp-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.exp-copy-btn:hover { background: rgba(255, 255, 255, 0.5); }
.exp-copy-btn.is-copied { color: #0b7d5b; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.12); }
.exp-copy-btn .exp-copy-key { color: var(--exp-text-muted); font-weight: 700; }

.exp-req-empty {
  color: var(--exp-text-muted);
  font-size: 11px;
  font-weight: 700;
}

.exp-req-empty a { color: var(--exp-violet); text-decoration: none; }

.exp-stat-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

/* ---- toolbar ---- */
.exp-toolbar {
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 30px;
}

.exp-toolbar > * { position: relative; z-index: 1; }

.exp-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  min-width: 150px;
}

.exp-search svg {
  position: absolute;
  left: 12px;
  color: var(--exp-text-muted);
  pointer-events: none;
}

.exp-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 34px 0 34px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.48), rgba(255,255,255,.24));
  color: var(--exp-text-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.72);
}

.exp-search-clear {
  position: absolute;
  right: 8px;
  display: none;
  border: none;
  background: transparent;
  color: var(--exp-text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.exp-search.has-value .exp-search-clear { display: block; }

.exp-select,
.exp-input,
.exp-textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.48), rgba(255,255,255,.24));
  color: var(--exp-text-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.72), 0 8px 18px rgba(31,41,55,.08);
  outline: none;
}

.exp-select,
.exp-input {
  min-height: 40px;
  padding: 0 12px;
}

.exp-textarea {
  min-height: 74px;
  padding: 11px 12px;
  resize: vertical;
}

.exp-toolbar .exp-select { width: auto; min-width: 128px; border-radius: 999px; }

.exp-spacer { flex: 1 1 10px; }

/* ---- expense list ---- */
.exp-list {
  display: grid;
  gap: 14px;
}

.exp-expense-card {
  overflow: hidden;
  padding: 15px 16px;
  border-radius: 26px;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}

.exp-expense-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(31,41,55,.20), inset 0 1px 1px rgba(255,255,255,.78);
}

.exp-expense-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(200px, 1.6fr) repeat(3, minmax(96px, .8fr));
  gap: 12px;
  align-items: start;
}

.exp-expense-title {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--exp-text-primary);
}

.exp-expense-sub {
  margin-top: 4px;
  color: var(--exp-text-muted);
  font-size: 11.5px;
  font-weight: 700;
}

.exp-metric span {
  display: block;
  color: var(--exp-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.exp-metric b {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--exp-text-primary);
}

.exp-meta-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.exp-progress {
  position: relative;
  z-index: 1;
  height: 7px;
  margin: 11px 0 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(255,255,255,.42);
}

.exp-progress-fill {
  height: 100%;
  width: min(var(--pct), 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--exp-cyan), var(--exp-blue), var(--exp-violet));
  box-shadow: 0 0 18px rgba(56,217,209,.26);
}

.exp-progress-fill[data-tone="reimbursed"] {
  background: linear-gradient(90deg, #34D399, var(--exp-green));
}

/* ---- pills / badges ---- */
.exp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.46);
  background: rgba(255,255,255,.30);
  color: var(--exp-text-secondary);
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
}

a.exp-pill:hover { background: rgba(255,255,255,.5); }

.exp-pill--good { color: #0b7d5b; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.28); }
.exp-pill--warn { color: #9c681d; background: rgba(229,163,0,.12); border-color: rgba(229,163,0,.30); }
.exp-pill--bad { color: #b3271f; background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.30); }
.exp-pill--info { color: #2c5ea8; background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.28); }

.exp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.exp-badge--awaiting { color: #9c681d; background: rgba(229,163,0,.14); border: 1px solid rgba(229,163,0,.32); }
.exp-badge--reimbursed { color: #0b7d5b; background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.30); }

.exp-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- empty ---- */
.exp-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  text-align: center;
  border-radius: var(--exp-radius-xl);
}

.exp-empty-inner { position: relative; z-index: 1; max-width: 440px; }

.exp-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.24), rgba(56,217,209,.22));
  color: var(--exp-violet);
  font-size: 26px;
  box-shadow: 0 12px 30px rgba(31,41,55,.13), inset 0 1px 1px rgba(255,255,255,.82);
}

.exp-empty h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.02em; }
.exp-empty p { margin: 0; color: var(--exp-text-muted); font-size: 12.5px; font-weight: 600; line-height: 1.45; }

/* ---- modal ---- */
.exp-modal-host {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(37,44,66,.24);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.exp-modal-host[hidden] { display: none; }

.exp-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 18px;
  border-radius: var(--exp-radius-xl);
}

.exp-modal-head,
.exp-modal-body,
.exp-modal-actions,
.exp-tabs { position: relative; z-index: 1; }

.exp-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.exp-modal-title { margin: 0; font-size: 19px; letter-spacing: -0.02em; }
.exp-modal-sub { margin: 3px 0 0; color: var(--exp-text-muted); font-size: 11.5px; font-weight: 700; }

.exp-ghost-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.32);
  color: var(--exp-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.exp-ghost-btn:hover { background: rgba(255,255,255,.5); }

.exp-tabs {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  margin-bottom: 14px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 999px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.70);
}

.exp-tab {
  min-height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--exp-text-secondary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.exp-tab.active {
  background: rgba(255,255,255,.84);
  color: var(--exp-text-primary);
  box-shadow: 0 8px 20px rgba(31,41,55,.14), inset 0 1px 1px rgba(255,255,255,.92);
}

.exp-tab-panel[hidden] { display: none; }

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

.exp-form-grid .exp-field--wide { grid-column: 1 / -1; }

.exp-field { display: flex; flex-direction: column; gap: 5px; }

.exp-field-label {
  color: var(--exp-text-muted);
  font-size: 10.5px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.exp-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}

.exp-status { color: var(--exp-text-muted); font-size: 12px; font-weight: 700; margin-right: auto; }
.exp-status.is-error { color: var(--exp-red); }
.exp-status.is-success { color: var(--exp-green); }

/* ---- receipts + reimbursement rows ---- */
.exp-section-title {
  margin: 4px 0 8px;
  color: var(--exp-text-secondary);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.exp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 6px;
}

.exp-receipt-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.26);
  color: #0b7d5b;
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
}

.exp-receipt-chip a { color: inherit; text-decoration: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.exp-receipt-chip button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}

.exp-receipt-chip button:hover { opacity: 1; }

.exp-receipt-missing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.28);
  color: #b3271f;
  font-size: 10.5px;
  font-weight: 800;
}

.exp-file-picker,
.exp-danger-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  color: var(--exp-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6);
  overflow: hidden;
}

.exp-file-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.exp-danger-btn:hover { color: var(--exp-red); border-color: rgba(239,68,68,.32); background: rgba(239,68,68,.12); }

.exp-reimb-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.exp-reimb-summary .exp-metric {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(255,255,255,.44);
}

.exp-reimb-summary .exp-metric[data-tone="good"] b { color: var(--exp-green); }
.exp-reimb-summary .exp-metric[data-tone="warn"] b { color: var(--exp-amber); }
.exp-reimb-summary .exp-metric[data-tone="info"] b { color: var(--exp-blue); }

.exp-reimb-list { display: grid; gap: 9px; margin-bottom: 12px; }

.exp-reimb-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 18px;
  background: rgba(255,255,255,.26);
  border: 1px solid rgba(255,255,255,.44);
}

.exp-reimb-amount { font-size: 15px; font-weight: 850; letter-spacing: -0.02em; color: var(--exp-text-primary); }
.exp-reimb-meta { color: var(--exp-text-muted); font-size: 11px; font-weight: 700; }
.exp-reimb-body { min-width: 0; }
.exp-reimb-body .exp-chip-row { margin-top: 6px; margin-bottom: 0; }

.exp-add-reimb {
  padding: 13px;
  border-radius: 20px;
  background: rgba(255,255,255,.22);
  border: 1px dashed rgba(129,143,172,.4);
}

/* ---- channel panels (bank-balance) ---- */
.exp-channels {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.exp-channel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.66);
}

.exp-channel-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--exp-text-muted);
}

.exp-channel-value {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.045em;
  color: var(--exp-text-primary);
}

.exp-channel[data-tone="debt"] .exp-channel-value { color: var(--exp-amber); text-shadow: 0 0 18px rgba(229,163,0,.20); }
.exp-channel[data-tone="advance"] .exp-channel-value { color: var(--exp-blue); text-shadow: 0 0 18px rgba(59,130,246,.20); }
.exp-channel[data-tone="settled"] .exp-channel-value { color: var(--exp-green); }

.exp-channel-caption { margin-top: 3px; font-size: 11px; font-weight: 750; color: var(--exp-text-secondary); }
.exp-channel-flow { margin-top: 6px; font-size: 10.5px; font-weight: 650; color: var(--exp-text-muted); }
.exp-channel-warn { margin-top: 2px; font-size: 10.5px; font-weight: 800; color: #b3271f; }

/* ---- ledger operation card ---- */
.exp-op-card {
  overflow: hidden;
  padding: 15px 16px 15px 20px;
  border-radius: 24px;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}

.exp-op-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(31, 41, 55, 0.20), inset 0 1px 1px rgba(255, 255, 255, 0.78);
}

.exp-op-accent {
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  z-index: 2;
}

.exp-op-accent--out { background: linear-gradient(180deg, #F0B429, #E5A300); }
.exp-op-accent--in { background: linear-gradient(180deg, #34D399, #22C55E); }

.exp-op-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.exp-op-title { font-size: 15px; font-weight: 850; letter-spacing: -0.02em; color: var(--exp-text-primary); }
.exp-op-sub { margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--exp-text-muted); }
.exp-op-amount { font-size: 18px; font-weight: 850; letter-spacing: -0.03em; white-space: nowrap; }
.exp-op-amount--out { color: #9c681d; }
.exp-op-amount--in { color: #0b7d5b; }

/* ---- segmented control ---- */
.exp-segments {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.exp-seg {
  flex: 1 1 0;
  min-height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--exp-text-secondary);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.exp-seg.active {
  background: rgba(255, 255, 255, 0.86);
  color: var(--exp-text-primary);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.92);
}

.exp-op-shared {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

/* ---- history ---- */
.exp-history {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exp-history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--exp-text-secondary);
}

.exp-history time { color: var(--exp-text-muted); font-weight: 650; white-space: nowrap; }

@media (max-width: 1180px) {
  .exp-balances { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .exp-shell { gap: 13px; padding-top: 12px !important; }
  .exp-topbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .exp-toolbar { flex-direction: column; align-items: stretch; }
  .exp-toolbar .exp-select { width: 100%; }
  .exp-toolbar .primary { width: 100%; }
  .exp-expense-main,
  .exp-balance-split,
  .exp-channels,
  .exp-op-shared,
  .exp-form-grid,
  .exp-reimb-summary { grid-template-columns: 1fr; }
  .exp-reimb-item { grid-template-columns: 1fr; }
  .exp-modal-host { place-items: start center; padding: 12px; }
  .exp-modal { width: 100%; }
  .exp-toolbar .secondary { width: 100%; }
}
