/* =========================================================
   WebZone Hub — styles
   Brand: black, deep violet, white — from the WebZone logo.
   Fonts: Sora Bold for headings and numbers, Inter for text.
   ========================================================= */

:root {
  --bg: #09080d;
  --bg-raised: #110f18;
  --surface: #16131f;
  --surface-2: #1d1929;
  --surface-3: #241f33;
  --border: #2a2438;
  --border-strong: #3b3350;

  --text: #f4f2fa;
  --text-muted: #a8a3b8;
  --text-faint: #7d778f;

  --violet: #8b5cf6;
  --violet-hover: #7c4ff0;
  --violet-soft: #c4b5fd;
  --violet-deep: #5b21b6;
  --violet-glow: rgba(139, 92, 246, 0.16);
  --violet-line: rgba(139, 92, 246, 0.45);

  /* Used sparingly, only to flag money owed or a loss. */
  --warn: #f5c56b;
  --bad: #f38ba3;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 22px 48px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--violet-line), 0 12px 40px -16px rgba(139, 92, 246, 0.45);
  --shadow-btn: 0 8px 22px -8px rgba(139, 92, 246, 0.7);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --side-w: 264px;
  --gutter: 16px;
}

@media (min-width: 760px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 0.9688rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto auto;
  width: 60vw; height: 60vw;
  background: radial-gradient(closest-side, rgba(91, 33, 182, 0.18), transparent);
  pointer-events: none;
  z-index: 0;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.875em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.ico { width: 20px; height: 20px; flex: none; }
.ico--sm { width: 17px; height: 17px; }
.ico--xs { width: 14px; height: 14px; }

.faint { color: var(--text-faint); }
.muted { color: var(--text-muted); }
.pos { color: var(--violet-soft); }
.neg, .warn-text.neg { color: var(--bad); }
.warn-text { color: var(--warn); }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.spacer { flex: 1; }

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: 0.01em;
  line-height: 1;
}
.logo span { background: linear-gradient(90deg, #a46bff, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand { display: inline-flex; align-items: center; gap: 10px; transition: opacity .2s; }
.brand:hover { opacity: .85; }
.brand__mark { width: 40px; height: auto; filter: drop-shadow(0 0 10px rgba(139, 92, 246, .45)); }

.link { color: var(--violet-soft); text-decoration: underline; text-decoration-color: var(--violet-line); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; word-break: break-word; }
.link:hover { color: #fff; text-decoration-color: var(--violet); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--violet-soft); transition: gap .2s var(--ease), color .2s; }
.text-link:hover { color: #fff; gap: 9px; }

/* ---------- Shell ---------- */

.shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 14px;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
  border-right: 1px solid var(--border);
  z-index: 40;
  transform: translateX(-100%);
  transition: transform .35s var(--ease);
  overflow-y: auto;
}
.nav-open .side { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .6); }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side__tag { font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-soft); border: 1px solid var(--violet-line); border-radius: 999px; padding: 2px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__label { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); padding: 18px 12px 6px; }
.nav__link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  font-size: .9063rem; font-weight: 500; text-align: left;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav__link span { line-height: 1.3; }
.nav__link:hover { background: var(--surface); color: var(--text); transform: translateX(2px); }
.nav__link[aria-current="page"] { background: var(--violet-glow); color: #fff; box-shadow: inset 0 0 0 1px var(--violet-line); }
.nav__link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.nav__link[aria-current="page"] .ico { color: var(--violet-soft); }
.side__foot { border-top: 1px solid var(--border); padding-top: 10px; }

.side-backdrop { position: fixed; inset: 0; background: rgba(5, 4, 8, .6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 35; }
.nav-open .side-backdrop { opacity: 1; pointer-events: auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  background: rgba(9, 8, 13, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) 80px; }

@media (min-width: 1024px) {
  .side { transform: none; }
  .side-backdrop, .topbar { display: none; }
  .main { margin-left: var(--side-w); }
  .content { padding-top: 40px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: .9375rem; line-height: 1.2;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .25s var(--ease);
}
.btn .ico { width: 18px; height: 18px; }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--violet); color: #fff; box-shadow: 0 4px 14px -6px rgba(139, 92, 246, .6); }
.btn--primary:hover { background: var(--violet-hover); transform: translateY(-1px); box-shadow: var(--shadow-btn); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, .01); }
.btn--ghost:hover { border-color: var(--violet); background: var(--violet-glow); transform: translateY(-1px); }
.btn--danger { border-color: rgba(243, 139, 163, .35); color: var(--bad); background: none; }
.btn--danger:hover { background: rgba(243, 139, 163, .1); border-color: var(--bad); }
.btn--sm { min-height: 38px; padding: 7px 16px; font-size: .875rem; }
.btn--block { width: 100%; }
.btn--icon, .icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; min-height: 0; padding: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: none; color: var(--text-muted);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--icon .ico, .icon-btn .ico { width: 18px; height: 18px; }
.btn--icon:hover, .icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: #fff; }
.row-actions .inline-form:last-child .btn--icon:hover { color: var(--bad); border-color: rgba(243, 139, 163, .4); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: inline; }

/* ---------- Page head ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
.page-head__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; color: var(--text-muted); }
.page-head__actions { display: flex; gap: 10px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: .8125rem; color: var(--text-faint); }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--violet-soft); }

.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-soft); margin-bottom: 10px; }
.block-title { font-size: 1.25rem; margin: 40px 0 16px; }
.block-sub { margin: -8px 0 16px; font-size: .875rem; }
.mini-title { font-size: .9375rem; margin: 22px 0 10px; color: var(--text-muted); }

/* ---------- Home: turnover (the first thing you see) ---------- */

.greet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 16px; }
.greet span { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-soft); }
.greet strong { order: -1; flex-basis: 100%; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); letter-spacing: -.02em; }

