/* Revia · internal panel (migration 0070), in the app's Perla style: pearl background, frosted glass cards, Revia green
   and the review-star yellow for the main action. Google Sans, like the app. */
:root {
  --ink: #171B1A; --ink-2: #2E3633; --muted: #4B5450; --faint: #69716E; --accent: #315748; --accent-dark: #1F3A2F;
  --star: #FBBC04; --red: #B43C35; --red-soft: #FAEEEE; --green: #1E6B3A; --green-soft: #E8EFEB;
  --gold: #7A5600; --gold-soft: #FFF4D1; --blue: #2B4C7E; --blue-soft: #EDF2F8; --purple: #5B3E99; --purple-soft: #F1ECFA;
  --glass: rgba(255, 255, 255, 0.62); --glass-line: rgba(255, 255, 255, 0.9); --line: rgba(23, 34, 28, 0.08);
  --shadow: 0 18px 40px rgba(23, 34, 28, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 400 15px/1.5 'Google Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at 92% 0%, rgba(243, 223, 166, 0.55), rgba(243, 223, 166, 0) 50%),
    radial-gradient(circle at 0% 100%, rgba(197, 222, 210, 0.5), rgba(197, 222, 210, 0) 45%),
    linear-gradient(180deg, #F8F4EA 0%, #F3F4F0 50%, #EFF3F1 100%);
  background-attachment: fixed;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(49, 87, 72, 0.45); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { opacity: 0.6; }
.boot-note { text-align: center; padding: 40px 16px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) { .rise, .grow, .float, .spinner { animation: none !important; } }

/* Cards */
.glass { background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-line); border-radius: 26px; box-shadow: var(--shadow); }
.dark { background: var(--ink); color: #FFFFFF; border-radius: 26px; box-shadow: 0 18px 40px rgba(23, 34, 28, 0.18); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip.green { color: var(--green); background: var(--green-soft); }
.chip.gold { color: var(--gold); background: var(--gold-soft); }
.chip.blue { color: var(--blue); background: var(--blue-soft); }
.chip.purple { color: var(--purple); background: var(--purple-soft); }
.chip.red { color: #FFFFFF; background: var(--red); }
.chip.grey { color: var(--muted); background: rgba(23, 34, 28, 0.06); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; font-weight: 500; text-decoration: none; }
.btn.primary { background: var(--star); color: var(--ink); box-shadow: 0 8px 18px rgba(251, 188, 4, 0.28); }
.btn.primary:disabled { opacity: 0.6; cursor: progress; }
.btn.quiet { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(23, 34, 28, 0.12); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(23, 27, 26, 0.25); border-top-color: var(--ink); animation: spin 0.8s linear infinite; }

/* Sign in and the second step */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: 100%; max-width: 440px; padding: 34px 30px; display: flex; flex-direction: column; gap: 18px; }
.gate-card h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -0.4px; }
.gate-card p { margin: 0; color: var(--ink-2); }
.gate-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gate-top img { height: 30px; width: auto; display: block; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input { min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(23, 34, 28, 0.14); background: rgba(255, 255, 255, 0.9); font-size: 16px; color: var(--ink); }
.field input.code { letter-spacing: 8px; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); }
.error { font-size: 14px; color: var(--red); background: var(--red-soft); padding: 10px 12px; border-radius: 12px; }
.ok { font-size: 14px; color: var(--green); background: var(--green-soft); padding: 10px 12px; border-radius: 12px; }
.qr { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.qr img { width: 168px; height: 168px; background: #FFFFFF; border-radius: 16px; padding: 8px; border: 1px solid var(--line); }
.qr code { font-size: 13px; word-break: break-all; background: rgba(23, 34, 28, 0.05); padding: 6px 8px; border-radius: 8px; }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }

/* Language switch */
.langs { display: inline-flex; background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(23, 34, 28, 0.06); border-radius: 999px; padding: 3px; }
.langs button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 0 11px; min-height: 30px; font-size: 12px; font-weight: 500; }
.langs button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }

/* The app: everything in one screen (owner request 16 Oct 2026, design A «Cabina»). A rail of icons, a header, and a
   view that fills the window; long lists scroll inside their own box, never the page. Phones stack and scroll. */
.app { height: 100vh; display: grid; grid-template-columns: 76px minmax(0, 1fr); overflow: hidden; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; border-right: 1px solid var(--line); background: rgba(255, 255, 255, 0.45); }
.rail .mark { width: 38px; height: 38px; margin-bottom: 14px; }
.rail button, .rail .off { width: 48px; height: 48px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); display: grid; place-items: center; position: relative; }
.rail button:hover { background: rgba(255, 255, 255, 0.85); }
.rail button[aria-current="page"] { background: var(--ink); color: #FFFFFF; }
.rail .off { color: #A3AAA7; }
.rail .sep { width: 28px; height: 1px; background: rgba(23, 34, 28, 0.12); margin: 8px 0; }
.rail .bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail .lang { width: 44px; height: 30px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid rgba(23, 34, 28, 0.1); background: rgba(255, 255, 255, 0.8); }
.rail .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; font-weight: 500; border: 0; }
.tip { position: absolute; left: 58px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--ink); color: #FFFFFF; font-size: 12px; padding: 5px 9px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 5; }
.rail button:hover .tip, .rail button:focus-visible .tip, .rail .off:hover .tip { opacity: 1; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 20px; }
.bar { flex: 0 0 auto; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.bar .title { display: flex; align-items: baseline; gap: 14px; }
.bar h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.3px; }
.bar .sub { font-size: 13px; color: var(--muted); }
.bar .tools { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; width: 300px; border-radius: 12px; background: rgba(255, 255, 255, 0.78); border: 1px solid rgba(23, 34, 28, 0.08); color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; font-size: 14px; width: 100%; min-width: 0; color: var(--ink); }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(255, 255, 255, 0.78); border: 1px solid rgba(23, 34, 28, 0.08); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--star); color: var(--ink); }
.view { flex: 1 1 auto; min-height: 0; display: grid; gap: 12px; }

