/* ==========================================================================
   Linkfluencer — Design System
   Mobile-first · token-based · light/dark
   ========================================================================== */

/* ---------- Fonts (self-hosted, GDPR-friendly) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage", "Inter", ui-sans-serif, system-ui, sans-serif;

  --bg: #f6f6fa;
  --surface: #ffffff;
  --surface-2: #f2f1f8;
  --surface-3: #e9e8f2;
  --line: #e5e4ee;
  --line-strong: #d3d2e0;
  --text: #12111c;
  --text-2: #3d3c52;
  --muted: #6e6d85;
  --placeholder: #9a99b0;

  --brand: #5b3df5;
  --brand-hover: #4a2de8;
  --brand-ink: #3a20d6;
  --brand-soft: #efebff;
  --brand-soft-2: #e1d9ff;
  --accent: #ff3d7f;
  --accent-ink: #d61f60;
  --accent-soft: #ffe7ef;
  --lime: #d9ff3f;
  --lime-ink: #1d2400;

  --success: #0e9f6e;
  --success-soft: #e2f7ee;
  --warning: #c96a04;
  --warning-soft: #fff1dd;
  --danger: #e0383b;
  --danger-soft: #fdeaea;
  --info: #2563eb;
  --info-soft: #e7effe;

  --grad: linear-gradient(120deg, #5b3df5 0%, #9b3df0 48%, #ff3d7f 100%);
  --grad-soft: linear-gradient(120deg, #f0ecff 0%, #fbe9f6 55%, #ffe9ef 100%);
  --grad-ink: linear-gradient(160deg, #15102e 0%, #1c1240 55%, #2b0f2e 100%);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --pill: 999px;

  --shadow-xs: 0 1px 2px rgba(18, 17, 28, 0.06);
  --shadow-sm: 0 1px 3px rgba(18, 17, 28, 0.07), 0 1px 2px rgba(18, 17, 28, 0.04);
  --shadow: 0 6px 20px -6px rgba(18, 17, 28, 0.12), 0 2px 6px -2px rgba(18, 17, 28, 0.06);
  --shadow-lg: 0 28px 60px -18px rgba(28, 18, 80, 0.28), 0 8px 20px -8px rgba(18, 17, 28, 0.12);
  --ring: 0 0 0 4px rgba(91, 61, 245, 0.2);

  --header-h: 68px;
  --sidebar-w: 256px;
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0a12;
    --surface: #14131e;
    --surface-2: #1b1a28;
    --surface-3: #252336;
    --line: #262436;
    --line-strong: #37354b;
    --text: #f2f1fa;
    --text-2: #c8c6da;
    --muted: #938faa;
    --placeholder: #6d6a86;
    --brand: #7b63ff;
    --brand-hover: #8f7bff;
    --brand-ink: #b6a8ff;
    --brand-soft: #211b42;
    --brand-soft-2: #2c2360;
    --accent: #ff5b92;
    --accent-ink: #ff8fb4;
    --accent-soft: #37162a;
    --success: #34d399;
    --success-soft: #0f2c22;
    --warning: #fbbf24;
    --warning-soft: #33250a;
    --danger: #f87171;
    --danger-soft: #3a1516;
    --info: #60a5fa;
    --info-soft: #13233f;
    --grad-soft: linear-gradient(120deg, #1d173a 0%, #26163a 55%, #2d1424 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 28px 60px -18px rgba(0, 0, 0, 0.7);
    --ring: 0 0 0 4px rgba(123, 99, 255, 0.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0a12;
  --surface: #14131e;
  --surface-2: #1b1a28;
  --surface-3: #252336;
  --line: #262436;
  --line-strong: #37354b;
  --text: #f2f1fa;
  --text-2: #c8c6da;
  --muted: #938faa;
  --placeholder: #6d6a86;
  --brand: #7b63ff;
  --brand-hover: #8f7bff;
  --brand-ink: #b6a8ff;
  --brand-soft: #211b42;
  --brand-soft-2: #2c2360;
  --accent: #ff5b92;
  --accent-ink: #ff8fb4;
  --accent-soft: #37162a;
  --success: #34d399;
  --success-soft: #0f2c22;
  --warning: #fbbf24;
  --warning-soft: #33250a;
  --danger: #f87171;
  --danger-soft: #3a1516;
  --info: #60a5fa;
  --info-soft: #13233f;
  --grad-soft: linear-gradient(120deg, #1d173a 0%, #26163a 55%, #2d1424 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 28px 60px -18px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 4px rgba(123, 99, 255, 0.3);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: var(--brand-soft-2); color: var(--text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
table { border-collapse: collapse; width: 100%; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.icon { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -0.2em; }
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  color: var(--text);
}
.display { font-size: clamp(2.5rem, 6.5vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
h1, .h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3, .h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
h4, .h4 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); line-height: 1.6; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-ink);
}
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small, small { font-size: 0.875rem; }
.xs { font-size: 0.78rem; }
.strong, strong, b { font-weight: 650; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tabular { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.prose { max-width: 72ch; color: var(--text-2); }
.prose h2 { margin-top: 1.8em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose a { text-decoration: underline; }
kbd, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; }
.container-md { max-width: 980px; }
.section { padding: 72px 0; }
.section-sm { padding: 40px 0; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-top { align-items: flex-start; }
.row-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--gap, 20px); grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.cards-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); }
.split { display: grid; gap: 28px; }
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .split-left { grid-template-columns: 300px minmax(0, 1fr); }
  .sticky-side { position: sticky; top: calc(var(--header-h) + 20px); }
}
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }
 @media (max-width: 767px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .hide-desktop { display: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1; white-space: nowrap;
  text-decoration: none !important; cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.08s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-wrap { white-space: normal; height: auto; min-height: var(--btn-h); padding-top: 9px; padding-bottom: 9px; line-height: 1.25; text-align: left; max-width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: 0.55; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -6px rgba(91, 61, 245, 0.55); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-gradient { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(155, 61, 240, 0.7); background-size: 140% 100%; background-position: 0 0; }
.btn-gradient:hover { background-position: 100% 0; color: #fff; }
.btn-dark { background: var(--text); color: var(--surface); }
.btn-dark:hover { opacity: 0.9; color: var(--surface); }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { filter: brightness(0.96); color: var(--lime-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--text-2); color: var(--text); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { background: var(--brand-soft-2); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(0.95); color: #fff; }
.btn-outline-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-outline-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-sm { --btn-h: 36px; padding: 0 13px; font-size: 0.875rem; border-radius: 10px; }
.btn-xs { --btn-h: 30px; padding: 0 10px; font-size: 0.8rem; border-radius: 8px; gap: 6px; }
.btn-lg { --btn-h: 54px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--btn-h); padding: 0; }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent transparent;
  animation: spin 0.7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-soft.is-loading::after { border-color: var(--brand) var(--brand) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-ink); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; color: var(--text); }
.label .opt { font-weight: 500; color: var(--muted); font-size: 0.82rem; }
.hint { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.field-error { color: var(--danger); font-size: 0.84rem; margin: 6px 0 0; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 16px; /* evita zoom su iOS */
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid, .has-error .input, .has-error .select, .has-error .textarea { border-color: var(--danger); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236e6d85' stroke-width='2' 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 12px center; background-size: 18px;
}
.input-sm, .select-sm { min-height: 38px; padding: 7px 12px; font-size: 0.9rem; border-radius: 10px; }
.select-sm { padding-right: 34px; background-position: right 9px center; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1; }
.input-group .addon {
  display: flex; align-items: center; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: 0.95rem;
}
.input-group .addon:first-child { border-radius: 12px 0 0 12px; border-right: 0; }
.input-group .addon:last-child { border-radius: 0 12px 12px 0; border-left: 0; }
.input-group .addon:first-child + .input { border-radius: 0 12px 12px 0; }
.input-group .input:not(:last-child) { border-radius: 12px 0 0 12px; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 42px; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } .form-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.form-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }
.form-actions.start { justify-content: flex-start; }
.char-count { float: right; font-size: 0.78rem; color: var(--muted); font-weight: 500; }

