/* ── auth.css – shared styles for login, register, account, admin ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #f5f3ef;
  color: #1a1a1a;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
.auth-topbar {
  background: #1a3a5c;
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-topbar-brand { display: flex; align-items: center; gap: 10px; }
.auth-topbar-brand span { font-size: 22px; }
.auth-topbar-brand h1 { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; }
.auth-topbar-links { display: flex; gap: 16px; }
.auth-topbar-links a { color: rgba(255,255,255,.75); font-size: 13px; text-decoration: none; }
.auth-topbar-links a:hover { color: white; }

/* ── Page container ── */
.auth-page {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 60px;
}

.auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,.08), 0 0 0 1px #e8e4dd;
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
}

.auth-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 6px;
}
.auth-card .subtitle {
  color: #6b6b6b;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Form fields ── */
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #6b6b6b;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e8e4dd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #f5f3ef;
  color: #1a1a1a;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.auth-field input:focus {
  outline: none;
  border-color: #1a3a5c;
  box-shadow: 0 0 0 3px rgba(26,58,92,.1);
  background: white;
}

/* ── Checkbox ── */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.auth-check input[type=checkbox] { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; accent-color: #1a3a5c; }
.auth-check label { font-size: 13px; color: #6b6b6b; line-height: 1.5; cursor: pointer; }
.auth-check a { color: #1a3a5c; }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #1a3a5c;
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
  margin-top: 4px;
}
.btn-primary:active { transform: scale(.98); opacity: .9; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: transparent;
  color: #1a3a5c;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid #1a3a5c;
  cursor: pointer;
  transition: background .15s;
  margin-top: 8px;
}
.btn-secondary:hover { background: #f0f4fa; }

.btn-danger {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: #fef2f2;
  color: #c0392b;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid #fecaca;
  cursor: pointer;
  transition: background .15s;
  margin-top: 8px;
}
.btn-danger:active { background: #fee2e2; }

/* ── Error / info alerts ── */
.auth-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  line-height: 1.4;
}
.auth-alert.error   { background: #fef2f2; color: #c0392b; border: 1px solid #fecaca; display: block; }
.auth-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; display: block; }
.auth-alert.info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; display: block; }

/* ── Auth link ── */
.auth-link {
  text-align: center;
  font-size: 14px;
  color: #6b6b6b;
  margin-top: 20px;
}
.auth-link a { color: #1a3a5c; font-weight: 600; text-decoration: none; }

/* ── Divider ── */
.auth-divider {
  border: none;
  border-top: 1px solid #e8e4dd;
  margin: 24px 0;
}

/* ── Info rows ── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f3ef;
  font-size: 14px;
}
.info-row .info-label { color: #6b6b6b; font-weight: 500; }
.info-row .info-val { font-weight: 600; }

/* ── Danger zone ── */
.danger-zone {
  border: 1.5px solid #fecaca;
  border-radius: 12px;
  padding: 16px;
  margin-top: 24px;
  background: #fff5f5;
}
.danger-zone h3 { color: #c0392b; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.danger-zone p  { color: #6b6b6b; font-size: 13px; line-height: 1.5; margin-bottom: 12px; }

/* ── Legal page ── */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}
.legal-page h1 { font-family: 'DM Serif Display', serif; font-size: 28px; font-weight: 400; margin-bottom: 8px; }
.legal-page .legal-meta { color: #6b6b6b; font-size: 13px; margin-bottom: 32px; }
.legal-page h2 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; }
.legal-page h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; color: #1a3a5c; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.75; color: #333; margin-bottom: 8px; }
.legal-page ul { padding-left: 22px; margin-bottom: 10px; }
.legal-page .notice-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  color: #92400e;
  margin: 20px 0;
  line-height: 1.6;
}
.legal-page .notice-box.blue {
  background: #eff6ff; border-color: #bfdbfe; color: #1e40af;
}

/* ── Admin table ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.admin-table th { text-align: left; padding: 10px 12px; background: #f5f3ef; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b6b6b; border-bottom: 1px solid #e8e4dd; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f5f3ef; vertical-align: middle; }
.admin-table tr:hover td { background: #fafaf8; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-admin { background: #dbeafe; color: #1e40af; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #c0392b; }
.btn-sm { padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1.5px solid; }
.btn-sm-del { color: #c0392b; border-color: #fecaca; background: #fef2f2; }
.btn-sm-del:hover { background: #fee2e2; }
.btn-sm-toggle { color: #1a3a5c; border-color: #bfdbfe; background: #eff6ff; }
.btn-sm-toggle:hover { background: #dbeafe; }

/* ── Loading / confirm overlays ── */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.confirm-box {
  background: white; border-radius: 20px; padding: 28px; max-width: 400px; width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.confirm-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.confirm-box p  { font-size: 14px; color: #6b6b6b; margin-bottom: 20px; line-height: 1.5; }
.confirm-row    { display: flex; gap: 10px; }
.confirm-row button { flex: 1; padding: 12px; border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border: none; }

/* ── Footer ── */
footer.auth-footer {
  background: #1a3a5c;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
footer.auth-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
footer.auth-footer a:hover { color: white; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-card { padding: 24px 18px; border-radius: 16px; }
}

/* ── Section title ── */
.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9e9e9e;
  margin-bottom: 12px;
}

/* ── Password strength ── */
.pw-strength { display: flex; gap: 4px; margin-top: 6px; }
.pw-bar { flex: 1; height: 3px; border-radius: 2px; background: #e8e4dd; transition: background .3s; }
.pw-bar.fill-weak   { background: #ef4444; }
.pw-bar.fill-ok     { background: #f59e0b; }
.pw-bar.fill-strong { background: #22c55e; }
.pw-hint { font-size: 11px; color: #9e9e9e; margin-top: 4px; }
