:root {
  --brand:       #1a56db;
  --brand-dark:  #1648c0;
  --brand-light: #e8effe;
  --surface:     #ffffff;
  --bg:          #eef2ff;
  --text:        #0f172a;
  --muted:       #64748b;
  --border:      #cbd5e1;
  --input-bg:    #f8fafc;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(147,197,253,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 80%, rgba(129,140,248,0.2) 0%, transparent 60%);
}

.top-bar {
  position: relative; z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-weight: 700; font-size: 1rem; color: var(--brand);
  text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
}
.brand svg { width: 18px; height: 18px; fill: var(--brand); }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-text { font-weight: 700; font-size: 0.95rem; color: var(--brand); letter-spacing: -0.01em; }
.secure-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; color: var(--muted);
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 20px; padding: 0.25rem 0.7rem;
}
.secure-badge svg { width: 12px; height: 12px; fill: #10b981; }

.main-wrap {
  position: relative; z-index: 1; flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid #dde3f0;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(15,23,42,0.10), 0 1px 4px rgba(15,23,42,0.05);
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2.5rem 2rem;
  animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
@media (max-width: 500px) {
  .login-card { padding: 1.8rem 1.4rem 1.6rem; border-radius: 16px; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  height: 44px; width: auto;
  margin-bottom: 1.2rem;
}

.card-title    { font-weight: 700; font-size: 1.7rem; color: var(--text); margin: 0 0 0.25rem; letter-spacing: -0.02em; }
.card-subtitle { font-size: 0.85rem; color: var(--muted); margin: 0 0 1.8rem; }

.alert-error {
  display: flex; align-items: center; gap: 0.5rem;
  background: #fff1f2; border: 1px solid #fecdd3; color: #be123c;
  border-radius: 10px; font-size: 0.82rem; padding: 0.7rem 0.9rem;
  margin-bottom: 1.2rem;
  animation: shake 0.4s ease;
}
.alert-error svg { width: 16px; height: 16px; fill: #be123c; flex-shrink: 0; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-5px); }
  40%,80%  { transform: translateX(5px); }
}

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

.input-wrap {
  position: relative; display: flex; align-items: stretch;
}
.input-icon {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: #94a3b8; pointer-events: none;
  z-index: 2;
}
.field-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-input.has-toggle { padding-right: 2.8rem; }
.field-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
  background: #fff;
}

.btn-eye {
  position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 0; cursor: pointer;
  color: #94a3b8; display: flex; align-items: center;
  transition: color 0.2s; z-index: 2;
}
.btn-eye:hover { color: var(--brand); }
.btn-eye svg   { width: 18px; height: 18px; fill: currentColor; }

.btn-signin {
  width: 100%; margin-top: 0.5rem;
  background: var(--brand); color: #fff;
  border: none; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  padding: 0.78rem 1rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn-signin svg  { width: 18px; height: 18px; fill: #fff; }
.btn-signin:hover  { background: var(--brand-dark); box-shadow: 0 4px 18px rgba(26,86,219,0.3); }
.btn-signin:active { transform: scale(0.98); }

.card-foot {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  text-align: center; font-size: 0.72rem; color: #94a3b8;
  margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid #f1f5f9;
}
.card-foot svg { width: 14px; height: 14px; fill: #10b981; }

.page-footer { position: relative; z-index: 1; text-align: center; font-size: 0.7rem; color: #94a3b8; padding: 1rem; }

.mb-3 { margin-bottom: 1rem; }
.hidden { display: none; }