/* Checkbox / radio */
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 0.95rem; line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface); display: grid; place-content: center; transition: all 0.12s; cursor: pointer; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.check input:focus-visible { box-shadow: var(--ring); }
.check .sub { display: block; color: var(--muted); font-size: 0.84rem; }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background 0.18s; flex: none; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 0.18s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

/* Pill selectors (checkbox/radio come chip) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-input { position: relative; }
.chip-input input { position: absolute; opacity: 0; pointer-events: none; }
.chip-input span {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--pill);
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.9rem; font-weight: 550; cursor: pointer;
  transition: all 0.12s; user-select: none; color: var(--text-2);
}
.chip-input span:hover { border-color: var(--brand); color: var(--text); }
.chip-input input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.chip-input input:focus-visible + span { box-shadow: var(--ring); }
.chip-input .icon { width: 1em; height: 1em; }

/* Option cards (radio grandi) */
.option-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .option-cards { grid-template-columns: repeat(var(--cols, 2), 1fr); } }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card .oc-body { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px 18px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); transition: all 0.14s; }
.option-card .oc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.option-card .oc-title { font-weight: 650; display: block; }
.option-card .oc-desc { font-size: 0.86rem; color: var(--muted); display: block; margin-top: 2px; }
.option-card:hover .oc-body { border-color: var(--brand); }
.option-card input:checked + .oc-body { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.option-card input:checked + .oc-body .oc-icon { background: var(--brand); color: #fff; }
.option-card input:focus-visible + .oc-body { box-shadow: var(--ring); }

/* Dropzone */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); cursor: pointer; transition: all 0.14s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 28px; height: 28px; }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 0.88rem; }
.file-list .file-item { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }

