/* ============================================================
   Yella Umbrella · Auth · brand-forward refresh
   Editorial atmosphere, brand-yellow accents, refined details
   ============================================================ */

:root {
  --bg-base: #1a1a1c;
  --bg-elev: #262629;
  --bg-glow: rgba(231, 201, 44, 0.18);
  --bg-glow-cool: rgba(127, 133, 130, 0.10);

  --surface: #f4f4f4;
  --surface-rule: rgba(38, 38, 41, 0.10);
  --surface-rule-strong: rgba(38, 38, 41, 0.24);
  --surface-deep: rgba(38, 38, 41, 0.04);

  --ink: #262629;
  --ink-muted: #5b5f60;
  --ink-soft: #7f8582;

  --on-dark: #f4f4f4;
  --on-dark-muted: rgba(244, 244, 244, 0.62);
  --on-dark-soft: rgba(244, 244, 244, 0.32);

  --accent: #e7c92c;
  --accent-deep: #c9aa1a;
  --accent-soft: rgba(231, 201, 44, 0.18);
  --accent-glow: rgba(231, 201, 44, 0.45);

  --danger: #dc5151;
  --danger-soft: rgba(220, 81, 81, 0.14);

  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 0.8rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.6rem;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--on-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  font-size: 1.5rem;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(4rem, 9vh, 10rem) 2rem 4rem;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80rem 60rem at 6% -8%, var(--bg-glow), transparent 60%),
    radial-gradient(ellipse 60rem 50rem at 110% 110%, var(--bg-glow-cool), transparent 65%),
    linear-gradient(168deg, var(--bg-base) 0%, var(--bg-elev) 60%, var(--bg-base) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  top: 2.4rem;
  left: 2.4rem;
  width: 1.2rem;
  height: 1.2rem;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
a:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent-deep);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: 44rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: rise 700ms var(--ease-out) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1.6rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Brand block
   ============================================================ */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  animation: rise 800ms 60ms var(--ease-out) both;
}

.brand__mark {
  width: 5.6rem;
  height: 6.11rem;
  display: inline-block;
  background-color: var(--accent);
  -webkit-mask: url("/auth/public/yella-umbrella-icon.svg") no-repeat center / contain;
          mask: url("/auth/public/yella-umbrella-icon.svg") no-repeat center / contain;
  filter: drop-shadow(0 0 1.8rem var(--accent-glow));
}

.brand__name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 40;
  font-weight: 700;
  font-size: clamp(3.2rem, 5.6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--on-dark);
  margin-top: 0.4rem;
}

.brand__name--default,
.brand__name--create,
.brand__name--manage { display: none; }

body[data-ogapp="1"] .brand__name--create { display: inline; }
body[data-ogapp="2"] .brand__name--manage { display: inline; }
body:not([data-ogapp="1"]):not([data-ogapp="2"]) .brand__name--default { display: inline; }

.brand__by {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--on-dark-muted);
  margin-top: 0.4rem;
}
.brand__by strong {
  font-weight: 600;
  color: var(--on-dark);
}

/* ============================================================
   Form card
   ============================================================ */

.form {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 3rem 2.6rem 2.6rem;
  font-size: 1.4rem;
  color: var(--ink);
  box-shadow:
    0 2.4rem 6rem -1.2rem rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  overflow: hidden;
  animation: rise 800ms 140ms var(--ease-out) both;
}

.form::after {
  content: "";
  position: absolute;
  bottom: -2.4rem;
  right: -2rem;
  width: 12rem;
  height: 13.09rem;
  background-color: var(--accent);
  -webkit-mask: url("/auth/public/yella-umbrella-icon.svg") no-repeat center / contain;
          mask: url("/auth/public/yella-umbrella-icon.svg") no-repeat center / contain;
  opacity: 0.05;
  pointer-events: none;
  transform: rotate(8deg);
}

.form > * { position: relative; z-index: 1; }

.form a {
  color: var(--accent-deep);
  border-bottom-color: rgba(201, 170, 26, 0.4);
}
.form a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.form__label {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.form__input {
  width: 100%;
  height: 4.8rem;
  padding: 0 1.4rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid var(--surface-rule);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.5rem;
  color: var(--ink);
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background-color 160ms var(--ease-out);
}

.form__input::placeholder { color: var(--ink-soft); }

.form__input:hover:not(:focus) {
  border-color: var(--surface-rule-strong);
  background: rgba(255, 255, 255, 0.78);
}

.form__input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form__input:-webkit-autofill,
.form__input:-webkit-autofill:hover,
.form__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  caret-color: var(--ink);
}

select.form__input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%235a5f6a' stroke-width='1.6'><path d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.4rem center;
  background-size: 1.1rem;
  padding-right: 3.6rem;
}

/* ============================================================
   Buttons
   ============================================================ */

