.dash, .layout { min-height: 100vh; }
.layout { display: flex; align-items: stretch; gap: 0; }

.sidebar {
  position: fixed !important;
  top: 0; left: 0; bottom: 0;
  width: 214px !important;
  max-width: 84vw;
  padding: 0 !important;
  gap: 0 !important;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0c111d, #090d17) !important;
  border-right: 1px solid var(--line) !important;
  box-shadow: none !important;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 56;
}
.side-inner { display: flex; flex-direction: column; height: 100%; padding: 14px 12px 12px; }

.side-brand {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 6px 16px;
}
.side-logo {
  font-size: 17px; font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.side-logo span { -webkit-text-fill-color: var(--muted2); color: var(--muted2); }
.side-collapse {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--muted2); flex: 0 0 28px;
  transition: background .18s ease, color .18s ease;
}
.side-collapse:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.nav-group {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted2); padding: 0 10px; margin: 16px 0 6px;
}
.nav-group:first-of-type { margin-top: 2px; }

.sidebar button[data-sec],
.sidebar .side-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-align: left; background: none; border: 0;
  transition: background .18s ease, color .18s ease;
}
.sidebar button[data-sec] .ic,
.sidebar .side-link .ic { width: 16px; height: 16px; flex: 0 0 16px; opacity: .9; }
.sidebar button[data-sec]:hover,
.sidebar .side-link:hover { background: rgba(255,255,255,0.055) !important; color: var(--text); }
.sidebar button[data-sec].active {
  background: rgba(70,129,255,0.14) !important;
  color: #c4d7ff !important;
  box-shadow: none !important;
}
.sidebar button[data-sec].active .ic { color: var(--blue-2); opacity: 1; }
.nav-count {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--blue-2); color: #fff;
  font-size: 11px; font-weight: 700;
}

.side-foot { margin-top: auto; padding-top: 14px; }
.side-foot .side-sep { height: 1px; background: var(--line); margin: 0 4px 10px; }
.side-user {
  padding: 6px 10px 10px; font-size: 11.5px; color: var(--muted2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.content {
  flex: 1; min-width: 0;
  margin-left: 214px;
  padding: 22px 26px 40px !important;
  max-width: none !important;
}
body.nav-hidden .sidebar { transform: translateX(-100%); }
body.nav-hidden .content { margin-left: 0; }

.page-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.proj-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; font-weight: 600;
  transition: border-color .18s ease, background .18s ease;
}
.proj-chip:hover { border-color: var(--ring); }
.proj-ava {
  width: 20px; height: 20px; border-radius: 6px; flex: 0 0 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-fill); color: #fff; font-size: 11px; font-weight: 700;
}
.proj-chip .arrow { color: var(--muted2); font-size: 11px; margin-left: 2px; }

.seg {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 10px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--line);
}
.seg button {
  height: 28px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: rgba(70,129,255,0.16); color: #c4d7ff; }

.tb-icon, .tb-chip {
  height: 36px; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border-radius: 10px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  transition: border-color .18s ease, color .18s ease;
}
.tb-icon { width: 36px; flex: 0 0 36px; }
.tb-chip { padding: 0 12px; }
.tb-icon:hover, .tb-chip:hover { border-color: var(--ring); color: var(--text); }
.tb-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; }
.page-sub { font-size: 13px; color: var(--muted2); margin-top: 4px; }

