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

.auth-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.auth-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.brand-mark {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #38bdf8;
  margin-bottom: 8px;
}

.auth-hero h1 {
  font-size: 22px;
  font-weight: 600;
  color: #f8fafc;
}

.auth-hero p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.auth-points span {
  background: rgba(56,189,248,0.12);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.auth-card {
  background: #1e293b;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.auth-card-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #f8fafc;
}

.auth-card-header p {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.auth-badge {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: #0f172a;
  border-radius: 10px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: #334155;
  color: #f8fafc;
}

.auth-tab:hover:not(.active) {
  color: #94a3b8;
}

.auth-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-message.error {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
}

.auth-message.success {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-group input {
  padding: 10px 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 14px;
  transition: border-color 0.2s;
}

.field-group input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

.field-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-submit {
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #38bdf8;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.auth-submit:hover {
  background: #0ea5e9;
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
}

.auth-resend {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.auth-resend:hover {
  text-decoration: underline;
}

.auth-resend:disabled {
  color: #475569;
  cursor: not-allowed;
  text-decoration: none;
}

.auth-2fa-info {
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
}

.auth-2fa-info code {
  background: #0f172a;
  padding: 2px 8px;
  border-radius: 4px;
  color: #38bdf8;
  font-weight: 600;
  font-size: 16px;
}

@media (max-width: 768px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-hero { padding: 32px 24px; }
  .auth-card { padding: 32px 24px; }
}

.auth-quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.auth-quick {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.auth-quick.primary {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
}

.auth-quick.secondary {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

.auth-quick:hover {
  transform: translateY(-1px);
}

.auth-quick:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .auth-body {
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100dvh;
    padding: 0;
    background: #0f172a;
  }

  .auth-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-card {
    order: 1;
    padding: 22px 16px 24px;
    gap: 18px;
  }

  .auth-hero {
    order: 2;
    padding: 22px 16px 28px;
    gap: 12px;
  }

  .brand-mark {
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 0;
  }

  .auth-hero h1 {
    font-size: 18px;
  }

  .auth-hero p {
    font-size: 13px;
  }

  .auth-card-header {
    gap: 12px;
  }

  .auth-badge {
    display: none;
  }

  .auth-tabs {
    position: sticky;
    top: 0;
    z-index: 2;
    gap: 3px;
    border-radius: 8px;
  }

  .auth-tab {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .field-group input {
    min-height: 46px;
    font-size: 16px;
  }

  .auth-submit {
    min-height: 48px;
  }

  .auth-footer {
    flex-direction: column;
    gap: 4px;
  }

  .auth-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .auth-quick {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .auth-tabs {
    flex-direction: column;
  }

  .auth-quick-actions {
    grid-template-columns: 1fr;
  }
}

.auth-card-actions {
  display: none;
  gap: 10px;
}

@media (max-width: 768px) {
  .auth-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .auth-hero .auth-quick-actions {
    display: none;
  }
}

@media (max-width: 380px) {
  .auth-card-actions {
    grid-template-columns: 1fr;
  }
}