.turnover {
  position: relative; overflow: hidden;
  display: grid; gap: 22px;
  padding: 24px;
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px circle at 100% 0%, rgba(196, 181, 253, .22), transparent 60%),
    linear-gradient(135deg, #4c1d95, #2a1260 55%, #150f24);
  border: 1px solid rgba(167, 139, 250, .5);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .15), 0 30px 70px -30px rgba(139, 92, 246, .75), inset 0 1px 0 rgba(255, 255, 255, .08);
}
@media (min-width: 900px) { .turnover { grid-template-columns: 1.15fr 1fr; align-items: stretch; padding: 30px 32px; } }
.turnover__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.turnover__label { display: inline-flex; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-soft); }
.turnover__label img { width: 34px; height: auto; }
.turnover__link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); transition: background .2s, gap .2s var(--ease), border-color .2s; }
.turnover__link:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); gap: 9px; }
.turnover__value { margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 1.6rem + 4vw, 4rem); letter-spacing: -.035em; line-height: 1; text-shadow: 0 0 40px rgba(196, 181, 253, .35); word-break: break-word; }
.turnover__sub { margin-top: 8px; font-size: .8125rem; color: rgba(244, 242, 250, .7); }
.turnover__split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.turnover__split > div { padding: 12px 14px; border-radius: var(--radius); background: rgba(9, 8, 13, .35); border: 1px solid rgba(255, 255, 255, .08); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.turnover__split > div:hover { background: rgba(9, 8, 13, .5); border-color: rgba(196, 181, 253, .35); transform: translateY(-2px); }
.turnover__split span { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(244, 242, 250, .6); }
.turnover__split strong { display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: clamp(.9375rem, .85rem + .4vw, 1.1875rem); word-break: break-word; }
.turnover__split strong.neg { color: var(--bad); }
@media (max-width: 480px) { .turnover__split { grid-template-columns: 1fr 1fr; } .turnover__split > div:last-child { grid-column: 1 / -1; } }

.turnover__chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: stretch; min-height: 190px; padding: 16px 14px 12px; border-radius: var(--radius); background: rgba(9, 8, 13, .3); border: 1px solid rgba(255, 255, 255, .07); }
.tbar { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.tbar__val { min-height: 1.1em; font-size: .6875rem; font-weight: 600; color: rgba(244, 242, 250, .75); white-space: nowrap; }
.tbar__col { flex: 1; width: 100%; max-width: 38px; min-height: 110px; display: flex; align-items: flex-end; border-radius: 8px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.tbar__col span { display: block; width: 100%; border-radius: 8px; background: linear-gradient(180deg, rgba(196, 181, 253, .85), rgba(139, 92, 246, .6)); transform-origin: bottom; animation: grow-up .9s var(--ease) both .3s; transition: filter .2s; }
.tbar:hover .tbar__col span { filter: brightness(1.2) drop-shadow(0 0 8px rgba(196, 181, 253, .6)); }
.tbar--now .tbar__col span { background: linear-gradient(180deg, #fff, var(--violet-soft)); box-shadow: 0 0 18px rgba(196, 181, 253, .6); }
.tbar__label { font-size: .75rem; color: rgba(244, 242, 250, .6); }
.tbar--now .tbar__label { color: #fff; font-weight: 600; }
@keyframes grow-up { from { transform: scaleY(0); } }

/* ---------- Tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.tile {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tile__label { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.tile__value { margin-top: 6px; font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; word-break: break-word; }
.tile__hint { margin-top: 2px; font-size: .75rem; color: var(--text-faint); }
.tile--accent { background: linear-gradient(160deg, rgba(139, 92, 246, .16), var(--surface) 70%); border-color: var(--violet-line); }
.tile--accent .tile__value { color: var(--violet-soft); }
.tile--warn .tile__value { color: var(--warn); }
.tile--bad .tile__value { color: var(--bad); }
.tile--muted { background: var(--bg-raised); border-style: dashed; }
.tiles--compact .tile { padding: 12px 16px; }
.tiles--compact .tile__value { font-size: 1.125rem; }

/* ---------- Service cards (Home) ---------- */

.sections-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .sections-grid { grid-template-columns: repeat(3, 1fr); } }
.scard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.scard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px circle at 100% 0%, var(--violet-glow), transparent 45%); opacity: 0; transition: opacity .35s; }
.scard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
.scard:hover::before { opacity: 1; }
.scard > * { position: relative; }
.scard__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--violet-glow); color: var(--violet-soft); border: 1px solid var(--violet-line); transition: background .3s, color .3s, transform .35s var(--ease); }
.scard__icon .ico { width: 24px; height: 24px; }
.scard:hover .scard__icon { background: var(--violet); color: #fff; transform: rotate(-6deg) scale(1.05); }
.scard h3 { font-size: 1.25rem; margin-top: 6px; }
.scard__desc { color: var(--text-muted); font-size: .875rem; flex: 1; }
.scard__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.scard__stats strong { display: block; font-family: var(--font-display); font-size: 1.0625rem; word-break: break-word; }
.scard__stats span { font-size: .75rem; color: var(--text-faint); }
.scard__go { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--violet-soft); transition: gap .25s var(--ease); }
.scard:hover .scard__go { gap: 10px; }

/* ---------- Project cards ---------- */

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cards--narrow { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.pcard, .wcard {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.pcard:hover, .wcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.pcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.pcard__due { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--text-faint); }
.pcard__title { font-size: 1.1875rem; }
.pcard__client { font-size: .875rem; color: var(--text-muted); margin-top: -4px; }
.pcard__money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0 2px; border-top: 1px solid var(--border); }
.pcard__money span { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.pcard__money strong { font-family: var(--font-display); font-size: .9688rem; word-break: break-word; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; font-size: .8125rem; color: var(--text-muted); }
.pcard__foot .ico { color: var(--violet-soft); transition: transform .25s var(--ease); }
.pcard:hover .pcard__foot .ico { transform: translateX(4px); }

.pcard--add {
  align-items: center; justify-content: center; text-align: center;
  min-height: 236px;
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  box-shadow: none;
}
.pcard--add strong { font-family: var(--font-display); font-size: 1.125rem; }
.pcard--add .faint { font-size: .8125rem; max-width: 220px; }
.pcard__plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--violet-glow); color: var(--violet-soft); margin-bottom: 4px; transition: transform .35s var(--ease), background .3s, color .3s, box-shadow .3s; }
.pcard__plus .ico { width: 26px; height: 26px; }
.pcard--add:hover { border-color: var(--violet); background: rgba(139, 92, 246, .05); box-shadow: 0 0 0 4px var(--violet-glow); }
.pcard--add:hover .pcard__plus { background: var(--violet); color: #fff; transform: rotate(90deg); box-shadow: var(--shadow-btn); }

.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-deep), var(--violet), var(--violet-soft)); transition: width .8s var(--ease); }

/* Wallet cards */
.wcard__head { display: flex; justify-content: space-between; gap: 10px; }
.wcard__head h3 { font-size: 1.0625rem; }
.wcard__head p { font-size: .8125rem; margin-top: 2px; }
.wcard__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; margin: 4px 0; padding: 12px 0; border-top: 1px solid var(--border); }
.wcard__grid dt { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.wcard__grid dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: .9375rem; word-break: break-word; }
.wcard__ad { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-muted); }

.wallet-main { display: grid; gap: 16px; margin-bottom: 8px; }
.wallet-main__balance { display: grid; gap: 20px; padding: 26px 28px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--violet-deep), #2c1460 60%, var(--surface)); border: 1px solid var(--violet-line); box-shadow: 0 22px 50px -24px rgba(139, 92, 246, .7); }
.wallet-main__balance .tile__label { color: var(--violet-soft); }
.wallet-main__balance .tile__hint { color: rgba(244, 242, 250, .7); }
.wallet-main__value { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem); letter-spacing: -.03em; margin: 6px 0; text-shadow: 0 0 36px rgba(196, 181, 253, .3); }
.wallet-main__value--sm { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.wallet-main__side { padding: 16px 18px; border-radius: var(--radius); background: rgba(9, 8, 13, .35); border: 1px solid rgba(255, 255, 255, .08); }
.wallet-main__balance .tile__label img { width: 30px; height: auto; }
@media (min-width: 820px) { .wallet-main__balance { grid-template-columns: 1.4fr 1fr; align-items: center; } }

/* Client cards */
.cards--clients { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ccard { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.ccard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: transparent; }
.ccard__main { flex: 1; min-width: 0; }
.ccard__main h3 { font-size: 1.0625rem; }
.ccard__main p { font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard__stats { display: flex; gap: 14px; font-size: .8125rem; color: var(--text-muted); }
.ccard__stats b { color: var(--text); font-family: var(--font-display); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--violet-glow); border: 1px solid var(--violet-line); color: var(--violet-soft); font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }

/* ---------- Chips, pills, toolbar ---------- */

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--text-muted); }
.chip--live { background: var(--violet-glow); border-color: var(--violet-line); color: var(--violet-soft); }
.chip--done { background: rgba(255, 255, 255, .06); border-color: transparent; color: var(--text); }
.chip--soft { background: var(--surface-2); border-color: var(--border); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .8125rem; font-weight: 500; color: var(--text-muted); transition: border-color .2s, color .2s, background .2s, box-shadow .2s; }
.pill b { font-weight: 600; color: var(--text-faint); }
.pill:hover { border-color: var(--violet-line); color: var(--text); }
.pill.is-on { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 6px 18px -8px rgba(139, 92, 246, .8); }
.pill.is-on b { color: rgba(255, 255, 255, .75); }

.search { position: relative; display: flex; align-items: center; min-width: min(100%, 280px); }
.search .ico { position: absolute; left: 14px; color: var(--text-faint); pointer-events: none; }
.search input[type="search"] { padding-left: 42px; border-radius: 999px; }
.search--wide { max-width: 480px; margin-bottom: 20px; }

