/* SUKU platform — after the "Financial Dashboard" reference: soft grey page, big white rounded shell, blue wallet card,
   amber CTA, coral promo, pastel tiles. Mobile first: base rules target phones; min-width queries add the desktop shell. */
:root {
  --blue: #1B7BC4; --blue-2: #4A9BD6; --blue-d: #14609A; --blue-tint: #E8F1FB; --blue-text: #14609A;
  --amber: #FFBE3C; --amber-d: #F5AE1E; --on-amber: #3D3D3D; --amber-ink: #8A5300;
  --coral: #E8604A; --coral-2: #F2866B;
  --ink: #3D3D3D; --ink-2: #575B63; --ink-3: #6B7280; --ink-4: #9A9A9A;
  --paper: #F1F1F1; --card: #ffffff; --line: #ECECEC; --soft: #F3F5F8; --soft-2: #F8F9FB; --shell-bg: #ffffff;
  --pill-bg: var(--blue); --pill-fg: #ffffff; --focus: #1B7BC4;
  --green: #15804A; --green-fill: #1FA463; --green-soft: #DFF3E8; --red: #C73B3B; --red-d: #B02F2F; --red-soft: #FDEAEA;
  --warn: #8A5300; --warn-soft: #FFF1D6; --info: #1F5FBF; --info-soft: #E3EEFC; --orange: #F59E50; --orange-soft: #FDEBDD; --blue-fill: #5B93E8;
  --fs-xs: 12px; --fs-sm: 13.5px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 21px; --fs-2xl: 28px; --fs-3xl: 40px;
  --r: 24px; --r-sm: 14px; --r-lg: 28px;
  --e1: 0 1px 2px rgba(40,50,70,.04), 0 4px 14px rgba(40,50,70,.04);
  --e2: 0 1px 2px rgba(40,50,70,.04), 0 12px 32px rgba(40,50,70,.07);
  --e3: 0 24px 60px rgba(40,50,70,.18);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 248px; --tab: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E6EDF5; --ink-2: #B8C4D3; --ink-3: #93A3B8; --ink-4: #6F8097; --paper: #0F1620; --card: #172231; --line: #243247; --soft: #1D2B3E; --soft-2: #1A2738; --shell-bg: #121B28;
    --blue-text: #6DB4EC; --blue-tint: #183450; --pill-bg: #2B8DD6; --focus: #6DB4EC;
    --green: #4ccf92; --green-fill: #2DB36F; --green-soft: #12301f; --red: #ff7b7b; --red-d: #ff9a9a; --red-soft: #3a1a22; --warn: #f0b44c; --warn-soft: #3a2b0c; --info: #8db8ff; --info-soft: #132a4d; --orange-soft: #3a2616; --amber-ink: #FFBE3C;
    --e1: 0 1px 2px rgba(0,0,0,.4); --e2: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35); --e3: 0 24px 60px rgba(0,0,0,.55);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-family: var(--font); color: var(--ink); font-size: var(--fs-md); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; overscroll-behavior-y: none; background: var(--paper); }