.ov-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; margin-bottom: 16px;
  border-radius: 14px; border: 1px solid var(--line);
  background: radial-gradient(120% 180% at 85% 50%, rgba(70,129,255,0.16), transparent 62%), rgba(255,255,255,0.035);
}
.ov-banner-ic {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(70,129,255,0.16); color: var(--blue-2);
}
.ov-banner-txt { min-width: 0; }
.ov-banner-txt b { display: block; font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.ov-banner-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ov-banner .btn { margin-left: auto; flex: 0 0 auto; }
.ov-banner-close {
  position: absolute; top: 10px; right: 12px;
  color: var(--muted2); font-size: 16px; line-height: 1;
}
.ov-banner-close:hover { color: var(--text); }

.kpi-strip {
  display: flex; flex-wrap: wrap;
  border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  margin-bottom: 16px; overflow: hidden;
}
.kpi { flex: 1 1 150px; min-width: 0; padding: 16px 20px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi-lead { flex: 1 1 240px; }
.kpi-l { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted2); margin-bottom: 8px; }
.kpi-v { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.kpi-lead .kpi-v { font-size: 30px; }
.kpi-d { font-size: 12px; font-weight: 600; color: var(--muted2); margin-top: 5px; }
.kpi-d.up { color: var(--ok); }
.kpi-d.down { color: var(--bad); }

.ov-grid { display: grid; grid-template-columns: minmax(0,1fr) 304px; gap: 16px; align-items: start; margin-bottom: 16px; }
.ov-side { display: flex; flex-direction: column; gap: 16px; }

.pcard {
  border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  padding: 16px 18px;
}
.pcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pcard-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.pcard-sub { font-size: 12px; color: var(--muted2); margin-top: 2px; }
.link-more { font-size: 12.5px; font-weight: 600; color: var(--muted); transition: color .18s ease; }
.link-more:hover { color: var(--blue-3); }

.chart-card .chart-canvas { height: 280px; width: 100%; }

.analytics-switcher { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,0.045); border: 1px solid var(--line); }
.analytic-tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 11px; border-radius: 8px;
  background: none !important; border: 0 !important; box-shadow: none !important;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.analytic-tab:hover { color: var(--text); }
.analytic-tab.active { background: rgba(70,129,255,0.16) !important; color: #c4d7ff !important; }
.analytic-tab .val { font-size: 11.5px; font-weight: 700; color: var(--muted2); }
.analytic-tab.active .val { color: #c4d7ff; }

.stat-row { margin-bottom: 14px; }
.stat-row:last-child { margin-bottom: 0; }
.stat-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.stat-row-l { font-size: 13px; color: var(--muted); }
.stat-row-v { font-size: 12.5px; font-weight: 700; }
.bar-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #33409a, #4681ff); }
.bar-fill.muted { background: rgba(255,255,255,0.22); }
.stat-note { font-size: 11.5px; color: var(--muted2); margin-top: 8px; }

.bal-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bal-row:last-child { border-bottom: 0; padding-bottom: 0; }
.bal-row:first-child { padding-top: 0; }
.bal-l { font-size: 12.5px; color: var(--muted); }
.bal-v { margin-left: auto; font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
.bal-row .status { display: none; }

.pay-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pay-row:last-child { margin-bottom: 0; }
.pay-ic { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--blue-3); }
.pay-name { font-size: 13px; font-weight: 600; }
.pay-val { margin-left: auto; font-size: 12.5px; font-weight: 700; }

.ov-empty { font-size: 13px; color: var(--muted2); padding: 6px 0 2px; }

.topbar { display: none !important; }
@media (max-width: 900px) {
  .ov-grid { grid-template-columns: minmax(0,1fr); }
  .ov-side { flex-direction: row; flex-wrap: wrap; }
  .ov-side .pcard { flex: 1 1 260px; }
}
@media (max-width: 767px) {
  .topbar { display: flex !important; position: sticky; top: 0; z-index: 50; }
  .sidebar { transform: translateX(-100%); transition: transform .28s var(--ease); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-hidden .sidebar { transform: translateX(-100%); }
  .content { margin-left: 0 !important; padding: 16px 16px 32px !important; }
  .page-head h1 { font-size: 24px; }
  .kpi { flex: 1 1 50%; border-left: 0; border-top: 1px solid var(--line); }
  .kpi-lead { flex: 1 1 100%; border-top: 0; }
  .page-toolbar { gap: 8px; }
  .tb-right { margin-left: 0; }
  .seg { overflow-x: auto; max-width: 100%; }
}

@media (min-width: 768px) {
  .dash { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .layout { gap: 0 !important; align-items: stretch !important; }
  .sidebar {
    top: 0 !important; left: 0 !important; bottom: 0 !important;
    height: auto !important; flex: none !important;
    border: 0 !important; border-right: 1px solid var(--line) !important;
    border-radius: 0 !important;
    transform: none;
  }
  .content { flex: 1; min-height: 100vh; }
}
.sidebar-head { display: none; }

.chart-card .chart-canvas { background: none !important; border: 0 !important; border-radius: 0 !important; }
.pcard .tx { display: block; }
.pcard .tx-item {
  background: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 11px 2px !important;
}
.pcard .tx-item:last-child { border-bottom: 0 !important; }
.pcard .tx-item:hover { background: rgba(255,255,255,0.03) !important; transform: none !important; }

.sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }

.pcard .tx { max-height: none !important; overflow: visible !important; }

.pcard-head { flex-wrap: wrap; row-gap: 10px; }
.analytics-switcher { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.analytics-switcher::-webkit-scrollbar { width: 0; height: 0; display: none; }
.analytic-tab {
  width: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: visible !important;
  text-align: center !important;
}
.analytic-tab .val { white-space: nowrap; }
@media (max-width: 560px) {
  .analytic-tab .val { display: none; }
}

.kpi {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 18px 20px;
  min-height: 96px;
}
.kpi-lead { flex: 1.5 1 0; }
.kpi-l { letter-spacing: 0.045em; margin-bottom: 0; }
.kpi-v { font-variant-numeric: tabular-nums; }
.kpi-d { margin-top: 0; }
@media (max-width: 767px) {
  .kpi { flex: 1 1 50%; min-height: 0; padding: 14px 16px; }
  .kpi-lead { flex: 1 1 100%; }
}

.box {
  background: rgba(255,255,255,0.035) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 18px !important;
  margin-bottom: 16px;
  box-shadow: none !important;
}
.box h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0; }
.box-header { margin-bottom: 14px; justify-content: flex-end; }
.box-header h3 { margin-right: auto; }
.help-text { font-size: 13px; color: var(--muted2); margin: 0 0 14px; }
.msg { font-size: 12.5px; margin-top: 12px; }

.row { align-items: flex-end; gap: 14px; }
.row-action { flex: 0 0 auto; }
.field-label { margin-bottom: 7px; }
input:not([type="checkbox"]):not([type="radio"]), select, .field-input:not(textarea) {
  height: 46px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
textarea, .field-input textarea { height: auto; min-height: 96px; padding: 12px 16px !important; }
.row .btn { height: 46px; padding: 0 22px; }
.grid-cards { gap: 14px; margin-top: 0; }

.box .tx { max-height: 460px; }
.box .tx-item, .pcard .tx-item {
  background: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 12px 2px !important;
  align-items: center;
}
.box .tx-item:last-child, .pcard .tx-item:last-child { border-bottom: 0 !important; }
.box .tx-item:hover, .pcard .tx-item:hover { background: rgba(255,255,255,0.03) !important; transform: none !important; }
.tx-main { min-width: 0; }
.tx-title { font-size: 13.5px; font-weight: 600; }
.tx-meta { font-size: 12px; color: var(--muted2); margin-top: 2px; }
.tx-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tx-amount { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tx-amount.pos { color: var(--ok); }
.tx-amount.neg { color: var(--bad); }
.tx-status {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: var(--muted);
  white-space: nowrap;
}
.tx-status.ok   { background: rgba(52,211,153,0.14); color: #34d399; }
.tx-status.wait { background: rgba(251,191,36,0.14); color: #fbbf24; }
.tx-status.out  { background: rgba(70,129,255,0.16); color: #c4d7ff; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 30px 16px; text-align: center;
}
.empty-state svg { width: 26px; height: 26px; color: var(--muted2); opacity: .65; }
.empty-state span { font-size: 13px; color: var(--muted2); max-width: 280px; line-height: 1.5; }
.ov-empty {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--muted2); padding: 10px 0 4px;
}
.ov-empty::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.22); flex: 0 0 6px;
}

.section:not(#sec-overview) .page-head { margin-bottom: 18px; }

.auth { padding: 24px; }
.auth-card {
  max-width: 408px;
  padding: 34px 32px 28px !important;
  border-radius: 20px !important;
}
.auth-logo-wrap { margin-bottom: 22px; }
.auth-logo { font-size: 22px; }
.auth-card h1 { font-size: 21px; letter-spacing: -0.03em; margin-bottom: 6px; }
.auth-card p { font-size: 13px; color: var(--muted2); margin-bottom: 24px; }
.auth-card label {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted) !important;
  margin: 16px 0 7px;
}
.auth-card form > label:first-of-type, .auth-card > label:first-of-type { margin-top: 0; }
.auth-card .input-group input { height: 46px; }
.auth-card .btn { width: 100%; height: 46px; margin-top: 22px; }
.auth-card .err:empty { display: none; }
.auth-card .err:not(:empty) {
  display: block;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid currentColor;
  font-size: 12.5px;
  font-weight: 500;
  color: #fca5a5;
  min-height: 0;
}
.auth-card .foot { justify-content: center; margin-top: 18px; }
.auth-card .link { font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-card .link:hover { color: var(--blue-3); }
.auth-back {
  display: block; text-align: center;
  margin-top: 16px; font-size: 12.5px; color: var(--muted2);
  transition: color .18s ease;
}
.auth-back:hover { color: var(--text); }
.input-group .ic { width: 18px; height: 18px; }

.only-mobile { display: none; }

@media (max-width: 767px) {
  .only-mobile { display: flex; }

  .content {
    padding: 16px 16px calc(32px + env(safe-area-inset-bottom)) !important;
  }
  .sidebar { width: 268px !important; }
  .side-inner { padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); }
  .sidebar button[data-sec], .sidebar .side-link { padding: 11px 12px; font-size: 14px; }
  .side-collapse { width: 34px; height: 34px; flex: 0 0 34px; }
  .side-collapse svg { display: none; }
  .side-collapse::after { content: '✕'; font-size: 15px; line-height: 1; }
  .topbar-logo { font-size: 17px; }

  .page-toolbar { gap: 8px; margin-bottom: 18px; }
  .proj-chip { order: 1; flex: 1 1 auto; height: 40px; min-width: 0; }
  .proj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-right { order: 2; margin-left: auto; gap: 6px; flex: 0 0 auto; }
  #periodSeg { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  #periodSeg button { flex: 0 0 auto; height: 32px; }
  .tb-chip, .tb-icon { height: 40px; }
  .tb-icon { width: 40px; flex: 0 0 40px; }

  #filterUTC, #langToggle { display: none; }

  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 23px; }
  .page-sub { font-size: 12.5px; }

  .ov-banner { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .ov-banner-txt { flex: 1 1 100%; order: 2; }
  .ov-banner .btn { order: 3; margin-left: 0; width: 100%; }
  .ov-banner-close { top: 8px; right: 10px; }

  .kpi-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .kpi {
    flex: none; min-height: 0; padding: 14px 16px;
    border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi-lead { grid-column: 1 / -1; border-top: 0; border-left: 0; padding: 16px; }
  .kpi-lead .kpi-v { font-size: 26px; }
  .kpi-v { font-size: 18px; }
  .kpi-l { font-size: 10px; }

  .ov-grid { gap: 14px; }
  .ov-side { flex-direction: column; }
  .ov-side .pcard { flex: 1 1 auto; }
  .pcard { padding: 14px 16px; }
  .chart-card .chart-canvas { height: 200px; }
  .pcard-head { margin-bottom: 12px; }

  .tx-item { flex-wrap: wrap; row-gap: 6px; }
  .tx-right { margin-left: auto; gap: 8px; }
  .tx-title { font-size: 13px; }
  .tx-status { font-size: 10px; padding: 3px 7px; }

  .row { gap: 12px; }
  .field { flex: 1 1 100%; min-width: 0; }
  .row-action { flex: 1 1 100%; }
  .row .btn { width: 100%; }
  .box { padding: 16px !important; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh;
    border-radius: 18px 18px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .auth { padding: 18px; }
  .auth-card { padding: 26px 20px 22px !important; border-radius: 18px !important; }
  .auth-logo { font-size: 20px; }
  .auth-card h1 { font-size: 19px; }
}

@media (max-width: 380px) {
  .kpi-strip { grid-template-columns: 1fr; }
  .kpi { border-left: 0 !important; }
  .proj-chip { flex: 1 1 100%; }
  .tb-right { margin-left: 0; }
}

.chart-canvas.chart-tall { height: 340px; }
@media (max-width: 767px) { .chart-canvas.chart-tall { height: 220px; } }
#anDays .stat-row { margin-bottom: 11px; }
#anDays .stat-row-l { font-variant-numeric: tabular-nums; }
#anDays .stat-row-v { font-variant-numeric: tabular-nums; }

.notif-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  transition: background .18s ease;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread .tx-title { color: var(--text); }
.notif-item.unread { background: rgba(70,129,255,0.05); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: rgba(255,255,255,0.22); }
.notif-dot.ok { background: var(--ok); }
.notif-dot.wait { background: #fbbf24; }
.notif-dot.out { background: var(--blue-2); }
.notif-item:not(.unread) .notif-dot { opacity: .45; }

.flow { display: flex; flex-direction: column; gap: 2px; }
.flow-step { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; position: relative; }
.flow-step + .flow-step { border-top: 1px solid var(--line); }
.flow-num {
  width: 24px; height: 24px; flex: 0 0 24px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(70,129,255,0.14);
  color: var(--blue-3); font-size: 12px; font-weight: 700;
}
.flow-step b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.flow-step span { font-size: 12.5px; color: var(--muted2); line-height: 1.5; }

.nav-restore {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 60;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)), #0c111d;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  box-shadow: var(--lacquer);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-restore:hover { color: var(--text); border-color: var(--ring); transform: translateY(-1px); }
.nav-restore:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
@media (min-width: 768px) {
  body.nav-hidden .nav-restore { display: inline-flex; }
  body.nav-hidden .content { padding-left: 66px !important; }
}

.ov-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-grid { margin-bottom: 0; }
.ov-grid + .pcard { margin-top: 16px; }
@media (max-width: 767px) { .ov-main { gap: 14px; } }

@media (max-width: 767px) {
  .topbar { gap: 10px; padding: 0 14px; height: 58px; }
  .menu-btn { flex: 0 0 36px; }
  .topbar-logo-wrap {
    flex: 1 1 auto;
    justify-content: center;
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .topbar-logo-wrap:hover { box-shadow: none !important; }
  .topbar-logo {
    font-size: 18px;
    line-height: 1.3;
    padding-bottom: 1px;
  }
  .topbar-right { flex: 0 0 36px; justify-content: flex-end; margin-left: 0; }
}

.chart-box { height: 210px; width: 100%; }
.chart-box-sm { height: 180px; }
.donut-wrap { width: 100%; max-width: 190px; margin: 2px auto 14px; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; }
.dl-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.dl-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.dl-name { color: var(--muted); }
.dl-val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .chart-box { height: 180px; }
  .chart-box-sm { height: 160px; }
  .donut-wrap { max-width: 170px; }
}

.seg-sep {
  width: 1px;
  align-self: stretch;
  margin: 3px 3px;
  background: var(--line-strong);
  flex: 0 0 1px;
}
.seg-icon {
  height: 28px;
  width: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.seg-icon:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.seg-icon:focus-visible { outline: 2px solid var(--blue-2); outline-offset: -2px; }
.seg-icon.active { background: rgba(70,129,255,0.16); color: #c4d7ff; }
.seg-icon.date-pick { width: 36px; flex: 0 0 36px; color: var(--muted2); }
.seg-icon.date-pick svg { width: 20px; height: 20px; }
.seg-icon.date-pick:hover { color: #c4d7ff; }
@media (max-width: 767px) {
  .seg-icon { height: 32px; width: 34px; flex: 0 0 34px; }
  .seg-icon.date-pick { width: 40px; flex: 0 0 40px; }
  .seg-icon.date-pick svg { width: 22px; height: 22px; }
}

.w-closed {
  margin-bottom: 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.28);
  color: #fbbf24; font-size: 13px; font-weight: 600; line-height: 1.5;
}

.creds { display: flex; flex-direction: column; gap: 8px; }
.cred { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.03); }
.cred-l { flex: 0 0 150px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted2); line-height: 1.35; }
.cred-l i { display: block; font-style: normal; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted2); opacity: 0.8; margin-top: 2px; }
.cred-v { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--blue-3); }
.cred-v.mask { letter-spacing: 2px; color: var(--muted); }
.cred .btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .cred { flex-wrap: wrap; }
  .cred-l { flex: 1 1 100%; }
  .cred-v { flex: 1 1 100%; order: 3; }
}
.wallets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.wallet { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.03); }
.wallet-top { display: flex; align-items: center; gap: 8px; }
.wallet-top .w-type { flex: 1 1 auto; min-width: 0; height: 38px; }
.w-active { flex: 0 0 auto; }
.w-active.off { color: var(--muted2) !important; }
.w-del { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; color: var(--muted2); font-size: 18px; line-height: 1; transition: background .15s ease, color .15s ease; }
.w-del:hover { background: rgba(248,113,113,0.14); color: var(--bad); }
.wallet .w-value, .wallet .w-bank { height: 38px; }
.w-pair { display: flex; gap: 8px; }
.w-pair select { flex: 1 1 0; min-width: 0; height: 38px; }
.w-cur-fixed { flex: 0 0 auto; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 8px; background: var(--panel-2, rgba(255,255,255,0.05)); border: 1px solid var(--ring, rgba(255,255,255,0.12)); font-weight: 700; font-size: 13px; color: var(--ink, #e6e9f0); }
