/* ════════════════════════════════════════════════
   AINEW — Login Page
   Design System: iOS 26 Liquid Glass
   ════════════════════════════════════════════════ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-strong: rgba(255, 255, 255, 0.58);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-subtle: rgba(255, 255, 255, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.72);
  --glass-blur: 28px;

  --bg-gradient-start: #e8eeff;
  --bg-gradient-end: #f0e8ff;
  --bg-accent-glow: rgba(120, 100, 255, 0.08);

  --text-main: #0e1726;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --brand: #6c5ce7;
  --brand-light: #a78bfa;
  --brand-glow: rgba(108, 92, 231, 0.16);

  --danger-bg: rgba(255, 220, 220, 0.6);
  --danger-text: #991b1b;

  --radius-glass: 32px;
  --radius-field: 16px;
  --radius-btn: 16px;
  --radius-pill: 999px;

  --shadow-glass: 0 8px 40px rgba(80, 60, 180, 0.08), 0 1.5px 6px rgba(0, 0, 0, 0.04);
  --shadow-glass-hover: 0 12px 48px rgba(80, 60, 180, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 20px 60px rgba(80, 60, 180, 0.1), 0 4px 16px rgba(0, 0, 0, 0.05);

  --font: "Inter", "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition-glass: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(ellipse 1400px 700px at 15% -5%, rgba(168, 148, 255, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 1000px 600px at 85% 10%, rgba(120, 180, 255, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 800px 500px at 50% 100%, rgba(200, 160, 255, 0.10) 0%, transparent 70%),
    linear-gradient(170deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-attachment: fixed;
}

.auth-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 20px;
}

/* ── Brand ── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--text-main);
}

.auth-brand strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(108, 92, 231, 0.9), rgba(167, 139, 250, 0.9));
  backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(108, 92, 231, 0.3);
}

.auth-brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Layout ── */
.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
}

/* ── Glass Card ── */
.glass-card {
  border-radius: var(--radius-glass);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-glass), transform var(--transition-glass);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  z-index: 0;
}

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

.glass-card:hover {
  box-shadow: var(--shadow-glass-hover);
  transform: translateY(-1px);
}

/* ── Hero Panel ── */
.hero-panel {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.06;
  margin: 0;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--text-main) 40%, var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.hero-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(108, 92, 231, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(108, 92, 231, 0.12);
}

/* ── Fox (Mascot) Box ── */
.fox-box {
  margin-top: 4px;
  border-radius: 24px;
  border: 1px solid var(--glass-border-subtle);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  transition: background var(--transition-glass);
}

.fox-box:hover {
  background: rgba(255, 255, 255, 0.5);
}

.fox-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 208, 178, 0.9), rgba(255, 183, 128, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(214, 130, 80, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.fox-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fox-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.fox-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.hero-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.hero-list li {
  margin-bottom: 4px;
}

/* ── Form Panel ── */
.form-panel {
  padding: 32px 28px;
}

.form-title {
  margin: 2px 0 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.form-sub {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Form Fields ── */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.field input,
.field select {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-field);
  padding: 13px 16px;
  font-size: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition-glass);
  color: var(--text-main);
}

.field input::placeholder {
  color: var(--text-muted);
}

.field input:focus,
.field select:focus {
  border-color: rgba(108, 92, 231, 0.4);
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 4px rgba(108, 92, 231, 0.1),
    0 4px 16px rgba(108, 92, 231, 0.06);
}

.field-hint {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Primary Button ── */
.btn-primary {
  width: 100%;
  border: none;
  border-radius: var(--radius-btn);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-glass);
  box-shadow: 0 4px 18px rgba(108, 92, 231, 0.3);
  letter-spacing: 0.01em;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(108, 92, 231, 0.4);
  background: linear-gradient(135deg, #5b4bd5, #9078f0);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.25);
}

.btn-secondary {
  border: 1px solid rgba(108, 92, 231, 0.18);
  border-radius: var(--radius-btn);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(108, 92, 231, 0.06);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all var(--transition-glass);
}

.btn-secondary:hover {
  background: rgba(108, 92, 231, 0.12);
  border-color: rgba(108, 92, 231, 0.3);
}

/* ── Captcha Wrap ── */
.captcha-wrap {
  margin: 4px 0 18px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(108, 92, 231, 0.22);
  border-radius: var(--radius-field);
  background: rgba(108, 92, 231, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.captcha-wrap .captcha-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  align-self: flex-start;
}

.captcha-wrap .cf-turnstile {
  min-height: 65px;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ── Alerts ── */
.alert-danger,
.alert-info {
  border-radius: var(--radius-field);
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(220, 38, 38, 0.12);
}

.alert-info {
  background: rgba(200, 220, 255, 0.5);
  color: #1e4f7d;
  border: 1px solid rgba(59, 130, 246, 0.12);
}

/* ── Muted link ── */
.muted-link {
  margin-top: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.muted-link a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.muted-link a:hover {
  color: #5b4bd5;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Responsive ── */
@media (max-width: 920px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .auth-shell {
    padding: 20px 14px;
  }
  .hero-panel,
  .form-panel {
    padding: 24px 18px;
  }
  .hero-title {
    font-size: 28px;
  }
  .form-title {
    font-size: 24px;
  }
}

/* ═══ Oops Modal (Liquid Glass) ═══ */
.oops-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  place-items: center;
}

.oops-modal:not([hidden]) {
  display: grid;
}

.oops-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 28, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.oops-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(94vw, 560px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-float);
  padding: 20px 20px 18px;
  animation: modal-float-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-float-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.oops-modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.oops-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.oops-modal-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
}

.oops-modal-mascot {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(214, 130, 80, 0.3);
  animation: mascot-liquid-wobble 2s ease-in-out infinite;
}

@keyframes mascot-liquid-wobble {
  0%   { transform: translateY(0) scale(1); }
  25%  { transform: translateY(-3px) rotate(-3deg) scale(1.02); }
  50%  { transform: translateY(0) scale(1); }
  75%  { transform: translateY(-3px) rotate(3deg) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

#oops-modal-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

#oops-modal-text {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 14px;
}
