/*
 * Global application stylesheet.
 *
 * Tokens follow DESIGN_SYSTEM.md. Auth pages (sessions, passwords) render
 * inside the application layout and share these styles.
 */

:root {
  --color-blue: #006cff;
  --color-blue-soft: #f0f5ff;
  --color-deep-blue: #002c52;
  --color-orange: #ff7a04;
  --color-green: #bce978;

  --color-white: #ffffff;
  --color-light-gray: #f3f4f6;
  --color-dark-gray: #474747;

  --blue-50: #cce2ff;
  --blue-100: #99c4ff;
  --blue-700: #0051bf;
  --deep-blue-100: #ccd5dc;

  --font-sans: "Figtree", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-dark-gray);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Auth page shell ----------------------------------------------------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--color-white);
}

.auth-shell__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
}

.auth-shell__aside {
  background: var(--color-deep-blue);
  color: var(--color-white);
  padding: clamp(2rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-shell__aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.10) 2.5px, transparent 3px),
    radial-gradient(circle at 78% 32%, rgba(188, 233, 120, 0.18) 1.5px, transparent 2px),
    radial-gradient(circle at 42% 64%, rgba(255, 255, 255, 0.08) 3.5px, transparent 4px),
    radial-gradient(circle at 88% 78%, rgba(255, 122, 4, 0.20) 2px, transparent 2.5px),
    radial-gradient(circle at 24% 88%, rgba(255, 255, 255, 0.10) 2px, transparent 2.5px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

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

.auth-aside__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-aside__brand img { height: 36px; width: auto; }

.auth-aside__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.auth-aside__brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.auth-aside__brand-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.auth-aside__quote {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 28ch;
  margin: auto 0;
}

.auth-aside__quote .accent { color: var(--color-green); }

.auth-aside__meta {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
}

/* --- Auth card ----------------------------------------------------------- */

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-card__eyebrow {
  color: var(--color-blue);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.auth-card__title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--color-deep-blue);
  margin: 0 0 0.75rem;
}

.auth-card__subtitle {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-dark-gray);
  margin: 0 0 2rem;
}

/* --- Forms --------------------------------------------------------------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field { display: flex; flex-direction: column; }

.label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-deep-blue);
}

.input {
  width: 100%;
  border: 1px solid var(--deep-blue-100);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-deep-blue);
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input::placeholder { color: rgba(71, 71, 71, 0.55); }

.input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(0, 108, 255, 0.16);
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 0.95rem 1.25rem;
  background: var(--color-blue);
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--color-blue);
  transition: transform 160ms ease, background 160ms ease;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  width: 100%;
}

.button-primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.auth-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-dark-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--deep-blue-100);
}

.button-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.25rem;
  background: var(--color-white);
  color: var(--color-deep-blue);
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--deep-blue-100);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button-google:hover:not(:disabled) {
  background: #f7f9fc;
  border-color: var(--color-blue);
  transform: translateY(-1px);
}

.button-google:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.button-google__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-link {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.auth-card__footnote {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-dark-gray);
  text-align: center;
}

/* --- Flash --------------------------------------------------------------- */

.flash {
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.flash--alert {
  background: #fff1ee;
  color: #803d02;
  border-color: #ffca9b;
}

.flash--notice {
  background: #f2fbe4;
  color: #5e753c;
  border-color: #d7f2ae;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell__aside { display: none; }
}
