/* Mortiflix portal (login, signup, account) — standalone, no template CSS needed. */
@font-face { font-family: "Burra Expanded"; src: url("../fonts/burra/Burra-RegularExpanded.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora/sora-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #0b0913; --ink-2: #120f1e; --ink-3: #1a1629;
  --text: #f5f2ff; --muted: rgba(245, 242, 255, 0.62); --faint: rgba(245, 242, 255, 0.4);
  --line: rgba(255, 255, 255, 0.09); --glass: rgba(255, 255, 255, 0.04);
  --lav: #b18cff; --pink: #ff8fd1; --aqua: #7ce8f3; --bad: #ff7a8a; --good: #7ef0b6;
  --grad: linear-gradient(100deg, #b18cff 0%, #ff8fd1 50%, #7ce8f3 100%);
  --display: "Burra Expanded", "Sora", sans-serif;
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.6 "Sora", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 20% 25%, rgba(177, 140, 255, 0.22), transparent),
    radial-gradient(closest-side at 85% 30%, rgba(255, 143, 209, 0.14), transparent),
    radial-gradient(closest-side at 60% 95%, rgba(124, 232, 243, 0.12), transparent);
}
a { color: var(--lav); }
a:hover { color: #fff; }
.logo { font-family: var(--display); font-size: 24px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); text-decoration: none; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
[hidden] { display: none !important; }

/* ---- auth pages ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 34px 34px;
  border-radius: 28px;
  background: rgba(18, 15, 30, 0.82);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.auth-card .logo { display: inline-block; margin-bottom: 28px; }
.auth-card h1 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; text-transform: uppercase; margin: 0 0 8px; }
.auth-card > p { margin: 0 0 26px; color: var(--muted); }
.auth-foot { margin-top: 22px; text-align: center; font-size: 14.5px; color: var(--muted); }

/* ---- form controls ---- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-bottom: 7px; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
textarea.input { min-height: 96px; resize: vertical; }
select.input option { background: var(--ink-2); }
.input:focus { border-color: rgba(177, 140, 255, 0.8); background: rgba(177, 140, 255, 0.07); box-shadow: 0 0 0 4px rgba(177, 140, 255, 0.14); }
.input.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 6px 0 20px; }
.check input { margin-top: 4px; accent-color: var(--lav); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 500 15px/1.2 "Sora", sans-serif; letter-spacing: 0.02em;
  background: var(--grad); color: #150f22; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(177, 140, 255, 0.3); color: #150f22; }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: rgba(177, 140, 255, 0.7); color: var(--text); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 13px; }

.alert { display: none; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.alert.show { display: block; }
.alert.error { background: rgba(255, 122, 138, 0.1); border: 1px solid rgba(255, 122, 138, 0.35); color: #ffc3cb; }
.alert.ok { background: rgba(126, 240, 182, 0.08); border: 1px solid rgba(126, 240, 182, 0.3); color: #c8f9df; }

/* ---- account dashboard ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.shell { width: min(1120px, 100% - 32px); margin: 0 auto; }
.hello { margin: 18px 0 34px; }
.hello h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; text-transform: uppercase; margin: 0 0 6px; }
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }
.card { padding: 26px 24px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); }
.card h2 { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.section { margin-top: 40px; }
.credit-num { font-family: var(--display); font-size: 48px; line-height: 1; }
.credit-label { color: var(--muted); font-size: 14px; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; font-weight: 600; }
.stat span { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); transition: all 0.15s;
}
.chip input:checked + span { color: #150f22; background: var(--grad); border-color: transparent; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(177, 140, 255, 0.45); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font: 12.5px ui-monospace, monospace; color: var(--muted);
}
.swatch i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); }
.swatch button { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.swatch button:hover { color: var(--bad); }
.color-add { display: inline-flex; gap: 6px; align-items: center; }
.color-add input[type="color"] { width: 38px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.saved { font-size: 14px; color: var(--good); }
.toggles label { display: flex; gap: 10px; align-items: center; margin: 8px 0; color: var(--muted); font-size: 14.5px; }
.toggles input { accent-color: var(--lav); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.list li:first-child { border-top: 0; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgba(126, 232, 243, 0.12); color: var(--aqua); margin-left: 8px; }
.tag.bad { background: rgba(255, 122, 138, 0.12); color: var(--bad); }
footer.portal-foot { margin: 60px 0 30px; color: var(--faint); font-size: 13px; }

/* craft preferences + dataset consent */
.craft-sec { border-top: 1px solid var(--line); }
.craft-sec:first-of-type { border-top: 0; }
.craft-sec summary { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: baseline; padding: 14px 0; cursor: pointer; list-style: none; }
.craft-sec summary::-webkit-details-marker { display: none; }
.craft-sec summary::before { content: "+"; grid-row: span 2; color: var(--lav); font-weight: 600; width: 12px; }
.craft-sec[open] summary::before { content: "−"; }
.craft-sec summary b { font-weight: 600; }
.craft-sec summary .muted { grid-column: 2; }
.craft-count { grid-column: 3; grid-row: 1; font-size: 12.5px; color: var(--aqua); }
.craft-body { padding: 4px 0 16px 26px; }
.saved.pending { color: #ffd98a; }
.error-text { color: var(--bad); }
.consent-list { margin: 10px 0 18px; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.consent-list li { margin: 6px 0; }
.consent-list b { color: var(--text); font-weight: 600; }
.consent-choices { margin-bottom: 8px; }
