/* IMDCX account screens (/account/): sign in, sign up, forgotten and new password.
   Neon card on a dark salon, after the login reference design. */
:root {
  color-scheme: dark;
  --ink: #ffffff;
  --text: #e6e2f7;
  --muted: #b3aed3;
  --violet: #9b6bff;
  --violet-bright: #b98cff;
  --line: #6c65b8b3;
  --danger: #ff8fb1;
  --success: #8ff0c8;
  --serif: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; overflow-x: hidden; background: #03040f; color: var(--text); font: 400 15px/1.55 'Montserrat', Arial, sans-serif; }
/* The icon sprite takes no room (the page's CSP refuses inline styles). */
.account-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet-bright); }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:is(a, button, input):focus-visible { outline: 2px solid var(--violet-bright); outline-offset: 3px; }

/* ── Scene ───────────────────────────────────────────────────────────── */
.account-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #03040f; }
.scene-room {
  position: absolute; inset: -30px;
  background: url('../images/phase1-salon.webp') center 30% / cover no-repeat;
  filter: blur(9px) brightness(.34) saturate(1.35);
}
.scene-room::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, #2b1673b3, transparent 70%),
    radial-gradient(ellipse 45% 35% at 85% 20%, #1a2d8a55, transparent 70%),
    linear-gradient(180deg, #03040fb3 0%, #03040f33 45%, #03040fcc 88%);
}
/* The blue light arc sweeping in from the top left. */
.scene-arc {
  position: absolute; width: 1100px; height: 1100px; left: -760px; top: -120px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: #4d7dff; border-right-color: #7c52ff;
  transform: rotate(-8deg); opacity: .75;
  filter: drop-shadow(0 0 10px #3f6bff) drop-shadow(0 0 28px #3f6bffaa);
}
.scene-bokeh {
  position: absolute; inset: 0; filter: blur(2px);
  background:
    radial-gradient(circle at 3% 24%, #9b5cff99 0 10px, transparent 26px),
    radial-gradient(circle at 5% 46%, #b04dff88 0 14px, transparent 34px),
    radial-gradient(circle at 12% 40%, #5a6cff55 0 6px, transparent 20px),
    radial-gradient(circle at 18% 62%, #7c5cff66 0 9px, transparent 26px),
    radial-gradient(circle at 92% 30%, #6b4dff66 0 10px, transparent 28px),
    radial-gradient(circle at 97% 52%, #9c5cff77 0 13px, transparent 32px),
    radial-gradient(circle at 88% 70%, #4a6cff55 0 8px, transparent 22px),
    radial-gradient(ellipse 18% 30% at 0% 55%, #4b2ab266, transparent 70%),
    radial-gradient(ellipse 16% 30% at 100% 50%, #3b2ab255, transparent 70%);
}
.scene-chip {
  position: absolute; left: -90px; bottom: 15%; width: 330px; height: auto;
  transform: rotate(-14deg); opacity: .96;
  filter: drop-shadow(0 0 22px #7b3cffaa) drop-shadow(0 18px 30px #000c) saturate(1.15);
}
.scene-floor {
  position: absolute; inset: auto 0 0; height: 34%;
  background:
    radial-gradient(ellipse 34% 60% at 50% 100%, #4b36c233, transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 9%, #5a6cff14 9% 9.4%, transparent 9.4% 17%),
    linear-gradient(180deg, transparent, #05061cf2 55%, #03040f);
}

/* ── Header ──────────────────────────────────────────────────────────── */
.account-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 16px 28px; }
.account-masthead { position: relative; width: min(100%, 1180px); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 8px 18px; }
.brand { display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; }
.brand-badge {
  display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #e6a2ff, #9b35f5 52%, #5a1bbd);
  box-shadow: 0 0 22px #a24dffa8, inset 0 1px 3px #ffffff80, inset 0 -3px 8px #2e0b6e;
}
.brand-badge svg { width: 26px; height: 26px; fill: #180733; stroke: none; }
.brand-text { display: grid; gap: 4px; }
.brand-text strong { font: 400 27px/1 var(--serif); letter-spacing: 9px; }
.brand-text small { font-size: 13px; font-weight: 500; letter-spacing: 10px; }
.masthead-actions { position: relative; display: flex; align-items: center; gap: 26px; }
.masthead-pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 36px;
  border: 1.5px solid #7d5cff; border-radius: 999px; background: #080a26cc; color: var(--ink); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  box-shadow: 0 0 16px #6a3cff5c, inset 0 0 14px #6a3cff38;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}
.masthead-pill:hover { border-color: #b08cff; box-shadow: 0 0 22px #7b4cff8c, inset 0 0 16px #6a3cff4d; }
.menu-button { display: grid; gap: 7px; width: 42px; padding: 8px 4px; border: 0; background: none; }
.menu-button span { display: block; height: 2px; border-radius: 2px; background: var(--ink); }
.site-menu {
  position: absolute; top: calc(100% + 14px); right: 0; z-index: 5; min-width: 230px; padding: 8px;
  border: 1px solid #8a6cffa6; border-radius: 16px; background: linear-gradient(160deg, #15123af7, #080a22f7);
  box-shadow: 0 18px 44px #000b, 0 0 24px #6a3cff44;
}
.site-menu :is(a, button) {
  display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: none;
  color: var(--text); font-size: 14px; text-align: left; text-decoration: none;
}
.site-menu :is(a, button):hover { background: #ffffff12; color: var(--ink); }
.site-menu [data-action="logout"] { color: #ff9ec0; }

/* ── Card ────────────────────────────────────────────────────────────── */
.account-card {
  position: relative; width: min(100%, 610px); margin: 3vh 0 auto; padding: 50px 54px 42px;
  border: 2px solid transparent; border-radius: 44px;
  background:
    linear-gradient(180deg, #0a0b2ae8, #06071cf2) padding-box,
    linear-gradient(165deg, #c9b8ff, #5b6bff 22%, #4b2cf0 48%, #3f7bff 72%, #b98cff) border-box;
  box-shadow: 0 0 0 1px #ffffff0d, 0 0 26px #5b3cffa6, 0 0 70px #3b2cff55, inset 0 0 44px #4a2cff26, 0 40px 80px #000c;
  backdrop-filter: blur(8px);
}
.account-card::before {
  content: ''; position: absolute; inset: -9px; border-radius: 52px; pointer-events: none;
  border: 1px solid #7a6cff66; box-shadow: 0 0 18px #5b3cff40;
}
.card-logo { display: grid; justify-items: center; gap: 6px; margin-bottom: 26px; color: var(--ink); }
.card-spade { width: 58px; height: 58px; fill: url(#spade-gradient); stroke: none; filter: drop-shadow(0 0 12px #b45cffcc); }
.card-wordmark { font: 400 44px/1 var(--serif); letter-spacing: 13px; margin-right: -13px; text-shadow: 0 0 14px #c8a8ff73; }
.card-sub { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 500; letter-spacing: 10px; color: #dcd7f2; }
.card-sub::before, .card-sub::after { content: ''; width: 28px; height: 1px; background: #b8b2dc99; }
.account-loading { margin: 0; color: var(--muted); text-align: center; }
.account-card h1 {
  margin: 0; color: var(--ink); text-align: center; overflow-wrap: anywhere;
  font: 400 56px/1.08 var(--serif); letter-spacing: .5px; text-shadow: 0 0 18px #b38cff55;
}
.account-lede { margin: 12px 0 30px; color: var(--muted); font-size: 17px; line-height: 1.55; text-align: center; }

/* ── Fields ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 10px; color: var(--ink); font-size: 16px; font-weight: 500; }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%; height: 62px; padding: 0 20px 0 64px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #0b0d2ce0; color: var(--ink); font-size: 16px;
  box-shadow: inset 0 1px 0 #ffffff0d;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.input-wrap input::placeholder { color: #a7a2cc; }
.input-wrap input:focus { outline: none; border-color: #a58bff; box-shadow: 0 0 0 3px #7b5cff33, 0 0 18px #7b5cff55; }
.input-wrap input[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap.has-toggle input { padding-right: 64px; }
.input-icon { position: absolute; left: 22px; top: 50%; width: 25px; height: 25px; transform: translateY(-50%); color: #dcd8f6; pointer-events: none; }
.password-toggle {
  position: absolute; right: 10px; top: 50%; display: grid; place-items: center; width: 44px; height: 44px;
  transform: translateY(-50%); border: 0; border-radius: 10px; background: none; color: #dcd8f6;
}
.password-toggle:hover { background: #ffffff10; color: var(--ink); }
.password-toggle svg { width: 25px; height: 25px; }
.field-hint { margin: 8px 2px 0; color: #9f99c4; font-size: 12px; }
.field-error { margin: 8px 2px 0; color: var(--danger); font-size: 13px; }
.field-error:empty { display: none; }

.form-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 4px 0 26px; }
.check { position: relative; display: inline-flex; align-items: center; gap: 14px; color: var(--text); font-size: 15px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid #c3bde6; border-radius: 4px; background: #0b0d2c; transition: background 120ms ease, border-color 120ms ease; }
.check input:checked + .check-box { border-color: #b08cff; background: linear-gradient(135deg, #6a3cff, #a24dff); }
.check input:checked + .check-box::after { content: ''; width: 7px; height: 13px; margin-top: -3px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:focus-visible + .check-box { outline: 2px solid var(--violet-bright); outline-offset: 3px; }
.text-link { color: var(--violet-bright); font-size: 15px; text-underline-offset: 4px; }
.text-link:hover { color: #d7c2ff; }
.form-note { margin: -4px 2px 20px; color: #a9a3cf; font-size: 12px; line-height: 1.6; }

.form-status { margin: 0 0 18px; font-size: 14px; line-height: 1.6; text-align: center; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.account-submit {
  display: flex; align-items: center; justify-content: center; gap: 22px; width: 100%; min-height: 74px; padding: 0 28px;
  border: 2px solid #cdbcff; border-radius: 999px; color: var(--ink); text-decoration: none;
  font-size: 19px; font-weight: 600; letter-spacing: 5px; text-transform: uppercase;
  background:
    radial-gradient(ellipse 30% 90% at 8% 20%, #7fb4ff66, transparent 70%),
    radial-gradient(ellipse 30% 90% at 94% 20%, #ff7cf066, transparent 70%),
    linear-gradient(90deg, #2438ff, #4a26ee 38%, #8a2cf2 70%, #d03cf0);
  box-shadow: 0 0 0 5px #120f3d, 0 0 0 7px #7b5cffb3, 0 0 26px #7b3cffb3, 0 0 60px #5b2cff55, inset 0 2px 3px #ffffff70, inset 0 -3px 6px #3a0f9a99;
  transition: transform 160ms ease, filter 160ms ease;
}
.account-submit svg { width: 26px; height: 26px; stroke-width: 2.2; }
.account-submit:hover { transform: translateY(-1px); filter: brightness(1.08); }
.account-submit:disabled { cursor: wait; filter: saturate(.6) brightness(.85); transform: none; }

.card-switch { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 34px 0 0; color: var(--text); font-size: 15px; text-align: center; }
.card-switch::before, .card-switch::after { content: ''; flex: 1; min-width: 20px; height: 1px; background: #ffffff26; }
.card-switch span { margin-left: 8px; }
.card-switch a { margin-right: 8px; color: var(--violet-bright); font-weight: 600; text-underline-offset: 4px; }

.account-details { margin: 0 0 22px; padding: 16px 20px; border: 1px solid #8a7cff40; border-radius: 16px; background: #ffffff08; }
.account-details div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 7px 0; }
.account-details dt { color: var(--muted); font-size: 13px; }
.account-details dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; vertical-align: 1px; }
.badge.is-verified { background: #8ff0c81f; color: var(--success); }
.badge.is-pending { background: #ffd28f1f; color: #ffd28f; }
.account-note { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.account-secondary {
  flex: 1 1 200px; min-height: 48px; padding: 0 18px; border: 1px solid #8a7cff66; border-radius: 999px;
  background: #ffffff0a; color: var(--text); font-size: 14px; font-weight: 600;
}
.account-secondary:hover { background: #ffffff14; color: var(--ink); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.account-footer { display: grid; justify-items: center; gap: 10px; margin-top: 44px; text-align: center; }
.account-footer p { margin: 0; color: #c2bde0; font-size: 12px; letter-spacing: 5px; text-transform: uppercase; }
.account-footer .footer-brand { display: flex; align-items: center; gap: 12px; color: #9a72ff; font-size: 14px; letter-spacing: 6px; }
.footer-brand svg { width: 16px; height: 16px; fill: #8a5cff; stroke: none; }
.account-noscript { text-align: center; color: var(--muted); }

/* ── Phones ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .account-masthead { padding: 18px 2px 10px; }
  .brand { gap: 12px; }
  .brand-badge { width: 48px; height: 48px; }
  .brand-badge svg { width: 21px; height: 21px; }
  .brand-text strong { font-size: 21px; letter-spacing: 6px; }
  .brand-text small { font-size: 10px; letter-spacing: 7px; }
  .masthead-actions { gap: 14px; }
  .masthead-pill { min-height: 40px; padding: 0 18px; font-size: 11px; letter-spacing: 2px; }
  .menu-button { width: 34px; gap: 6px; }
  .account-card { margin-top: 18px; padding: 36px 22px 30px; border-radius: 34px; }
  .account-card::before { inset: -7px; border-radius: 40px; }
  .card-logo { margin-bottom: 18px; }
  .card-spade { width: 44px; height: 44px; }
  .card-wordmark { font-size: 34px; letter-spacing: 10px; margin-right: -10px; }
  .card-sub { font-size: 12px; letter-spacing: 8px; }
  .account-card h1 { font-size: 42px; }
  .account-lede { margin-bottom: 24px; font-size: 15px; }
  .field label { font-size: 15px; }
  .input-wrap input { height: 56px; padding-left: 56px; font-size: 16px; }
  .input-icon { left: 18px; width: 22px; height: 22px; }
  .form-row { flex-wrap: nowrap; gap: 10px; }
  .check { gap: 10px; font-size: 13px; white-space: nowrap; }
  .check-box { width: 22px; height: 22px; }
  .text-link { font-size: 13px; white-space: nowrap; }
  .card-switch { gap: 6px; font-size: 13px; }
  .card-switch :is(span, a) { white-space: nowrap; }
  .card-switch::before, .card-switch::after { min-width: 0; }
  .account-submit { min-height: 64px; font-size: 16px; letter-spacing: 4px; gap: 16px; }
  .scene-chip { width: 220px; left: -95px; bottom: 20%; }
  .scene-arc { width: 760px; height: 760px; left: -560px; top: -40px; }
}
@media (max-width: 380px) {
  .masthead-pill { padding: 0 14px; letter-spacing: 1.5px; }
  .account-card h1 { font-size: 36px; }
  .form-row { flex-direction: column; align-items: flex-start; }
  .card-switch { flex-wrap: wrap; }
  .card-switch::before, .card-switch::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .account-submit, .masthead-pill, .input-wrap input { transition: none; } }
/* Installed app: the page keeps clear of the notch and the rounded corners. */
.account-shell { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.account-masthead { padding-top: max(26px, env(safe-area-inset-top)); }
@media (max-width: 640px) { .account-masthead { padding-top: max(18px, env(safe-area-inset-top)); } }
