*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-darker: #1e40af;
  --brand-light:  #3b82f6;
  --brand-50:     #eff6ff;
  --brand-100:    #dbeafe;
  --brand-200:    #bfdbfe;
  --slate-50:     #f8fafc;
  --slate-100:    #f1f5f9;
  --slate-200:    #e2e8f0;
  --slate-300:    #cbd5e1;
  --slate-400:    #94a3b8;
  --slate-500:    #64748b;
  --slate-600:    #475569;
  --slate-700:    #334155;
  --slate-800:    #1e293b;
  --slate-900:    #0f172a;
  --slate-950:    #020617;
  --emerald-50:   #ecfdf5;
  --emerald-100:  #d1fae5;
  --emerald-600:  #059669;
  --emerald-700:  #047857;
  --red-50:       #fef2f2;
  --red-100:      #fee2e2;
  --red-200:      #fecaca;
  --red-600:      #dc2626;
  --red-700:      #b91c1c;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --shadow-sm:    0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg:    0 12px 32px -8px rgba(15,23,42,.12), 0 4px 12px -4px rgba(15,23,42,.06);
  --shadow-xl:    0 24px 48px -12px rgba(15,23,42,.16), 0 8px 24px -8px rgba(15,23,42,.08);
  --shadow-brand: 0 4px 14px -2px rgba(37,99,235,.25);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-950) 50%, #0c2340 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(37,99,235,.15), transparent 70%);
  pointer-events: none;
}

.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 440px;
  padding: 40px 36px 32px;
  position: relative;
  z-index: 1;
  animation: card-in 0.4s var(--ease-out);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.logo-wrap img { height: 34px; width: auto; }
.logo-text {
  font-size: 13px; font-weight: 700; color: var(--brand-darker);
  letter-spacing: 0.05em; text-transform: uppercase;
}

h1 {
  font-size: 26px; font-weight: 800; color: var(--slate-900);
  margin-bottom: 8px; letter-spacing: -0.03em;
}
.subtitle {
  font-size: 14px; color: var(--slate-500);
  margin-bottom: 28px; line-height: 1.6;
}

.field { margin-bottom: 18px; }
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--slate-700); margin-bottom: 7px;
}

input[type=email], input[type=password], input[type=text], input[type=tel] {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--slate-900);
  background: #fff;
  transition: all 0.15s var(--ease);
  outline: none;
}
input[type=email]:focus, input[type=password]:focus, input[type=text]:focus, input[type=tel]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,130,246,.15);
}
input::placeholder { color: var(--slate-400); }

.forgot {
  display: block; text-align: right; font-size: 12.5px;
  color: var(--brand); text-decoration: none; margin-top: 7px;
  font-weight: 600; transition: color 0.15s;
}
.forgot:hover { color: var(--brand-darker); text-decoration: underline; }

.error-box {
  background: var(--red-50);
  border: 1px solid var(--red-200);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 13.5px;
  color: var(--red-700);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  box-shadow: var(--shadow-brand);
}
.btn-submit:hover {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  box-shadow: 0 6px 20px -2px rgba(37,99,235,.35);
}
.btn-submit:active { transform: translateY(1px); }

.divider {
  text-align: center; font-size: 12px; color: var(--slate-400);
  margin: 22px 0; position: relative; font-weight: 500;
}
.divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--slate-200);
}
.divider span { background: #fff; padding: 0 12px; position: relative; }

.register-link {
  text-align: center; font-size: 13.5px; color: var(--slate-500);
}
.register-link a {
  color: var(--brand); text-decoration: none; font-weight: 600;
  transition: color 0.15s;
}
.register-link a:hover { color: var(--brand-darker); text-decoration: underline; }

@media (max-width: 480px) {
  .card { padding: 32px 24px 28px; }
}
