/* Supply Chain Learning Center - dashboard UI standard */
:root {
  --pico-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --bg: #f8fafc;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --text: #020617;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --red: #dc2626;
  --amber: #d97706;
  --green: #059669;
  --purple: #7c3aed;
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); line-height: 1.65; }
button, textarea { font-family: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 284px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 10px 18px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #0f172a; color: #fff; font-weight: 800; letter-spacing: -.04em; }
.brand strong { display: block; line-height: 1.1; font-size: 15px; }
.brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.nav-label { margin: 18px 10px 8px; color: #94a3b8; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.navbtn { width: 100%; margin: 2px 0; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #334155; text-align: left; font-size: 14px; cursor: pointer; transition: .16s ease; }
.navbtn:hover { background: #f1f5f9; color: #0f172a; }
.navbtn.active { background: #0f172a; color: #fff; font-weight: 700; box-shadow: 0 10px 24px rgba(15, 23, 42, .16); }

.content-shell { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 14px 24px; background: rgba(248, 250, 252, .88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-pill { min-width: 260px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #94a3b8; font-size: 13px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1e40af; font-size: 12px; font-weight: 800; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: #2563eb; }
main { width: min(1180px, 100%); margin: 0 auto; padding: 24px; }
.hidden { display: none !important; }

.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card, .panel-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 10px 30px rgba(15,23,42,.05); }
.metric-card { padding: 16px; }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { display: block; margin: 6px 0 2px; font-size: 28px; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); }
.page { margin-bottom: 18px; padding: clamp(18px, 2vw, 24px); }
.page > h2:first-child { margin-bottom: 12px; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.055em; }
.page > p, .muted { color: var(--muted); }
.small { color: var(--muted); font-size: 13px; }

/* Existing content components, restyled to dashboard standard */
.grid, .grid3 { display: grid; gap: 14px; margin: 14px 0; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card-soft); }
.mini strong { display: block; margin-bottom: 6px; color: #0f172a; }
.tag, .pill { display: inline-flex; align-items: center; gap: 4px; margin: 3px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.5; vertical-align: middle; }
.tag { background: #dbeafe; color: #1e40af; }
.p1 { background: #fee2e2; color: #991b1b; }
.p2 { background: #fef3c7; color: #92400e; }
.p3 { background: #dcfce7; color: #166534; }
.p4 { background: #ede9fe; color: #5b21b6; }
.p5 { background: #dbeafe; color: #1e40af; }
.todo { margin: 12px 0; padding: 12px 14px; border-left: 5px solid var(--blue); border-radius: 14px; background: #eff6ff; color: #1e3a8a; }
.risk { border-left-color: var(--red); background: #fef2f2; color: #991b1b; }
.ok { border-left-color: var(--green); background: #ecfdf5; color: #166534; }
.warn { border-left-color: var(--amber); background: #fffbeb; color: #92400e; }
ul, ol { padding-left: 1.2rem; }
li { margin: .25rem 0; }
table { width: 100%; border-collapse: collapse; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
th { background: #f8fafc; color: #0f172a; }
details { margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
details[open] { background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.05); }
summary { cursor: pointer; font-weight: 800; color: #0f172a; }
textarea { width: 100%; min-height: 180px; margin-top: 12px; border-radius: 14px !important; background: #fff !important; }
a { color: var(--blue); }

/* Home page gets a stronger dashboard feel without changing content */
#home { background: radial-gradient(circle at top right, #dbeafe 0, transparent 34%), #fff; }
#home > h2:first-child::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 12px; border-radius: 99px; background: #0f172a; }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 10px; }
  .nav-label { grid-column: 1 / -1; }
  .topbar { position: relative; align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .search-pill { min-width: 0; flex: 1 1 240px; }
  .overview-grid, .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  main { padding: 14px; }
  .overview-grid, .grid, .grid3, .side-nav { grid-template-columns: 1fr; }
  .page { border-radius: 15px; }
  .topbar { padding: 14px; }
}
