/* account.alloop.ch — built on the alloop Design System
   (01_Business_Context/alloop_marketing_assets/alloop Design System/colors_and_type.css).
   Monochrome ink on cream, the pastel mesh as the only colour, pill buttons, generous radii.
   Dark mode follows the system (tokens of the account mockup, 2026-10-28). Mobile first:
   every screen works from 320 px; the layout widens at 720 px and 960 px. */

:root {
  --ink: #0A0A0A;
  --ink-soft: #1A1A1A;
  --paper: #FAF7F2;
  --paper-2: #F2EEE7;
  --white: #FFFFFF;
  --line: #E7E2D9;
  --line-strong: #D6CFC3;
  --fg-1: #0A0A0A;
  --fg-2: #4A4742;
  --fg-3: #77726A; /* the system's #8C877E darkened to reach 4.5:1 on cream for small text */
  --on-ink: #FAF7F2;
  --ok: #2E7D4F;
  --ok-tint: #E6F6EA;
  --warn: #8A5A00;
  --warn-tint: #FDF3CE;
  --danger: #BC2F35;
  --danger-tint: #FBDEDF;
  --info: #356E9E;
  --info-tint: #E2EFFA;
  --focus: #0A0A0A;
  --mesh:
    radial-gradient(120% 120% at 8% 0%, #F8D244 0%, rgba(248, 210, 68, 0) 45%),
    radial-gradient(120% 120% at 100% 8%, #A6CDED 0%, rgba(166, 205, 237, 0) 50%),
    radial-gradient(130% 130% at 0% 100%, #EB5358 0%, rgba(235, 83, 88, 0) 48%),
    radial-gradient(140% 140% at 100% 100%, #A78DC0 0%, rgba(167, 141, 192, 0) 55%),
    radial-gradient(90% 90% at 50% 45%, #FAE4D8 0%, rgba(250, 228, 216, 0) 60%),
    linear-gradient(120deg, #FBAA3F 0%, #D97BA6 50%, #A78DC0 100%);
  --mesh-veil: rgba(250, 247, 242, 0);
  --font-display: "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --pill: 999px;
  --sh-sm: 0 1px 2px rgba(10, 10, 10, .04), 0 2px 6px rgba(10, 10, 10, .04);
  --sh-md: 0 4px 14px rgba(10, 10, 10, .06), 0 1px 3px rgba(10, 10, 10, .05);
  --sh-lg: 0 18px 50px rgba(10, 10, 10, .10), 0 6px 16px rgba(10, 10, 10, .06);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F4F0E8;
    --ink-soft: #E8E2D8;
    --paper: #121110;
    --paper-2: #1A1917;
    --white: #1E1D1A;
    --line: #2E2C28;
    --line-strong: #45413B;
    --fg-1: #F4F0E8;
    --fg-2: #C9C2B6;
    --fg-3: #A39D92;
    --on-ink: #121110;
    --ok: #7FCF9A;
    --ok-tint: #17301F;
    --warn: #E9CB55;
    --warn-tint: #352E14;
    --danger: #F08A8E;
    --danger-tint: #3A1F21;
    --info: #9FC6E8;
    --info-tint: #1C2E3C;
    --focus: #A6CDED;
    --mesh-veil: rgba(18, 17, 16, .72);
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --sh-md: 0 4px 14px rgba(0, 0, 0, .35);
    --sh-lg: 0 18px 50px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { opacity: .75; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 6vw, 2.4rem); }
h2 { font-size: 1.25rem; letter-spacing: -.015em; margin-top: 1.75rem; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; margin-top: 1.25rem; }
p { margin: 0 0 1rem; }
code, .acc-mono { font-family: var(--font-mono); font-size: .9em; }
.acc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acc-lead { color: var(--fg-2); font-size: 1.05rem; text-wrap: pretty; }
.acc-help, .helptext { color: var(--fg-3); font-size: .875rem; }
.acc-muted { color: var(--fg-3); }

/* ---------- header and footer ---------- */
.acc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}
.acc-brand { display: inline-flex; align-items: center; color: var(--fg-1); text-decoration: none; }
.acc-logo { height: 26px; width: auto; aspect-ratio: 153.87 / 64.65; fill: currentColor; }
.acc-user { position: relative; }
.acc-user > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--white);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  max-width: 60vw;
}
.acc-user > summary::-webkit-details-marker { display: none; }
.acc-user > summary span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--on-ink);
  font-size: .75rem;
  font-weight: 700;
  overflow: hidden;
  text-transform: uppercase;
}
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
}
.acc-user-menu p { margin: 6px 10px 10px; font-size: .875rem; color: var(--fg-3); }
.acc-user-menu a, .acc-user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--fg-1);
  font: inherit;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
}
.acc-user-menu a:hover, .acc-user-menu button:hover { background: var(--paper-2); opacity: 1; }
.acc-foot {
  margin-top: auto;
  padding: 24px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  align-items: center;
  color: var(--fg-3);
  font-size: .8125rem;
}
.acc-foot form { display: flex; gap: 4px; }
.acc-foot button {
  border: 0;
  background: none;
  color: var(--fg-3);
  font: inherit;
  padding: 6px 8px;
  border-radius: var(--pill);
  cursor: pointer;
}
.acc-foot button[aria-current="true"] { color: var(--fg-1); font-weight: 600; }
.acc-foot button:hover { background: var(--paper-2); }

