/* ----------------------------------------------------------------------------
   Page styles for templates/accounts/login1.html (standalone login screen).
   Design tokens come from tokens.css, which the template links first.
   -------------------------------------------------------------------------- */

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

/* Page-local vars ONLY. The brand + neutral tokens (--navy, --electric,
   --muted, --border, --surface, --white, --text, --text-mid) come from
   tokens.css, which this page links first. Redefining them here would
   silently override the design system — this block used to pin --navy to the
   pre-Command-Center #08172e. */
:root {
  --danger:   var(--alert);
  --warn-bg:  #eef1f5;
  --warn-bd:  #d0d5dc;
  --warn-txt: #45566b;
}

html, body {
  height: 100%;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 20px;
  -webkit-font-smoothing: antialiased;
}

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 48px);
  width: min(420px, 100%);
  box-shadow:
    0 4px 6px rgba(11,18,28,0.04),
    0 16px 48px rgba(11,18,28,0.10);
}

/* logo */
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.logo-mark {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(11,18,28,0.20);
}

.logo-mark img {
  width: 100px; height: 100px;
  object-fit: cover;
}

/* fallback if no image */
.logo-mark svg { width: 26px; height: 26px; color: white; }

.logo-name {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-top: 4px;
}

.logo-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  text-align: center;
  margin-top: 2px;
}

/* divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 24px;
}

/* alerts */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.alert svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.alert-warn  { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-txt); }
.alert-error { background: #fbedef; border: 1px solid #f4c9ce; color: var(--danger); }

/* fields */
.field { margin-bottom: 16px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 7px;
}

.field-wrap { position: relative; }

.field-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: flex; align-items: center;
  pointer-events: none;
}

.field-icon svg { width: 15px; height: 15px; }

.field-input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #fafbfd;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field-input::placeholder { color: #b8c5d6; }

.field-input:focus {
  border-color: var(--electric);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46,107,198,0.10);
}

.field-input.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(217,72,91,0.08);
}

.eye-btn {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--muted);
  display: flex; align-items: center;
  padding: 4px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.eye-btn:hover { color: var(--text); background: #f0f4fa; }
.eye-btn svg { width: 15px; height: 15px; }

.field-error {
  font-size: 12px; color: var(--danger);
  margin-top: 5px;
  display: flex; align-items: center; gap: 5px;
}

.field-error svg { width: 12px; height: 12px; }

/* meta row */
.row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 20px;
}

.remember {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-mid);
  cursor: pointer; user-select: none;
}

.remember input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--electric);
  cursor: pointer;
}

.forgot {
  font-size: 13px;
  color: var(--electric);
  text-decoration: none;
  font-weight: 500;
}

.forgot:hover { text-decoration: underline; }

/* submit */
.btn-submit {
  width: 100%;
  height: 44px;
  padding: 8px;
  border: none;
  border-radius: 10px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--electric) 100%);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(11,18,28,0.20);
  transition: transform 0.12s, box-shadow 0.12s;
  letter-spacing: 0.2px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(11,18,28,0.26);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(11,18,28,0.16);
}

.btn-submit svg { width: 15px; height: 15px; }

/* footer */
.card-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #b0bccf;
  line-height: 1.6;
}

/* entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeUp 0.35s ease both; }