/* ---------- Tabs (project + settings) ---------- */

.tabs {
  display: flex; gap: 4px;
  margin: 0 calc(var(--gutter) * -1) 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  font-size: .875rem; font-weight: 500; white-space: nowrap;
  color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color .2s, background .2s;
}
.tabs__item b { font-size: .6875rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-muted); }
.tabs__item::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--violet); transform: scaleX(0); transition: transform .3s var(--ease); }
.tabs__item:hover { color: var(--text); background: var(--surface); }
.tabs__item:hover::after { transform: scaleX(.4); }
.tabs__item[aria-current="page"] { color: #fff; }
.tabs__item[aria-current="page"]::after { transform: scaleX(1); box-shadow: 0 0 10px var(--violet); }
.tabs__item[aria-current="page"] b { background: var(--violet); color: #fff; }
@media (min-width: 1024px) { .tabs { margin-left: 0; margin-right: 0; padding: 0; } }

.tab-body { animation: rise .45s var(--ease) both; }

/* ---------- Panels ---------- */

.panel {
  padding: 22px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.panel__head h2 { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; }
.panel__head h2 .ico { color: var(--violet-soft); }
.panel__head--page { margin-bottom: 18px; }
.panel__head--page h2 { font-size: 1.25rem; }
.panel__empty { color: var(--text-faint); font-size: .875rem; padding: 6px 0; }
.panel--flush .panel__empty { padding: 22px; }
.stack { display: flex; flex-direction: column; }

.two-col { display: grid; gap: 18px; margin-top: 22px; }
.two-col > * { min-width: 0; }
@media (min-width: 960px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (min-width: 960px) { .two-col--side { grid-template-columns: 340px 1fr; } }
.tab-body .two-col, .tab-body > .two-col:first-child { margin-top: 0; }

.details { display: grid; gap: 0; margin: 0; }
.details > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.details > div:last-child { border-bottom: 0; }
.details dt { font-size: .8125rem; color: var(--text-faint); }
.details dd { margin: 0; word-break: break-word; }
.prose { color: var(--text-muted); white-space: normal; word-break: break-word; }

.callout { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--radius); background: var(--violet-glow); border: 1px solid var(--violet-line); font-size: .875rem; color: var(--text); }
.callout .ico { color: var(--violet-soft); margin-top: 2px; }
.callout--warn { background: rgba(245, 197, 107, .08); border-color: rgba(245, 197, 107, .35); }
.callout--warn .ico { color: var(--warn); }

/* Lists (reminders, latest money) */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.list__row { display: flex; align-items: center; gap: 14px; padding: 10px; margin: 0 -10px; border-radius: var(--radius-sm); transition: background .2s, transform .2s var(--ease); }
.list__row:hover { background: var(--surface-2); transform: translateX(3px); }
.list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list__main strong { font-weight: 600; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__main small { font-size: .8125rem; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__side { font-size: .8125rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.datebox { display: grid; place-items: center; width: 46px; height: 48px; flex: none; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .6875rem; text-transform: uppercase; color: var(--text-faint); line-height: 1.1; }
.datebox b { font-family: var(--font-display); font-size: 1.125rem; color: var(--text); }
.datebox--soon { border-color: var(--violet-line); background: var(--violet-glow); }
.datebox--soon b { color: var(--violet-soft); }
.datebox--late { border-color: rgba(243, 139, 163, .4); }
.datebox--late b { color: var(--bad); }
.dot { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-weight: 700; }
.dot--in { background: var(--violet-glow); color: var(--violet-soft); }
.dot--out { background: var(--surface-2); color: var(--text-muted); }

.jump-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.jump { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--border); font-size: .875rem; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.jump span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.jump b { font-family: var(--font-display); font-size: .8125rem; }
.jump .ico { color: var(--violet-soft); }
.jump:hover { border-color: var(--violet-line); background: var(--violet-glow); transform: translateY(-1px); }
.jump:hover span { color: var(--text); }

.quick-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); padding: 12px 16px; background: var(--bg-raised); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { font-family: var(--font-display); font-weight: 700; background: var(--bg-raised); border-top: 1px solid var(--border-strong); border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel .table-wrap { margin: 0 -22px -22px; }
.panel--flush .table-wrap { margin: 0; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.row-actions > * { flex: none; }
td.row-actions { display: table-cell; width: 1%; text-align: right; }
td.row-actions > * { display: inline-grid; vertical-align: middle; }
td.row-actions > .inline-form { display: inline-block; }

/* ---------- Forms ---------- */

.form { display: flex; flex-direction: column; gap: 14px; }
.form--wide { max-width: 860px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .8125rem; font-weight: 500; color: var(--text-muted); }
.field--check { justify-content: flex-start; }
.grid-2, .grid-3 { display: grid; gap: 14px; }
@media (min-width: 680px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .field--full { grid-column: 1 / -1; }
  .grid-3 .field--wide { grid-column: span 2; }
}

input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: .9375rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a3b8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
input[type="date"] { color-scheme: dark; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover, select:hover, textarea:hover { border-color: #4a4063; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 4px var(--violet-glow); }

.input-money, .input-pass { position: relative; display: flex; align-items: center; }
.input-money span { position: absolute; left: 14px; color: var(--text-faint); pointer-events: none; }
.input-money input[type="text"] { padding-left: 34px; }
.input-pass input[type="password"], .input-pass input[type="text"] { padding-right: 48px; }
.input-pass .icon-btn { position: absolute; right: 5px; }
.input-title { font-family: var(--font-display); font-size: 1.0625rem !important; font-weight: 600; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .875rem; color: var(--text-muted); min-height: 46px; }
.check input { appearance: none; width: 20px; height: 20px; flex: none; margin: 0; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--bg-raised); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s; }
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s var(--ease); }
.check input:checked { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-glow); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check:hover input { border-color: var(--violet); }
.check:hover { color: var(--text); }
.check--danger input:checked { background: var(--bad); border-color: var(--bad); box-shadow: 0 0 0 4px rgba(243, 139, 163, .15); }

.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.form__actions--end { justify-content: flex-end; margin-top: 14px; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-form input { flex: 1; min-width: 200px; }
.hint { font-size: .8125rem; color: var(--text-faint); }
.subform { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 6px 0 0; display: flex; flex-direction: column; gap: 14px; }
.subform legend { padding: 0 8px; font-family: var(--font-display); font-weight: 700; }
.new-client { padding: 16px; border-radius: var(--radius); background: var(--bg-raised); border: 1px dashed var(--violet-line); }

/* Upload */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__ico { width: 30px; height: 30px; color: var(--violet-soft); transform: rotate(180deg); transition: transform .3s var(--ease); }
.dropzone:hover, .dropzone.is-over { border-color: var(--violet); background: rgba(139, 92, 246, .06); box-shadow: 0 0 0 4px var(--violet-glow); }
.dropzone:hover .dropzone__ico, .dropzone.is-over .dropzone__ico { transform: rotate(180deg) translateY(4px); }

.file-list { display: flex; flex-direction: column; gap: 8px; }
.frow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.frow:hover { border-color: var(--violet-line); transform: translateY(-1px); box-shadow: var(--shadow); }
.frow__ext { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--violet-glow); color: var(--violet-soft); font-family: var(--font-display); font-size: .6875rem; font-weight: 700; letter-spacing: .04em; }
.frow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.frow__main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow__main small { color: var(--text-faint); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Notes */
.notes-grid { columns: 1; column-gap: 16px; }
@media (min-width: 720px) { .notes-grid { columns: 2; } }
@media (min-width: 1200px) { .notes-grid { columns: 3; } }
.ncard { break-inside: avoid; display: flex; flex-direction: column; gap: 8px; padding: 18px; margin-bottom: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.ncard:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.ncard--pinned { border-color: var(--violet-line); background: linear-gradient(180deg, rgba(139, 92, 246, .1), var(--surface) 60%); }
.ncard__head { display: flex; justify-content: space-between; gap: 8px; }
.ncard__head h3 { font-size: 1rem; padding-top: 6px; }
.ncard .row-actions { opacity: .5; transition: opacity .2s; }
.ncard:hover .row-actions { opacity: 1; }

/* Vault */
.vault-gate { max-width: 620px; margin: 10px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 26px; }
.vault-gate .form, .vault-gate .row-form { width: 100%; text-align: left; }
.vault-gate p { color: var(--text-muted); }
.vault-gate__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--violet-glow); border: 1px solid var(--violet-line); color: var(--violet-soft); box-shadow: 0 0 40px -6px rgba(139, 92, 246, .55); }
.vault-gate__icon .ico { width: 28px; height: 28px; }
.vault-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.vcard { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, box-shadow .2s; }
.vcard:hover { border-color: var(--violet-line); box-shadow: var(--shadow-lift); }
.vcard__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 4px; }
.vcard__head > div:nth-child(2) { flex: 1; min-width: 0; }
.vcard__head h3 { font-size: 1rem; }
.vcard__head p { font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--violet-glow); color: var(--violet-soft); }
.vcard__row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--border); }
.vcard__row > span { width: 78px; flex: none; font-size: .75rem; color: var(--text-faint); }
.vcard__row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard__row .icon-btn { width: 32px; height: 32px; }
.vcard__notes { font-size: .8125rem; color: var(--text-muted); padding: 4px 2px 0; word-break: break-word; }
.secret.is-shown { color: var(--violet-soft); }

/* Settings: field editor */
.field-rows { display: flex; flex-direction: column; gap: 10px; }
.field-row { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--border); transition: border-color .2s; }
.field-row:hover { border-color: var(--border-strong); }
.field-row--head { display: none; }
.field-row textarea { min-height: 46px; font-size: .875rem; }
.field-row__opts { display: flex; flex-wrap: wrap; gap: 0 16px; }
.field-row__opts .check { min-height: 34px; }
.input-sort { max-width: 90px; }
@media (min-width: 980px) {
  .field-row { grid-template-columns: 70px 1.2fr 1fr 1.2fr auto; align-items: start; }
  .field-row--head { display: grid; background: none; border: 0; padding: 0 12px; font-size: .75rem; color: var(--text-faint); }
  .field-row__opts { flex-direction: column; }
}
.tab-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* Danger zone */
.danger-zone { margin-top: 30px; border: 1px solid rgba(243, 139, 163, .25); border-radius: var(--radius); padding: 0 18px; }
.danger-zone summary { display: flex; align-items: center; gap: 8px; padding: 14px 0; cursor: pointer; color: var(--bad); font-size: .875rem; font-weight: 600; list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] { padding-bottom: 18px; background: rgba(243, 139, 163, .03); }
.danger-zone p { color: var(--text-muted); font-size: .875rem; }

/* Empty states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty__ico { width: 34px; height: 34px; color: var(--violet-soft); opacity: .8; }
.empty h3, .empty h2 { font-size: 1.125rem; }
.empty p { color: var(--text-muted); max-width: 420px; font-size: .9063rem; }
.empty .btn { margin-top: 8px; }

/* Flash messages */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); font-size: .875rem; border: 1px solid var(--violet-line); background: var(--violet-glow); box-shadow: var(--shadow); animation: rise .4s var(--ease) both; transition: opacity .4s, transform .4s var(--ease); }
.flash .ico { color: var(--violet-soft); }
.flash--bad { border-color: rgba(243, 139, 163, .4); background: rgba(243, 139, 163, .08); }
.flash--bad .ico { color: var(--bad); }
.flash.is-gone { opacity: 0; transform: translateY(-6px); }

