@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Cinzel-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/Cinzel-900.woff2') format('woff2');
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Rajdhani-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Rajdhani-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Rajdhani-700.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --canvas: #07060D;
  --panel: #110D1D;
  --panel-raised: #171128;
  --input: #0A0812;
  --line: #1F1836;
  --line-soft: #2D224C;
  --muted: #9E95B8;
  --dim: #6E6488;
  --text: #F3F0FF;
  --green: #00D68F;
  --green-soft: rgba(0, 214, 143, 0.12);
  --violet: #9D4EDD;
  --lavender: #C77DFF;
  --blue: #00B4D8;
  --red: #E61E4D;
  --grad-santri-silk: linear-gradient(135deg, #9D4EDD 0%, #5A189A 50%, #00B4D8 100%);
  --grad-ambient-stage: radial-gradient(circle at 50% 0%, #19112E 0%, #07060D 75%);
  --grad-card-surface: linear-gradient(160deg, rgba(17, 13, 29, 0.86) 0%, rgba(7, 6, 13, 0.94) 100%);
  --grad-border-glow: linear-gradient(135deg, rgba(199, 125, 255, 0.5) 0%, rgba(90, 24, 154, 0.25) 50%, rgba(0, 180, 216, 0.4) 100%);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: Rajdhani, Inter, Manrope, 'Segoe UI', ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background:
    url('/bg-santri.webp') center / 1150px auto no-repeat,
    radial-gradient(circle at 50% 0%, rgba(25, 17, 46, 0.88) 0%, rgba(7, 6, 13, 0.94) 75%);
  background-attachment: fixed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-shell.is-compact {
  width: min(400px, 100%);
  align-items: center;
  gap: 26px;
}

.login-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 32px 30px;
  background-color: var(--panel);
  background-image: var(--grad-card-surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 60px -20px rgba(157, 78, 221, 0.25);
}

.login-card.is-compact {
  width: 100%;
  padding: 34px 28px 30px;
  background-color: var(--panel);
  background-image: var(--grad-card-surface);
  border-color: var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 60px -20px rgba(157, 78, 221, 0.25);
}

.login-logo-img {
  display: block;
  width: min(260px, 82%);
  min-width: 220px;
  height: auto;
  margin: 0 auto 26px;
  filter: drop-shadow(0 0 25px rgba(157, 78, 221, 0.4));
}

.login-logo-img.is-hero {
  width: min(260px, 86%);
  margin: 0 auto 22px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-family: Cinzel, Rajdhani, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card p.login-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: 10px;
  padding: 11px 14px;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid rgba(0, 214, 143, 0.35);
  background: var(--green-soft);
  color: var(--green);
}

.login-alert svg {
  flex: none;
  margin-top: 1px;
}

.login-alert.is-error {
  border-color: rgba(230, 30, 77, 0.45);
  background: rgba(230, 30, 77, 0.1);
  color: var(--red);
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 6px;
  border: 1px solid rgba(157, 78, 221, 0.45);
  background: linear-gradient(180deg, rgba(157, 78, 221, 0.16) 0%, rgba(90, 24, 154, 0.22) 100%);
  color: #D9CFF5;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.google-button:hover {
  border-color: var(--lavender);
  background: linear-gradient(180deg, rgba(157, 78, 221, 0.26) 0%, rgba(90, 24, 154, 0.32) 100%);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.12);
}

.google-button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.google-button svg {
  flex: 0 0 auto;
  border-radius: 4px;
  background: #F3F0FF;
  padding: 2px;
}

.decoy-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.decoy-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.03em;
}

.decoy-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #221940;
  border-radius: 5px;
  background: rgba(10, 8, 18, 0.74);
  color: #D9D2EE;
  font: inherit;
  font-size: 15px;
}

.decoy-form input:focus-visible {
  outline: none;
  border-color: rgba(157, 78, 221, 0.6);
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.14);
}

/* Browser autofill paints its own yellow field; keep the glass field recipe
 * (flat violet focus ring plus a solid inset matching the blended card). */
.decoy-form input:-webkit-autofill,
.decoy-form input:-webkit-autofill:hover,
.decoy-form input:-webkit-autofill:active {
  -webkit-text-fill-color: #D9D2EE;
  caret-color: #D9D2EE;
  border-color: #221940;
  box-shadow: inset 0 0 0 1000px #0C0915;
  transition: background-color 99999s ease-in-out 0s;
}

.decoy-form input:-webkit-autofill:focus-visible {
  border-color: rgba(157, 78, 221, 0.6);
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.14), inset 0 0 0 1000px #0C0915;
}

.decoy-submit {
  margin-top: 6px;
  min-height: 44px;
  border: 1px solid rgba(157, 78, 221, 0.45);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(157, 78, 221, 0.16) 0%, rgba(90, 24, 154, 0.22) 100%);
  color: #D9CFF5;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.decoy-submit:hover {
  border-color: var(--lavender);
  background: linear-gradient(180deg, rgba(157, 78, 221, 0.26) 0%, rgba(90, 24, 154, 0.32) 100%);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.12);
}

.decoy-submit:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

.login-hint {
  margin: 20px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 12px;
}

.login-footer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}

.error-code {
  margin: 0 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lavender);
}

.error-reason {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.error-path {
  display: block;
  overflow-wrap: anywhere;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.error-return {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 11px 18px;
  border: 1px solid rgba(157, 78, 221, 0.45);
  border-radius: 6px;
  background: var(--panel-raised);
  color: var(--lavender);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}

.error-return:hover {
  border-color: var(--violet);
  transform: translateY(-1px);
}

.error-return:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

.login-matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #07060D;
}

.login-matrix canvas {
  display: block;
  opacity: 0.55;
}

.login-matrix-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(7, 6, 13, 0.88) 0%, rgba(7, 6, 13, 0.45) 45%, rgba(7, 6, 13, 0.15) 100%);
}
