/* Kogoto Creator portal + Admin Console -- the one design system.
   Served same-origin (/creator/brand/console.css, /admin/brand/console.css).
   Mobile first; no framework; respects prefers-reduced-motion. */

:root {
  --blue: #0B0BC7;            /* kogotoSeedColor */
  --blue-600: #0909a8;
  --blue-700: #070785;
  --blue-50: #eef0ff;
  --blue-100: #dfe2ff;
  --sky: #0a5cff;             /* logo blue, accents only */
  --ink: #0f1222;
  --ink-2: #2a2f45;
  --muted: #535b70;           /* 6.4:1 on white */
  --line: #e3e6ef;
  --line-2: #d3d8e5;
  --bg: #f4f5fa;
  --card: #ffffff;
  --ok: #0c6e36;  --ok-bg: #e9f7ee;  --ok-line: #bfe3cc;
  --warn: #7c5100; --warn-bg: #fff5de; --warn-line: #f0d9a0;
  --bad: #b3261e; --bad-bg: #fdeceb; --bad-line: #f3c5c1;
  --bad-600: #951f18;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 34, .06), 0 1px 1px rgba(15, 18, 34, .04);
  --shadow: 0 6px 20px rgba(15, 18, 34, .08), 0 1px 3px rgba(15, 18, 34, .06);
  --shadow-lg: 0 24px 60px rgba(15, 18, 34, .22);
  --focus: 0 0 0 3px rgba(11, 11, 199, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.6 var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;          /* long names/URLs never overflow */
}
img, video, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.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; }
.skip-link { position: absolute; left: 12px; top: -120px; z-index: 100; background: #fff; color: var(--blue); padding: 8px 14px; border-radius: 8px; font-weight: 700; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }

/* ---------- App shell ---------- */
header.top {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(90deg, var(--blue) 0%, #1414d6 100%); color: #fff;
  box-shadow: 0 2px 12px rgba(7, 7, 133, .25);
}
header.top .bar { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
header.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; color: #fff; text-decoration: none; font-size: 16px; white-space: nowrap; }
header.top .brand .kmark { display: block; background: #fff; border-radius: 50%; padding: 2px; }
header.top .brand .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 999px; }
header.top nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
header.top nav a, header.top nav button {
  color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 10px; min-height: 40px;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 14px; border: 0; background: transparent; cursor: pointer;
  transition: background .15s var(--ease);
}
header.top nav a:hover, header.top nav a.active, header.top nav a[aria-current="page"], header.top nav button:hover { background: rgba(255,255,255,.16); color: #fff; }
header.top nav a[aria-current="page"] { background: rgba(255,255,255,.22); }
header.top nav .who { font-size: 13px; opacity: .85; padding: 0 8px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
header.top nav form { margin: 0; }
.nav-toggle { display: none; margin-left: auto; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 10px; width: 44px; height: 44px; cursor: pointer; font: inherit; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; position: relative; margin: 0 auto; transition: transform .2s var(--ease), opacity .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .js .nav-toggle { display: block; }
  .js header.top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--blue-700); flex-direction: column; align-items: stretch; padding: 8px 12px 14px; gap: 2px; box-shadow: 0 12px 24px rgba(7,7,133,.3); }
  .js header.top nav.open { display: flex; animation: drop .18s var(--ease); }
  .js header.top nav a, .js header.top nav button { width: 100%; justify-content: flex-start; min-height: 46px; }
  .js header.top nav .who { max-width: none; padding: 8px 12px; }
  header.top .bar { position: relative; flex-wrap: wrap; }
}

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 72px; flex: 1; }
main.narrow { max-width: 760px; }
footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 32px; }
footer.foot a { color: inherit; }

/* EN / DE / FR switcher (creator/_language.html). Before sign-in it sits in
   the top-right corner over the video backdrop; signed in, inside the nav. */
.lang-switch { display: inline-flex; gap: 2px; align-items: center; padding: 2px; border-radius: 999px;
  background: rgba(255,255,255,.14); }
.lang-switch a, .lang-switch .lang-current { display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-decoration: none; color: inherit; }
.lang-switch a { opacity: .8; }
.lang-switch a:hover { opacity: 1; background: rgba(255,255,255,.18); }
.lang-switch a:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; opacity: 1; }
.lang-switch .lang-current { background: #fff; color: #0B0BC7; }
.lang-corner { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 5; color: var(--text, #111); }
body.auth-page .lang-corner { color: #fff; }
body.auth-page .lang-corner .lang-switch { background: rgba(0,0,0,.32); backdrop-filter: blur(6px); }
.consent-links { display: block; margin-top: 4px; font-size: 13px; }
@media (max-width: 600px) { body.auth-page main { padding-top: 64px; } }
@media (prefers-reduced-motion: reduce) { .lang-switch a { transition: none; } }

/* ---------- Typography ---------- */
h1 { font-size: clamp(22px, 2.4vw + 12px, 30px); line-height: 1.2; margin: 4px 0 18px; letter-spacing: -.3px; font-weight: 800; }
h2 { font-size: 19px; line-height: 1.3; margin: 28px 0 12px; font-weight: 750; letter-spacing: -.1px; }
h3 { font-size: 16px; margin: 0 0 6px; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 16px; color: var(--ink-2); }
code, .mono { font-family: var(--mono); font-size: .92em; }
.breadcrumb { font-size: 14px; margin: 0 0 8px; }
.breadcrumb a { text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 4px 0 22px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

/* ---------- Layout helpers ---------- */
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spacer { flex: 1; }
.stack-sm > * + * { margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); min-width: 0;
}
@media (max-width: 480px) { .card { padding: 16px; border-radius: 12px; } }
.card > h2:first-child, .card-head h2 { margin-top: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 18px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card.danger-zone { border-color: var(--bad-line); }
.card.danger-zone h2 { color: var(--bad); }
.card.highlight { border-color: var(--blue-100); background: linear-gradient(180deg, #fff 0%, #f8f9ff 100%); }
a.card, .card.link { display: block; color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
a.card:hover, .card.link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-100); color: inherit; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); display: block; color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.stat .num { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; color: var(--ink); }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.stat.attention { border-color: var(--warn-line); background: var(--warn-bg); }
.stat.attention .num { color: var(--warn); }

/* ---------- Item lists (responsive by nature) ---------- */
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item-list > li:first-child { padding-top: 2px; }
.item-list > li:last-child { border-bottom: 0; padding-bottom: 2px; }
.item-list .main { flex: 1 1 240px; min-width: 0; }
.item-list .title { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 15.5px; }
.item-list a.title:hover { color: var(--blue); text-decoration: underline; }
.item-list .meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.item-list .side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }

/* ---------- Tables (become cards on small screens) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
table.kv th { width: 34%; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  th.hide-s, td.hide-s { display: none; }
  table.resp thead { display: none; }
  table.resp, table.resp tbody, table.resp tr, table.resp td { display: block; width: 100%; }
  table.resp tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; background: #fff; }
  table.resp td { border: 0; padding: 7px 0; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; text-align: right; }
  table.resp td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; text-align: left; flex: none; }
  table.resp td[data-label=""]::before, table.resp td:not([data-label])::before { content: none; }
  table.resp td.primary { display: block; font-size: 16px; font-weight: 700; text-align: left; }
  table.resp td.actions { justify-content: flex-start; flex-wrap: wrap; }
  table.kv th, table.kv td { display: block; width: 100%; padding: 4px 0; border: 0; }
  table.kv tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.kv tr:last-child { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--blue); color: #fff; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  box-shadow: 0 1px 2px rgba(11,11,199,.25), inset 0 1px 0 rgba(255,255,255,.12);
  transition: background .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease), color .15s, border-color .15s;
}
.btn:hover { background: var(--blue-600); color: #fff; box-shadow: 0 4px 14px rgba(11,11,199,.28); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.lg { min-height: 52px; padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.btn.ghost { background: transparent; color: var(--blue); box-shadow: none; padding-left: 10px; padding-right: 10px; }
.btn.ghost:hover { background: var(--blue-50); color: var(--blue-700); }
.btn.danger { background: var(--bad); box-shadow: 0 1px 2px rgba(179,38,30,.3); }
.btn.danger:hover { background: var(--bad-600); color: #fff; box-shadow: 0 4px 14px rgba(179,38,30,.28); }
.btn.danger-outline { background: #fff; color: var(--bad); border-color: var(--bad-line); box-shadow: none; }
.btn.danger-outline:hover { background: var(--bad-bg); color: var(--bad-600); }
.btn.small, .btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled], .btn.is-loading { opacity: .65; cursor: progress; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn .ico { font-size: 1.1em; line-height: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 480px) { .btn-row.stack-mobile > .btn, .btn-row.stack-mobile > form, .btn-row.stack-mobile > form .btn { width: 100%; } }

/* ---------- Badges ---------- */
.pill, .badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .2px; white-space: nowrap;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); text-transform: capitalize;
}
.pill::before, .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.pill.bad { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.pill.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.pill.blue { color: var(--blue); border-color: var(--blue-100); background: var(--blue-50); }
.pill.plain::before { display: none; }

/* ---------- Alerts / flash ---------- */
.flash { display: block; position: relative; padding: 13px 16px 13px 48px; border-radius: 12px; margin-bottom: 18px; border: 1px solid; font-weight: 500; animation: fade-up .3s var(--ease) both; }
.flash::before { position: absolute; left: 14px; top: 13px; font-weight: 800; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-line); color: #0a4f28; }
.flash.ok::before { content: "\2713"; background: var(--ok); }
.flash.err { background: var(--bad-bg); border-color: var(--bad-line); color: #7d1a14; }
.flash.err::before { content: "!"; background: var(--bad); }
.flash.warn { background: var(--warn-bg); border-color: var(--warn-line); color: #5f3e00; }
.flash.warn::before { content: "!"; background: #b27700; }
.flash.info { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.flash.info::before { content: "i"; background: var(--blue); }
.flash .btn { margin-top: 8px; }

/* ---------- Forms ---------- */
form.stack { display: grid; gap: 20px; max-width: 640px; }
form.stack.wide { max-width: none; }
.field { display: grid; gap: 6px; min-width: 0; }
label, .label { display: block; font-weight: 700; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; }
.field label { margin-bottom: 0; }
label .opt, legend .opt { font-weight: 500; color: var(--muted); }
label .req, .req { color: var(--bad); font-weight: 800; margin-left: 2px; }
.hint, form .small.muted { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=tel],
input[type=number], input[type=datetime-local], input[type=date], input[type=time], textarea, select {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 16px; /* no iOS zoom */ background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #8a91a6; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
input:hover, textarea:hover, select:hover { border-color: #b9c0d3; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"], .has-error input, .has-error textarea, .has-error select { border-color: var(--bad); }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; padding: 10px; border: 1px dashed var(--line-2); border-radius: 12px; width: 100%; background: #fafbff; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; border: 0; border-radius: 9px; padding: 8px 14px; margin-right: 12px; background: var(--blue-50); color: var(--blue); cursor: pointer; }
fieldset.dt-group { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; min-width: 0; }
fieldset.dt-group legend { font-weight: 700; padding: 0 6px; font-size: 14px; }
/* Date of birth as Day / Month / Year (Creator sign-up): no calendar to page back through decades. */
fieldset.dob { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.dob legend { padding: 0; }
fieldset.dob .hint { margin: 0 0 8px; }
.dob-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 7rem; gap: 12px; }
.dob-row label { font-weight: 600; font-size: 13.5px; color: var(--muted); }
@media (max-width: 380px) { .dob-row { grid-template-columns: 4.5rem minmax(0, 1fr) 5.5rem; gap: 8px; } }
.check { display: flex; align-items: flex-start; gap: 10px; }
.check input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--blue); }
.check label { margin: 0; font-weight: 500; }
.field-error { color: var(--bad); font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.counter { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; margin-top: 4px; }
.counter.near { color: var(--warn); font-weight: 700; }
.counter.full { color: var(--bad); font-weight: 700; }
.preview { max-width: 240px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; display: block; box-shadow: var(--shadow-sm); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }
@media (max-width: 480px) { .form-actions .btn { flex: 1 1 100%; } }

/* ---------- Code / QR ---------- */
.codebox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); background: #f2f3f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; word-break: break-all; }
.qr-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.qr-wrap img { border: 1px solid var(--line); border-radius: 12px; background: #fff; width: 220px; height: auto; }
.qr-preview { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); max-width: 340px; width: 100%; }
.qr-preview img { display: block; width: 100%; height: auto; border-radius: 8px; }
.format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .format-grid { grid-template-columns: 1fr; } }

/* Creator-written text (descriptions, posts, announcements): line breaks
   and paragraphs as typed, web links visibly links, a long URL wraps
   instead of widening the page (app/core/linkify.py). */
.user-text { white-space: pre-line; overflow-wrap: anywhere; word-break: normal; max-width: 100%; }
.user-text a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.user-text a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.draft-note .btn { margin-left: 8px; vertical-align: middle; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 6px 0; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "\25B8"; display: inline-block; margin-right: 6px; transition: transform .2s var(--ease); }
details.more[open] summary::before { transform: rotate(90deg); }
details.more[open] summary { margin-bottom: 8px; }
details.more[open] > *:not(summary) { animation: fade-up .25s var(--ease) both; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 28px 12px; }
.empty-state img { opacity: .6; display: block; margin: 0 auto 10px; }
.empty-state h3 { margin-bottom: 4px; }
.empty-state p { color: var(--muted); max-width: 440px; margin: 0 auto 14px; }

/* ---------- Steps / onboarding ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; counter-reset: step; margin: 0 0 18px; padding: 0; list-style: none; }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 50px; position: relative; font-size: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-50); color: var(--blue); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.steps li.done::before { content: "\2713"; background: var(--ok-bg); color: var(--ok); }
.steps li b { display: block; }

/* ---------- Modal dialog ---------- */
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--ink); overflow: auto; }
dialog.modal::backdrop { background: rgba(10, 12, 30, .55); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .2s var(--ease); }
dialog.modal[open]::backdrop { animation: fade .2s var(--ease); }
.modal-body { padding: 22px 22px 8px; }
.modal-body h2 { margin: 0 0 8px; font-size: 20px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px 22px; }
@media (max-width: 480px) { .modal-actions .btn, .modal-actions form { flex: 1 1 100%; } .modal-actions form .btn { width: 100%; } }
.impact { background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 14px; color: #6a1510; }
.impact ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Auth pages (sign-in / sign-up) ---------- */
.login-wrap { max-width: 420px; margin: 7vh auto 0; }
.login-wrap.wide { max-width: 600px; }
.brand-big { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-big img { display: block; height: auto; }
.brand-big .portal-label { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; }
.auth-backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #0B0BC7 url("/creator/brand/welcome_bg_poster.jpg") center / cover no-repeat; }
.auth-backdrop video, .auth-backdrop img.backdrop-motion { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,6,40,.55) 0%, rgba(6,6,40,.82) 100%); }
body.auth-page { background: #0B0BC7; }
body.auth-page footer.foot, body.auth-page footer.foot a { color: rgba(255,255,255,.86); }
body.auth-page .brand-big img { background: #fff; border-radius: 16px; padding: 10px 16px; box-sizing: content-box; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
body.auth-page .brand-big .portal-label { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
body.auth-page .card { box-shadow: 0 18px 50px rgba(0,0,0,.35); border: 0; padding: 26px; }
body.auth-page main { padding-top: 8px; }
body.auth-page .login-wrap { margin-top: 5vh; }
.auth-alt { text-align: center; margin-top: 16px; color: rgba(255,255,255,.9); }
.auth-alt a { color: #fff; font-weight: 700; }
@media (max-width: 480px) { body.auth-page .card { padding: 20px; } }

/* ---------- Announcement recipients ---------- */
.people-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.people-list li { border-bottom: 1px solid var(--line); }
.people-list li:last-child { border-bottom: 0; }
.people-list label { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0; font-weight: 500; cursor: pointer; }
.people-list label:hover { background: var(--blue-50); }
.people-list input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--blue); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.initials { display: inline-flex; align-items: center; justify-content: center; background: var(--blue); color: #fff; font-weight: 700; }
.picker-tools { gap: 8px; }
.picker-tools input[type=search] { max-width: 280px; }
.phone-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px; }
@media (max-width: 380px) { .phone-row { grid-template-columns: 1fr; } }
.interest-grid { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.interest-grid label { font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.badge-unverified { font-size: 11px; font-weight: 700; color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.post-images { display: flex; flex-wrap: wrap; gap: 12px; }
.post-images img { border-radius: 10px; }

/* ---------- Motion ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
main > * { animation: fade-up .35s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .03s; }
main > *:nth-child(3) { animation-delay: .06s; }
main > *:nth-child(4) { animation-delay: .09s; }
main > *:nth-child(n+5) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .auth-backdrop video, .auth-backdrop img.backdrop-motion { display: none; }
}

@media print {
  header.top, footer.foot, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* ---------- Sign-in extras ---------- */
.auth-title { font-size: 22px; margin: 0 0 14px; }
.social-buttons { display: grid; gap: 10px; margin-bottom: 4px; }
.btn.social { width: 100%; justify-content: center; gap: 10px; min-height: 48px; }
.btn.social.google { background: #fff; color: #1f1f1f; border-color: #c7cad3; box-shadow: var(--shadow-sm); }
.btn.social.google:hover { background: #f6f7f9; color: #1f1f1f; }
.btn.social.apple { background: #000; color: #fff; box-shadow: none; }
.btn.social.apple:hover { background: #222; color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.status-card { text-align: center; padding: 28px 22px; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.status-icon.pending { background: var(--warn-bg); color: #b27700; animation: pulse 2.4s ease-in-out infinite; }
.status-icon.ok { background: var(--ok-bg); color: var(--ok); }
.status-icon.bad { background: var(--bad-bg); color: var(--bad); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(178,119,0,.25); } 50% { box-shadow: 0 0 0 12px rgba(178,119,0,0); } }
.btn.kogoto-cta img { background: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; }
.forgot-link { display: block; text-align: center; margin-top: 14px; font-weight: 700; font-size: 15px; padding: 8px; border-radius: 10px; text-decoration: none; }
.forgot-link:hover { background: var(--blue-50); text-decoration: underline; }