/* ---------- Sign-in & installer ---------- */

.bare-main { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 32px var(--gutter); }
.auth { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 22px; animation: rise .6s var(--ease) both; }
.auth--wide { max-width: 620px; }
.auth__card { width: 100%; display: flex; flex-direction: column; gap: 16px; padding: 34px 28px; border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--surface), var(--bg-raised)); border: 1px solid var(--border); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(139, 92, 246, .08), 0 20px 60px -30px rgba(139, 92, 246, .45); }
.auth__logo { width: 150px; height: auto; margin: -6px auto 0; filter: drop-shadow(0 0 24px rgba(139, 92, 246, .35)); }
.auth__title { font-size: 1.5rem; text-align: center; }
.auth__sub { text-align: center; color: var(--text-muted); font-size: .875rem; margin-top: -6px; }
.auth__tag { font-family: var(--font-display); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .8125rem; }
.checks li { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.checks .ok .ico { color: var(--violet-soft); }
.checks .bad .ico { color: var(--bad); }

/* ---------- Splash (after sign-in) ---------- */

.splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: #050408;
  animation: splash-out .7s var(--ease) 2.3s forwards;
}
.splash__glow { position: absolute; width: 620px; height: 620px; max-width: 140vw; max-height: 140vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(139, 92, 246, .35), transparent); opacity: 0; animation: glow-in 1.6s var(--ease) .1s forwards, glow-pulse 2.4s ease-in-out 1.2s infinite; }
.splash__ring { position: absolute; width: min(340px, 74vw); aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(196, 181, 253, .7); box-shadow: 0 0 30px rgba(139, 92, 246, .8), inset 0 0 30px rgba(139, 92, 246, .5); opacity: 0; transform: scale(.6); animation: ring-out 1.4s var(--ease) .9s forwards; }
.splash__logo { position: relative; width: min(300px, 70vw); height: auto; opacity: 0; transform: scale(.82) rotate(-6deg); filter: blur(12px); animation: logo-in 1.1s var(--ease) .15s forwards; }
.splash__tag { position: relative; font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .32em; text-transform: uppercase; color: var(--text-muted); opacity: 0; transform: translateY(8px); animation: rise-in .8s var(--ease) 1.1s forwards; }

