:root{
  --bg:            #0a1218;
  --page-bg:       #eef0f3;     
  --panel-bg:      #e2e4ea;     
  --ink:           #14151a;
  --ink-soft:      #8b8e97;
  --line:          #d3d6dd;
  --field:         #eef0f3;
  --accent:        #28dd63;
  --ok:            #14151a;     
  --ok-soft:       #d9f5e6;
  --ok-text:       #128a5f;
  --warn-soft:     #fde4e2;
  --warn-text:     #c2453d;
  --bad:           #d1453d;
  --hatch:         #a7d8ea;

  --font: "Montserrat", sans-serif;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

.app{
  background: var(--bg);
  padding: 22px 40px 0;
  overflow-x: hidden;
  width: 100%;
}

.topbar{
  padding: 4px 4px 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.topbar-row{
  display:flex; align-items:center;
}
.brand-mark{
  display: inline-flex; align-items: center;
  text-decoration: none; flex-shrink: 0; cursor: pointer;
}
.brand-logo-img{ height: 20px; width: auto; display: block; }
.auth-brand .brand-logo-img{ height: 22px; }

.nav{ display:flex; gap: 30px; margin-left: 52px; flex: 1; }
.nav-item{
  color: rgba(255,255,255,.42);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
}
.nav-item:hover{ color: rgba(255,255,255,.75); }
.nav-item.active{ color:#fff; font-weight: 600; }
.nav-item.active::after{
  content:""; position:absolute; left:0; right:0; bottom:-13px;
  height:2px; background: var(--accent); border-radius:2px;
}

.hamburger-btn{
  display:none;
  width: 36px; height: 36px;
  margin-left: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  flex-direction: column; align-items:center; justify-content:center; gap:4px;
  cursor:pointer; flex-shrink:0;
}
.hamburger-btn span{
  width: 16px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger-btn.is-open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.hamburger-btn.is-open span:nth-child(2){ opacity: 0; }
.hamburger-btn.is-open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

.nav-mobile{
  display:none;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.nav-mobile.is-open{ max-height: 320px; margin-top: 16px; }
.nav-mobile .nav-item{
  padding: 12px 6px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav-mobile .nav-item.active{ color: var(--accent); }

.topbar-actions{ display:flex; align-items:center; gap:8px; margin-left:auto; }
.icon-btn{
  position: relative;
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.65);
  cursor:pointer;
  transition: background .2s ease, color .2s ease;
  flex-shrink: 0;
}
.icon-btn:hover{ background: rgba(255,255,255,.1); color: #fff; }
.icon-btn--user{ margin-left: 4px; }

.search-box{
  position: relative;
  display:flex; align-items:center;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  transition: background .2s ease;
  overflow: hidden;
}
.search-box .icon-btn{ border: none; background: transparent; }
.search-box:focus-within{ background: rgba(255,255,255,.07); }
.search-input{
  width: 0; min-width: 0; opacity: 0;
  border: none; outline: none; background: transparent;
  color: #fff; font-family: var(--font); font-size: 13.5px; padding: 0;
  transition: width .25s ease, opacity .2s ease, padding .25s ease;
}
.search-input::placeholder{ color: rgba(255,255,255,.4); }
.search-box.is-open .search-input{ width: 190px; opacity: 1; padding: 0 14px 0 0; }
.search-results{
  position: absolute; top: calc(100% + 10px); right: 0; width: 310px; max-height: 320px;
  overflow-y: auto; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 24px 48px -16px rgba(0,0,0,.35);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 45; padding: 6px;
}
.search-box.has-results .search-results{ opacity: 1; visibility: visible; transform: translateY(0); }
.search-result-item{
  display: flex; flex-direction: column; gap: 3px; padding: 10px 11px; border-radius: 8px;
  color: inherit; text-decoration: none; border-bottom: 1px solid #f1efe9;
}
.search-result-item:last-child{ border-bottom: 0; }
.search-result-item:hover, .search-result-item.is-active{ background: var(--field); }
.search-result-order{ font-size: 12.5px; font-weight: 800; color: var(--ink); }
.search-result-meta{ font-size: 11.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.4; }
.search-result-empty{ padding: 12px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }

.dropdown{ position: relative; }
.dropdown-panel{
  position:absolute; top: calc(100% + 12px); right: 0;
  background: #fff; color: var(--ink);
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 24px 48px -16px rgba(0,0,0,.35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 40;
}
.dropdown.is-open .dropdown-panel{ opacity:1; visibility:visible; transform:translateY(0); }

.dropdown-panel--user{ width: 220px; padding: 8px; }
.user-menu-item{
  display:flex; align-items:center; gap:12px;
  padding: 11px 12px; border-radius:8px;
  color: var(--ink); text-decoration:none;
  font-size:13px; font-weight:600;
}
.user-menu-item svg{ color: var(--ink-soft); flex-shrink:0; }
.user-menu-item:hover{ background: var(--field); }
.user-menu-divider{ height:1px; background:var(--line); margin:6px 4px; }
.user-menu-item--danger{ color: var(--bad); }
.user-menu-item--danger svg{ color: var(--bad); }

.page-head{
  display:flex; align-items:center; justify-content:space-between;
  margin: 0 4px 22px;
}
.page-head h1{
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}
.page-sub{
  margin: 6px 0 0;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.42);
}
.page-sub .current-month-label{ color: rgba(255,255,255,.75); font-weight: 700; }
.last-update{
  display:flex; align-items:center; gap:8px;
  color: rgba(255,255,255,.4);
}
.last-update-label{ font-size: 12.5px; font-weight: 600; }
.last-update-value{ font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.85); }

.wallet-row{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}
.wcard{
  border-radius: 12px;
  padding: 26px 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.04) 60%);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.18);
  color: #f6f5f2;
  display:flex; flex-direction:column; justify-content: space-between;
  min-height: 188px;
}
.wcard--hero{ border-color: rgba(40,221,99,.4); background: linear-gradient(135deg, rgba(40,221,99,.22), rgba(255,255,255,.04) 60%); }
.al-right{ text-align:right; }
.wcard-label{
  display:block;
  font-size: 10.5px; letter-spacing: .07em; font-weight:600;
  color: rgba(246,245,242,.5);
  margin-bottom: 7px;
}
.wcard-balance{
  display:block;
  font-size: 25px; font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.wcard--kpi{ justify-content: flex-start; gap: 12px; }
.wcard-trend{ font-size: 12px; font-weight: 700; width: fit-content; }
.wcard-trend--up{ color: #6bdba8; }
.wcard-trend--down{ color: #f0958d; }

.sheet{
  background: var(--page-bg);
  border-radius: 14px 14px 0 0;
  margin-top: -14px;
  padding-top: 36px;
  position: relative;
  z-index: 2;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-bottom: 60px;
}

.panel-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 20px;
}
.panel-head h2{
  font-size: 16px; font-weight: 700;
  margin:0; color: var(--ink);
  letter-spacing: -0.005em;
}
.panel-sub{ font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }

.chart-legend{
  display:flex; gap:18px; margin-bottom:14px;
  font-size:12px; color: var(--ink-soft); font-weight:600;
}
.chart-legend span{ display:flex; align-items:center; gap:6px; }
.chart-legend .dot{ width:8px; height:8px; border-radius:2px; display:inline-block; }
.dot--ok{ background: var(--ink); }
.dot--bad{
  background-image: repeating-linear-gradient(45deg, var(--hatch) 0, var(--hatch) 2px, transparent 2px, transparent 6px);
  background-color:#eaf6fa; border:1px solid var(--hatch);
}

.chart-wrap{ display:flex; gap: 14px; }
.chart-yaxis{
  display:flex; flex-direction:column; justify-content:space-between;
  height: 190px; padding-bottom: 27px;
  font-size: 10.5px; font-weight: 600; color: var(--ink-soft);
  text-align:right;
}
.chart-body{ flex:1; position:relative; min-width:0; }
.chart{
  display:flex; align-items:flex-end; gap: 14px;
  height: 190px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.chart-col{
  flex:1; display:flex; align-items:flex-end; justify-content:center; gap:5px; height:100%;
  position: relative;
}
.bar{
  width: 40%;
  border-radius: 4px 4px 2px 2px;
  transform-origin: bottom;
  animation: growBar .7s cubic-bezier(.22,1,.36,1) both;
}
.bar--ok{ background: var(--ink); }
.bar--bad{
  background-image: repeating-linear-gradient(45deg, var(--hatch) 0, var(--hatch) 2px, transparent 2px, transparent 6px);
  background-color: #eaf6fa;
  border: 1px solid var(--hatch);
}
@keyframes growBar{
  from{ transform: scaleY(0); opacity:0; }
  to{ transform: scaleY(1); opacity:1; }
}
.chart-axis{ display:flex; gap:14px; padding: 10px 0 0; }
.chart-axis span{ flex:1; text-align:center; font-size:11px; color: var(--ink-soft); font-weight:600; }

.tooltip{
  position:absolute;
  background:#fff;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 16px 36px -10px rgba(20,21,26,.28);
  border: 1px solid var(--line);
  display:flex; flex-direction:column; gap:6px;
  z-index: 3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease;
}
.chart-col:hover .tooltip{
  opacity: 1;
  visibility: visible;
}
.tooltip-month{ font-size:11.5px; font-weight:700; color: var(--ink); margin-bottom:2px; }
.tooltip-row{ display:flex; align-items:center; gap:8px; font-size:12px; color: var(--ink-soft); }
.tooltip-row b{ color: var(--ink); font-weight:700; }
.tooltip-swatch{ width:9px; height:9px; border-radius:2px; flex-shrink:0; }
.tooltip-swatch--ok{ background: var(--ink); }
.tooltip-swatch--bad{
  background-image: repeating-linear-gradient(45deg, var(--hatch) 0, var(--hatch) 1px, transparent 1px, transparent 3px);
  background-color:#eaf6fa; border:1px solid var(--hatch);
}

.tx-table{ width:100%; border-collapse: collapse; }
.tx-table thead th{
  text-align:left; font-size: 10.5px; letter-spacing:.05em;
  color: var(--ink-soft); font-weight:700;
  padding: 0 6px 12px;
  border-bottom: 1px solid var(--line);
}
.tx-table th.al-right, .tx-table td.al-right{ text-align:right; }
.tx-table td{
  padding: 13px 6px;
  border-bottom: 1px solid #d9dbe1;
  font-size: 13px;
  vertical-align: middle;
}
.tx-table tbody tr:last-child td{ border-bottom:none; }
.tx-row-lead{ display:flex; align-items:center; gap:10px; }
.tx-avatar{
  width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:10.5px; font-weight:700; color:#fff; flex-shrink:0;
}
.tx-order{ font-weight:600; color:var(--ink); }
.tx-sub{ display:block; font-size:11px; color:var(--ink-soft); margin-top:1px; }
.status-pill{
  display:inline-flex; align-items:center; gap:5px;
  font-size:11.5px; font-weight:700;
  padding: 4px 11px; border-radius: 999px;
}
.status-pill--ok{ background: var(--ok-soft); color: var(--ok-text); }
.status-pill--bad{ background: var(--warn-soft); color: var(--warn-text); }
.status-pill--warn{ background: #fbeed9; color: #9a6c1f; }
.tx-amount{ font-weight:700; color: var(--ink); }
.tx-amount.neg{ color: var(--bad); }
.tx-empty{ text-align:center; padding: 24px 6px; color: var(--ink-soft); font-size:12.5px; font-weight:600; }

.filter-toolbar{
  display:flex; align-items:center; justify-content:flex-end;
  flex-wrap: wrap; gap: 14px;
  padding: 0 40px 26px;
}
.filter-group{ display:flex; align-items:center; gap:10px; flex-wrap: wrap; }
.filter-toolbar-label{
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .05em;
  margin-right: 4px;
}
.filter-select{
  appearance: none; -webkit-appearance:none;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="%2392929c" stroke-width="1.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 12px center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 30px 8px 12px;
  font-family: var(--font);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.filter-select:focus{ outline: 2px solid rgba(40,221,99,.35); }
.filter-apply{
  background: var(--ink); border: none;
  color: #fff; font-family: var(--font);
  font-size: 12.5px; font-weight: 700; cursor:pointer;
  padding: 9px 20px; border-radius: 8px;
  transition: background .15s ease;
}
.filter-apply:hover{ background:#000; }

.row{ padding: 0 40px 22px; }
.row--kpi3{ display:grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.row--kpi4{ display:grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.row--split{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row--kpi3 > *, .row--kpi4 > *, .row--split > *, .wallet-row > *{ min-width: 0; }

.panel-box{
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
}

.row--section-label{ padding-bottom: 10px; }
.section-label{
  font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .05em;
}
.section-label .period-label,
.section-label .current-month-label{ color: var(--ink); }

.kpi-card{
  border-radius: 10px;
  padding: 22px 24px;
  display:flex; flex-direction:column; gap: 8px;
  border: 1px solid var(--line);
}
.kpi-label{ font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing:.04em; }
.kpi-value{ font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.kpi-trend{ font-size: 11.5px; font-weight: 700; width: fit-content; }
.kpi-trend--up{ color: var(--ok-text); }
.kpi-trend--down{ color: var(--warn-text); }
.kpi-card--revenue{ background: linear-gradient(160deg, #dcf0e6, var(--panel-bg)); }
.kpi-card--expense{ background: linear-gradient(160deg, #f7dfdc, var(--panel-bg)); }
.kpi-card--total{ background: linear-gradient(160deg, #14151a, #23242c); border-color: rgba(255,255,255,.08); }
.kpi-card--total .kpi-label{ color: rgba(255,255,255,.5); }
.kpi-card--total .kpi-value{ color: #fff; }

.stat-card{
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  display:flex; flex-direction:column; gap:10px;
}
.stat-icon{
  width: 30px; height: 30px; border-radius: 8px;
  display:flex; align-items:center; justify-content:center;
  color: #fff;
}
.stat-icon--orders{ background: var(--ink); }
.stat-icon--returns{ background: var(--warn-text); }
.stat-icon--ticket{ background: var(--accent); }
.stat-icon--diverg{ background: var(--bad); }
.stat-value{ font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing:-0.01em; }
.stat-label{ font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.stat-card--alert{ background: linear-gradient(160deg, #f7dcda, var(--panel-bg)); border-color: #eac6c3; }

.channel-list{ display:flex; flex-direction:column; gap: 16px; }
.channel-row{ display:flex; align-items:center; gap: 14px; }
.channel-avatar{
  width: 34px; height:34px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size: 10.5px; font-weight:700; color:#fff;
  overflow: hidden;
}
.channel-avatar img{ width:100%; height:100%; }
.channel-info{ flex:1; min-width:0; }
.channel-top-row{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:6px; }
.channel-name{ font-size: 13.5px; font-weight: 700; color: var(--ink); }
.channel-amount{ font-size: 13px; font-weight: 700; color: var(--ink); }
.channel-track{ height:6px; border-radius:999px; background: #cfd2d9; overflow:hidden; }
.channel-fill{ height:100%; background: var(--ink); border-radius:999px; }
.channel-pct{ font-size: 11px; color: var(--ink-soft); font-weight:600; margin-top:5px; display:block; }

.entries-summary{ display:flex; align-items:center; gap: 18px; height: 100%; }
.entries-summary > *{ min-width: 0; }
.entries-total{ display:flex; flex-direction:column; gap:4px; flex-shrink:0; }
.entries-total-value{ font-size: 26px; font-weight: 800; color: var(--ink); }
.entries-total-label{ font-size: 11.5px; color: var(--ink-soft); font-weight:600; }
.entries-spark{ flex:1; height: 90px; cursor: crosshair; }
.entries-spark circle{ transition: r .15s ease; }
.entries-spark circle:hover{ r: 4.5; }

.expense-content{ display:flex; gap: 30px; }
.expense-bars{ flex: 1.15; display:flex; flex-direction:column; gap: 12px; min-width:0; }
.expense-bar-row{
  cursor:pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  transition: background .15s ease, border-color .15s ease;
}
.expense-bar-row:hover{ background: rgba(255,255,255,.5); }
.expense-bar-row.is-active{ background: #fff; border-color: var(--accent); }
.expense-bar-top{ display:flex; justify-content:space-between; margin-bottom:6px; }
.expense-bar-name{ font-size: 12.5px; font-weight: 700; color: var(--ink); }
.expense-bar-value{ font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.expense-bar-track{ height: 8px; border-radius: 999px; background: #cfd2d9; overflow:hidden; }
.expense-bar-fill{ height:100%; border-radius:999px; background: var(--accent); }
.expense-detail{
  flex: 1; min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 30px;
  display:flex; align-items:center;
}
.expense-detail-empty{ font-size: 12.5px; color: var(--ink-soft); line-height:1.6; }
.expense-detail-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; width:100%; }
.expense-detail-item{ display:flex; flex-direction:column; gap:4px; }
.expense-detail-label{ font-size:10px; letter-spacing:.05em; font-weight:700; color:var(--ink-soft); }
.expense-detail-value{ font-size:13.5px; font-weight:700; color: var(--ink); }

.sheet--flat{ margin-top: 0; padding-top: 30px; }
.site-footer{
  margin-top: 20px;
  padding: 24px 40px 0;
  border-top: 1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; gap:18px;
}
.site-footer-brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.brand-mini{
  font-weight: 800; font-size: 14px; color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mini .brand-dot{ color: var(--accent); }
.site-footer p{
  margin:0; font-size: 12px; font-weight: 500; color: var(--ink-soft);
}
.site-footer-social{ display:flex; align-items:center; gap:8px; flex-shrink:0; }
.footer-icon-link{
  width: 34px; height: 34px; display:inline-flex; align-items:center; justify-content:center;
  border-radius: 50%; border: 1px solid var(--line); color: var(--ink-soft);
  text-decoration:none; background: var(--field); transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.footer-icon-link:hover{ color: var(--ink); background:#fff; border-color: var(--ink-soft); }
.footer-icon-link svg{ width: 17px; height: 17px; display:block; }

@media (max-width: 1080px){
  .wallet-row{ grid-template-columns: 1fr 1fr; }
  .nav{ display:none; }
  .hamburger-btn{ display:flex; }
  .nav-mobile{ display:flex; }
  .row--kpi4{ grid-template-columns: 1fr 1fr; }
  .row--split{ grid-template-columns: 1fr; }
  .expense-content{ flex-direction: column; }
  .expense-detail{ border-left:none; border-top:1px solid var(--line); padding-left:0; padding-top:20px; }
}

@media (max-width: 720px){
  .app{ padding: 14px 16px 0; }
  .row, .filter-toolbar{ padding-left: 16px; padding-right: 16px; }
  .sheet{ padding-top: 26px; }
  .sheet--flat{ padding-top: 22px; }

  .page-head{ flex-direction:column; align-items:stretch; gap:10px; }
  .last-update{ flex-wrap:wrap; }

  .wallet-row{ grid-template-columns: 1fr; gap:12px; }
  .wcard{ padding: 24px 22px; min-height: auto; }

  .filter-toolbar{ flex-direction:column; align-items:stretch; }
  .filter-group{ flex-direction:column; align-items:stretch; width:100%; gap:8px; }
  .filter-select{ flex:none; width:100%; }
  .filter-apply{ width:100%; }

  .topbar-row{ flex-wrap: nowrap; }
  .topbar-actions{ gap:2px; }
  .icon-btn{ width:30px; height:30px; }
  .brand-logo-img{ height:22px; }
  .hamburger-btn{ width:30px; height:30px; margin-left:4px; }

  .row--kpi3, .row--kpi4{ grid-template-columns: 1fr 1fr; gap:12px; }
  .kpi-card, .stat-card{ padding: 16px 16px; }
  .kpi-value{ font-size: 19px; overflow-wrap: break-word; }
  .stat-value{ font-size: 18px; overflow-wrap: break-word; }
  .kpi-trend, .stat-label{ overflow-wrap: break-word; }

  .panel-box{ padding: 18px 16px; }
  .panel-head{ flex-wrap:wrap; gap:6px; }

  .channel-amount, .wcard-balance{ overflow-wrap: break-word; }

  .chart-wrap{ overflow-x:auto; }
  .chart{ min-width: 460px; }
  .chart-axis{ min-width: 460px; }

  .tx-table{ display:block; overflow-x:auto; white-space:nowrap; }

  .expense-bar-name, .expense-bar-value{ font-size: 11.5px; }

  .site-footer{ padding: 20px 16px 0; flex-direction:column; align-items:flex-start; }
  .site-footer-brand{ flex-direction:column; align-items:flex-start; gap:4px; }

  .dropdown-panel{
    position: fixed; left: 14px; right: 14px; top: 66px; width:auto;
    max-height: calc(100vh - 90px); overflow-y:auto;
  }
  .dropdown-panel--user{ width:auto; }
}

@media (max-width: 420px){
  .row--kpi3, .row--kpi4{ grid-template-columns: 1fr; }
  .search-box.is-open .search-input{ width: 120px; }
  .page-head h1{ font-size: 20px; }
  .wcard-balance{ font-size: 21px; }
  #helpToggle{ display:none; }
}