.next-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.8rem;
  padding: 0 1.8rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 100ms var(--ease-out);
  box-shadow: 0 0.4rem 1.2rem rgba(231, 201, 44, 0.22);
}
.next-button:hover {
  background: #f0d63d;
  box-shadow: 0 0.6rem 1.8rem rgba(231, 201, 44, 0.32);
}
.next-button:active {
  background: var(--accent-deep);
  transform: scale(0.99);
  box-shadow: 0 0.2rem 0.6rem rgba(231, 201, 44, 0.18);
}
.next-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 0.4rem 1.2rem rgba(231, 201, 44, 0.22);
}

.decline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.8rem;
  padding: 0 1.8rem;
  background: transparent;
  color: var(--ink-muted);
  border: 1.5px solid var(--surface-rule);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    background-color 160ms var(--ease-out);
}
.decline-btn:hover {
  border-color: var(--surface-rule-strong);
  color: var(--ink);
  background: var(--surface-deep);
}
.decline-btn:active {
  background: rgba(38, 38, 41, 0.08);
}

/* ============================================================
   Separator + Google
   ============================================================ */

.separator-container { width: 100%; }

.separator {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.separator::before,
.separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--surface-rule);
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.8rem;
  padding: 0 1.6rem 0 4.6rem;
  margin-top: 0;
  background-color: #fff;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNiA5LjJsLS4xLTEuOEg5djMuNGg0LjhDMTMuNiAxMiAxMyAxMyAxMiAxMy42djIuMmgzYTguOCA4LjggMCAwIDAgMi42LTYuNnoiIGZpbGw9IiM0Mjg1RjQiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik05IDE4YzIuNCAwIDQuNS0uOCA2LTIuMmwtMy0yLjJhNS40IDUuNCAwIDAgMS04LTIuOUgxVjEzYTkgOSAwIDAgMCA4IDV6IiBmaWxsPSIjMzRBODUzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNNCAxMC43YTUuNCA1LjQgMCAwIDEgMC0zLjRWNUgxYTkgOSAwIDAgMCAwIDhsMy0yLjN6IiBmaWxsPSIjRkJCQzA1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNOSAzLjZjMS4zIDAgMi41LjQgMy40IDEuM0wxNSAyLjNBOSA5IDAgMCAwIDEgNWwzIDIuNGE1LjQgNS40IDAgMCAxIDUtMy43eiIgZmlsbD0iI0VBNDMzNSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PHBhdGggZD0iTTAgMGgxOHYxOEgweiIvPjwvZz48L3N2Zz4=);
  background-repeat: no-repeat;
  background-position: 1.6rem center;
  background-size: 1.8rem;
  border: 1.5px solid var(--surface-rule);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 200ms var(--ease-out),
    background-color 160ms var(--ease-out);
}
.google-btn:hover {
  border-color: var(--surface-rule-strong);
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.05);
  background-color: #fff;
  opacity: 1;
}
.google-btn:active {
  background-color: #fafafa;
}

/* ============================================================
   Forgot-password link & "Not registered" copy
   ============================================================ */

.form > a:not(.google-btn):not(.decline-btn) {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  align-self: flex-start;
  margin-top: -0.6rem;
  border-bottom-color: rgba(201, 170, 26, 0.3);
}

.not-registered {
  margin-top: 0.4rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--surface-rule);
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--ink-muted);
}
.not-registered > span,
.not-registered > strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.not-registered p { margin: 0; }

/* ============================================================
   Message box
   ============================================================ */

.message-box {
  font-size: 1.35rem;
  font-weight: 500;
  padding: 1.4rem 1.6rem;
  background: rgba(243, 237, 224, 0.06);
  color: var(--on-dark);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  animation: rise 600ms 100ms var(--ease-out) both;
}
.message-box--error {
  border-left-color: var(--danger);
  background: rgba(230, 114, 114, 0.1);
}

/* ============================================================
   SSO Config preservation (out-of-scope, prevent breakage)
   ============================================================ */

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  color: var(--on-dark);
  font-variation-settings: "opsz" 40;
}
.form h2 {
  color: var(--ink);
  margin: 0 0 0.4rem;
}
.form__required { color: var(--danger); margin-left: 0.2rem; }
.form__instructions { font-size: 1.3rem; }
.copy-btn {
  cursor: pointer;
  color: var(--accent-deep);
  text-decoration: underline;
  font-size: 0.9em;
  margin-left: 0.3rem;
}
.copy-btn:hover { color: var(--ink); }

/* ============================================================
   Footer
   ============================================================ */

.auth-footer {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  text-align: center;
  animation: rise 900ms 220ms var(--ease-out) both;
}
.auth-footer a {
  color: var(--on-dark-muted);
  border-bottom: none;
  transition: color 160ms var(--ease-out);
}
.auth-footer a:hover { color: var(--accent); }

/* ============================================================
   Reduced motion
   ============================================================ */

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

/* ============================================================
   Small screens
   ============================================================ */

@media (max-width: 36rem) {
  body { padding: 4rem 1.4rem 3rem; }
  .form { padding: 2.4rem 2rem 2rem; }
  .brand__name { font-size: 3.2rem; }
  .brand__mark { width: 4.8rem; height: 5.24rem; }
}
