/* ============================================================
   auth.css — Login page styles
   ============================================================ */

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

:root {
  --color-primary:   #1e40af;
  --color-primary-d: #1e3a8a;
  --color-accent:    #f59e0b;
  --color-bg:        #0f172a;
  --color-bg2:       #1e293b;
  --color-card:      #ffffff;
  --color-text:      #1e293b;
  --color-muted:     #64748b;
  --color-danger:    #dc2626;
  --color-success:   #16a34a;
  --radius:          12px;
  --shadow:          0 20px 60px rgba(0,0,0,0.4);
}

html, body {
  height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  user-select: none;
}

/* Background gradient overlay */
.auth-bg {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(30,64,175,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(245,158,11,0.15) 0%, transparent 60%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 1rem;
  overflow-y: auto;
}

/* Card */
.auth-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: slideUp 0.4s ease;
}

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

.auth-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-d) 100%);
  color: white;
  text-align: center;
  padding: 2.5rem 2rem 2rem;
}

.auth-logo {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.auth-header p {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Alerts */
.alert {
  margin: 1rem 1.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-danger);
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--color-success);
}

/* Form */
form {
  padding: 1.75rem 1.75rem 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--color-text);
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
  background: #ffffff;
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .form-control {
  padding-right: 2.75rem;
}

.toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0;
}

.toggle-pw:hover { opacity: 1; }

.btn-login {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-d));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(30,64,175,0.3);
  margin-top: 0.5rem;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,64,175,0.4);
}

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

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Footer */
.auth-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.75rem;
  text-align: center;
}

.auth-footer p {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card { border-radius: 0; min-height: 100vh; }
  .auth-bg   { padding: 0; align-items: flex-start; }
}
