/* SEO Fixlist — page shells: public site, auth, app, admin */

/* ---------- Public site ---------- */
.public-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 242, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.public-nav {
  max-width: var(--public-max); margin: 0 auto;
  display: flex; align-items: center; gap: var(--s-6);
  padding: 0 var(--s-5); height: 64px;
}
.public-nav .nav-links { display: flex; gap: var(--s-5); flex: 1; }
.public-nav .nav-links a { font-size: var(--fs-13); font-weight: 500; color: var(--slate); }
.public-nav .nav-links a:hover, .public-nav .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.public-nav .nav-actions { display: flex; align-items: center; gap: var(--s-2); }
.nav-burger { display: none; }

.mobile-nav {
  display: none; border-top: 1px solid var(--border);
  background: var(--surface); padding: var(--s-3) var(--s-5) var(--s-4);
}
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: var(--s-2) 0; font-size: var(--fs-14); font-weight: 500; color: var(--ink); }
.mobile-nav .nav-actions { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.mobile-nav .nav-actions .btn { flex: 1; }

.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; color: var(--ink); }
.brand .brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.brand .brand-mark svg { width: 15px; height: 15px; }
.brand .brand-name { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-15); letter-spacing: -0.01em; }
.brand .brand-name span { color: var(--accent-deep); }

.section { max-width: var(--public-max); margin: 0 auto; padding: var(--s-16) var(--s-5); }
.section-tight { padding-top: var(--s-10); padding-bottom: var(--s-10); }
.section-head { max-width: 620px; margin-bottom: var(--s-8); }
.section-head .kicker {
  font-size: var(--fs-12); font-weight: 600; color: var(--accent-deep);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: var(--s-2);
}
.section-head h2 { font-size: var(--fs-28); }
.section-head p { color: var(--slate); font-size: var(--fs-15); }

.public-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: var(--s-8); }
.footer-grid {
  max-width: var(--public-max); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-8);
  padding: var(--s-10) var(--s-5);
}
.footer-grid h4 { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate); font-family: var(--font-ui); font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--s-2); }
.footer-grid a { font-size: var(--fs-13); color: var(--slate); }
.footer-grid a:hover { color: var(--ink); }
.footer-tagline { font-size: var(--fs-13); color: var(--slate); max-width: 260px; margin-top: var(--s-3); }
.footer-bottom {
  max-width: var(--public-max); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-4) var(--s-5); border-top: 1px solid var(--row-line);
  font-size: var(--fs-12); color: var(--muted);
}

/* ---------- Auth ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--s-6) var(--s-4);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-8);
}
.auth-card h1 { font-size: var(--fs-20); margin-bottom: var(--s-1); }
.auth-card .auth-sub { font-size: var(--fs-13); color: var(--slate); margin-bottom: var(--s-6); }
.auth-foot { margin-top: var(--s-5); text-align: center; font-size: var(--fs-13); color: var(--slate); }
.auth-brand { margin-bottom: var(--s-6); }
.auth-note {
  margin-top: var(--s-4); font-size: var(--fs-11); color: var(--muted);
  text-align: center; max-width: 400px;
}

/* ---------- App shell ---------- */
.app-body { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: var(--z-drawer);
  padding: var(--s-4) var(--s-3);
}
.sidebar .brand { padding: 0 var(--s-2); margin-bottom: var(--s-6); }
.sidebar nav { flex: 1; overflow-y: auto; }
.sidebar .nav-group-label {
  font-size: var(--fs-11); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); padding: var(--s-4) var(--s-2) var(--s-1);
}
.side-link {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-13); font-weight: 500; color: var(--slate);
  padding: var(--s-2) var(--s-2); border-radius: var(--r-sm);
  margin-bottom: 1px; text-decoration: none !important;
}
.side-link .icon { width: 16px; height: 16px; flex: none; }
.side-link:hover { background: var(--canvas); color: var(--ink); }
.side-link.active { background: var(--accent-tint); color: var(--accent-deep); }
.side-link .count {
  margin-left: auto; font-size: var(--fs-11); font-weight: 600;
  background: var(--crit-bg); color: var(--crit-text);
  padding: 1px 7px; border-radius: var(--r-full);
}

.sidebar-foot { border-top: 1px solid var(--row-line); padding-top: var(--s-3); }
.credit-summary {
  background: var(--canvas); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--s-3); margin-bottom: var(--s-3); font-size: var(--fs-12);
}
.credit-summary .flex-between { margin-bottom: var(--s-2); }
.user-chip { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2); }
.user-chip .user-name { font-size: var(--fs-12); font-weight: 500; line-height: 1.2; }
.user-chip .user-plan { font-size: var(--fs-11); color: var(--slate); }

.app-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--s-6);
  background: rgba(246, 245, 242, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-family: var(--font-display); font-size: var(--fs-16); font-weight: 600; margin: 0; }
.topbar .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.credit-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-12); font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 6px 10px; text-decoration: none !important;
}
.credit-pill .icon { width: 14px; height: 14px; color: var(--accent); }
.credit-pill.low { border-color: var(--high-border); background: var(--high-bg); color: var(--high-text); }
.credit-pill.low .icon { color: var(--high); }
.menu-btn { display: none; }

.notif-btn { position: relative; }
.notif-btn .notif-dot {
  position: absolute; top: 5px; right: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--crit); border: 1.5px solid var(--surface);
}

.page {
  flex: 1; width: 100%; max-width: var(--content-max);
  margin: 0 auto; padding: var(--s-6);
}
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.page-head h2 { margin-bottom: var(--s-1); font-size: var(--fs-20); }
.page-head .page-sub { font-size: var(--fs-13); color: var(--slate); }
.page-head .page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* Grid helpers */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-4); }

/* Sidebar drawer (mobile) */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(20, 32, 46, 0.45); z-index: calc(var(--z-drawer) - 1);
}
body.drawer-open .sidebar-overlay { display: block; }

/* ---------- Admin accents ---------- */
.admin-flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-11); font-weight: 600;
  background: var(--ink); color: #fff;
  padding: 3px 9px; border-radius: var(--r-full);
}