/* ---------- entrance: one card on the brand mesh ---------- */
.acc-main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 16px 24px; }
body.acc-entrance { background: var(--paper); }
body.acc-entrance::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(var(--mesh-veil), var(--mesh-veil)), var(--mesh);
}
.acc-entrance .acc-main { display: grid; place-items: start center; padding-top: 4vh; }
.acc-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 32px 24px;
}
@media (min-width: 480px) { .acc-card { padding: 40px; } }
.acc-card > :last-child { margin-bottom: 0; }
.acc-card .acc-isotype { width: 44px; height: auto; aspect-ratio: 59.36 / 32.87; fill: currentColor; margin-bottom: 20px; }

/* ---------- buttons ---------- */
.acc-btn, .acc-panel button[type="submit"]:not(.acc-btn), .acc-card button[type="submit"]:not(.acc-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--on-ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.acc-btn:hover { background: var(--ink-soft); opacity: 1; }
.acc-btn:active { transform: scale(.98); }
.acc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.acc-btn--block { display: flex; width: 100%; }
.acc-btn--quiet, .acc-btn--secondary {
  background: var(--white);
  color: var(--fg-1);
  border-color: var(--line-strong);
}
.acc-btn--quiet:hover, .acc-btn--secondary:hover { background: var(--paper-2); }
.acc-btn--danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.acc-btn--danger:hover { background: var(--danger); opacity: .88; }
.acc-btn--danger-quiet { background: var(--white); color: var(--danger); border-color: var(--line-strong); }
.acc-btn--small { min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.acc-btn svg { width: 20px; height: 20px; flex: none; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.acc-providers { display: grid; gap: 10px; margin: 24px 0 8px; }
.acc-providers form { margin: 0; }
.acc-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--fg-3);
  font-size: .875rem;
}
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acc-inline { display: inline; margin: 0; }
.acc-link-btn {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- forms ---------- */
.acc-stack { display: grid; gap: 16px; }
.acc-field { display: grid; gap: 6px; }
.acc-field label, .acc-label { font-size: .875rem; font-weight: 600; color: var(--fg-1); }
input[type="text"], input[type="email"], input[type="number"], input[type="search"],
input[type="password"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--fg-1);
  font: inherit;
  font-size: 1rem; /* 16px: no zoom on iOS */
}
input:disabled, input[readonly] { background: var(--paper-2); color: var(--fg-2); }
input[aria-invalid="true"] { border-color: var(--danger); }
input::placeholder { color: var(--fg-3); }
.acc-code-input { font-family: var(--font-mono); font-size: 1.5rem !important; letter-spacing: .2em; text-align: center; text-transform: uppercase; }
.acc-choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.acc-choice + .acc-choice { margin-top: 8px; }
.acc-choice:has(input:checked) { border-color: var(--ink); box-shadow: var(--sh-sm); }
.acc-choice input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--danger); font-size: .875rem; }
.acc-allauth-form p { display: grid; gap: 6px; margin: 0 0 16px; }
.acc-allauth-form p:has(> input[type="checkbox"]), .acc-allauth-form p:has(> input[type="radio"]) { display: flex; align-items: center; gap: 10px; }

