
:root {
  --primary: #0f61a8;
  --primary-light: #5b9fd9;
  --primary-dark: #073d7a;
  --secondary: #00b4a6;
  --accent: #f57c00;
  --success: #059669;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .25s ease-out;
  --font: 'Manrope', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.09);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.12);
}

[data-theme="light"] {
  --bg: #f8f9fc;
  --bg2: #ffffff;
  --bg3: #f3f4f7;
  --surface: #ffffff;
  --border: rgba(0,0,0,.08);
  --border2: rgba(0,0,0,.12);
  --text: #0f1419;
  --text2: #4a5568;
  --text3: #8b92a8;
  --text4: #cbd1dc;
}

[data-theme="dark"] {
  --bg: #0f1219;
  --bg2: #1a1f2e;
  --bg3: #242b3d;
  --surface: #16202f;
  --border: rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.12);
  --text: #f0f2f8;
  --text2: #cbd1dc;
  --text3: #8b92a8;
  --text4: #4a5568;
      --bs-modal-bg: #0d131c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

a {
  text-decoration: none;
}

/* ═══ BACKGROUND DECORATION ═══ */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(15, 97, 168, 0.08) 0%, transparent 70%);
}

.shape-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
  background: radial-gradient(circle, rgba(0, 180, 166, 0.06) 0%, transparent 70%);
}

[data-theme="dark"] .shape-1 {
  background: radial-gradient(circle, rgba(91, 159, 217, 0.06) 0%, transparent 70%);
}

[data-theme="dark"] .shape-2 {
  background: radial-gradient(circle, rgba(0, 180, 166, 0.05) 0%, transparent 70%);
}

/* ═══ CONTAINER ═══ */
.auth-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  animation: slideUp .5s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Header ─── */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  cursor: pointer;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(15, 97, 168, 0.2);
  transition: all var(--transition);
}

.logo-brand:hover .logo-mark {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 97, 168, 0.25);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text);
}

.login-subtitle {
  font-size: 14px;
  color: var(--text3);
  margin: 0;
}

/* ─── Card ─── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  animation: slideUp .5s ease-out .1s backwards;
}

/* ─── Form ─── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text);
  margin-bottom: 8px;
}

.form-input, .form-control, .form-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition);
  outline: none;
}

.form-input::placeholder, .form-control::placeholder, .form-select::placeholder {
  color: var(--text3);
}

.form-input:hover, .form-control:hover, .form-select:hover {
  border-color: var(--border2);
}

.form-input:focus, .form-control:focus, .form-select:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(15, 97, 168, 0.06);
}

/* ─── Form Options ─── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--bg3);
}

.checkbox:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.checkbox-input {
  display: none;
}

.checkbox-input:checked + .checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-input:checked + .checkbox::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.checkbox-label {
  color: var(--text2);
  cursor: pointer;
  user-select: none;
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.forgot-link:hover {
  color: var(--primary-dark);
}

/* ─── Buttons ─── */
.btn-submit {
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 97, 168, 0.2);
  margin-bottom: 12px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 97, 168, 0.3);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-submit.loading {
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Divider ─── */
.form-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  font-size: 12px;
  color: var(--text3);
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-divider span {
  padding: 0 12px;
}

/* ─── Social Buttons ─── */
.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.btn-social:hover {
  background: var(--surface);
  border-color: var(--border2);
  color: var(--text);
}

.btn-social i {
  font-size: 16px;
}

/* ─── Footer ─── */
.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.login-footer a:hover {
  color: var(--primary-dark);
}

/* ─── Message ─── */
.message {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 16px;
  border-left: 3px solid;
  animation: slideDown .3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-error {
  background: rgba(220, 38, 38, 0.1);
  border-left-color: var(--danger);
  color: var(--danger);
}

.message-success {
  background: rgba(5, 150, 105, 0.1);
  border-left-color: var(--success);
  color: var(--success);
}

/* ─── Controls Bar ─── */
.controls-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.control-pill {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.control-pill button {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.control-pill button.active {
  background: var(--primary);
  color: white;
}

/* ─── Features List ─── */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.feature-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  transition: all var(--transition);
}

.feature-item:hover {
  background: rgba(15, 97, 168, 0.08);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.feature-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.3px;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .auth-container {
    max-width: 100%;
  }

  .auth-card {
    padding: 24px;
  }

  .login-title {
    font-size: 22px;
  }

  .social-buttons {
    grid-template-columns: 1fr;
  }

  .features-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls-bar {
    top: 12px;
    right: 12px;
    gap: 8px;
  }

  .control-pill button {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* ─── Loading State ─── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse .8s ease-in-out infinite;
}
