@font-face {
  font-family: 'Fredoka';
  src: url('/assets/Fredoka.ttf') format('truetype');
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: 'Fredoka', system-ui, sans-serif;
  background: #111014;
  color: #fff3e6;
  --raspberry: #e63b73;
  --pink: #ff6b9e;
  --grape: #8b5cf6;
  --panel: #1b181f;
  --line: #302a35;
  --muted: #a49aa8;
  --cream: #fff3e6;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #111014; }
body { margin: 0; min-height: 100vh; background: #111014; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.hidden { display: none !important; }

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid #29242e;
  background: #111014;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font-size: 20px; font-weight: 600; }
.brand img { display: block; border-radius: 9px; }
.marketing-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.marketing-link:hover { color: var(--cream); }
main { min-height: calc(100vh - 76px); }

.center-card { min-height: calc(100vh - 76px); display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.droplet { width: 18px; height: 24px; display: block; background: var(--raspberry); border-radius: 12px 12px 14px 14px; transform: rotate(12deg); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: rotate(12deg) translateY(-5px); opacity: .65; } }

.auth-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 480px); align-items: center; gap: clamp(48px, 8vw, 120px); max-width: 1180px; margin: 0 auto; padding: 64px 32px; }
.auth-intro h1 { max-width: 720px; margin: 12px 0 18px; font-size: clamp(42px, 6vw, 74px); line-height: .98; letter-spacing: -.045em; }
.auth-intro > p:not(.eyebrow) { max-width: 590px; color: var(--muted); font-size: 19px; line-height: 1.6; }
.eyebrow { margin: 0; color: var(--pink); font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.price-note { display: flex; gap: 28px; margin-top: 34px; color: var(--cream); font-size: 22px; font-weight: 600; }
.price-note small { color: var(--muted); font-size: 13px; font-weight: 400; }
.auth-card { border: 1px solid var(--line); background: var(--panel); padding: 28px; box-shadow: 12px 12px 0 #09080b; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 30px; padding: 5px; background: #121014; border: 1px solid #2b2630; }
.tab { min-height: 44px; border: 0; background: transparent; color: var(--muted); }
.tab.active { background: var(--raspberry); color: #fff; }
form label { display: block; margin: 18px 0 8px; color: #d9cedb; font-size: 14px; }
input { width: 100%; min-height: 50px; border: 1px solid #403746; border-radius: 5px; background: #121014; color: var(--cream); padding: 0 14px; outline: none; }
input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgb(230 59 115 / 16%); }
.field-help, .small-print { color: var(--muted); font-size: 12px; line-height: 1.5; }
.primary-button, .secondary-button, .danger-button, .text-button, .plan-card button { min-height: 44px; border-radius: 5px; padding: 0 18px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary-button { border: 1px solid var(--raspberry); background: var(--raspberry); color: #fff; }
.primary-button:hover:not(:disabled) { background: var(--pink); border-color: var(--pink); }
.secondary-button { border: 1px solid #4a414f; background: #18151b; color: var(--cream); }
.secondary-button:hover { border-color: var(--pink); }
.danger-button { border: 1px solid #673345; background: transparent; color: #ff8eaf; }
.danger-button:hover:not(:disabled) { background: #351823; }
.text-button { border: 0; background: transparent; color: var(--muted); justify-content: flex-start; padding: 0; }
#auth-submit { width: 100%; margin-top: 26px; }
.form-message { min-height: 22px; margin: 14px 0 0; color: #ff9ab9; font-size: 14px; }
.form-message[data-tone='success'] { color: #72d6a2; }

.dashboard { max-width: 1320px; min-height: calc(100vh - 76px); margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { border-right: 1px solid #2a252e; padding: 48px 28px 36px; display: flex; flex-direction: column; }
.sidebar h1 { margin: 8px 0 6px; font-size: 29px; }
.account-email { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sidebar nav { display: grid; gap: 6px; margin: 50px 0; }
.nav-item { min-height: 46px; border: 0; border-left: 3px solid transparent; background: transparent; color: var(--muted); padding: 0 14px; text-align: left; }
.nav-item:hover { color: var(--cream); background: #18151b; }
.nav-item.active { color: var(--cream); background: #211a22; border-left-color: var(--raspberry); }
.sidebar .text-button { margin-top: auto; }
.content { padding: 46px clamp(24px, 5vw, 72px) 80px; }
.content > .form-message { margin: 0 0 18px; }
.content-section { max-width: 940px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 42px); }
.status-badge, .limit-note { border: 1px solid #413847; padding: 7px 11px; color: var(--muted); font-size: 12px; }
.status-badge[data-status='active'], .status-badge[data-status='grace'] { border-color: #2f7651; color: #75dda5; }
.section-copy { max-width: 700px; color: var(--muted); line-height: 1.65; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.plan-card { position: relative; border: 1px solid var(--line); background: var(--panel); padding: 26px; }
.plan-card.featured { border-color: var(--raspberry); }
.plan-card p { color: var(--muted); margin: 0 0 14px; }
.plan-card strong { font-size: 36px; }
.plan-card > span:not(.save-label) { color: var(--muted); margin-left: 5px; }
.plan-card button { width: 100%; margin-top: 26px; border: 1px solid #433a48; background: #121014; color: var(--muted); }
.save-label { position: absolute; top: -12px; right: 16px; background: var(--raspberry); color: white; padding: 4px 8px; font-size: 10px; letter-spacing: .08em; }
.account-facts { margin-top: 18px; border: 1px solid var(--line); background: #161319; }
.account-facts div { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.account-facts div:last-child { border-bottom: 0; }
.account-facts span { color: var(--muted); }
.activation-form { display: grid; grid-template-columns: minmax(200px, 1fr) auto; align-items: end; gap: 12px; max-width: 620px; margin-top: 28px; }
.activation-form label { grid-column: 1 / -1; margin-bottom: -4px; }
.activation-form input { text-transform: uppercase; letter-spacing: .16em; font-size: 20px; font-weight: 600; }
.confirm-card { margin-top: 22px; max-width: 620px; border: 1px solid var(--raspberry); background: var(--panel); padding: 24px; }
.confirm-card p { margin: 0; color: var(--muted); }
.confirm-card strong { display: block; margin: 10px 0 22px; color: var(--pink); font-size: 30px; letter-spacing: .14em; }
.confirm-card > div { display: flex; gap: 10px; }
.list-stack { display: grid; gap: 10px; margin-top: 26px; }
.list-row { min-height: 78px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; }
.list-row.revoked { opacity: .55; }
.list-row > div { display: grid; gap: 5px; }
.list-row span { color: var(--muted); font-size: 13px; }
.empty-state { border: 1px dashed #43394a; padding: 28px; display: grid; gap: 7px; color: var(--muted); }
.empty-state strong { color: var(--cream); }

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; padding: 42px 20px; }
  .auth-intro h1 { font-size: 48px; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #2a252e; padding: 28px 20px 18px; }
  .sidebar nav { grid-template-columns: repeat(4, minmax(max-content, 1fr)); overflow-x: auto; margin: 24px 0 8px; }
  .sidebar .text-button { position: absolute; top: 98px; right: 20px; }
  .nav-item { border-left: 0; border-bottom: 3px solid transparent; text-align: center; padding: 0 10px; }
  .nav-item.active { border-left-color: transparent; border-bottom-color: var(--raspberry); }
  .content { padding: 34px 20px 64px; }
}

@media (max-width: 560px) {
  .site-header { height: 66px; padding: 0 16px; }
  .brand { font-size: 17px; }
  .marketing-link { display: none; }
  main { min-height: calc(100vh - 66px); }
  .auth-intro h1 { font-size: 39px; }
  .price-note { flex-direction: column; gap: 6px; }
  .auth-card { padding: 20px; box-shadow: 7px 7px 0 #09080b; }
  .plan-grid { grid-template-columns: 1fr; }
  .activation-form { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .list-row { align-items: flex-start; flex-direction: column; }
  .list-row button, .list-row a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
