/* ══════════════════════════════════════════════
   SUBIX ACCOUNTS — Central Login Page
   accounts.subix.in  |  style.css
   ══════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand tokens */
  --bg:           #050505;
  --surface:      #111111;
  --surface-hi:   #1a1a1a;
  --border:       #333333;
  --border-hi:    #555555;
  --text:         #ffffff;
  --text-muted:   #888888;

  --lime:         #ccff00;
  --lime-hover:   #b3e600;
  --purple:       #9d4edd;
  --cyan:         #00f3ff;
  --pink:         #ff007f;

  /* Typography */
  --font-head:  'Space Grotesk', system-ui, sans-serif;
  --font-body:  'Inter', system-ui, sans-serif;

  /* Easing */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ── Noise Overlay ────────────────────────────── */
.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Background Glows ─────────────────────────── */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: float 8s ease-in-out infinite alternate;
}

.glow-purple {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(157,78,221,0.18) 0%, transparent 70%);
  top: -140px;
  left: -180px;
}

.glow-cyan {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0,243,255,0.12) 0%, transparent 70%);
  bottom: -100px;
  right: -140px;
  animation-delay: -4s;
}

@keyframes float {
  from { transform: translateY(0px) scale(1); }
  to   { transform: translateY(-30px) scale(1.06); }
}

/* ── Wrapper ──────────────────────────────────── */
.auth-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 32px 16px 24px;
}

/* ── Brand header ─────────────────────────────── */
.brand { display: flex; justify-content: center; }

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.logo-link:hover { opacity: 0.8; }

.logo-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(204,255,0,0.4));
}

.logo-wordmark {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
}

/* ── Auth Card ────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 430px;
  background: rgba(17, 17, 17, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 24px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(157,78,221,0.08);
  overflow: hidden;
  animation: card-in 0.5s var(--ease-out) both;
  position: relative;
}

/* top accent line */
.auth-card::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--lime), var(--cyan));
  background-size: 200% 100%;
  animation: gradient-slide 4s linear infinite;
}

@keyframes gradient-slide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card-inner { padding: 36px 36px 32px; }

/* ── Card Head ────────────────────────────────── */
.card-head { margin-bottom: 20px; }

.card-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Product Badges ───────────────────────────── */
.product-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}

.badge-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
}

.badge-soon {
  color: var(--lime);
  border-color: rgba(204,255,0,0.25);
  background: rgba(204,255,0,0.07);
}

/* ── Form ─────────────────────────────────────── */
.login-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--lime); }

/* Input */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  transition: color 0.2s;
}

.form-input {
  width: 100%;
  background: rgba(26,26,26,0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 44px 12px 42px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}

.form-input::placeholder { color: #444444; }

.form-input:focus {
  border-color: var(--lime);
  background: rgba(26,26,26,0.95);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.12);
}

.form-input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--lime);
}

/* Eye toggle */
.eye-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}
.eye-toggle:hover { color: var(--text); }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 20px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn:active { transform: scale(0.98); }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Primary */
.btn-primary {
  background: var(--lime);
  color: #000000;
  margin-top: 6px;
  box-shadow: 0 4px 24px rgba(204,255,0,0.18);
}

.btn-primary:hover:not(:disabled) {
  background: var(--lime-hover);
  box-shadow: 0 6px 32px rgba(204,255,0,0.3);
  transform: translateY(-1px);
}

/* Google */
.btn-google {
  background: rgba(26,26,26,0.7);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-google:hover:not(:disabled) {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.google-icon { flex-shrink: 0; }

/* Loader spinner */
.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

.btn-primary .btn-loader { border-color: rgba(0,0,0,0.25); border-top-color: #000; }
.btn-google  .btn-loader { border-color: rgba(255,255,255,0.2); border-top-color: #fff; }

@keyframes spin { to { transform: rotate(360deg); } }

.btn.loading .btn-loader { display: block; }
.btn.loading .btn-text   { opacity: 0.7; }

/* ── OR Divider ───────────────────────────────── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.or-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.or-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ── Sign Up Prompt ───────────────────────────── */
.signup-prompt {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}

.signup-link {
  color: var(--lime);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
  transition: opacity 0.2s;
}
.signup-link:hover { opacity: 0.8; text-decoration: underline; }

/* ── Toast / Error Messages ───────────────────── */
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,0,0,0.1);
  border: 1px solid rgba(255,0,0,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ff6b6b;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}

.toast[aria-hidden="false"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-success {
  background: rgba(204,255,0,0.08);
  border-color: rgba(204,255,0,0.25);
  color: var(--lime);
}

.toast-sm {
  margin-bottom: 14px;
  font-size: 12.5px;
}

.toast-icon { font-size: 14px; flex-shrink: 0; }

/* ── Footer ───────────────────────────────────── */
.auth-footer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.75;
}

.auth-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.auth-footer a:hover { color: var(--text); }

/* ── Forgot Password Modal ────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-backdrop[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #141414;
  border: 1px solid var(--border-hi);
  border-radius: 18px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 40px rgba(157,78,221,0.1);
  animation: modal-in 0.3s var(--ease-out);
}

@keyframes modal-in {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--surface-hi); color: var(--text); }

.modal-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Input autofill override ──────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px #1a1a1a inset;
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  border-color: var(--border) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* ── Input invalid state ──────────────────────── */
.form-input.invalid {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 480px) {
  .card-inner { padding: 28px 22px 26px; }

  .card-title { font-size: 22px; }

  .auth-card { border-radius: 16px; }
}

@media (max-width: 360px) {
  .card-inner { padding: 24px 18px 22px; }
}