@keyframes logo-in { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes ring-out { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes glow-in { to { opacity: 1; } }
@keyframes glow-pulse { 50% { transform: scale(1.08); } }
@keyframes rise-in { to { opacity: 1; transform: none; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }

/* ---------- Entrances ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--d, 0) * 80ms + 60ms); }
.splash ~ .rise, .splash ~ .sections-grid .rise { animation-delay: calc(var(--d, 0) * 80ms + 2.5s); }
.splash ~ .turnover .tbar__col span { animation-delay: 2.8s; }
.cards > *, .vault-list > *, .file-list > * { animation: rise .5s var(--ease) both; }
.cards > *:nth-child(2) { animation-delay: .04s; }
.cards > *:nth-child(3) { animation-delay: .08s; }
.cards > *:nth-child(4) { animation-delay: .12s; }
.cards > *:nth-child(n+5) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .splash { display: none; }
}

@media print {
  .side, .topbar, .tabs, .row-actions, .btn, .quick-add { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; color: #000; }
}

/* ---------- Later fixes ---------- */
@media (min-width: 1100px) { .tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wcard__head .chip, .pcard__top .chip { flex: none; align-self: flex-start; }

/* =========================================================
   Contacts, invoices, goals & plans
   ========================================================= */

.chip--warn { background: rgba(245, 197, 107, .1); border-color: rgba(245, 197, 107, .4); color: var(--warn); }
.chip--bad { background: rgba(243, 139, 163, .1); border-color: rgba(243, 139, 163, .4); color: var(--bad); }
.small { font-size: .8125rem; }
.btn-row--tight { gap: 6px; margin-top: 6px; }
.panel__head--pad { padding: 18px 22px 0; }
.form__spacer { flex: 1; }
.filters__gap { width: 1px; margin: 4px; background: var(--border); align-self: stretch; }

/* Call / WhatsApp pills */
.pill--sm { padding: 4px 11px; font-size: .75rem; gap: 5px; }
.pill--sm .ico { width: 14px; height: 14px; }
.pill--wa:hover { border-color: rgba(139, 92, 246, .7); color: #fff; background: var(--violet-glow); }

/* Contacts */
.avatar--sm { width: 36px; height: 36px; border-radius: 10px; font-size: .9375rem; flex: none; }
.contact-list { display: grid; }
.contact { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact:last-child { border-bottom: 0; }
.contact__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.contact__main strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.contact__main small { color: var(--text-muted); font-size: .8125rem; word-break: break-word; }
.contact .row-actions { display: flex; gap: 4px; flex: none; }
.contact-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.contact--card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.contact--card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: transparent; }
.contact--card:last-child { border-bottom: 1px solid var(--border); }
.subform { padding: 16px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }

/* Invoice form: line items */
.lines { display: grid; gap: 8px; margin-bottom: 12px; }
.lines__head, .line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px 110px 36px; gap: 8px; align-items: center; }
.lines__head { font-size: .75rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px; }
.line__amount { font-family: var(--font-display); font-size: .9375rem; text-align: right; }
.sums { display: grid; gap: 8px; margin: 18px 0 0 auto; max-width: 380px; padding-top: 14px; border-top: 1px solid var(--border); }
.sums > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sums span, .sums label { color: var(--text-muted); font-size: .875rem; }
.sums b { font-family: var(--font-display); font-weight: 700; }
.sums__input .input-money { max-width: 150px; }
.sums__taxname { max-width: 90px; }
.input-pct { position: relative; max-width: 90px; }
.input-pct input { padding-right: 28px; }
.input-pct span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.sums__total { padding-top: 10px; border-top: 1px solid var(--border); }
.sums__total b { font-size: 1.375rem; color: var(--violet-soft); }
@media (max-width: 640px) {
  .lines__head { display: none; }
  .line { grid-template-columns: 1fr 1fr 36px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .line > input:first-child { grid-column: 1 / -1; }
  .line__amount { grid-column: 1 / 3; text-align: left; }
  .line [data-line-remove] { grid-row: 3; grid-column: 3; }
}

/* Invoice page */
.doc-layout { display: grid; gap: 20px; }
.doc-layout > * { min-width: 0; }
@media (min-width: 1100px) { .doc-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .doc-side { position: sticky; top: 20px; } }
.doc-side { display: grid; gap: 16px; }
.doc-side .panel { margin: 0; }
.stack-btns { display: grid; gap: 8px; margin-top: 14px; }
.stack-btns form, .stack-btns .btn, .stack-btns form .btn { width: 100%; justify-content: center; }
.doc-side .small { margin: 12px 0 0; }
.details--tight > div { grid-template-columns: 90px 1fr; padding: 7px 0; }
.list--tight .list__row { margin: 0; padding: 8px 0; }
.list--tight .list__row:hover { transform: none; background: none; }

.paper { background: #fff; color: #1b1726; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(139, 92, 246, .25); font-size: .875rem; line-height: 1.55; }
.paper p { margin: 0; }
.paper__band { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 32px; background: radial-gradient(420px circle at 0% 0%, rgba(139, 92, 246, .35), transparent 60%), #0b0a10; color: #fff; }
.paper__brand { display: flex; align-items: center; gap: 10px; }
.paper__brand .logo { font-size: 1.375rem; }
.paper__title { text-align: right; display: grid; }
.paper__title strong { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .08em; }
.paper__title span { color: #c4b5fd; font-weight: 600; }
.paper__parties { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: 26px 32px 6px; }
.paper .paper__k { font-size: .6875rem; text-transform: uppercase; letter-spacing: .1em; color: #7c4ff0; font-weight: 600; margin-bottom: 4px; }
.paper__name { font-family: var(--font-display); font-size: 1.0625rem; color: #0b0a10; }
.paper__parties p:not(.paper__k):not(.paper__name) { color: #4b4560; }
.paper__dates { margin: 0; display: grid; gap: 6px; align-content: start; }
.paper__dates div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-radius: 8px; background: #f4f1fb; }
.paper__dates dt { color: #6b6580; }
.paper__dates dd { margin: 0; font-weight: 600; text-align: right; }
.paper__items { width: calc(100% - 64px); margin: 18px 32px 0; border-collapse: collapse; }
.paper__items th { text-align: left; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: #6b6580; padding: 10px 8px; border-bottom: 2px solid #0b0a10; }
.paper__items td { padding: 12px 8px; border-bottom: 1px solid #e8e4f2; vertical-align: top; }
.paper__items .num { text-align: right; white-space: nowrap; }
.paper__items td:first-child { color: #9a94ad; width: 28px; }
.paper__foot { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 20px 32px; }
.paper__pay { display: grid; gap: 4px; min-width: 0; align-content: start; color: #4b4560; }
.paper .paper__pay .paper__k:not(:first-child) { margin-top: 10px; }
.paper__sums { margin: 0; display: grid; gap: 4px; align-content: start; }
.paper__sums div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.paper__sums dt { color: #6b6580; }
.paper__sums dd { margin: 0; font-weight: 600; white-space: nowrap; }
.paper__sums .paper__total { margin-top: 6px; padding: 10px 14px; border-radius: 10px; background: #0b0a10; color: #fff; }
.paper__total dt { color: #c4b5fd; font-weight: 600; }
.paper__total dd { font-family: var(--font-display); font-size: 1.25rem; }
.paper__due dd { color: #7c4ff0; font-family: var(--font-display); font-size: 1.0625rem; }
.paper__terms { margin: 0 32px; padding: 16px 0; border-top: 1px solid #e8e4f2; color: #4b4560; font-size: .8125rem; }
.paper .paper__thanks { padding: 18px 32px 24px; text-align: center; color: #9a94ad; font-size: .8125rem; }
@media (max-width: 640px) {
  .paper__band, .paper__parties, .paper__foot { padding-left: 18px; padding-right: 18px; }
  .paper__items { width: calc(100% - 36px); margin: 14px 18px 0; }
  .paper__terms { margin: 0 18px; }
  .paper__items th:nth-child(1), .paper__items td:nth-child(1), .paper__items th:nth-child(3), .paper__items td:nth-child(3) { display: none; }
  .paper__title { text-align: left; }
}

/* Goals & plans */
.cards--goals { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.gcard { display: grid; gap: 14px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; scroll-margin-top: 20px; }
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.gcard:target { border-color: var(--violet); }
.gcard--done { opacity: .7; }
.gcard__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gcard__head h3 { font-size: 1.125rem; line-height: 1.3; }
.gcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .75rem; color: var(--text-faint); }
.gcard__desc { margin: 0; color: var(--text-muted); font-size: .875rem; }
.gcard__facts { margin: 0; display: grid; gap: 6px; font-size: .8125rem; }
.gcard__facts div { display: grid; grid-template-columns: 56px 1fr; gap: 8px; }
.gcard__facts dt { color: var(--text-faint); }
.gcard__facts dd { margin: 0; }
.gcard__status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.gcard__status select { width: auto; min-width: 150px; padding-top: 6px; padding-bottom: 6px; font-size: .8125rem; }
.prio { padding: 2px 8px; border-radius: 99px; font-weight: 600; font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--border-strong); color: var(--text-muted); }
.prio--high { background: var(--violet); border-color: var(--violet); color: #fff; }
.prio--medium { background: var(--violet-glow); border-color: var(--violet-line); color: var(--violet-soft); }
.gprog { display: flex; align-items: center; gap: 10px; }
.gprog__bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.gprog__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-deep), var(--violet), var(--violet-soft)); transition: width .8s var(--ease); }
.gprog b { font-family: var(--font-display); font-size: .875rem; min-width: 38px; text-align: right; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.step { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; transition: background .2s; }
.step:hover { background: var(--surface-2); }
.step__box { display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; border: 1.5px solid var(--border-strong); color: transparent; transition: background .2s, border-color .2s, color .2s; }
.step:hover .step__box { border-color: var(--violet); }
.step.is-done .step__box { background: var(--violet); border-color: var(--violet); color: #fff; }
.step.is-done > span:last-child { color: var(--text-faint); text-decoration: line-through; }

/* Home: goals in focus */
.focus { margin-top: 22px; }
.focus__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.focus__item { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.focus__item:hover { transform: translateY(-2px); border-color: var(--violet-line); box-shadow: 0 12px 30px -16px rgba(139, 92, 246, .6); }
.focus__item strong { font-weight: 600; line-height: 1.35; }
.focus__meta { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--text-faint); }

/* Printing an invoice: only the paper, full width, colours kept */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .side, .side-backdrop, .topbar, .page-head, .flash, .no-print, .doc-side { display: none !important; }
  .shell, .main, .content, .doc-layout, .doc-main { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .paper { box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .paper__items tr { break-inside: avoid; }
}

/* =========================================================
   Leads pipeline
   ========================================================= */

.filters--sub { margin-bottom: 14px; }
.panel--glow { border-color: var(--violet-line); background: radial-gradient(500px circle at 100% 0%, var(--violet-glow), transparent 55%), var(--surface); }

/* Board: one column per stage, scrolls sideways on small screens */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 14px; scroll-snap-type: x proximity; }
.board__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border-radius: var(--radius-lg); background: var(--bg-raised); border: 1px solid var(--border); scroll-snap-align: start; }
.board__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px 6px; border-bottom: 2px solid var(--violet-line); }
.board__head h2 { font-size: .9375rem; }
.board__head span { font-size: .75rem; color: var(--text-faint); white-space: nowrap; }
.board__head b { color: var(--violet-soft); }
.board__empty { margin: 0; padding: 18px 8px; text-align: center; font-size: .8125rem; color: var(--text-faint); border: 1px dashed var(--border); border-radius: var(--radius); }

.lcard { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: transparent; }
.lcard__link { display: grid; gap: 6px; padding: 14px 14px 10px; color: inherit; }
.lcard h3 { font-size: 1rem; line-height: 1.3; }
.lcard p { margin: 0; font-size: .8125rem; }
.lcard__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lcard__tags .chip { white-space: normal; }
.lcard__value { font-family: var(--font-display); color: var(--violet-soft); font-size: .9375rem !important; }
.lcard__foot { display: grid; gap: 8px; padding: 0 14px 14px; }
.lcard__foot .btn-row--tight { margin-top: 0; }
.lcard__foot select { padding-top: 6px; padding-bottom: 6px; font-size: .8125rem; }

/* Follow-up history */
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline__item { position: relative; display: flex; gap: 14px; padding: 0 0 18px 4px; }
.timeline__item::before { content: ""; position: absolute; left: 9px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px var(--violet-glow); }
.timeline__body { flex: 1; min-width: 0; }
.timeline__body p { margin: 0; font-size: .875rem; color: var(--text-muted); word-break: break-word; }
.timeline__body .timeline__meta { color: var(--text-faint); font-size: .8125rem; margin-bottom: 2px; }
.timeline__meta strong { color: var(--text); font-weight: 600; }
.board { scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }
.board::-webkit-scrollbar { height: 8px; }
.board::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
.board::-webkit-scrollbar-track { background: transparent; }

/* ---------- Home: monthly turnover target ---------- */

.target { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: rgba(9, 8, 13, .35); border: 1px solid rgba(255, 255, 255, .08); }
.target__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .8125rem; color: rgba(244, 242, 250, .75); }
.target__head > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.target__head strong { color: #fff; font-family: var(--font-display); font-weight: 700; }
.target__head b { font-family: var(--font-display); font-size: 1.125rem; color: #fff; }
.target__bar { height: 10px; margin: 10px 0 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.target__bar span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--violet-soft), #fff); box-shadow: 0 0 14px rgba(196, 181, 253, .7); transform-origin: left; animation: grow-right 1s var(--ease) both .4s; }
.target--hit { border-color: rgba(196, 181, 253, .55); background: rgba(196, 181, 253, .12); }
.target__note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; font-size: .8125rem; color: rgba(244, 242, 250, .75); }
.target__note strong { color: #fff; }
.target__streak { color: var(--violet-soft); }
.target__edit { margin-top: 10px; }
.target > .target__edit:first-child { margin-top: 0; }
.target__edit summary { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--violet-soft); cursor: pointer; list-style: none; transition: color .2s; }
.target__edit summary::-webkit-details-marker { display: none; }
.target__edit summary:hover { color: #fff; }
.target__form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.target__form .input-money { flex: 1 1 140px; max-width: 200px; }
.target__form .check { margin: 0; font-size: .8125rem; }
.target__hint { margin: 6px 0 0; font-size: .75rem; color: rgba(244, 242, 250, .5); }
@keyframes grow-right { from { transform: scaleX(0); } }

/* Target line on each month's bar */
.tbar__col { position: relative; }
.tbar__target { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(255, 255, 255, .7); pointer-events: none; }
.tbar--hit .tbar__target { border-top-style: solid; border-color: #fff; }
.tbar--hit .tbar__label::after { content: " ✓"; color: var(--violet-soft); }
.splash ~ .turnover .target__bar span { animation-delay: 2.8s; }

/* =========================================================
   Case studies
   ========================================================= */

.cscard { display: grid; gap: 8px; padding: 20px; border-radius: var(--radius-lg); background: radial-gradient(400px circle at 100% 0%, var(--violet-glow), transparent 55%), var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.cscard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.cscard__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cscard__num { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-soft); }
.cscard h3 { font-size: 1.125rem; line-height: 1.3; }
.cscard p { margin: 0; font-size: .8125rem; }
.cscard__best { color: var(--text-muted); }
.cscard__best b { font-family: var(--font-display); font-size: 1.375rem; color: var(--violet-soft); margin-right: 4px; }
.cscard__best--none { color: var(--text-faint); }
.cscard__check { display: grid; gap: 6px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .75rem; color: var(--text-faint); }

/* Honesty checklist */
.checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; font-size: .8125rem; line-height: 1.45; }
.checks li small { display: block; margin-top: 2px; color: var(--text-faint); }
.checks__box { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid rgba(243, 139, 163, .5); color: var(--bad); }
.checks li.is-ok .checks__box { background: var(--violet); border-color: var(--violet); color: #fff; }
.checks li.is-ok { color: var(--text-muted); }
.checks__stage { padding-top: 12px; border-top: 1px solid var(--border); }
.checks__stage .small { margin: 6px 0 0; }
.copy-box { width: 100%; resize: vertical; font: .8125rem/1.55 var(--font-body); }
.case-results { margin-top: 20px; }
.field--self { align-self: end; }

/* The case study document */
.paper--case { position: relative; }
.paper__draft { margin: 0; padding: 7px 16px; text-align: center; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6b21a8; background: repeating-linear-gradient(135deg, #f3e8ff, #f3e8ff 10px, #ede4fb 10px, #ede4fb 20px); }
.case__intro { padding: 26px 32px 8px; }
.paper .case__intro h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.25; color: #0b0a10; }
.paper .case__meta { margin-top: 8px; color: #6b6580; font-size: .875rem; }
.case__results { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding: 16px 32px 6px; }
.result { padding: 16px; border-radius: 14px; background: #0b0a10; color: #fff; background-image: radial-gradient(260px circle at 100% 0%, rgba(139, 92, 246, .45), transparent 60%); }
.paper .result__label { font-size: .75rem; color: #c4b5fd; font-weight: 600; }
.paper .result__nums { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: .9375rem; color: rgba(255, 255, 255, .7); }
.result__nums strong { font-family: var(--font-display); font-size: 1.375rem; color: #fff; }
.result__nums .ico { color: #c4b5fd; }
.paper .result__change { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 99px; background: #8b5cf6; color: #fff; font-family: var(--font-display); font-size: .875rem; }
.paper .result__change--down { background: rgba(255, 255, 255, .15); }
.paper .result__src { margin-top: 8px; font-size: .6875rem; color: rgba(255, 255, 255, .55); }
.case__body { display: grid; gap: 16px; padding: 18px 32px 4px; color: #2e2940; }
.case__body section { display: grid; gap: 4px; }
.case__quote { margin: 18px 32px 0; padding: 18px 22px; border-left: 4px solid #8b5cf6; border-radius: 0 12px 12px 0; background: #f4f1fb; }
.case__quote p { margin: 0; font-size: 1rem; font-style: italic; color: #1b1726; }
.case__quote cite { display: block; margin-top: 8px; font-style: normal; font-size: .8125rem; color: #6b6580; }
.paper .case__pending { margin: 16px 32px 0; padding: 10px 14px; border-radius: 10px; border: 1px dashed #c4b5fd; color: #6b6580; font-size: .8125rem; }
.paper .case__foot { margin: 22px 32px 0; padding-top: 14px; border-top: 1px solid #e8e4f2; font-size: .75rem; color: #6b6580; }
@media (max-width: 640px) {
  .case__intro, .case__results, .case__body { padding-left: 18px; padding-right: 18px; }
  .case__quote, .paper .case__pending, .paper .case__foot { margin-left: 18px; margin-right: 18px; }
}
@media print {
  .case-results { display: none !important; }
  .result, .paper__draft { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result { break-inside: avoid; }
}

/* =========================================================
   Monthly client reports
   ========================================================= */

.mrows { display: grid; gap: 8px; margin-bottom: 14px; }
.mrows__head, .mrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) 90px minmax(0, 1.2fr) 120px 36px; gap: 8px; align-items: center; }
.mrows__head { font-size: .75rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px; }
.mrow__prev { font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow__prev::before { content: "Last: "; display: none; }
@media (max-width: 760px) {
  .mrows__head { display: none; }
  .mrow { grid-template-columns: 1fr 1fr 36px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .mrow > input:first-child { grid-column: 1 / -1; }
  .mrow__prev { grid-column: 1 / 3; }
  .mrow__prev::before { display: inline; }
  .mrow > input:nth-of-type(3) { grid-column: 1 / -1; }
  .mrow [data-row-remove] { grid-column: 3; grid-row: 2; }
}

.paper .rep__summary { margin: 14px 32px 0; padding: 16px 18px; border-radius: 12px; background: #f4f1fb; border-left: 4px solid #8b5cf6; }
.paper .rep__summary p:last-child { color: #1b1726; font-size: .9375rem; }
.paper .rep__ads { margin: 16px 32px 0; padding: 16px 18px; border-radius: 12px; border: 1px solid #e8e4f2; }
.rep__ads dl { margin: 8px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.rep__ads dl div { padding: 10px 12px; border-radius: 10px; background: #f8f6fd; }
.rep__ads dt { font-size: .75rem; color: #6b6580; }
.rep__ads dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.0625rem; color: #0b0a10; }
.rep__ads .rep__held { background: #0b0a10; }
.rep__ads .rep__held dt { color: #c4b5fd; }
.rep__ads .rep__held dd { color: #fff; }
.paper .rep__note { margin-top: 8px; font-size: .75rem; color: #6b6580; }
.rep__cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 22px; }
@media (max-width: 640px) { .paper .rep__summary, .paper .rep__ads { margin-left: 18px; margin-right: 18px; } }
@media print { .rep__ads .rep__held, .rep__summary { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- UPI QR on invoices ---------- */
.upi { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 10px; padding: 10px; border: 1px solid #e8e4f2; border-radius: 12px; background: #fff; width: fit-content; max-width: 100%; }
.upi .qr { display: block; flex: none; width: 132px; height: 132px; }
.upi__text { display: grid; gap: 2px; flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; font-size: .75rem; color: #6b6580; }
.upi__text strong { font-family: var(--font-display); font-size: .9375rem; color: #0b0a10; }
@media print { .upi { break-inside: avoid; } }

/* ---------- Invoice design (founder's layout) ---------- */
.inv { position: relative; background: #fff; font-size: .875rem; container: inv / inline-size; }
.inv p { margin: 0; }
.inv__band { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding: 30px 36px 74px; color: #fff;
  background: radial-gradient(520px 260px at 0% 0%, rgba(139, 92, 246, .45), transparent 70%), radial-gradient(600px 300px at 100% 0%, rgba(124, 79, 240, .55), transparent 70%), linear-gradient(135deg, #0b0a10 0%, #1d1036 55%, #3b1d80 100%); }
.inv__brand { display: flex; align-items: center; gap: 12px; }
.inv__brand img { width: 84px; height: auto; }
.inv__brand .logo { font-size: 2rem; line-height: 1; display: block; }
.inv__brand small { display: block; margin-top: 6px; font-size: .6875rem; letter-spacing: .42em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.inv__title { display: flex; align-items: center; gap: 22px; }
.inv__title > div { display: grid; text-align: right; }
.inv__title strong { font-family: var(--font-display); font-size: 2.5rem; line-height: 1.05; letter-spacing: .04em; }
.inv__title > div span { margin-top: 4px; font-size: 1rem; color: rgba(255, 255, 255, .9); }
.inv__tag { display: grid; gap: 2px; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .35); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.inv__parties { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: -54px 28px 0; }
.inv__card { display: grid; gap: 4px; align-content: start; padding: 18px 22px; background: #fff; border: 1px solid #ece8f6; border-radius: 14px; box-shadow: 0 10px 30px -18px rgba(59, 29, 128, .45); }
.inv__card--to { grid-template-columns: 1fr auto; gap: 14px; }
.inv__card--to > div { display: grid; gap: 4px; align-content: start; }
.inv .inv__k { font-size: .6875rem; text-transform: uppercase; letter-spacing: .12em; color: #6b6580; }
.inv .inv__name { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.25; color: #0b0a10; }
.inv .inv__sub { font-size: .9375rem; color: #1b1726; margin-bottom: 6px; }
.inv .inv__line { display: flex; align-items: flex-start; gap: 10px; color: #1b1726; }
.inv__line .ico { flex: none; margin-top: 2px; color: #7c4ff0; }
.inv .inv__muted { color: #4b4560; overflow-wrap: anywhere; }
.inv__badge { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 14px; background: #f4f1fb; color: #b7aed0; }
.inv__badge .ico { width: 40px; height: 40px; }
.inv__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 16px 28px 0; padding: 14px 6px; border-radius: 14px; background: #f4f1fb; }
.inv__meta div { display: grid; gap: 4px; text-align: center; padding: 2px 10px; }
.inv__meta div + div { border-left: 1px solid #ddd6ef; }
.inv__meta dt { font-size: .8125rem; color: #6b6580; }
.inv__meta dd { margin: 0; font-weight: 600; color: #0b0a10; }
.inv__items { width: calc(100% - 56px); margin: 18px 28px 0; border-collapse: separate; border-spacing: 0; border: 1px solid #ece8f6; border-radius: 14px; overflow: hidden; }
.inv__items thead th { padding: 13px 16px; text-align: left; font-family: var(--font-display); font-size: .9375rem; color: #fff; background: linear-gradient(90deg, #5b21b6, #7c3aed 60%, #4c1d95); }
.inv__items td { padding: 12px 16px; border-top: 1px solid #ece8f6; vertical-align: middle; color: #1b1726; }
.inv__items th + th, .inv__items td + td { border-left: 1px solid #ece8f6; }
.inv__items thead th + th { border-left-color: rgba(255, 255, 255, .18); }
.inv__items td:first-child, .inv__items th:first-child { width: 52px; text-align: center; }
.inv__items td strong { display: block; font-weight: 600; color: #0b0a10; }
.inv__items td small { display: block; margin-top: 2px; font-size: .8125rem; color: #4b4560; }
.inv__items .num { text-align: right; white-space: nowrap; }
.inv__items tbody .num:last-child { font-size: .9375rem; }
.inv__items tfoot td, .inv__items tfoot th { padding: 14px 16px; border-top: 1px solid #ddd6ef; background: #f1ecfd; font-family: var(--font-display); font-size: 1.0625rem; color: #3b1d80; text-align: left; }
.inv__items tfoot td.num { text-align: right; font-size: 1.25rem; color: #0b0a10; }
.inv__foot { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, 1fr); gap: 24px; padding: 20px 28px 0; align-items: start; }
.inv .inv__h { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.25rem; color: #3b1d80; }
.inv__pay > .inv__h { padding-left: 14px; border-left: 4px solid #7c3aed; }
.inv__pay { min-width: 0; padding-top: 30px; }
.inv__pay > .inv__muted { margin-bottom: 14px; padding-left: 18px; font-size: .8125rem; }
.inv__payrow { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.inv__qr { flex: none; padding: 6px; border: 1px solid #ece8f6; border-radius: 10px; background: #fff; }
.inv__qr .qr { display: block; width: 168px; height: 168px; }
.inv__ways { display: grid; gap: 18px; flex: 1 1 200px; min-width: 0; }
.inv__way { display: flex; gap: 14px; align-items: flex-start; }
.inv__way strong { display: block; font-weight: 600; color: #0b0a10; }
.inv__way p { color: #1b1726; overflow-wrap: anywhere; }
.inv__way .inv__muted { margin-top: 8px; font-size: .8125rem; }
.inv__wayico { flex: none; display: grid; place-items: center; width: 34px; color: #6d28d9; }
.inv__wayico .ico { width: 30px; height: 30px; }
.inv__upi { font-family: var(--font-display); font-style: italic; font-size: 1.125rem; letter-spacing: -.02em; color: #7c3aed; }
.inv .inv__upiid { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.inv__copy { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid #ddd6ef; border-radius: 8px; background: #fff; color: #6b6580; font: inherit; font-size: .75rem; cursor: pointer; transition: background .2s, color .2s; }
.inv__copy:hover { background: #f4f1fb; color: #6d28d9; }
.inv__sums { margin: 0; display: grid; border: 1px solid #ece8f6; border-radius: 14px; overflow: hidden; background: #fff; }
.inv__sums div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 20px; }
.inv__sums div + div { border-top: 1px solid #ece8f6; }
.inv__sums dt { color: #1b1726; white-space: nowrap; }
.inv__sums dd { margin: 0; color: #0b0a10; white-space: nowrap; }
.inv__sums .inv__due { margin: 0 -1px -1px; padding: 14px 20px; border-radius: 12px; border-top: 0; background: linear-gradient(90deg, #5b21b6, #7c3aed); }
.inv__due dt, .inv__due dd { color: #fff; font-family: var(--font-display); font-size: 1.25rem; }
.inv__notes { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 22px 28px 0; padding: 20px 24px; border: 1px solid #ece8f6; border-radius: 14px; background: #fcfbff; color: #1b1726; font-size: .8125rem; }
.inv__notes > div:first-child { display: grid; gap: 6px; min-width: 0; }
.inv .inv__h--icon { display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; }
.inv .inv__h--icon:not(:first-child) { margin-top: 8px; }
.inv__h--icon .ico { color: #7c3aed; }
.inv__notes ol { margin: 0; padding-left: 52px; display: grid; gap: 3px; }
.inv__notes > div:first-child > p { padding-left: 34px; color: #1b1726; }
.inv__thanks { flex: none; display: grid; justify-items: center; gap: 6px; padding: 0 10px; }
.inv__thanks strong { font-family: var(--font-display); font-size: 1.75rem; color: #6d28d9; transform: rotate(-4deg); }
.inv__thanks span { font-size: .8125rem; color: #4b4560; }
.inv__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; padding: 18px 36px; color: #fff; background: linear-gradient(90deg, #0b0a10, #1d1036 70%, #2e1766); }
.inv__bottom strong { font-family: var(--font-display); }
.inv__bottom span { margin: 0 12px; color: rgba(255, 255, 255, .5); }
.inv .inv__bottomtag { color: #c4b5fd; font-size: .8125rem; }
@container inv (max-width: 680px) {
  .inv__foot { grid-template-columns: 1fr; }
  .inv__pay { padding-top: 0; }
}
@container inv (max-width: 560px) {
  .inv__band { padding: 22px 18px 66px; }
  .inv__brand .logo { font-size: 1.5rem; }
  .inv__brand img { width: 60px; }
  .inv__brand small { letter-spacing: .3em; }
  .inv__title { width: 100%; justify-content: space-between; }
  .inv__title > div { text-align: left; }
  .inv__title strong { font-size: 1.875rem; }
  .inv__parties, .inv__meta, .inv__notes { margin-left: 14px; margin-right: 14px; }
  .inv__meta div { padding: 8px 10px; }
  .inv__meta div + div { border-left: 0; }
  .inv__items { width: calc(100% - 28px); margin: 16px 14px 0; }
  .inv__items td, .inv__items thead th, .inv__items tfoot td, .inv__items tfoot th { padding: 10px; }
  .inv__items td:first-child, .inv__items th:first-child { display: none; }
  .inv__items:not(.inv__items--simple) td:nth-child(3), .inv__items:not(.inv__items--simple) th:nth-child(3) { display: none; }
  .inv__foot { grid-template-columns: 1fr; padding: 18px 14px 0; }
  .inv__pay { padding-top: 0; }
  .inv__notes { flex-direction: column; align-items: stretch; }
  .inv__notes ol { padding-left: 20px; }
  .inv__notes > div:first-child > p { padding-left: 0; }
  .inv__bottom { padding: 16px 18px; }
}
@media print {
  .inv__band, .inv__items thead th, .inv__items tfoot td, .inv__items tfoot th, .inv__sums .inv__due, .inv__meta, .inv__bottom, .inv__badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv__foot, .inv__notes, .inv__items tr { break-inside: avoid; }
}

/* =========================================================
   Renewals
   ========================================================= */
.renew { list-style: none; margin: 0; padding: 0; display: grid; }
.renew__row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 100px auto; gap: 8px 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.renew__row:first-child { border-top: 0; }
.renew__title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.renew__sub { margin: 4px 0 0; font-size: .8125rem; color: var(--text-muted); }
.renew__when { display: grid; }
.renew__when small { font-size: .75rem; color: var(--text-faint); }
.renew__cost { text-align: right; font-weight: 600; white-space: nowrap; }
.renew__actions { display: flex; gap: 8px; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; }
.renew__done { position: relative; }
.renew__done summary { list-style: none; cursor: pointer; }
.renew__done summary::-webkit-details-marker { display: none; }
.renew__done[open] summary { border-color: var(--violet-line); color: var(--text); }
.renew__done form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(340px, 86vw); padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .9); }
.plain-list { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 6px; color: var(--text-muted); }
.inline-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.field--inline { display: flex; align-items: center; gap: 10px; margin: 0; }
.field--inline input { width: 84px; }
@media (max-width: 760px) {
  .renew__row { grid-template-columns: minmax(0, 1fr) auto; }
  .renew__main { grid-column: 1 / -1; }
  .renew__cost { text-align: right; }
  .renew__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .renew__done[open] { flex-basis: 100%; }
  .renew__done form { position: static; width: 100%; margin-top: 10px; box-shadow: none; }
}
