@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy: #1B2A41;
  --navy-deep: #101A29;
  --gold: #B8934D;
  --paper: #F7F5F1;
  --ink: #1F2733;
  --muted: #6B7280;
  --line: #E4DFD4;
  --ok: #2F7A4D;
  --err: #B3392C;
  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
  margin: 0 0 0.4em 0;
}

a { color: var(--navy); }

/* ── TOP NAV (dashboard/settings/templates/messaging/coexistence) ── */
.topbar {
  background: var(--navy-deep);
  color: #EDE7D9;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold);
}

.topbar .brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar .brand span { color: var(--gold); }

.topbar nav a {
  color: #D9D2BF;
  text-decoration: none;
  margin-left: 22px;
  font-size: 13.5px;
  font-weight: 500;
}

.topbar nav a:hover { color: #fff; }
.topbar nav a.active { color: var(--gold); }

/* ── PAGE SHELL (main content container on every logged-in page) ── */
.shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 6px;
}

.muted { color: var(--muted); font-size: 14px; }

/* ── CARDS (dashboard sections, settings blocks, template list items) ── */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-top: 18px;
}

.card h3 { font-size: 17px; margin-bottom: 6px; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--navy-deep);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--navy-deep);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.btn.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 11px 22px;
}
.btn.btn-secondary:hover { background: var(--gold); color: var(--navy-deep); }

/* ── FORM ELEMENTS (settings.php / messaging.php / templates.php) ── */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 14px 0 6px;
}

input[type="text"], input[type="tel"], input[type="email"],
input[type="password"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; min-height: 90px; }

/* ── NOTICES (success/error banners) ── */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin: 16px 0;
}
.notice.ok  { background: #EAF4EC; color: var(--ok);  border: 1px solid #C7E3CC; }
.notice.err { background: #FBEAE8; color: var(--err); border: 1px solid #F0C7C1; }

/* ── LOGIN PAGE (index.php) ── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--navy-deep);
  color: #EDE7D9;
  text-align: center;
  padding: 48px 24px;
}

.login-shell h1 { color: #fff; font-size: 28px; }
.login-shell .signature {
  width: 42px; height: 3px; background: var(--gold); margin: 18px auto 22px;
}
.login-shell > p { color: #B9B2A0; max-width: 420px; margin: 0 auto 40px; }

.login-options {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 620px;
}

.login-option {
  flex: 1;
  background: #223350;
  border: 1px solid #2E4262;
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.login-option h2 {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  flex-shrink: 0;
  position: relative;
}

.login-divider span {
  background: var(--navy-deep);
  color: #8A8370;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  border: 1px solid #2E4262;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #2E4262;
}

.fb-login-btn {
  background: #1877F2;
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  width: 100%;
  max-width: 240px;
}
.fb-login-btn:hover { background: #1465D8; }

.token-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.token-login-form input {
  padding: 11px 12px;
  border: 1px solid #3A4C6B;
  border-radius: var(--radius);
  background: #1B2A41;
  color: #EDE7D9;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
.token-login-form input::placeholder { color: #7E8AA0; }

.token-login-form label {
  color: #B9B2A0;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  margin: 0;
}

#loginStatus { color: #B9B2A0; }

.error-text { color: #E8877A; font-size: 0.9em; margin: 0; }

@media (max-width: 560px) {
  .login-options { flex-direction: column; }
  .login-divider { width: 100%; height: 40px; }
  .login-divider::before { top: 50%; left: 0; right: 0; bottom: auto; width: 100%; height: 1px; }
}