.image-picker { display: flex; align-items: center; gap: 16px; }
.image-picker .preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.image-picker .preview.cover { width: 160px; height: 60px; border-radius: 12px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
@media (min-width: 768px) { .card-pad { padding: 28px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.08rem; }
.card-body { padding: 22px; }
.card-foot { padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-link { display: block; color: inherit; transition: transform 0.18s var(--ease), box-shadow 0.18s, border-color 0.18s; }
.card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-brand { background: var(--grad-soft); border-color: var(--brand-soft-2); }
.card-dark { background: var(--grad-ink); color: #fff; border: 0; }
.card-dark h2, .card-dark h3, .card-dark h4 { color: #fff; }
.card-dark .muted { color: rgba(255,255,255,.66); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title h2, .section-title h3 { margin: 0; }

/* ---------- Badges, pills, tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: var(--pill); font-size: 0.75rem; font-weight: 650; line-height: 1; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge .icon { width: 13px; height: 13px; }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-dark { background: var(--text); color: var(--surface); }
.badge-lime { background: var(--lime); color: var(--lime-ink); }
.badge-outline { background: transparent; border: 1px solid var(--line-strong); }
.badge-lg { height: 30px; padding: 0 12px; font-size: 0.82rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--pill); background: var(--surface-2); color: var(--text-2); font-size: 0.82rem; font-weight: 550; border: 1px solid transparent; }
a.tag:hover { border-color: var(--line-strong); text-decoration: none; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.verified { color: var(--brand); display: inline-flex; }
.verified .icon { width: 1.05em; height: 1.05em; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1; }

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-xs { width: 24px; height: 24px; font-size: 0.62rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 44px; height: 44px; font-size: 0.95rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; }
.avatar-2xl { width: 128px; height: 128px; font-size: 2.6rem; }
.avatar-initials {
  display: inline-grid; place-items: center; font-weight: 700; color: #fff; letter-spacing: 0.02em;
  background: linear-gradient(135deg, hsl(var(--h, 260) 80% 62%), hsl(calc(var(--h, 260) + 40) 85% 58%));
}
.avatar.square { border-radius: 14px; }
.avatar-ring { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px transparent; }
.avatar-stack { display: flex; }
.avatar-stack > * { margin-left: -8px; border: 2px solid var(--surface); }
.avatar-stack > *:first-child { margin-left: 0; }

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.star { width: 16px; height: 16px; }
.stars-sm .star { width: 13px; height: 13px; }
.star.on { fill: #f5b301; }
.star.half { fill: url(#half); fill: #f5b301; opacity: 0.55; }
.star.off { fill: var(--surface-3); }
.rating-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 0.9rem; }
.rating-inline .muted { font-weight: 500; }

/* ---------- Alerts / callouts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid transparent; font-size: 0.93rem; }
.alert > .icon { margin-top: 2px; width: 20px; height: 20px; }
.alert-title { font-weight: 650; display: block; margin-bottom: 2px; }
.alert-info { background: var(--info-soft); color: var(--text); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert-info > .icon { color: var(--info); }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.alert-success > .icon { color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-warning > .icon { color: var(--warning); }
.alert-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-danger > .icon { color: var(--danger); }
.alert-brand { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.alert-brand > .icon { color: var(--brand); }
.alert p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: 0.92rem; }
.table th { text-align: left; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact td, .table-compact th { padding: 9px 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 0.93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; text-align: right; }
.breakdown { width: 100%; font-size: 0.94rem; }
.breakdown td { padding: 7px 0; }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; white-space: nowrap; }
.breakdown .total td { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 750; font-size: 1.05rem; }
.breakdown .sub td { color: var(--muted); font-size: 0.86rem; }
.breakdown .minus td:last-child { color: var(--danger); }

/* ---------- Stat cards ---------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(var(--cols, 4), 1fr); } }
.stat { padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 550; }
.stat-label .icon { width: 16px; height: 16px; }
.stat-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 750; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.stat-up { color: var(--success); font-weight: 650; }
.stat-down { color: var(--danger); font-weight: 650; }
.stat-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); float: right; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width 0.5s var(--ease); }
.progress-sm { height: 5px; }
.ring { --p: 50; --size: 64px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring > span { position: relative; font-weight: 750; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ring.good { background: conic-gradient(var(--success) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring.mid { background: conic-gradient(var(--warning) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring.low { background: conic-gradient(var(--danger) calc(var(--p) * 1%), var(--surface-3) 0); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 0.93rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); }
.tab.active, .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.tab .count-badge { background: var(--surface-3); color: var(--text-2); }
.tab.active .count-badge { background: var(--brand); color: #fff; }
.segmented { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 12px; gap: 2px; }
.segmented a, .segmented button { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 0.88rem; color: var(--muted); text-decoration: none !important; border: 0; background: none; }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; opacity: 0; transform: translateY(-4px) scale(0.98); pointer-events: none; transition: all 0.14s var(--ease);
}
.dropdown.open .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-menu.left { right: auto; left: 0; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: 0.92rem; font-weight: 500; text-decoration: none !important; background: none; border: 0; text-align: left; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item .icon { color: var(--muted); width: 18px; height: 18px; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger .icon { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dropdown-header { padding: 10px 12px 8px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; padding: 0; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12, 10, 24, 0.55); backdrop-filter: blur(3px); animation: fadeIn 0.15s; }
.modal-dialog { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: slideUp 0.22s var(--ease); }
@media (min-width: 640px) { .modal { align-items: center; padding: 24px; } .modal-dialog { border-radius: 22px; } }
.modal-lg .modal-dialog { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }
body.modal-open { overflow: hidden; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 768px) { .toasts { left: auto; right: 24px; transform: none; bottom: 24px; } }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); font-size: 0.93rem; font-weight: 500; animation: slideUp 0.25s var(--ease); }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: #4ade80; }
.toast-error .icon { color: #fb7185; }
.toast-warning .icon { color: #fbbf24; }
.toast-info .icon { color: #a5b4fc; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: 0.6; padding: 0; }
.toast.hide { opacity: 0; transform: translateY(8px); transition: all 0.25s; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty-icon .icon { width: 30px; height: 30px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 0.9rem; text-decoration: none !important; }
.pagination a:hover { border-color: var(--brand); color: var(--brand-ink); }
.pagination .current { background: var(--text); color: var(--surface); border-color: var(--text); }
.pagination .gap { border: 0; background: none; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -28px; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); display: grid; place-items: center; }
.tl-dot .icon { width: 11px; height: 11px; }
.tl-item.done .tl-dot { background: var(--success); border-color: var(--success); color: #fff; }
.tl-item.current .tl-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-soft); }
.tl-item.warn .tl-dot { background: var(--warning); border-color: var(--warning); color: #fff; }
.tl-title { font-weight: 600; font-size: 0.93rem; }
.tl-meta { font-size: 0.8rem; color: var(--muted); }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: 6px; margin-bottom: 28px; }
.stepper .step { flex: 1; }
.stepper .step-bar { height: 5px; border-radius: 99px; background: var(--surface-3); }
.stepper .step.done .step-bar, .stepper .step.current .step-bar { background: var(--grad); }
.stepper .step-label { font-size: 0.76rem; font-weight: 600; color: var(--muted); margin-top: 8px; display: none; }
.stepper .step.current .step-label { color: var(--text); }
@media (min-width: 640px) { .stepper .step-label { display: block; } }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Accordion ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 4px; font-weight: 650; font-size: 1.03rem; }
.faq summary .icon { transition: transform 0.2s; color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--brand); }
.faq details > div { padding: 0 4px 20px; color: var(--text-2); max-width: 75ch; }

/* ==========================================================================
   Public site header / footer
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s, background 0.2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.035em; text-decoration: none !important; flex: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 6px 14px -6px rgba(155, 61, 240, 0.8); }
.logo-mark svg { width: 22px; height: 22px; }
.logo-dot { color: var(--accent); }
.main-nav { display: none; gap: 2px; margin-left: 12px; }
.main-nav a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: 0.94rem; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (min-width: 1024px) { .main-nav { display: flex; } .menu-toggle { display: none !important; } }
.mobile-menu { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 49; background: var(--bg); padding: 16px 20px 32px; overflow-y: auto; display: none; animation: fadeIn 0.15s; }
.mobile-menu.open { display: block; }
.mobile-menu a.mm-link { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 1.08rem; color: var(--text); text-decoration: none; }
.mobile-menu .mm-actions { display: grid; gap: 10px; margin-top: 24px; }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.footer-grid .brand-col { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid .brand-col { grid-column: auto; } }
.footer-col h4 { font-family: var(--font); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-2); padding: 5px 0; font-size: 0.93rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
.social-links { display: flex; gap: 8px; }
.social-links a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.social-links a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.lang-switch a { padding: 4px 9px; border-radius: 8px; font-size: 0.8rem; font-weight: 650; color: var(--muted); text-decoration: none !important; }
.lang-switch a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.announcement { background: var(--text); color: var(--surface); text-align: center; font-size: 0.86rem; font-weight: 550; padding: 9px 16px; }
.announcement a { color: var(--lime); }

/* ==========================================================================
   App shell (area riservata)
   ========================================================================== */
.app-body { min-height: 100vh; }
.app-sidebar { display: none; }
.app-main { min-width: 0; padding-bottom: 96px; }
.app-topbar { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.app-topbar .page-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.015em; margin: 0; }
.app-topbar .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--text-2); background: transparent; border: 0; text-decoration: none !important; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .count-badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; font-size: 0.66rem; border: 2px solid var(--bg); }
.app-content { padding: 20px 16px 32px; max-width: 1240px; margin: 0 auto; }
@media (min-width: 768px) { .app-content { padding: 28px 28px 40px; } .app-topbar { padding: 0 28px; } }
.app-page-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.app-page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.app-page-head p { margin: 6px 0 0; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 550; font-size: 0.9rem; margin-bottom: 10px; }
.back-link:hover { color: var(--text); }

.bottom-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); font-size: 0.68rem; font-weight: 600; text-decoration: none !important; border-radius: 12px; }
.bottom-nav a .icon { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--brand-ink); }
.bottom-nav a .count-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 0.62rem; }

