/* ═══════════════════════════════════════════════════════════════════
   Hub chrome — loaded on every Publisher Hub page.
   Body class `hub-page` opts a page into this stylesheet's rules.
   Owns: shell layout, sidebar, topbar, body container, common primitives
   (cards, pills, buttons, section headings, loading states).
   Page-specific styling (master-detail grids, title row lists, forms,
   etc.) stays inline in each page.
   ═══════════════════════════════════════════════════════════════════ */

html,body{background:#f5f5f5}
body.hub-page{
  background:#f5f5f5;color:#111;
  font-family:'Instrument Sans',-apple-system,BlinkMacSystemFont,sans-serif;
}
body.hub-page > header{display:none} /* hide marketing nav on Hub pages */

/* ── Shell ──────────────────────────────────────────────────────── */
.hub-shell{
  display:flex;min-height:100vh;
  max-width:1740px;margin:0 auto;
  background:#fff;
  box-shadow:0 0 0 .5px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.04);
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.hub-sidebar{
  width:240px;background:#fafafa;border-right:.5px solid rgba(0,0,0,.08);
  flex-shrink:0;display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh;z-index:50;
  align-self:flex-start;
}
.hub-brand{padding:26px 22px 22px;border-bottom:.5px solid rgba(0,0,0,.08);display:flex;flex-direction:column;gap:4px}
.hub-brand-name{font-family:'Cormorant Garamond',Georgia,serif;font-size:22px;font-weight:500;color:#111;letter-spacing:-.3px;line-height:1}
.hub-brand-sub{font-size:9.5px;letter-spacing:2px;color:#888;text-transform:uppercase;font-weight:500}

.hub-nav{padding:12px 0;flex:1;overflow-y:auto}
.hub-nav a, .hub-nav button{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:11px 22px 11px 20px;font-size:13.5px;color:#555;
  background:none;border:none;cursor:pointer;font-family:inherit;text-align:left;
  border-left:2px solid transparent;transition:all .15s;
  text-decoration:none;
}
.hub-nav a:hover, .hub-nav button:hover{color:#111;background:rgba(0,0,0,.03)}
.hub-nav a.active, .hub-nav button.active{color:#111;border-left-color:#A7012A;background:rgba(167,1,42,.05)}
.hub-nav svg{width:15px;height:15px;flex-shrink:0;stroke-width:1.6;opacity:.6}
.hub-nav a.active svg, .hub-nav button.active svg{opacity:1;color:#A7012A}
.hub-nav a.hub-nav-sub{padding-left:42px;font-size:12.5px;color:#777}
.hub-nav a.hub-nav-sub svg{width:13px;height:13px;opacity:.5}
.hub-nav a.hub-nav-sub:hover{color:#111}
.hub-nav a.hub-nav-sub.active{padding-left:42px}
.hub-nav-badge{margin-left:auto;background:#A7012A;color:#fff;font-size:9.5px;font-weight:700;padding:1px 7px;border-radius:10px;min-width:18px;text-align:center}
.hub-nav-sep{height:1px;background:rgba(0,0,0,.08);margin:10px 22px}
.hub-nav-admin a{color:#a06070}
.hub-nav-admin a svg{color:#A7012A;opacity:.85}

.hub-help{padding:16px 22px;border-top:.5px solid rgba(0,0,0,.08);font-size:12px;color:#666;line-height:1.65}
.hub-help strong{color:#111;display:block;font-size:12.5px;margin-bottom:4px}
.hub-help a{color:#A7012A;text-decoration:none}

/* ── Main column ─────────────────────────────────────────────────── */
.hub-main{flex:1;min-height:100vh;display:flex;flex-direction:column;min-width:0;background:#f7f7f5}
.hub-topbar{
  border-bottom:.5px solid rgba(0,0,0,.08);background:#fff;
  position:sticky;top:0;z-index:10;
}
.hub-topbar-in{
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
  padding:18px 40px;
}
.hub-title-h1{font-family:'Cormorant Garamond',Georgia,serif;font-size:22px;font-weight:500;color:#111;letter-spacing:-.3px}
.hub-crumbs{font-size:12px;color:#888;font-family:'Instrument Sans',sans-serif}
.hub-crumbs a{color:#666;text-decoration:none}
.hub-crumbs a:hover{color:#111}
.hub-crumbs .sep{margin:0 8px;color:#ccc}
.hub-crumbs .current{color:#111}
.hub-ident{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;background:#fafafa;border:.5px solid rgba(0,0,0,.1);font-size:11.5px;color:#555;font-family:'Instrument Sans',sans-serif;letter-spacing:.5px}
.hub-ident .ident-dot{width:6px;height:6px;background:#2a8a4e;border-radius:50%}

.hub-body{padding:28px 40px 60px;flex:1}

/* ── Generic card ────────────────────────────────────────────────── */
.hub-card{background:#fff;border:.5px solid rgba(0,0,0,.08);box-shadow:0 1px 2px rgba(0,0,0,.03);padding:22px 24px;border-radius:2px;min-width:0}
.hub-card-label{font-size:10px;letter-spacing:1.8px;text-transform:uppercase;color:#A7012A;font-weight:600;margin-bottom:14px;font-family:'Instrument Sans',sans-serif;display:flex;align-items:center;justify-content:space-between;gap:10px}
.hub-card-count{color:#888;font-weight:500;letter-spacing:.3px;font-size:11px}

/* ── Status pills ────────────────────────────────────────────────── */
.hub-pill{display:inline-block;padding:3px 10px;font-family:'Instrument Sans',sans-serif;font-size:9.5px;letter-spacing:.5px;text-transform:uppercase;font-weight:600;border:.5px solid;white-space:nowrap}
.hp-draft{color:#666;background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.12)}
.hp-warn{color:#8a5a10;background:rgba(200,140,40,.12);border-color:rgba(200,140,40,.3)}
.hp-red{color:#A7012A;background:rgba(167,1,42,.08);border-color:rgba(167,1,42,.25)}
.hp-info{color:#1e5a9e;background:rgba(74,111,165,.1);border-color:rgba(74,111,165,.3)}
.hp-green{color:#1d6b3a;background:rgba(45,122,67,.1);border-color:rgba(45,122,67,.3)}

/* ── Buttons ─────────────────────────────────────────────────────── */
.hub-btn-primary{display:inline-block;padding:12px 16px;background:#A7012A;color:#fff;border:none;font-size:12px;letter-spacing:.3px;font-weight:600;text-align:center;cursor:pointer;font-family:'Instrument Sans',sans-serif;text-decoration:none;transition:background .15s}
.hub-btn-primary:hover{background:#8f0124}
.hub-btn-primary:disabled,.hub-btn-ghost:disabled{opacity:.45;cursor:not-allowed;pointer-events:none}
.hub-btn-ghost{display:inline-block;padding:9px 14px;background:#fff;color:#333;border:.5px solid rgba(0,0,0,.15);font-size:11.5px;letter-spacing:.3px;font-weight:500;cursor:pointer;font-family:'Instrument Sans',sans-serif;text-decoration:none;transition:all .15s}
.hub-btn-ghost:hover{border-color:#A7012A;color:#A7012A;background:rgba(167,1,42,.03)}

/* ── Section header (page-level title for non-dashboard sections) ── */
.hub-section-hd{margin-bottom:18px}
.hub-section-eyebrow{font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#A7012A;font-weight:600;margin-bottom:8px;font-family:'Instrument Sans',sans-serif}
.hub-section-h1{font-family:'Cormorant Garamond',Georgia,serif;font-size:28px;font-weight:400;color:#111;letter-spacing:-.4px;line-height:1.15;margin-bottom:6px}
.hub-section-sub{font-size:13.5px;color:#555;line-height:1.65;max-width:620px}

/* ── Loading state ────────────────────────────────────────────────── */
.hub-skel{padding:40px 20px;text-align:center;color:#999;font-size:13px;font-family:'Instrument Sans',sans-serif}

/* ── Responsive: collapse sidebar to top banner under 900px ──────── */
@media(max-width:900px){
  .hub-shell{flex-direction:column}
  .hub-sidebar{position:relative;width:100%;height:auto;border-right:none;border-bottom:.5px solid rgba(0,0,0,.08)}
  .hub-topbar-in{padding:14px 24px}
  .hub-body{padding:20px 24px 48px}
}
