/* Shared design for signed-in and utility pages: the same look as the
   dashboard (dashboard.html), profile.html and settings.html. */
:root {
  --navy:        #1a365d;
  --navy-mid:    #2d4a66;
  --oxford-navy: #14243d;
  --ink:         #1a202c;
  --ink-mid:     #4a5568;
  --ink-light:   #718096;
  --surface:     #f7fafc;
  --surface-alt: #eef2f7;
  --white:       #ffffff;
  --gold:        #c8913a;
  --gold-light:  #f5e6cc;
  --gold-text:   #7a520a;
  --green:       #2d7d52;
  --green-light: #d4f0e2;
  --green-text:  #1a5236;
  --blue-light:  #dceefb;
  --blue-text:   #1a4f7a;
  --red-light:   #fde8e8;
  --red-text:    #8b1a1a;
  --border:      #e2e8f0;
  --border-soft: #edf2f7;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --shadow-xs:   0 1px 3px rgba(15,35,64,.06);
  --shadow-md:   0 4px 16px rgba(15,35,64,.10);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  padding-top: 64px;
  margin: 0;
}

/* Short pages: keep the footer at the bottom of the window. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

/* ── Navbar ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border-soft);
  padding: .75rem 0;
  box-shadow: var(--shadow-xs);
}
.navbar-brand {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  font-size: 1.6rem;
  color: var(--navy) !important;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.nav-username { font-weight: 500; font-size: 13px; color: var(--ink); }
.btn-nav-menu {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 5px 9px; color: var(--ink-mid); cursor: pointer; font-size: 13px;
}
.btn-nav-menu:hover { background: var(--surface-alt); }

/* ── Page header ── */
.page-header { background: var(--oxford-navy); padding: 36px 0 30px; margin-bottom: 28px; }
.page-header h1 {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  font-size: 1.9rem; font-weight: 400; color: #ffffff; margin-bottom: 6px;
}
.page-header p { font-size: 13px; color: rgba(255,255,255,.75); margin: 0; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.stat-card {
  background: rgba(255,255,255,.12); border-radius: var(--radius-md);
  padding: 14px 16px; border: 1px solid rgba(255,255,255,.18);
}
.stat-val { font-size: 22px; font-weight: 600; color: #ffffff; line-height: 1.2; margin-bottom: 2px; }
.stat-lbl { font-size: 11px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .04em; }
.stat-note { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 4px; }

/* ── Panels ── */
.panel {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-xs); margin-bottom: 20px;
}
.panel-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-light); margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}

.who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.who-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-light); color: var(--blue-text);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Libre Baskerville', Georgia, serif; font-size: 22px;
}
.who-name { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.2rem; color: var(--navy); line-height: 1.3; word-break: break-word; }
.who-email { font-size: 13px; color: var(--ink-light); word-break: break-all; }

.meta-pair {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; padding: 9px 0; border-top: 1px solid var(--border-soft);
}
.meta-lbl { color: var(--ink-light); flex-shrink: 0; }
.meta-val { font-weight: 500; color: var(--ink); text-align: right; }
.meta-val a { color: var(--navy); }

.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.pill-gold  { background: var(--gold-light);  color: var(--gold-text); }
.pill-green { background: var(--green-light); color: var(--green-text); }
.pill-gray  { background: var(--surface-alt); color: var(--ink-mid); }
.pill-red   { background: var(--red-light);   color: var(--red-text); }

.plan-name { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.25rem; color: var(--navy); margin: 6px 0 2px; }
.plan-sub { font-size: 13px; color: var(--ink-mid); }

.btn-action {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border); background: var(--white); color: var(--navy); cursor: pointer;
}
.btn-action:hover { background: var(--surface-alt); color: var(--navy); }
.btn-action.primary { background: var(--navy-mid); border-color: var(--navy-mid); color: #ffffff; }
.btn-action.primary:hover { background: var(--navy); color: #ffffff; }
.btn-action.gold { background: var(--gold); border-color: var(--gold); color: #ffffff; }
.btn-action.gold:hover { background: #b07c2c; color: #ffffff; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.note { font-size: 12px; color: var(--ink-light); margin-top: 12px; }
.note a { color: var(--navy); }


/* ── Forms ── */
.form-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.form-control, .form-select { font-size: 14px; border-color: var(--border); border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus { border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(45,74,102,.15); }
.form-check-label { font-size: 13px; }
.hint { font-size: 12px; color: var(--ink-light); margin-top: 6px; }
.panel p { font-size: 13px; color: var(--ink-mid); }
.panel p a, .hint a { color: var(--navy); }
.btn-action:disabled { opacity: .6; cursor: default; }
.panel { scroll-margin-top: 80px; }
/* ── Loading, empty states ── */
.loading { display: flex; justify-content: center; padding: 48px 0; }
.loading-spinner { width: 2.4rem; height: 2.4rem; border: 3px solid var(--border); border-top-color: var(--navy-mid); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 36px 16px; }
.empty i { font-size: 2.2rem; color: var(--ink-light); margin-bottom: 12px; }
.empty h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.25rem; color: var(--navy); }
.empty p { max-width: 460px; margin: 0 auto 16px; }
.links-list { list-style: none; padding: 0; margin: 0; }
.links-list li { padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.links-list li:first-child { border-top: 0; padding-top: 0; }
.links-list a { color: var(--navy); text-decoration: none; }
.links-list a:hover { text-decoration: underline; }

/* ── Notification ── */
.notification {
  position: fixed; top: 20px; right: 20px; padding: 12px 18px; border-radius: var(--radius-md);
  color: white; font-weight: 600; font-size: 13px; z-index: 9999; opacity: 0;
  transform: translateY(-8px); transition: all .25s ease; box-shadow: var(--shadow-md); pointer-events: none;
}
.notification.show { opacity: 1; transform: translateY(0); }
.notification.error { background: #c53030; }
.notification.success { background: var(--green); }
.notification.info { background: var(--navy-mid); }

/* ── Footer ── */
.footer { background: var(--white); border-top: 1px solid var(--border-soft); padding: 28px 0; margin-top: 8px; }
.footer-links a { font-size: 12px; color: var(--ink-light); text-decoration: none; margin: 0 10px; }
.footer-links a:hover { color: var(--navy); }
.footer-copy { font-size: 11px; color: var(--ink-light); margin-top: 8px; }

@media (max-width: 991px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .page-header h1 { font-size: 1.5rem; }
  .nav-username { display: none; }
  .footer-links a { display: inline-block; margin: 4px 8px; }
}
