[hidden] { display: none !important; }
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy-950: #0F1826;
  --navy-900: #16223A;
  --navy-800: #1E2C48;
  --line: #2C3B5C;
  --cream: #F3EFE6;
  --muted: #93A1BE;
  --gold: #E8AA3D;
  --gold-dim: #B7842B;
  --success: #5EAE7C;
  --danger: #D9724F;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: radial-gradient(120% 140% at 20% -10%, #1C2A46 0%, var(--navy-950) 55%);
  color: var(--cream);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

h1, h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  margin: 0 0 0.3em;
}

h1 { font-size: 1.7rem; }
h2 { font-size: 1.05rem; color: var(--cream); margin-top: 1.6em; }

.muted { color: var(--muted); font-size: 0.92rem; }

.screen {
  min-height: 100vh;
}

/* ---- Login ---- */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 360px;
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 32px;
}

.mark { margin-bottom: 14px; }
.mark svg { display: block; }

.sub { margin: 0 0 24px; color: var(--muted); }

form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

input, textarea {
  width: 100%;
  margin-top: 6px;
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  resize: vertical;
}

input:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
}

.primary-btn, form button[type="submit"] {
  width: 100%;
  background: var(--gold);
  color: #251A05;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 16px;
  border-radius: 8px;
  margin-top: 6px;
  transition: background 0.15s ease;
}

.primary-btn:hover, form button[type="submit"]:hover { background: #F0B75A; }
.primary-btn:disabled { background: var(--gold-dim); cursor: not-allowed; opacity: 0.6; }

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.85rem;
}
.ghost-btn:hover { color: var(--cream); border-color: var(--muted); }

.error {
  color: var(--danger);
  font-size: 0.87rem;
  margin-top: 10px;
}

.limit-note {
  margin: -4px 0 14px;
  font-size: 0.85rem;
}

/* ---- Dashboard ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.topbar .mark {