@media (min-width: 900px) {
  body { background: radial-gradient(520px 520px at 100% 0%, color-mix(in srgb, var(--ink) 5%, transparent) 62%, transparent 63%), radial-gradient(340px 340px at 0% 100%, color-mix(in srgb, var(--ink) 4%, transparent) 62%, transparent 63%), var(--paper); background-attachment: fixed; }
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: var(--fs-2xl); font-weight: 500; letter-spacing: -.02em; } h2 { font-size: var(--fs-xl); font-weight: 500; } h3 { font-size: var(--fs-lg); font-weight: 600; }
@media (min-width: 900px) { h1 { font-size: var(--fs-3xl); } }
p { margin: 0; } a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.ic { flex: none; }
.muted { color: var(--ink-3); } .small { font-size: var(--fs-sm); } .right { text-align: right; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b)); background: radial-gradient(420px 420px at 100% 0%, color-mix(in srgb, var(--ink) 6%, transparent) 62%, transparent 63%), radial-gradient(300px 300px at 0% 100%, color-mix(in srgb, var(--ink) 5%, transparent) 62%, transparent 63%), var(--paper); }
.login-card { width: 100%; max-width: 420px; background: var(--shell-bg); border-radius: 36px; padding: 34px 24px 26px; box-shadow: var(--e3); text-align: center; animation: rise .5s var(--ease) both; }
@media (min-width: 480px) { .login-card { padding: 42px 40px 32px; border-radius: 40px; } }
.login-tile { width: 96px; height: 96px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; }
@media (prefers-color-scheme: dark) { .login-tile { background: #fff; } }
.login-logo { width: 52px; height: auto; display: block; }
.brand-word { font-weight: 800; letter-spacing: .5em; color: var(--ink); font-size: 24px; padding-left: .5em; } .brand-word i { color: #E8212B; font-style: normal; }
.brand-sub { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 2px; }
.login form { margin-top: 26px; text-align: left; display: grid; gap: 16px; }
.login .btn.red { min-height: 52px; font-size: 16px; }
.login .foot { margin-top: 22px; font-size: var(--fs-sm); line-height: 1.9; color: var(--ink-3); text-align: center; }
.login .foot a { color: var(--blue-text); font-weight: 700; display: inline-block; padding: 6px 2px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.input, select, textarea { width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); transition: border-color .15s, box-shadow .15s; min-width: 0; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; text-overflow: ellipsis; }
textarea { min-height: 96px; resize: vertical; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.input[readonly] { background: var(--soft); }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw .eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
.err { color: var(--red-d); font-size: var(--fs-sm); background: var(--red-soft); padding: 10px 12px; border-radius: 12px; }
.row { display: grid; gap: 12px; } .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .row.two, .row.three { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; line-height: 1.4; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); flex: none; margin: 0; }

/* ---------- buttons: .btn = blue, .btn.red = amber CTA (class name kept for markup compatibility) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--pill-bg); color: var(--pill-fg); font-weight: 600; font-size: var(--fs-md); cursor: pointer; text-decoration: none; transition: transform .12s var(--ease), background .15s, opacity .15s, box-shadow .15s; -webkit-user-select: none; user-select: none; }
.btn:hover { opacity: .92; } .btn:active { transform: scale(.97); opacity: .9; }
.btn.red { background: var(--amber); color: var(--on-amber); box-shadow: 0 6px 16px rgba(255,190,60,.32); } .btn.red:hover { background: var(--amber-d); opacity: 1; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; } .btn.ghost:hover, .btn.ghost:active { background: var(--soft); opacity: 1; }
.btn.sm { min-height: 44px; padding: 0 18px; font-size: var(--fs-sm); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .ic { margin-left: -2px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--ink-3); position: relative; transition: background .15s, transform .12s; }
.icon-btn:hover, .icon-btn:active { background: var(--soft); } .icon-btn:active { transform: scale(.92); }
.link-btn { background: none; border: 0; padding: 0 2px; min-height: 44px; display: inline-flex; align-items: center; color: var(--blue-text); font-weight: 600; cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- avatars + pastel icon tiles ---------- */
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; letter-spacing: .02em; }
.av.sm { width: 34px; height: 34px; font-size: 13px; } .av.lg { width: 56px; height: 56px; font-size: 20px; }
.av-0 { background: #1B7BC4; color: #fff; } .av-1 { background: #0f6b4a; color: #e3f6ec; } .av-2 { background: #b34a2a; color: #fff1ea; } .av-3 { background: #5b4bb5; color: #efeaff; }
.av-4 { background: #0a5aa3; color: #e6f1ff; } .av-5 { background: #8a5f00; color: #fff3cf; } .av-6 { background: #a3265f; color: #ffe6f1; } .av-7 { background: #3d6a28; color: #eaf7df; }
.ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--ink-2); }
.ico.in, .ico.green { background: var(--green-soft); color: var(--green-fill); } .ico.out { background: var(--red-soft); color: var(--red-d); } .ico.blue { background: var(--info-soft); color: var(--blue-fill); } .ico.orange { background: var(--orange-soft); color: var(--orange); }
.ico.lg { width: 48px; height: 48px; border-radius: 16px; }

/* ---------- shell (mobile first) ---------- */
.shell { min-height: 100dvh; }
.side { display: none; }
.main { padding: 0 16px calc(var(--tab) + var(--safe-b) + 28px); width: 100%; max-width: 1180px; margin: 0 auto; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + var(--safe-t)) 0 10px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top .tools { display: flex; align-items: center; gap: 2px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), #ffd57a); color: #3D3D3D; display: grid; place-items: center; font-weight: 700; flex: none; }
.top .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; } .top .role { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.2; }
.dot { position: absolute; top: 7px; right: 7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--shell-bg); border-top: 1px solid var(--line); display: flex; z-index: 30; box-shadow: 0 -8px 24px rgba(40,50,70,.07); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--ink-3); min-width: 0; min-height: 48px; position: relative; transition: color .15s; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tabbar a:active { background: var(--soft-2); }
.tabbar a[aria-current="page"] { color: var(--blue-text); }
.tabbar a[aria-current="page"]::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; flex: 1 1 220px; }
.page-head p { color: var(--ink-3); margin-top: 6px; font-size: var(--fs-sm); }
@media (max-width: 599px) {
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head > div:first-child { flex: none; } .page-head > .pill { align-self: flex-start; }
  .page-head > .btn, .page-head > div > .btn:only-child { width: 100%; }
  .page-head > div:last-child:not(:first-child) { display: flex; gap: 8px; } .page-head > div:last-child:not(:first-child) .btn { flex: 1; }
}
#page { animation: pagein .32s var(--ease) backwards; outline: none; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (min-width: 900px) {
  .shell { max-width: 1480px; margin: 28px auto; min-height: calc(100dvh - 56px); background: var(--shell-bg); border-radius: 40px; box-shadow: var(--e3); display: grid; grid-template-columns: var(--side) minmax(0, 1fr); overflow: clip; }
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; padding: 30px 18px 24px; border-right: 1px solid var(--line); position: sticky; top: 28px; align-self: start; height: calc(100dvh - 56px); overflow-y: auto; }
  .main { width: auto; max-width: none; margin: 0; padding: 0 40px 40px; }
  .main-inner { max-width: 1080px; margin: 0 auto; }
  .top { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 26px 0 0; justify-content: flex-end; }
  .top .who { order: 2; } .top .tools { order: 1; margin-right: 6px; }
  #out-mobile { display: none; }
  .page-head { margin-top: 8px; }
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 30px; text-decoration: none; }
.side .brand img { width: 30px; height: auto; background: #fff; border-radius: 9px; padding: 3px 4px; }
.side .brand b { letter-spacing: .32em; color: var(--ink); font-size: var(--fs-lg); font-weight: 700; } .side .brand b i { color: #E8212B; font-style: normal; }
.nav a { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 16px; border-radius: 12px; text-decoration: none; color: var(--ink-3); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--soft-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--blue-tint); color: var(--blue-text); font-weight: 600; }
.nav-sec { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); padding: 16px 16px 4px; }
.nav .badge { margin-left: auto; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.side-foot { margin-top: auto; padding-top: 20px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.side-foot > svg { width: 96px; height: auto; } .side-foot p { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; max-width: 20ch; }
.side-foot .btn { width: 100%; min-height: 46px; font-size: var(--fs-sm); }
.side-foot .link-btn { min-height: 44px; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; }
.art-line { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; } .art-fill { fill: var(--blue-tint); }

/* ---------- cards + grids ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 20px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: var(--e2); min-width: 0; }
@media (min-width: 600px) { .card { padding: 24px; } }
.card + .card, .stack > * + * { margin-top: 20px; }
.card h3 + .muted { margin-top: 2px; }
.card-title { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.015em; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
a.card { transition: transform .18s var(--ease), box-shadow .18s; } a.card:active { transform: scale(.985); }
@media (hover: hover) { a.card:hover { transform: translateY(-2px); box-shadow: var(--e3); } }
.card.flush { padding: 0; overflow: hidden; }
.cover { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--soft); }
.grid { display: grid; gap: 20px; } .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); }
.grid > .card { margin: 0 !important; }
@media (max-width: 899px) { .grid.two, .grid.three { grid-template-columns: 1fr; } .grid.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .grid { gap: 12px; } .grid.four .stat .v { font-size: var(--fs-lg); } }
.split { display: grid; gap: 20px; grid-template-columns: 1.3fr 1fr; align-items: start; }
@media (max-width: 1099px) { .split { grid-template-columns: 1fr; } }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
.card-head > div { min-width: 0; }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 12px; font-size: var(--fs-lg); font-weight: 500; }
.sec-title .ic { color: var(--ink-3); }
.stat { display: grid; gap: 2px; align-content: start; } .stat .v { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; line-height: 1.25; } .stat .l { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
.stat .d { font-size: var(--fs-xs); color: var(--ink-3); }
.stat.tile { grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; } .stat.tile .ico { grid-row: span 3; }

/* ---------- wallet card (credit-card style) ---------- */
.wp { container-type: inline-size; }
.walletpanel { display: grid; gap: 20px; }
@container (min-width: 480px) { .walletpanel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; } .balances .big { font-size: clamp(22px, 5.4cqw, 36px) !important; } .balances { border-left: 1px solid var(--line); padding-left: 20px; text-align: right !important; grid-template-columns: 1fr !important; } .balances .big { grid-column: auto !important; } .balances .inc, .balances .out { font-size: var(--fs-xl) !important; } }
.cc { container-type: inline-size; position: relative; overflow: hidden; border-radius: 26px; color: #fff; padding: 20px 22px; aspect-ratio: 1.62; min-height: 186px; max-width: 440px; width: 100%; background: linear-gradient(135deg, #1E7FC9 0%, #4A9BD6 100%); box-shadow: 0 18px 36px rgba(27,123,196,.32); display: grid; grid-template-rows: auto 1fr auto; isolation: isolate; }
.cc::before { content: ''; position: absolute; width: 74%; aspect-ratio: 1; right: -18%; bottom: -46%; border-radius: 50%; background: rgba(255,255,255,.16); z-index: -1; }
.cc::after { content: ''; position: absolute; width: 38%; aspect-ratio: 1; left: 34%; bottom: -26%; border-radius: 50%; background: rgba(255,255,255,.10); z-index: -1; }
.cc .brandline { display: flex; align-items: center; gap: 10px; } .cc .brandline img { width: 24px; height: auto; background: #fff; border-radius: 8px; padding: 3px 4px; } .cc .brandline b { font-weight: 600; letter-spacing: .12em; font-size: var(--fs-md); display: block; line-height: 1.1; } .cc .brandline small { font-size: 10px; letter-spacing: .1em; opacity: .85; display: block; margin-top: 2px; }
.cc .pan { align-self: center; font-size: clamp(13px, 6.4cqw, 23px); font-weight: 500; letter-spacing: .1em; white-space: nowrap; }
.cc .meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 12px; font-size: 11px; } .cc .meta small { display: block; opacity: .8; font-size: 10px; margin-bottom: 1px; } .cc .meta b { font-weight: 600; font-size: var(--fs-sm); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.balances { display: grid; gap: 10px; align-content: center; text-align: left; grid-template-columns: 1fr 1fr; }
.balances .big { grid-column: 1 / -1; }
.balances .big { font-size: clamp(28px, 8vw, 38px); font-weight: 500; color: var(--blue-text); letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; } .balances .big .cur { font-size: .55em; margin-right: 6px; opacity: .85; }
.balances .lab { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; font-weight: 400; letter-spacing: 0; }
.balances .inc { font-size: var(--fs-lg); font-weight: 500; color: var(--green); } .balances .out { font-size: var(--fs-lg); font-weight: 500; color: var(--red); }

.limit { display: grid; gap: 8px; margin-top: 22px; } .limit .rowl { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: var(--ink-3); } .limit .rowl b { color: var(--ink); font-weight: 600; }
.progress { height: 7px; border-radius: 4px; background: var(--soft); overflow: hidden; } .progress > i { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width .7s var(--ease); }

/* ---------- tiles (my villas), stat rows, promo ---------- */
.tiles { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 152px; scroll-snap-align: start; background: var(--card); border-radius: 22px; padding: 16px; box-shadow: 0 6px 16px rgba(40,50,70,.08); display: grid; gap: 2px; text-decoration: none; min-height: 168px; align-content: start; transition: transform .15s var(--ease); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.tile:active { transform: scale(.97); } @media (hover: hover) { .tile:hover { transform: translateY(-3px); } }
.tile .amt-l { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.02em; } .tile .sub { font-size: var(--fs-xs); color: var(--ink-3); } .tile .ico { margin: 14px 0 8px; } .tile .nm { font-size: var(--fs-md); font-weight: 500; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tiles-wrap { position: relative; }
.rnd-arrow { display: none; }
@media (min-width: 900px) { .rnd-arrow { display: grid; position: absolute; right: -14px; top: 50%; transform: translateY(-60%); width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--e2); border: 0; place-items: center; color: var(--blue-text); cursor: pointer; z-index: 2; } .rnd-arrow:hover { background: var(--blue-tint); } }
.stat-rows { display: grid; gap: 18px; }
.stat-row { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 4px 14px; align-items: center; }
.stat-row .ico { grid-row: span 2; } .stat-row .bar-l { height: 7px; border-radius: 4px; background: var(--soft); overflow: hidden; align-self: end; } .stat-row .bar-l i { display: block; height: 100%; border-radius: 4px; transition: width .7s var(--ease); }
.stat-row .nm { grid-column: 2; font-size: var(--fs-sm); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .stat-row .pc { grid-row: span 2; grid-column: 3; font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.01em; min-width: 3.4ch; text-align: right; }
.fill-orange { background: linear-gradient(90deg, #F2A25E, #F59E50); } .fill-green { background: var(--green-fill); } .fill-blue { background: linear-gradient(90deg, #5B93E8, #7BA9EE); }
.qw { display: grid; gap: 14px; }
.qw .rowq { display: flex; gap: 10px; flex-wrap: wrap; } .qw .amount-in { flex: 1 1 140px; min-width: 0; } .qw .btn { flex: 1 1 auto; padding: 0 20px; } .qw .chips { gap: 8px; } .qw .chip { min-width: 0; padding: 0 4px; }
.promo { position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 22px; min-height: 150px; background: linear-gradient(150deg, #E8604A 0%, #F2866B 100%); display: flex; align-items: flex-end; text-decoration: none; box-shadow: 0 16px 34px rgba(232,96,74,.28); isolation: isolate; border: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; }
.promo::before { content: ''; position: absolute; width: 62%; aspect-ratio: 1; left: -12%; top: -34%; border-radius: 50%; background: rgba(255,255,255,.14); z-index: -1; } .promo::after { content: ''; position: absolute; width: 38%; aspect-ratio: 1; right: -8%; top: -10%; border-radius: 50%; background: rgba(255,255,255,.12); z-index: -1; }
.promo b { font-size: var(--fs-xl); font-weight: 500; line-height: 1.2; max-width: 14ch; display: block; } .promo .ic { vertical-align: -4px; margin-left: 4px; }
.promo:active { transform: scale(.985); }

.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: var(--fs-sm); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .wrap-t, .item .wrap-s { white-space: normal; }
.item a.t, .item .link { text-decoration: none; }
a.item, button.item, .item[data-act] { cursor: pointer; text-decoration: none; transition: background .15s; border-radius: 12px; }
a.item:active, button.item:active, .item[data-act]:active { background: var(--soft-2); }
.amt { font-weight: 700; white-space: nowrap; } .amt.in { color: var(--green); } .amt.out { color: var(--red); }
.thumb { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: var(--soft); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 11px; border-radius: 13px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--red-soft); color: var(--red-d); }
.pill.info { background: var(--info-soft); color: var(--info); } .pill.muted { background: var(--soft); color: var(--ink-3); }
.tag { display: inline-block; background: var(--soft); border-radius: 8px; padding: 2px 8px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2); }
.meter { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; } .meter > i { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width .6s var(--ease); } .meter.ok > i { background: var(--green-fill); } .meter.warn > i { background: var(--amber-d); }

/* ---------- tables: scroll on desktop, stacked cards on phones ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: var(--fs-sm); color: var(--ink-4); font-weight: 400; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
@media (prefers-color-scheme: dark) { th { color: var(--ink-3); } }
td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--soft-2); } tr.click:active td { background: var(--soft); }
td.actions .btn { margin: 2px 0; }
.hist td { padding: 12px 8px; } .hist .nm { display: flex; align-items: center; gap: 10px; min-width: 0; } .hist .nm .sq { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--ink-2); } .hist .nm .sq.in { background: var(--green-soft); color: var(--green-fill); } .hist .nm .sq.out { background: var(--red-soft); color: var(--red-d); } .hist .nm span.tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist td.mutedc { color: var(--ink-3); white-space: nowrap; }
.hist td.primary { width: 46%; max-width: 0; } .hist .nm .tx { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 759px) {
  .hist td.primary { width: auto; max-width: none; }
  .tbl-wrap { overflow: visible; margin: 0; }
  table.resp, table.resp tbody { display: block; }
  table.resp thead { display: none; }
  table.resp tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--e1); }
  table.resp tr:last-child { margin-bottom: 0; }
  table.resp td { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 5px 0; border: 0; grid-column: 1 / -1; text-align: right; min-width: 0; }
  table.resp td::before { grid-row: 1 / span 3; grid-column: 1; }
  table.resp td > * { grid-column: 2; }
  table.resp td > .tag, table.resp td > .pill { justify-self: end; }
  table.resp td.primary, table.resp td.actions { display: flex; }
  .card:has(> .tbl-wrap > table.resp:not(.hist)) { background: none; border: 0; box-shadow: none; padding: 0; }
  table.resp td::before { content: attr(data-label); flex: none; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); text-align: left; }
  table.resp td:not([data-label])::before { display: none; }
  table.resp td.primary { justify-content: flex-start; text-align: left; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  table.resp td.primary::before { display: none; }
  table.resp td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  table.resp td.actions .btn { flex: 1 1 140px; margin: 0; }
  table.resp td.actions:empty { display: none; }
  table.resp td.hide-m { display: none; }
  /* history table on phones: slim rows instead of heavy cards */
  table.hist.resp tr { box-shadow: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; margin: 0; background: none; grid-template-columns: 1fr auto; }
  table.hist.resp td { padding: 1px 0; } table.hist.resp td.primary { border: 0; margin: 0; padding-bottom: 2px; grid-column: 1; } table.hist.resp td.amt-c { grid-column: 2; grid-row: 1; justify-content: flex-end; } table.hist.resp td.dt { grid-column: 1 / -1; justify-content: flex-start; font-size: var(--fs-xs); color: var(--ink-3); } table.hist.resp td.dt::before, table.hist.resp td.ty::before { display: none; } table.hist.resp td.ty { display: none; }
}

.chart { width: 100%; height: 130px; display: block; } .bar { fill: var(--blue-2); } .bar.hi { fill: var(--amber); } .bar:hover { fill: var(--blue-d); }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; gap: 8px; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 32px 16px; color: var(--ink-3); display: grid; justify-items: center; gap: 6px; } .empty.small { padding: 18px; }
.empty .ic { margin-bottom: 4px; opacity: .5; }
.empty svg.art { width: 120px; height: auto; margin-bottom: 6px; }
.empty b { color: var(--ink); font-size: var(--fs-md); font-weight: 600; } .empty p { max-width: 34ch; font-size: var(--fs-sm); }
.art .a1 { fill: var(--blue-tint); } .art .a2 { fill: var(--line); } .art .a3 { fill: var(--amber); } .art .a4 { stroke: var(--blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .art .a5 { fill: var(--card); stroke: var(--line); stroke-width: 2; }

/* ---------- tabs (scroll + edge fade) ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%); }
.tabs::-webkit-scrollbar { display: none; }
.card > .tabs { margin: 0 -20px 14px; padding-inline: 20px; }
@media (min-width: 900px) { .tabs { margin: 0 0 14px; padding-inline: 0; -webkit-mask-image: none; mask-image: none; } .card > .tabs { margin: 0 0 14px; padding-inline: 0; } }
.tab { padding: 0 18px; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 500; white-space: nowrap; cursor: pointer; scroll-snap-align: start; flex: none; transition: background .15s, transform .12s; text-decoration: none; display: inline-flex; align-items: center; color: var(--ink-2); }
.tab:active { transform: scale(.96); }
.tab[aria-selected="true"] { background: var(--blue-tint); color: var(--blue-text); border-color: var(--blue-tint); font-weight: 600; }

/* ---------- profit-share scheme editor ---------- */
.bar-total { height: 14px; border-radius: 7px; background: var(--soft); overflow: hidden; display: flex; gap: 2px; }
.bar-total i { display: block; height: 100%; transition: width .3s var(--ease); }
.c0 { background: #1B7BC4; } .c1 { background: #FFBE3C; } .c2 { background: #E8604A; } .c3 { background: #1FA463; } .c4 { background: #7B6FD6; } .c5 { background: #2AA7A7; }
.scheme-row { display: grid; grid-template-columns: 14px minmax(0,1.5fr) minmax(0,1fr) 112px 44px; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.scheme-row:first-of-type { border-top: 0; }
.scheme-row .sw { width: 12px; height: 12px; border-radius: 4px; }
.pct-box { position: relative; } .pct-box input { padding-right: 30px; text-align: right; font-weight: 600; } .pct-box span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
@media (max-width: 759px) {
  .scheme-row { grid-template-columns: 14px minmax(0,1fr) 44px; grid-template-areas: 'sw who del' '. role role' '. pct pct'; gap: 8px 10px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft-2); }
  .scheme-row:first-of-type { border-top: 1px solid var(--line); }
  .scheme-row .sw { grid-area: sw; } .scheme-row select { grid-area: who; } .scheme-row .role { grid-area: role; } .scheme-row .pct-box { grid-area: pct; } .scheme-row .icon-btn { grid-area: del; }
  .pct-box input { min-height: 56px; font-size: 24px; font-weight: 600; padding-right: 40px; } .pct-box span { font-size: 20px; font-weight: 600; }
}
.scheme-foot { margin-top: 14px; } .scheme-foot .btn.red { min-width: 180px; }
@media (min-width: 900px) { .scheme-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; } .scheme-foot .total-line { margin: 0; flex: 1; } }
.total-line { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-top: 12px; gap: 12px; }
.total-line.ok { color: var(--green); } .total-line.bad { color: var(--red-d); }
@media (max-width: 899px) {
  .scheme-foot { position: sticky; bottom: calc(var(--tab) + var(--safe-b) + 8px); z-index: 15; margin: 14px -6px 0; padding: 12px 14px; background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--e3); }
  .scheme-foot .total-line { margin-top: 0; margin-bottom: 10px; }
  .scheme-foot .btn.red { width: 100%; }
}
.sim { background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; font-size: var(--fs-sm); }
.sim .ln { display: flex; justify-content: space-between; padding: 3px 0; gap: 12px; } .sim .ln > span:first-child { min-width: 0; overflow-wrap: anywhere; } .sim .ln.sub { color: var(--ink-3); } .sim .ln.tot { border-top: 1px dashed var(--ink-4); margin-top: 6px; padding-top: 8px; font-weight: 700; }

/* ---------- invitations ---------- */
.code-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-tint); color: var(--blue-text); border-radius: 16px; padding: 4px 4px 4px 16px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 19px; font-weight: 700; letter-spacing: .06em; max-width: 100%; }
.code-chip button { color: var(--blue-text); } .code-chip button:hover { background: color-mix(in srgb, var(--blue) 14%, transparent); }
.inv-meta { display: grid; gap: 8px; margin-top: 12px; }
.inv-meta .row-m { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: var(--ink-3); }
.inv-meta .row-m b { color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.inv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; } .inv-actions .btn { flex: 1 1 130px; }
.inv-top { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }

/* ---------- demo + settings ---------- */
.demo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.demo-stats .stat { background: var(--soft-2); border-radius: 16px; padding: 12px 8px; text-align: center; } .demo-stats .v { font-size: var(--fs-xl); }
@media (max-width: 480px) { .demo-stats { grid-template-columns: repeat(2, 1fr); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; } @media (max-width: 599px) { .btn-row .btn { flex: 1 1 100%; } }

/* ---------- withdraw ---------- */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip { min-height: 44px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .15s, transform .12s, border-color .15s; } .chip:active { transform: scale(.96); } .chip[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-tint); color: var(--blue-text); }
.amount-in { position: relative; } .amount-in span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-3); font-size: 16px; pointer-events: none; } .amount-in input { padding-left: 46px; font-size: 20px; font-weight: 600; min-height: 52px; }
.amount-in.xl input { font-size: 24px; min-height: 60px; padding-left: 52px; }
.preview { background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; display: grid; gap: 4px; font-size: var(--fs-sm); } .preview .ln { display: flex; justify-content: space-between; gap: 12px; } .preview .ln.tot { border-top: 1px dashed var(--ink-4); padding-top: 6px; margin-top: 4px; font-weight: 700; font-size: var(--fs-md); } .preview .ln.bad b { color: var(--red-d); }

/* ---------- modal = bottom sheet on phones ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20,30,45,.5); z-index: 100; display: grid; place-items: end center; animation: fade .18s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); overscroll-behavior: contain; }
.modal { background: var(--card); width: 100%; max-width: 520px; max-height: calc(100dvh - 12px - var(--safe-t)); display: flex; flex-direction: column; border-radius: 28px 28px 0 0; padding: 0; animation: up .3s var(--ease); box-shadow: var(--e3); touch-action: pan-y; }
.modal.wide { max-width: 760px; }
.modal.dragging { animation: none; transition: none; } .modal.snap { animation: none; transition: transform .2s var(--ease); }
.grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 12px 6px 20px; flex: none; }
.modal-head h3 { font-size: var(--fs-xl); font-weight: 500; min-width: 0; }
.modal > .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 20px calc(24px + var(--safe-b)); }
.modal-body { display: grid; gap: 14px; align-content: start; }
@media (min-width: 700px) { .modal-bg { place-items: center; padding: 24px; } .modal { border-radius: 32px; max-height: calc(100dvh - 48px); } .grab { display: none; } .modal-head { padding-top: 16px; } .modal > .modal-body { padding-bottom: 24px; } }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- toasts: bottom on phones (never over the header), top-right on desktop ---------- */
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab) + var(--safe-b) + 12px); z-index: 200; display: grid; gap: 8px; pointer-events: none; justify-items: center; }
.toast { width: min(440px, 100%); background: #2b3340; color: #fff; border-radius: 20px; padding: 12px 16px; display: grid; gap: 2px; box-shadow: 0 12px 30px rgba(20,30,45,.35); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .3s, transform .3s var(--ease); pointer-events: auto; border-left: 5px solid #5B93E8; }
.toast.in { opacity: 1; transform: none; } .toast.income { border-left-color: #2DB36F; } .toast.error { border-left-color: #ff7b7b; } .toast span { font-size: var(--fs-sm); color: #cfd8e6; }
@media (min-width: 900px) { #toasts { left: auto; right: 24px; bottom: auto; top: 96px; width: 380px; justify-items: stretch; } .toast { transform: translateX(20px); } }

/* ---------- skeletons ---------- */
.sk { border-radius: 14px; background: linear-gradient(90deg, var(--soft), var(--line), var(--soft)); background-size: 200% 100%; animation: sk 1.3s infinite linear; }
.sk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 12px; box-shadow: var(--e1); }
.sk-line { height: 14px; } .sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; } .sk-h { height: 28px; width: 55%; } .sk-hero { height: 190px; border-radius: var(--r-lg); } .sk-row { display: flex; gap: 12px; align-items: center; } .sk-av { width: 42px; height: 42px; border-radius: 14px; flex: none; }
.skeleton { height: 90px; border-radius: var(--r); background: linear-gradient(90deg, var(--soft), var(--line), var(--soft)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); min-width: 14px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #b5bfcc; } .live.on i { background: #2fbf7a; box-shadow: 0 0 0 4px rgba(47,191,122,.2); }

/* ---------- earnings card ---------- */
.earn { padding-top: 6px; }
.etabs { display: flex; border-bottom: 1px solid var(--line); margin: 0 -20px 16px; }
.etabs button { flex: 1; min-height: 48px; background: none; border: 0; border-bottom: 3px solid transparent; font: 600 var(--fs-xs) var(--font); letter-spacing: .12em; color: var(--ink-3); cursor: pointer; transition: color .15s; }
.etabs button:active { background: var(--soft-2); }
.etabs button[aria-selected="true"] { color: var(--blue-text); border-bottom-color: var(--blue); }
.eamt { font-size: clamp(26px, 8vw, 32px); font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; } .eamt .cur { color: var(--blue-text); font-size: 20px; margin-right: 2px; }
.ebars { display: flex; align-items: flex-end; gap: clamp(4px, 2.5vw, 10px); height: 150px; margin: 18px 0 6px; } .ebars.dense { gap: 3px; }
.ecol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px; min-width: 0; }
.ebar { background: var(--blue-2); border-radius: 8px 8px 4px 4px; min-height: 4px; transform-origin: bottom; animation: grow .6s var(--ease) both; } .ebar.now { background: var(--amber); }
@keyframes grow { from { transform: scaleY(.05); } }
.ecol span { text-align: center; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
.esum { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin: 12px -20px -4px; }
.esum div { padding: 14px 6px; text-align: center; border-left: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; } .esum div:first-child { border-left: 0; }
.esum b { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .esum span { font-size: var(--fs-xs); color: var(--ink-3); }
@media (min-width: 600px) { .etabs { margin-inline: -24px; } .esum { margin-inline: -24px; } .esum b { font-size: var(--fs-md); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- home composition: single column on phones (explicit order), two columns on wide screens ---------- */
.home { display: grid; gap: 20px; min-width: 0; }
.home .col { display: contents; }
.home [data-o="1"] { order: 1; } .home [data-o="2"] { order: 2; } .home [data-o="3"] { order: 3; } .home [data-o="4"] { order: 4; } .home [data-o="5"] { order: 5; }
.home > .col > * { min-width: 0; }
.duo { display: grid; gap: 20px; }
@media (min-width: 640px) { .duo { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
@media (min-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
  .home .col { display: grid; gap: 20px; align-content: start; min-width: 0; }
  .home [data-o] { order: 0; }
  .duo { grid-template-columns: 1fr; }
}
.promo { min-height: 140px; }
@media (max-width: 639px) { .promo { min-height: 120px; } }
.card .card-title:last-child { margin-bottom: 0; }
.tint-card { background: var(--blue-tint); border-color: transparent; box-shadow: none; }

@media (max-width: 599px) { .stat.tile { grid-template-columns: 1fr; row-gap: 6px; } .stat.tile .ico { grid-row: auto; } }

@media (min-width: 900px) and (max-height: 880px) { .side-foot > svg, .side-foot > p { display: none; } .side-foot { padding-top: 8px; } }

/* assignments */
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.loc-row .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
.pre-assign { border: 1.5px dashed var(--line); border-radius: 16px; padding: 0 14px; }
.pre-assign summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; }
.pre-assign summary::-webkit-details-marker { display: none; }
.pre-assign summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--ink-3); }
.pre-assign[open] summary::after { content: '–'; }
.pre-assign[open] { padding-bottom: 14px; }
.modal-body { grid-template-columns: minmax(0, 1fr); }
.modal-body > *, .modal .stack, .modal .item .grow { min-width: 0; }
.modal .item { flex-wrap: nowrap; }
.modal .card-head { flex-wrap: wrap; }
.modal .item a.t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
