:root {
  --bg-body: #080c14;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --accent-hover-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --accent-blue: #2563eb;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.22) 0%, transparent 65%),
    radial-gradient(circle at 85% 90%, rgba(56, 189, 248, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 15% 90%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--bg-card-border);
  border-radius: 24px;
  padding: 44px 32px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.75);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #6366f1);
}

.brand-emblem {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: #ffffff;
}

.login-header p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Alerts */
.alert-box {
  display: none;
  font-size: 13px;
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: left;
  line-height: 1.45;
  animation: fadeIn 0.25s ease;
}

.alert-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

.alert-info {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
}

.alert-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #6ee7b7;
}

/* Card Action Box */
.login-action-box {
  margin-bottom: 26px;
}

.btn-login-primary {
  width: 100%;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 15.5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login-primary:hover {
  background: var(--accent-hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
}

.btn-login-primary:active {
  transform: translateY(0);
}

.btn-left-content {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.btn-icon-bubble {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.btn-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.btn-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
  font-weight: 400;
}

.btn-arrow {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease;
}

.btn-login-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* First Access Form Elements */
.first-access-box {
  display: none;
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: left;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  display: block;
  margin-bottom: 4px;
}

.input-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.4;
}

.input-row {
  display: flex;
  gap: 8px;
}

.form-input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12.5px;
  outline: none;
}

.form-input.otp-input {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}

.btn-submit {
  padding: 9px 14px;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-confirm {
  padding: 9px 14px;
  background: #22c55e;
  color: #000000;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.back-link-container {
  margin-top: 8px;
  text-align: right;
}

.back-link {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: underline;
}

.toggle-access-container {
  margin-top: 12px;
}

.toggle-link {
  font-size: 11.5px;
  color: var(--accent-blue);
  text-decoration: none;
}

.footer-note {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
