/* ==========================================================================
   Login / sign-up cards (creators + brands) and the brand portal
   ========================================================================== */

/* Login/sign-up pages fit on one screen: the header floats over the page and
   the card is centred in the full window height */
.auth-page .site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login {
  width: min(460px, 100%);
  padding: 26px 30px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px -30px rgba(120,30,90,.35);
  text-align: center;
}
.login.wide { width: min(580px, 100%); }
.login .spark { width: 38px; height: 38px; margin: 0 auto 8px; display: block; }
.login h1 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.login > p:not(.or), .login .lead { margin: 4px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.login .lead b { color: var(--ink); }
.login .optional { color: var(--muted); font-weight: 400; }
/* Bot trap field: off screen for people, still "there" for bots */
.login .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.login .turnstile { margin: 2px 0 10px; }
.login label { display: block; margin-bottom: 10px; text-align: left; font-size: 13px; font-weight: 500; }
.login input, .login select, .login textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 12px;
  border: 1px solid rgba(10,10,10,.18); border-radius: 9px; background: #fff; font: inherit; font-size: 15px; color: var(--ink);
}
.login input, .login select { height: 43px; } /* inputs and dropdowns line up exactly */
.login textarea { resize: vertical; min-height: 84px; }
/* Logging in only needs email + password: always full width, one under the other */
.login form.is-login .grid-2 { grid-template-columns: 1fr; }
.login input:focus, .login select:focus, .login textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(243,95,191,.2); }
.login .btn { width: 100%; height: 44px; margin-top: 4px; }
.login small { display: block; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.login small a { color: var(--ink); text-decoration: underline; }
.login .demo-note { display: block; margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: #fff4d6; color: #7a5200; font-size: 12px; }
.login .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
/* When one field of a pair is hidden (e.g. name on "Log in"), the other takes the full row */
.login .grid-2:has(> [hidden]) > :not([hidden]) { grid-column: 1 / -1; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin-bottom: 14px; padding: 4px;
  border-radius: 10px; background: rgba(10,10,10,.06);
}
.auth-tabs button {
  height: 34px; border: 0; border-radius: 7px; background: none;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.auth-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 42px; border: 1px solid rgba(10,10,10,.18); border-radius: 9px;
  background: #fff; font-size: 15px; font-weight: 500;
  transition: border-color .15s, transform .15s;
}
.oauth-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.oauth-btn svg { width: 20px; height: 20px; }
.oauth-btn.discord { background: #5865F2; border-color: #5865F2; color: #fff; }
.oauth-btn.discord:hover { background: #4752c4; border-color: #4752c4; }

.or { display: flex; align-items: center; gap: 12px; margin: 12px 0 10px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-error { margin: 0 0 10px; text-align: left; font-size: 13.5px; color: #c4204f; }

/* Short windows (small laptops, Windows zoom at 125/150%): shrink step by step
   so the card, including an error message, still fits without a scrollbar */
@media (max-height: 760px) {
  .login { padding: 20px 26px 16px; }
  .login .spark { width: 30px; height: 30px; margin-bottom: 4px; }
  .login h1 { font-size: 23px; }
  .login > p:not(.or), .login .lead { margin: 2px 0 10px; font-size: 13px; }
  .auth-tabs { margin-bottom: 10px; }
  .login label { margin-bottom: 8px; }
  .or { margin: 8px 0; }
  .login small { margin-top: 10px; }
}
@media (max-height: 620px) {
  .login .spark, .login > p:not(.or), [data-form-view] .lead { display: none; }
  .login h1 { margin-bottom: 10px; }
  .login input, .login select { height: 38px; padding: 7px 10px; }
  .login textarea { min-height: 56px; }
  .login label { margin-bottom: 6px; }
}

/* ---------- Brand portal ---------- */

.portal { max-width: 860px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.portal .section-title { font-size: clamp(36px, 5vw, 64px); margin: 8px 0 12px; }
.portal-card {
  margin-top: 28px; padding: 32px;
  border: 1px solid var(--line); border-radius: 18px;
  background: #fff;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.portal-card h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: 22px; }
.portal-card > p { margin: 0 0 18px; color: var(--muted); }
.inbox-address {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 12px; background: var(--ink); color: #fff;
}
.inbox-address code { flex: 1; min-width: 0; font-size: clamp(15px, 2.4vw, 20px); font-weight: 600; overflow-wrap: anywhere; }
.inbox-address .btn { height: 40px; padding: 0 18px; background: #fff; color: var(--ink); }
.send-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.send-list li { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; color: var(--muted); }
.send-list b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }
.portal dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0; font-size: 14.5px; }
.portal dt { color: var(--muted); }
.portal dd { margin: 0; overflow-wrap: anywhere; }
.portal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

@media (max-width: 640px) {
  .auth-page .site-header { position: static; }
  .login-wrap { min-height: 0; padding: 8px 16px 24px; }
  .login { padding: 24px 18px 20px; }
  .login .grid-2 { grid-template-columns: 1fr; }
  .send-list { grid-template-columns: 1fr; }
  .portal dl { grid-template-columns: 1fr; gap: 2px; }
  .portal dd { margin-bottom: 10px; }
  .portal-card { padding: 22px 18px; }
}
.portal-card .demo-note { margin-top: 18px; }
