:root {
  --asphalt-950: var(--bg-body);
  --asphalt-glass: var(--bg-glass);
  --asphalt-900: var(--bg-surface-solid);
  --asphalt-800: var(--bg-input);
  --line: var(--border-line);
  --chrome-dim: var(--text-muted);
  --chrome: var(--text-secondary);
  --white: var(--text-primary);
}

.auth-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 0, 51, 0.18), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 180, 0, 0.12), transparent 45%),
    var(--asphalt-950);
}

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  background: var(--asphalt-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Fallback for single-card pages like verify_otp */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--asphalt-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Access Form */
.form-panel {
  padding: 40px 36px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ignition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--asphalt-950);
  font-size: 17px;
}

.auth-brand .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.auth-brand .name span {
  color: var(--ignition);
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--asphalt-800);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}

.tab-btn {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--chrome-dim);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--white);
}

.tab-btn.active {
  background: var(--asphalt-950);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.form-panel h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 6px;
}

.form-panel .sub {
  color: var(--chrome-dim);
  font-size: 13px;
  margin: 0 0 20px;
  line-height: 1.5;
}

.admin-notice {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.28);
  border-radius: 8px;
  margin-bottom: 18px;
}

.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
  padding-top: 1px;
}

.notice-text strong {
  display: block;
  font-size: 13px;
  color: #ffc107;
  margin-bottom: 2px;
}

.notice-text span {
  font-size: 12px;
  color: var(--chrome-dim);
  line-height: 1.45;
  display: block;
}

.admin-badge-row {
  margin-bottom: 14px;
}

.badge-admin-shield {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 180, 0, 0.15);
  border: 1px solid rgba(255, 180, 0, 0.35);
  color: #ffc107;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field {
  margin-bottom: 20px;
}

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

.field input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.field input:focus {
  border-color: var(--ignition);
  outline: none;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 42, 77, 0.15);
}

.pwd-wrap {
  position: relative;
  width: 100%;
}

.pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--chrome-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwd-toggle:hover {
  color: var(--white);
}

.pwd-match-msg {
  font-size: 11px;
  margin-top: 6px;
  font-weight: 500;
  transition: color 0.2s;
}

.pwd-match-msg.error {
  color: var(--signal-red);
}

.pwd-match-msg.success {
  color: var(--signal-green);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--ignition);
  color: var(--asphalt-950);
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: #ff3366;
}

.btn-primary:active {
  transform: scale(0.98);
}

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--chrome-dim);
}

.auth-foot a {
  color: var(--ignition);
  font-weight: 600;
  text-decoration: none;
}

.auth-foot a:hover {
  text-decoration: underline;
}

/* OTP digit inputs */
.otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}

.otp-row input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--asphalt-800);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
}

.otp-row input:focus {
  border-color: var(--ignition);
  outline: none;
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.3);
}

.resend-form {
  text-align: center;
  margin-top: 14px;
}

.resend-form button {
  background: none;
  border: none;
  color: var(--chrome-dim);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.resend-form button:hover {
  color: var(--ignition);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-container {
    max-width: 90%;
  }
}

/* Auth Footer */
.auth-footer {
  width: 100%;
  padding: 60px 5% 30px;
  max-width: none;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--chrome-dim);
  font-size: 13px;
  line-height: 1.6;
}

.auth-footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 60px;
  align-items: start;
  margin-bottom: 50px;
}

@media (min-width: 1024px) {
  .auth-footer-top {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.auth-footer-col {
  /* Removed flex properties since it's now a grid item */
}

.auth-footer-col.wide {
  /* No extra width needed, handled by grid */
}

.auth-footer-logo img {
  width: 100px;
  height: auto;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
}

.auth-footer-brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 14px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.auth-footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 14px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-footer-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-footer-link {
  color: var(--chrome-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.auth-footer-link svg {
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.auth-footer-link:hover {
  color: var(--white);
  transform: translateX(4px);
}

.auth-footer-link:hover svg {
  opacity: 1;
  color: var(--ignition);
}

.auth-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.auth-footer-bottom strong {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
}