/* Cards */
.box { min-height: 0; display: flex; flex-direction: column; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); overflow: hidden; }
.box > .head { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px 10px; }
.box > .head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.box > .head h2 span { color: var(--muted); font-weight: 400; }
.box > .head .note { font-size: 12px; color: var(--muted); }
.box > .body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 18px 14px; }
.box.dark { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.box.dark .head .note { color: #C9D3CE; }
.tile { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); }
.tile .label { font-size: 13px; font-weight: 500; }
.tile .value { font-size: 32px; line-height: 1.05; font-weight: 500; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .hint { font-size: 12px; color: var(--muted); }
.tile.dark { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.tile.dark .label, .tile.dark .hint { color: #C9D3CE; }
.tile.dark .value { font-size: 50px; letter-spacing: -2px; }
.negative { color: var(--red); }
.tile.dark .negative { color: #FF8A80; }
.c-green { color: var(--accent); } .c-gold { color: var(--gold); } .c-red { color: var(--red); } .c-purple { color: var(--purple); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.chips button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(23, 34, 28, 0.1); background: rgba(255, 255, 255, 0.85); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.chips button span { opacity: 0.7; margin-left: 4px; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag.paid { background: var(--green-soft); color: var(--green); } .tag.test { background: var(--blue-soft); color: var(--blue); }
.tag.complimentary { background: var(--gold-soft); color: var(--gold); } .tag.none { background: rgba(23, 34, 28, 0.06); color: var(--muted); }
.code { font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px; background: var(--accent); color: #FFFFFF; }
.code.none { background: rgba(23, 34, 28, 0.08); color: var(--muted); }

/* Tables */
.grid-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid-table th { position: sticky; top: 0; background: rgba(250, 249, 245, 0.96); text-align: left; font-size: 11px; letter-spacing: 0.3px; font-weight: 500; color: var(--muted); padding: 8px; border-bottom: 1px solid rgba(23, 34, 28, 0.08); z-index: 1; }
.grid-table td { padding: 0 8px; height: 42px; border-bottom: 1px solid rgba(23, 34, 28, 0.05); white-space: nowrap; }
.grid-table th:first-child, .grid-table td:first-child { padding-left: 0; }
.grid-table th:last-child, .grid-table td:last-child { padding-right: 0; text-align: right; }
.grid-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.grid-table .name { font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.grid-table tr.pick { cursor: pointer; }
.grid-table tr.pick:hover td { background: rgba(255, 255, 255, 0.7); }
.grid-table tr[aria-selected="true"] td { background: #FFFFFF; }
.place { display: inline-flex; align-items: center; gap: 6px; }
.muted { color: var(--muted); }

/* Bars and lists */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bars .row div { display: flex; justify-content: space-between; gap: 8px; }
.bars .track { height: 8px; border-radius: 999px; background: rgba(23, 34, 28, 0.07); overflow: hidden; }
.bars .fill { display: block; height: 8px; border-radius: 999px; background: var(--accent); transform-origin: left; animation: growx 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.bars .fill.grey { background: #C9CFCC; }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lines { display: flex; flex-direction: column; }
.lines .line { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid rgba(23, 34, 28, 0.06); }
.lines .line:last-child { border-bottom: 0; }
.lines .line b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .line .left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lines .line small { font-size: 12px; color: var(--muted); }
.lines.dense .line { padding: 6px 0; }
.lines .line .inline { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty.slim { padding: 10px 12px; margin: 0; }
.empty { padding: 18px 14px; text-align: center; color: var(--muted); border: 1px dashed rgba(23, 34, 28, 0.18); border-radius: 14px; font-size: 13px; }
.days { display: flex; align-items: flex-end; gap: 4px; height: 100%; min-height: 80px; }
.days span { flex: 1; min-height: 3px; background: var(--purple); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.days-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding-top: 6px; }

/* Waterfall (Dinero) */
.box.hero { flex-direction: row; align-items: center; gap: 24px; padding: 20px 24px; }
.hero .left { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hero .big { font-size: clamp(44px, 5.4vw, 80px); line-height: 0.95; font-weight: 500; letter-spacing: -3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero p { margin: 0; font-size: 14px; color: var(--ink-2); }
.fall { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.fall .col { display: flex; flex-direction: column; gap: 6px; }
.fall .chart { position: relative; height: 130px; }
.fall .axis { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); }
.fall .bar { position: absolute; left: 0; right: 0; border-radius: 6px; animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fall .bar.up { transform-origin: bottom; } .fall .bar.down { transform-origin: top; }
.fall .in { background: #1E8E3E; } .fall .cut { background: #E3A008; }
.fall .cost { background: repeating-linear-gradient(135deg, #B43C35 0 8px, #C8564F 8px 16px); }
.fall .left-up { background: var(--accent); } .fall .left-down { background: var(--ink); }
.fall b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fall small { font-size: 12px; color: var(--muted); }

/* Expenses (Dinero) */
.amount { background: none; border: 0; padding: 4px 0; font-weight: 500; font-variant-numeric: tabular-nums; text-decoration: underline dotted rgba(23, 34, 28, 0.35); text-underline-offset: 4px; white-space: nowrap; min-height: 32px; }
.set { font-size: 12px; font-weight: 500; color: var(--gold); background: var(--gold-soft); padding: 5px 12px; border-radius: 999px; border: 0; min-height: 30px; }
.edit { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.edit input { width: 100px; min-height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(23, 34, 28, 0.2); text-align: right; }
.edit select { min-height: 34px; border-radius: 10px; border: 1px solid rgba(23, 34, 28, 0.2); background: #FFFFFF; padding: 0 6px; }
.edit button { min-height: 34px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--ink); color: #FFFFFF; font-size: 12px; font-weight: 500; }
.edit button.cancel { background: transparent; color: var(--muted); }
.shared { font-size: 11px; color: var(--blue); background: var(--blue-soft); padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.total { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; margin: 0 18px 14px; padding: 12px 14px; border-radius: 14px; background: rgba(23, 34, 28, 0.05); font-size: 14px; }
.total b { font-weight: 500; font-size: 16px; }
.sale { padding: 14px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.sale .top { font-size: 13px; color: #C9D3CE; }
.sale .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sale .cut { font-size: 13px; color: #F3D57A; }
.sale b { font-size: 26px; font-weight: 500; color: var(--star); font-variant-numeric: tabular-nums; }

/* Client card (Clientes) */
.card { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 24px; background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 18px 40px rgba(23, 34, 28, 0.08); overflow: auto; }
.card .who { display: flex; align-items: center; gap: 12px; }
.card .initial { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; font-size: 18px; font-weight: 500; }
.card h2 { margin: 0; font-size: 18px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card .fact { padding: 10px 12px; border-radius: 14px; background: rgba(23, 34, 28, 0.04); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .fact span { font-size: 11px; color: var(--muted); }
.card .fact b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.card .section { display: flex; flex-direction: column; gap: 6px; }
.card .section > span { font-size: 12px; color: var(--muted); }
.card .actions { margin-top: auto; display: flex; gap: 8px; }
.card .actions button { flex: 1; min-height: 44px; border-radius: 12px; font-weight: 500; border: 1px solid rgba(23, 34, 28, 0.14); background: #FFFFFF; }
.card .actions button.primary { background: var(--star); border-color: var(--star); }
.card .actions button:disabled { opacity: 0.55; cursor: default; }
.foot-note { flex: 0 0 auto; margin: 0; font-size: 12px; color: var(--muted); }

/* Views: the grids that fill the window. */
.v-home { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); grid-template-rows: 132px minmax(0, 1fr) 124px; }
.v-home .kpis { grid-column: 1 / -1; display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 12px; }
.v-home .side-col { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
.v-clients { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto minmax(0, 1fr); }
.v-clients .filters { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-line); }
.v-clients .filters .sep { width: 1px; height: 24px; background: rgba(23, 34, 28, 0.12); }
.v-clients .card { grid-column: 2; grid-row: 1 / span 2; }
.v-money { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: 250px minmax(0, 1fr); }
.v-money .right { grid-column: 2; grid-row: 1 / span 2; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 108px; gap: 12px; }
/* IA: boxes as tall as their content, never stretched to the window. */
.v-ai { grid-template-columns: minmax(0, 1fr); align-content: start; max-width: 960px; }
.box.fit { flex: 0 0 auto; }
.ai-sum { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; }
.ai-sum .main-number { display: flex; flex-direction: column; gap: 4px; }
.ai-sum .main-number .label { font-size: 13px; font-weight: 500; }
.ai-sum .main-number b { font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.ai-sum .facts { display: flex; gap: 28px; }
.ai-sum .facts div { display: flex; flex-direction: column; gap: 2px; }
.ai-sum .facts span { font-size: 12px; color: var(--muted); }
.ai-sum .facts b { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.days.slim { height: 96px; min-height: 0; justify-content: space-between; }
.days.slim span { flex: 1 1 0; max-width: 22px; }
.ai-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.box-tabs { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(23, 34, 28, 0.06); }
.box-tabs button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.box-tabs button[aria-pressed="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(23, 34, 28, 0.12); }

/* Phones and narrow windows: one column that scrolls, the rail on top. */
@media (max-width: 1000px) {
  .app { height: auto; min-height: 100vh; display: block; overflow: visible; }
  .rail { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; padding: 10px 12px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .rail .mark { margin: 0 8px 0 0; width: 32px; height: 32px; }
  .rail .sep, .rail .off { display: none; }
  .rail .bottom { margin: 0 0 0 auto; flex-direction: row; }
  .tip { display: none; }
  .main { padding: 14px; }
  .view { display: flex; flex-direction: column; }
  .v-home .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-lists { grid-template-columns: minmax(0, 1fr); }
  .v-home .kpis .tile.dark { grid-column: 1 / -1; }
  .box { max-height: 70vh; }
  .v-money .right, .v-home .side-col { display: flex; flex-direction: column; }
  .box.hero { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .bar .tools { width: 100%; flex-wrap: wrap; }
  .card { max-height: none; }
  .v-clients .filters .sep { display: none; }
}
