/* Shared brand tokens and chrome (hub, cards, top bar, footer) used across
   every page. Module pages keep their own internal UI beyond this. */
:root{
  --brand-cream:#F1ECE2; --brand-card:#FFFFFF; --brand-card-muted:#F7F3EA;
  --brand-line:#E4DDCC; --brand-navy:#16294B; --brand-navy-2:#24406B;
  --brand-ink:#2B2A28; --brand-muted:#8C8676; --brand-muted-2:#B4AE9E;
  --brand-live:#1F7A5C; --brand-live-soft:#E1EFE7; --brand-progress:#B98900; --brand-progress-soft:#F3E9CE;
  --brand-icon-bg:#E7EEF1; --brand-icon-fg:#5C7A8A;
  color-scheme:light;
}
.brand-body{margin:0;background:var(--brand-cream);color:var(--brand-ink);font-family:"Public Sans",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.brand-serif{font-family:"Playfair Display","Georgia",serif}
.brand-eyebrow{font-size:.74rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--brand-navy-2)}

.brand-topbar{display:flex;align-items:center;justify-content:space-between;padding:16px 28px;border-bottom:1px solid var(--brand-line);background:var(--brand-card)}
.brand-topbar .wordmark{font-weight:700;color:var(--brand-navy);letter-spacing:.02em}
.brand-topbar .crumb{color:var(--brand-muted);margin-left:10px;padding-left:10px;border-left:1px solid var(--brand-line)}
.brand-topbar .back{color:var(--brand-navy-2);text-decoration:none;font-size:.88rem;font-weight:600;border:1px solid var(--brand-line);border-radius:7px;padding:7px 12px;background:var(--brand-card)}
.brand-topbar .back:hover{border-color:var(--brand-navy-2)}

.brand-page{max-width:1200px;margin:0 auto;padding:40px 28px 60px}
.brand-h1{font-size:2.1rem;margin:6px 0 0;color:var(--brand-navy)}

.brand-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:28px}
.brand-card{background:var(--brand-card);border:1px solid var(--brand-line);border-radius:12px;padding:20px 22px;text-decoration:none;color:inherit;display:block;transition:box-shadow .15s,border-color .15s}
.brand-card.is-live:hover{box-shadow:0 6px 20px rgba(22,41,75,.08);border-color:var(--brand-navy-2)}
.brand-card.is-disabled{background:var(--brand-card-muted);color:var(--brand-muted);cursor:default}
.brand-card-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.brand-icon{width:40px;height:40px;border-radius:50%;background:var(--brand-icon-bg);color:var(--brand-icon-fg);display:flex;align-items:center;justify-content:center;flex:none}
.brand-card.is-disabled .brand-icon{background:#EFE9DC;color:var(--brand-muted-2)}
.brand-card-eyebrow{font-size:.7rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--brand-muted)}
.brand-card-title{font-family:"Playfair Display","Georgia",serif;font-weight:700;font-size:1.2rem;color:var(--brand-navy);margin-top:2px}
.brand-card.is-disabled .brand-card-title{color:var(--brand-muted)}
.brand-card-desc{color:var(--brand-muted);font-size:.9rem;margin:0 0 16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand-card-foot{display:flex;align-items:center;justify-content:space-between;font-size:.85rem}
.brand-status{display:inline-flex;align-items:center;gap:7px;font-weight:600}
.brand-status .dot{width:7px;height:7px;border-radius:50%;background:var(--brand-muted-2)}
.brand-status.live{color:var(--brand-live)}
.brand-status.live .dot{background:var(--brand-live)}
.brand-status.progress{color:var(--brand-progress)}
.brand-status.progress .dot{background:var(--brand-progress)}
.brand-arrow{color:var(--brand-navy-2)}

.brand-footer{max-width:1200px;margin:36px auto 0;padding:18px 28px 0;border-top:1px solid var(--brand-line);display:flex;align-items:center;justify-content:space-between}
.brand-who{display:flex;align-items:center;gap:10px;color:var(--brand-ink);font-size:.9rem}
.brand-avatar{width:28px;height:28px;border-radius:50%;background:var(--brand-navy);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.78rem;font-weight:700}
.brand-signout{color:var(--brand-muted);text-decoration:none;font-size:.85rem;margin-left:10px;border-left:1px solid var(--brand-line);padding-left:10px}
.brand-signout:hover{color:var(--brand-navy)}
.brand-footer .brand-wordmark2{color:var(--brand-muted);font-size:.9rem}

@media (max-width:900px){
  .brand-grid{grid-template-columns:1fr}
  .brand-page{padding:28px 18px 40px}
  .brand-topbar{padding:14px 18px}
}

/* Persistent sidebar shell (shared/nav.js populates #appSidebar) */
.app-shell{display:flex;align-items:stretch;min-height:100dvh}
.app-sidebar{width:232px;flex:0 0 232px;background:var(--brand-navy);color:#fff;display:flex;flex-direction:column;padding:22px 0 0;position:sticky;top:0;height:100dvh;overflow-y:auto}
.app-sidebar .app-brand{padding:0 22px 22px;font-weight:700;letter-spacing:.02em;font-size:1.05rem}
.app-nav{flex:1;display:flex;flex-direction:column;gap:2px;padding:4px 12px;align-self:flex-start;width:100%}
.app-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:7px;color:rgba(255,255,255,.72);text-decoration:none;font-size:.88rem;font-weight:600}
.app-nav a svg{flex:none;opacity:.85}
.app-nav a:hover{background:rgba(255,255,255,.08);color:#fff}
.app-nav a.active{background:rgba(255,255,255,.16);color:#fff}
.app-nav a.active svg{opacity:1}
.app-sidebar-foot{padding:14px 16px;border-top:1px solid rgba(255,255,255,.16);font-size:.82rem;color:rgba(255,255,255,.85)}
.app-sidebar-who{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.app-sidebar-avatar{width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700;flex:none}
.app-sidebar-email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem}
.app-signout{background:none;border:none;color:rgba(255,255,255,.65);font-size:.8rem;cursor:pointer;padding:0;text-decoration:underline}
.app-signout:hover{color:#fff}
.app-main{flex:1;min-width:0}

@media (max-width:860px){
  .app-shell{flex-direction:column}
  .app-sidebar{width:100%;flex:0 0 auto;flex-direction:row;align-items:center;padding:10px 14px;gap:10px;height:auto;overflow-x:auto;overflow-y:visible;z-index:5}
  .app-sidebar .app-brand{padding:0;flex:none;font-size:.95rem;white-space:nowrap}
  .app-nav{flex-direction:row;padding:0;gap:4px}
  .app-nav a{white-space:nowrap;padding:7px 10px}
  .app-nav a span.label{display:none}
  .app-sidebar-foot{border-top:none;padding:0;flex:none;display:flex;align-items:center;gap:8px}
  .app-sidebar-who{margin-bottom:0}
  .app-sidebar-email{display:none}
}