@media (min-width: 1024px) {
  .app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .app-sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); padding: 18px 14px; }
  .app-main { padding-bottom: 0; }
  .bottom-nav, .topbar-logo { display: none !important; }
}
.sidebar-logo { padding: 4px 10px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav .nav-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); padding: 18px 12px 8px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-weight: 550; font-size: 0.94rem; text-decoration: none !important; }
.side-nav a .icon { width: 20px; height: 20px; color: var(--muted); }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.side-nav a.active .icon { color: var(--brand); }
.side-nav a .count-badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.sidebar-promo { padding: 16px; border-radius: 16px; background: var(--grad-ink); color: #fff; margin-bottom: 14px; }
.sidebar-promo .small { color: rgba(255,255,255,.72); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); width: 100%; text-align: left; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .uc-name { font-weight: 650; font-size: 0.9rem; line-height: 1.2; }
.user-chip .uc-role { font-size: 0.76rem; color: var(--muted); }
.impersonation-bar { background: var(--warning); color: #1a1200; font-weight: 600; font-size: 0.86rem; padding: 8px 16px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.impersonation-bar button { background: rgba(0,0,0,.12); border: 0; border-radius: 8px; padding: 4px 10px; font-weight: 700; color: inherit; }

/* ==========================================================================
   Marketing
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
@media (min-width: 1024px) { .hero { padding: 88px 0 96px; } }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-bg::before { content: ""; position: absolute; width: 900px; height: 900px; left: 50%; top: -420px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(91, 61, 245, 0.18), transparent 70%); }
.hero-bg::after { content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: 120px; background: radial-gradient(closest-side, rgba(255, 61, 127, 0.14), transparent 70%); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 560px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: var(--muted); font-size: 0.9rem; font-weight: 550; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .icon { color: var(--success); }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 0.86rem; font-weight: 600; margin-bottom: 24px; color: var(--text-2); }
.hero-badge .badge { height: 24px; }
.hero-search { display: flex; gap: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); max-width: 580px; margin-bottom: 18px; flex-wrap: wrap; }
.hero-search .hs-field { flex: 1 1 160px; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-height: 48px; border-radius: 12px; }
.hero-search .hs-field + .hs-field { border-left: 1px solid var(--line); }
.hero-search input, .hero-search select { border: 0; background: transparent; width: 100%; font-size: 15.5px; outline: none; min-width: 0; }
.hero-search .icon { color: var(--muted); }
@media (max-width: 639px) {
  .hero-search .hs-field { flex-basis: 100%; }
  .hero-search .hs-field + .hs-field { border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .hero-search .btn { width: 100%; }
  .hero-ctas .btn { flex: 1 1 100%; }
}

.hero-visual { position: relative; min-height: 460px; }
.hv-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); }
.hv-profile { left: 0; top: 0; width: 290px; padding: 18px; animation: float 7s ease-in-out infinite; }
.hv-profile .hv-cover { height: 84px; border-radius: 14px; background: var(--grad); margin-bottom: -30px; }
.hv-profile .avatar { border: 4px solid var(--surface); margin-left: 12px; }
.hv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hv-stats div { background: var(--surface-2); border-radius: 12px; padding: 8px; text-align: center; }
.hv-stats b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.hv-stats span { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.hv-escrow { right: 0; top: 18px; width: 250px; padding: 16px; animation: float 8s ease-in-out -2s infinite; }
.hv-match { right: 0; top: 222px; width: 270px; padding: 16px; animation: float 6.5s ease-in-out -4s infinite; }
.hv-chat { left: 36px; top: 322px; width: 250px; padding: 14px; animation: float 7.5s ease-in-out -1s infinite; }
.hv-bubble { background: var(--brand-soft); color: var(--text); padding: 9px 12px; border-radius: 14px 14px 14px 4px; font-size: 0.84rem; margin-top: 6px; }
.hv-bubble.me { background: var(--brand); color: #fff; border-radius: 14px 14px 4px 14px; margin-left: 28px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 1023px) { .hero-visual { display: none; } }
@media (prefers-reduced-motion: reduce) { .hv-card { animation: none !important; } html { scroll-behavior: auto; } }

.logos-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.feature { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); height: 100%; }
.feature-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 18px; }
.feature-icon.accent { background: var(--accent-soft); color: var(--accent-ink); }
.feature-icon.success { background: var(--success-soft); color: var(--success); }
.feature-icon.warning { background: var(--warning-soft); color: var(--warning); }
.feature-icon.info { background: var(--info-soft); color: var(--info); }
.feature-icon .icon { width: 24px; height: 24px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.steps-list { counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps-list { grid-template-columns: repeat(var(--cols, 4), 1fr); } }
.step-card { position: relative; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step-card::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; color: var(--brand); display: block; margin-bottom: 14px; }
.step-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.dark-band { background: var(--grad-ink); color: #fff; border-radius: var(--radius-xl); padding: 48px 28px; position: relative; overflow: hidden; }
@media (min-width: 768px) { .dark-band { padding: 64px 56px; } }
.dark-band h2 { color: #fff; }
.dark-band .lead, .dark-band p { color: rgba(255,255,255,.74); }
.dark-band::after { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -160px; background: radial-gradient(closest-side, rgba(255, 61, 127, 0.35), transparent 70%); pointer-events: none; }
.stat-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1; }
.source-note { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.dark-band .source-note { color: rgba(255,255,255,.5); }
.compare-table td, .compare-table th { text-align: center; }
.compare-table td:first-child, .compare-table th:first-child { text-align: left; }
.compare-table .yes { color: var(--success); }
.compare-table .no { color: var(--muted); }
.compare-table .us { background: var(--brand-soft); }
.cta-band { text-align: center; padding: 64px 24px; border-radius: var(--radius-xl); background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.86); }
.city-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pricing */
.price-card { position: relative; padding: 30px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); height: 100%; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.price-card .price { font-family: var(--font-display); font-weight: 800; font-size: 3rem; letter-spacing: -0.04em; line-height: 1; margin: 16px 0 4px; }
.price-card .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.check-list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 11px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check-list li .icon { color: var(--success); margin-top: 2px; flex: none; }
.check-list li.no .icon { color: var(--muted); }

/* ==========================================================================
   Marketplace components
   ========================================================================== */
/* Creator card */
.creator-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform 0.18s var(--ease), box-shadow 0.18s, border-color 0.18s; }
.creator-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.cc-cover { position: relative; height: 96px; background: var(--grad-soft); overflow: hidden; }
.cc-cover img { width: 100%; height: 100%; object-fit: cover; }
.cc-cover .cc-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.cc-fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #3d3c52; border: 0; box-shadow: var(--shadow-sm); }
.cc-fav:hover { color: var(--accent); }
.cc-fav.on { color: var(--accent); }
.cc-fav.on .icon { fill: currentColor; }
.cc-body { padding: 0 16px 16px; display: flex; flex-direction: column; flex: 1; }
.cc-avatar { margin-top: -32px; margin-bottom: 10px; position: relative; }
.cc-avatar .avatar { border: 4px solid var(--surface); width: 68px; height: 68px; font-size: 1.4rem; }
.cc-name { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none !important; }
.cc-name::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cc-headline { font-size: 0.86rem; color: var(--muted); margin: 3px 0 10px; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.82rem; color: var(--text-2); margin-bottom: 12px; }
.cc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cc-meta .icon { width: 14px; height: 14px; color: var(--muted); }
.cc-socials { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-social { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; background: var(--surface-2); font-size: 0.8rem; font-weight: 650; }
.cc-social .icon { width: 14px; height: 14px; }
.cc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.86rem; }
.cc-price b { font-size: 1.02rem; }
.cc-match { position: absolute; top: 10px; right: 52px; z-index: 2; }
.match-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(255,255,255,.95); box-shadow: var(--shadow-sm); font-size: 0.78rem; font-weight: 700; color: #12111c; }
.match-pill .mp-score { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.72rem; }

/* Platform colors */
.pf-instagram { color: #e1306c; }
.pf-tiktok { color: var(--text); }
.pf-youtube { color: #ff0000; }
.pf-facebook { color: #1877f2; }
.pf-twitch { color: #9146ff; }
.pf-pinterest { color: #e60023; }
.pf-linkedin { color: #0a66c2; }
.pf-x { color: var(--text); }

/* Campaign card */
.campaign-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: transform 0.18s var(--ease), box-shadow 0.18s; position: relative; height: 100%; }
.campaign-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.campaign-card .cmp-brand { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--muted); }
.campaign-card .cmp-brand b { color: var(--text); }
.campaign-card h3 { font-size: 1.08rem; margin: 0; }
.campaign-card h3 a { color: var(--text); text-decoration: none; }
.campaign-card h3 a::after { content: ""; position: absolute; inset: 0; }
.campaign-card .cmp-desc { color: var(--text-2); font-size: 0.9rem; margin: 0; }
.campaign-card .cmp-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.86rem; }
.comp-value { font-family: var(--font-display); font-weight: 750; font-size: 1.05rem; }

/* Search layout */
.search-layout { display: grid; gap: 24px; }
@media (min-width: 1024px) { .search-layout { grid-template-columns: 280px minmax(0, 1fr); align-items: start; } }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
@media (min-width: 1024px) { .filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; } }
@media (max-width: 1023px) {
  .filters { position: fixed; inset: 0; z-index: 90; border-radius: 0; overflow-y: auto; display: none; padding: 20px 20px 100px; }
  .filters.open { display: block; animation: slideUp 0.2s var(--ease); }
}
.filter-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group > .label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.filter-group .chips { gap: 6px; }
.filter-group .chip-input span { padding: 6px 11px; font-size: 0.84rem; }
.filters-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; }
@media (min-width: 1024px) { .filters-mobile-bar, .filters-close { display: none !important; } }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.active-filters a .icon { width: 14px; height: 14px; }
.range-row { display: flex; gap: 8px; align-items: center; }
.range-row .input { min-height: 40px; padding: 8px 10px; font-size: 0.9rem; }

/* Autocomplete */
.ac-wrap { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 300px; overflow-y: auto; }
.ac-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 0.93rem; }
.ac-item:hover, .ac-item.active { background: var(--surface-2); }
.ac-item .muted { font-size: 0.82rem; }

/* ==========================================================================
   Profilo pubblico creator (media kit)
   ========================================================================== */
.mk-cover { height: 180px; background: var(--grad); position: relative; overflow: hidden; }
@media (min-width: 768px) { .mk-cover { height: 260px; border-radius: 0 0 28px 28px; } }
.mk-cover img { width: 100%; height: 100%; object-fit: cover; }
.mk-head { position: relative; display: flex; flex-direction: column; gap: 14px; }
.mk-head > .avatar { margin-top: -64px; }
@media (min-width: 768px) { .mk-head { flex-direction: row; align-items: flex-end; gap: 22px; } .mk-head > .avatar { margin-top: -76px; } }
.mk-head .avatar { width: 128px; height: 128px; border: 5px solid var(--bg); box-shadow: var(--shadow); font-size: 2.6rem; }
.mk-title { padding-top: 14px; }
.mk-title h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.mk-title .handle { color: var(--muted); font-weight: 550; }
.mk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 768px) { .mk-actions { margin-left: auto; } }
.mk-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .mk-metrics { grid-template-columns: repeat(4, 1fr); } }
.platform-card { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.platform-card .pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.platform-card .pc-head .icon { width: 26px; height: 26px; }
.platform-card .pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.platform-card .pc-stats b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.platform-card .pc-stats span { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.package-item { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s; }
.package-item:hover { border-color: var(--brand); }
.package-item .pk-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.package-item .pk-price { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; white-space: nowrap; }
.package-item .pk-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.82rem; color: var(--muted); }
.package-item .pk-meta span { display: inline-flex; align-items: center; gap: 5px; }
.portfolio-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
.portfolio-item { position: relative; aspect-ratio: 4/5; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.portfolio-item:hover img { transform: scale(1.04); }
.portfolio-item .pi-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: 0.8rem; font-weight: 600; }
.audience-bar { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; font-size: 0.86rem; margin-bottom: 8px; }
.audience-bar .progress { height: 7px; }
.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-reply { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 0.9rem; }
.authenticity { display: flex; gap: 14px; align-items: center; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.link-box code { background: none; border: 0; padding: 0; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.qr-box { width: 160px; height: 160px; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr-box img, .qr-box svg, .qr-box canvas { width: 100%; height: 100%; }
.demo-ribbon { position: absolute; top: 12px; left: -34px; transform: rotate(-45deg); background: var(--warning); color: #1a1200; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; padding: 3px 40px; z-index: 3; }

/* ==========================================================================
   Messaggi
   ========================================================================== */
.chat-layout { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; height: calc(100vh - 64px - 96px - 40px); min-height: 480px; }
@media (min-width: 900px) { .chat-layout { grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 64px - 56px); } }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list-head { padding: 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.chat-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.active { background: var(--brand-soft); }
.chat-item .ci-name { font-weight: 650; font-size: 0.94rem; display: flex; justify-content: space-between; gap: 8px; }
.chat-item .ci-name time { font-weight: 500; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.chat-item .ci-prev { font-size: 0.85rem; color: var(--muted); }
.chat-item.unread .ci-prev { color: var(--text); font-weight: 600; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg { max-width: min(78%, 560px); padding: 10px 14px; border-radius: 18px 18px 18px 5px; background: var(--surface); border: 1px solid var(--line); font-size: 0.94rem; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: transparent; border-radius: 18px 18px 5px 18px; }
.msg .msg-time { display: block; font-size: 0.7rem; opacity: 0.6; margin-top: 4px; text-align: right; }
.msg.system { align-self: center; max-width: 90%; background: transparent; border: 0; color: var(--muted); font-size: 0.82rem; text-align: center; padding: 6px; }
.msg.flagged { border: 1px solid var(--warning); }
.msg a { color: inherit; text-decoration: underline; }
.msg-attachment { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.06); font-size: 0.85rem; text-decoration: none !important; color: inherit; }
.msg.me .msg-attachment { background: rgba(255,255,255,.16); }
.msg-img { margin-top: 6px; border-radius: 12px; max-height: 240px; }
.msg-day { align-self: center; font-size: 0.74rem; font-weight: 650; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 99px; margin: 10px 0; }
.offer-card { align-self: stretch; max-width: 460px; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 16px; }
.offer-card.me { align-self: flex-end; }
.chat-compose { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); }
.chat-compose .textarea { min-height: 46px; max-height: 160px; padding: 11px 14px; resize: none; border-radius: 14px; }
.chat-warning { margin: 0 12px 8px; }
@media (max-width: 899px) {
  .chat-layout.has-thread .chat-list { display: none; }
  .chat-layout:not(.has-thread) .chat-thread { display: none; }
}

/* ==========================================================================
   Collaborazione (workroom)
   ========================================================================== */
.collab-head { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.status-steps { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 24px; }
.status-steps::-webkit-scrollbar { display: none; }
.status-step { flex: 1 0 auto; min-width: 104px; position: relative; text-align: center; padding-top: 34px; font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.status-step::before { content: ""; position: absolute; top: 13px; left: 0; right: 0; height: 3px; background: var(--surface-3); }
.status-step:first-child::before { left: 50%; }
.status-step:last-child::before { right: 50%; }
.status-step .ss-dot { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); display: grid; place-items: center; z-index: 1; }
.status-step .ss-dot .icon { width: 12px; height: 12px; }
.status-step.done { color: var(--text-2); }
.status-step.done::before { background: var(--success); }
.status-step.done .ss-dot { background: var(--success); border-color: var(--success); color: #fff; }
.status-step.current { color: var(--text); }
.status-step.current .ss-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-soft); }
.action-panel { padding: 22px; border-radius: var(--radius-lg); background: var(--grad-soft); border: 1px solid var(--brand-soft-2); }
.action-panel h3 { margin-bottom: 6px; }
.deliverable { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.deliverable + .deliverable { margin-top: 12px; }
.deliverable-files { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 12px; }
.deliverable-files a { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; position: relative; }
.deliverable-files img, .deliverable-files video { width: 100%; height: 100%; object-fit: cover; }
.deliverable-files .file-generic { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 0.78rem; text-align: center; padding: 8px; }
.caption-box { white-space: pre-wrap; padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: 0.93rem; }
.compliance { border-radius: 14px; border: 1px solid var(--line); padding: 14px; }
.compliance-item { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; padding: 5px 0; }
.compliance-item .icon { margin-top: 2px; width: 16px; height: 16px; }
.compliance-item.ok .icon { color: var(--success); }
.compliance-item.warn .icon { color: var(--warning); }
.compliance-item.error .icon { color: var(--danger); }
.deliverables-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.deliverables-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.92rem; font-weight: 550; }
.deliverables-list .qty { margin-left: auto; font-weight: 700; }

/* Dynamic rows (deliverables editor) */
.dyn-rows { display: grid; gap: 10px; }
.dyn-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr 80px 44px; align-items: center; }
@media (max-width: 560px) { .dyn-row { grid-template-columns: 1fr 1fr; } .dyn-row .qty-input { grid-column: 1; } }

/* ==========================================================================
   Dashboard widgets
   ========================================================================== */
.welcome { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding: 24px; border-radius: var(--radius-xl); background: var(--grad-ink); color: #fff; margin-bottom: 22px; position: relative; overflow: hidden; }
.welcome h1, .welcome h2 { color: #fff; margin: 0 0 4px; }
.welcome p { color: rgba(255,255,255,.72); margin: 0; }
.welcome::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; background: radial-gradient(closest-side, rgba(255, 61, 127, 0.4), transparent 70%); pointer-events: none; }
.welcome > * { position: relative; z-index: 1; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checklist li a, .checklist li > span { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); font-size: 0.93rem; font-weight: 550; text-decoration: none !important; }
.checklist li a:hover { background: var(--surface-2); }
.checklist .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.checklist .done .ck { background: var(--success); border-color: var(--success); color: #fff; }
.checklist .done .ck .icon { width: 12px; height: 12px; }
.checklist .done { color: var(--muted); }
.checklist .done a, .checklist .done > span { color: var(--muted); text-decoration: line-through !important; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-weight: 650; font-size: 0.95rem; }
.list-row .lr-sub { font-size: 0.83rem; color: var(--muted); }
.chart-box { position: relative; height: 260px; }
.status-badge { white-space: nowrap; }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; }
@media (min-width: 1024px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; position: relative; overflow: hidden; background: var(--grad-ink); color: #fff; padding: 56px; }
@media (min-width: 1024px) { .auth-side { display: flex; flex-direction: column; justify-content: center; } }
.auth-side h2 { color: #fff; font-size: 2.2rem; max-width: 460px; }
.auth-side p { color: rgba(255,255,255,.72); max-width: 440px; }
.auth-side::after { content: ""; position: absolute; width: 560px; height: 560px; right: -200px; bottom: -200px; background: radial-gradient(closest-side, rgba(255, 61, 127, 0.35), transparent 70%); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px 64px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.84rem; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.role-cards { display: grid; gap: 12px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.86); }
.auth-points .icon { color: var(--lime); margin-top: 3px; }

/* ==========================================================================
   Documenti (stampa)
   ========================================================================== */
.doc-page { max-width: 820px; margin: 24px auto; background: #fff; color: #111; padding: 48px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }
.doc-page h1 { color: #111; font-size: 22px; }
.doc-page table { width: 100%; border-collapse: collapse; }
.doc-page th, .doc-page td { padding: 8px 10px; border-bottom: 1px solid #e5e5e5; text-align: left; }
.doc-page .num { text-align: right; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.doc-parties h4 { font-family: var(--font); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #666; margin-bottom: 6px; }
.doc-note { font-size: 12px; color: #555; margin-top: 24px; }
.doc-toolbar { max-width: 820px; margin: 24px auto 0; display: flex; gap: 10px; justify-content: flex-end; padding: 0 16px; }
@media print {
  body { background: #fff !important; }
  .no-print, .site-header, .site-footer, .doc-toolbar, .app-sidebar, .app-topbar, .bottom-nav, .toasts { display: none !important; }
  .doc-page { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .app-shell { display: block !important; }
  .print-mediakit .card { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   Error pages
   ========================================================================== */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.error-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); line-height: 1; letter-spacing: -0.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ==========================================================================
   Cookie bar
   ========================================================================== */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 560px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 0.88rem; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
@media (min-width: 768px) { .cookie-bar { left: 24px; right: auto; } }
.app-body .cookie-bar { bottom: 90px; }
@media (min-width: 1024px) { .app-body .cookie-bar { bottom: 16px; } }

/* Tool widgets */
.tool-result { padding: 24px; border-radius: var(--radius-lg); background: var(--grad-soft); border: 1px solid var(--brand-soft-2); text-align: center; }
.tool-result .big { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.estimate-box { padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--text); font-size: 0.9rem; display: flex; gap: 12px; align-items: flex-start; }
.estimate-box .icon { color: var(--brand); margin-top: 2px; }

/* Utility colors */
.c-success { color: var(--success); } .c-warning { color: var(--warning); } .c-danger { color: var(--danger); } .c-brand { color: var(--brand-ink); } .c-accent { color: var(--accent-ink); }
.bg-surface { background: var(--surface); } .bg-soft { background: var(--surface-2); }
.rounded { border-radius: var(--radius); } .rounded-lg { border-radius: var(--radius-lg); }
.border { border: 1px solid var(--line); }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.fade-in { animation: fadeIn 0.3s var(--ease); }

/* Extra utilities (fiscale, impostazioni, admin) */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; }
.list-check { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 9px; }
.list-check li { position: relative; padding-left: 24px; }
.list-check li::before { content: ""; position: absolute; left: 3px; top: 0.42em; width: 10px; height: 6px; border: 2px solid var(--success); border-top: 0; border-right: 0; transform: rotate(-45deg); }
.check.has-error input { border-color: var(--danger); }
.settings-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.settings-nav::-webkit-scrollbar { display: none; }
.settings-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 0.9rem; color: var(--muted); white-space: nowrap; text-decoration: none !important; border: 1px solid transparent; }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-nav a.active { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.settings-nav .icon { width: 17px; height: 17px; }
.pref-table { width: 100%; font-size: 0.93rem; }
.pref-table th { text-align: center; font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 8px 10px; }
.pref-table th:first-child { text-align: left; padding-left: 0; }
.pref-table td { padding: 14px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.pref-table td:first-child { padding-left: 0; }
.pref-table td.c { text-align: center; width: 90px; }
.pref-table .check { justify-content: center; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.danger-zone h2, .danger-zone h3 { color: var(--danger); }
.totp-setup { display: grid; gap: 22px; align-items: center; }
@media (min-width: 720px) { .totp-setup { grid-template-columns: 200px 1fr; } }
.secret-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95rem; letter-spacing: 0.12em; word-break: break-all; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chart-box.chart-box-sm { height: 210px; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 12px; align-items: center; font-size: 0.9rem; }
.funnel-bar { height: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.funnel-bar > span { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters-bar .input, .filters-bar .select { width: auto; min-width: 160px; flex: 1 1 160px; }
.filters-bar .btn { flex: none; }
.admin-note { font-size: 0.84rem; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.log-line { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; }
.prose-legal { max-width: 780px; }
.prose-legal h2 { font-size: 1.3rem; margin-top: 2.2em; }
.prose-legal h3 { font-size: 1.05rem; margin-top: 1.6em; }
.prose-legal p, .prose-legal li { color: var(--text-2); line-height: 1.7; }
.prose-legal ol, .prose-legal ul { padding-left: 1.3em; }
.prose-legal .toc { padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 28px; }
.prose-legal .toc ol { margin: 8px 0 0; columns: 2 220px; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; height: auto; color: var(--brand-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
ul.timeline, ol.timeline { list-style: none; margin: 0; }

/* Pagine marketing interne */
.page-hero { position: relative; overflow: hidden; padding: 64px 0 36px; text-align: center; }
.page-hero h1 { max-width: 900px; margin: 14px auto 0; }
.page-hero .lead { max-width: 700px; margin: 18px auto 0; }
.page-hero .hero-ctas { justify-content: center; margin-top: 30px; }
.page-hero .hero-trust { justify-content: center; }
.usecase { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); height: 100%; }
.usecase h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.usecase p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.usecase .uc-idea { margin-top: 12px; font-size: 0.84rem; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.money-card { padding: 26px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.money-card .breakdown td { padding: 9px 0; }
.flow-steps { display: grid; gap: 14px; }
.flow-step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.flow-step .fs-num { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-family: var(--font-display); font-weight: 800; }
.flow-step h3 { font-size: 1.05rem; margin: 2px 0 6px; }
.flow-step p { margin: 0; color: var(--text-2); font-size: 0.94rem; }
.flow-step .fs-who { display: inline-flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.rate-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border-bottom: 0; }
.rate-row .rr-main { flex: 1; min-width: 0; }
.rate-row .rr-price { font-family: var(--font-display); font-weight: 750; font-size: 1.1rem; white-space: nowrap; }
.faq-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.faq-group { margin-bottom: 44px; scroll-margin-top: 90px; }
.faq-group h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin-bottom: 8px; }
.contact-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.4fr 1fr; } }
.legal-meta { font-size: 0.86rem; color: var(--muted); margin-top: 10px; }
.mt-auto { margin-top: auto !important; }
.price-card > .badge { align-self: flex-start; }
/* Evita overflow orizzontale su mobile: i figli di griglie non si allargano oltre il contenitore */
.split { grid-template-columns: minmax(0, 1fr); }
.split > *, .grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .stats > * { min-width: 0; }
.image-picker { flex-wrap: wrap; }
.image-picker > div { min-width: 0; flex: 1 1 180px; }
.image-picker .preview { flex: none; }