/* ---------- messages and badges ---------- */
.acc-messages { list-style: none; margin: 0 auto 16px; padding: 0; display: grid; gap: 8px; width: 100%; max-width: 760px; }
.acc-entrance .acc-messages { max-width: 460px; }
.acc-message { padding: 12px 16px; border-radius: var(--r-md); background: var(--info-tint); color: var(--fg-1); font-size: .95rem; }
.acc-message--success { background: var(--ok-tint); }
.acc-message--error { background: var(--danger-tint); }
.acc-message--warning { background: var(--warn-tint); }
.acc-alert { padding: 12px 16px; border-radius: var(--r-md); background: var(--warn-tint); margin: 0 0 16px; }
.acc-alert--danger { background: var(--danger-tint); }
.acc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--paper-2);
  color: var(--fg-2);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}
.acc-badge--ok, .acc-badge--success { background: var(--ok-tint); color: var(--ok); }
.acc-badge--warn, .acc-badge--warning { background: var(--warn-tint); color: var(--warn); }
.acc-badge--danger { background: var(--danger-tint); color: var(--danger); }
.acc-badge--info, .acc-badge--current { background: var(--info-tint); color: var(--info); }

/* ---------- Mi cuenta: section nav + panel ---------- */
.acc-manage { display: grid; gap: 16px; }
.acc-manage > * { min-width: 0; }
.acc-nav { margin: 0 -16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.acc-nav::-webkit-scrollbar { display: none; }
.acc-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0 16px 4px; width: max-content; }
.acc-nav a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--pill);
  color: var(--fg-2);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.acc-nav a:hover { background: var(--paper-2); opacity: 1; }
.acc-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.acc-nav a.acc-nav--danger { color: var(--danger); }
.acc-nav a.acc-nav--danger[aria-current="page"] { background: var(--danger); color: var(--white); }
@media (min-width: 960px) {
  .acc-manage { grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
  .acc-nav { margin: 0; overflow: visible; position: sticky; top: 16px; }
  .acc-nav ul { flex-direction: column; width: auto; padding: 0; }
}
.acc-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  padding: 24px 16px;
  min-width: 0;
}
@media (min-width: 720px) { .acc-panel { padding: 32px 36px; } }
.acc-panel > h1:first-child { margin-bottom: 4px; }
.acc-panel > :last-child { margin-bottom: 0; }
.acc-section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 4px; }
.acc-section > h2:first-child { margin-top: 20px; }

/* rows: emails, providers, sessions, members, apps */
.acc-rows { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; }
.acc-row + .acc-row { border-top: 1px solid var(--line); }
.acc-row-main { flex: 1 1 220px; min-width: 0; }
.acc-row-main b { display: block; font-weight: 600; }
.acc-row-main small { display: block; color: var(--fg-3); font-size: .8125rem; }
.acc-row-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acc-row form { margin: 0; }
.acc-row select { width: auto; min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.acc-app-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); font-weight: 700; }

/* allauth's tables (MFA, recovery codes) stay inside the card */
.acc-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.acc-table-wrap table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.acc-table-wrap th, .acc-table-wrap td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.acc-table-wrap tr:last-child td { border-bottom: 0; }
.acc-table-wrap th { color: var(--fg-3); font-weight: 600; font-size: .8125rem; }
.acc-panel details { margin: 12px 0; }
.acc-panel summary { cursor: pointer; font-weight: 600; }
.acc-panel pre, .acc-card pre { overflow-x: auto; padding: 12px; background: var(--paper-2); border-radius: var(--r-sm); }
.acc-panel hr, .acc-card hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* welcome: one tile per app */
.acc-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); margin: 20px 0; }
.acc-tile { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); text-decoration: none; font-weight: 600; }
.acc-tile:hover { border-color: var(--ink); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
