/* NetEdgeIQ University — shared stylesheet */

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

:root {
  --brand:       #0f4c8a;
  --brand-dark:  #0a3568;
  --brand-light: #e8f0fb;
  --accent:      #2563eb;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --bg:          #f8fafc;
  --white:       #ffffff;
  --success:     #16a34a;
  --warning:     #d97706;
  --danger:      #dc2626;
  --sidebar-w:   260px;
  --header-h:    56px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.site-header .logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}
.site-header .logo span {
  font-weight: 300;
  opacity: .8;
}
.site-header .tagline {
  font-size: 12px;
  opacity: .65;
  margin-left: 4px;
}

/* ── Layout ── */
.layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  overflow-y: auto;
  padding: 20px 0;
}
.sidebar-section {
  margin-bottom: 4px;
}
.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 8px 20px 4px;
}
.sidebar a {
  display: block;
  padding: 6px 20px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .1s, border-color .1s;
}
.sidebar a:hover {
  background: var(--bg);
  color: var(--accent);
}
.sidebar a.active {
  background: var(--brand-light);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.sidebar a.section-home {
  font-weight: 600;
}

/* ── Main content ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 36px 48px 60px;
  max-width: 860px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: .4; }

/* ── Page title ── */
h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}
.page-intro {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

/* ── Headings ── */
h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}
h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 8px;
}

/* ── Paragraphs / lists ── */
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 14px 20px; }
li { margin-bottom: 4px; }

/* ── Steps ── */
.steps { counter-reset: step; list-style: none; margin-left: 0; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}
.steps li .step-body { flex: 1; padding-top: 3px; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}
th {
  background: var(--bg);
  text-align: left;
  padding: 9px 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}
tr:nth-child(even) td { background: #fafafa; }

/* ── Code / inline ── */
code {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: #0f4c8a;
}
pre {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 20px;
}
pre code { background: none; border: none; padding: 0; font-size: 13px; color: var(--text); }

/* ── Status flow ── */
.flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}
.flow-state {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.flow-state.open     { border-color: #64748b; color: #475569; }
.flow-state.approved { border-color: var(--success); color: var(--success); }
.flow-state.rejected { border-color: var(--danger); color: var(--danger); }
.flow-state.current  { background: var(--brand); border-color: var(--brand); color: var(--white); }
.flow-arrow { color: var(--text-muted); font-size: 16px; }

/* ── Callout boxes ── */
.callout {
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-left: 4px solid;
  font-size: 14px;
}
.callout-info  { background: #eff6ff; border-color: var(--accent); }
.callout-note  { background: #fffbeb; border-color: var(--warning); }
.callout-admin { background: #f0fdf4; border-color: var(--success); }
.callout strong { display: block; margin-bottom: 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.callout-info  strong { color: var(--accent); }
.callout-note  strong { color: var(--warning); }
.callout-admin strong { color: var(--success); }

/* ── Card grid (for section index pages) ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  display: block;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37,99,235,.12);
}
.card .card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 6px;
}
.card .card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Section home list ── */
.guide-list { list-style: none; margin: 0; }
.guide-list li {
  border-bottom: 1px solid var(--border);
}
.guide-list li:last-child { border-bottom: none; }
.guide-list a {
  display: flex;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: color .1s;
}
.guide-list a:hover { color: var(--accent); }
.guide-list .guide-num {
  width: 28px; height: 28px;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.guide-list .guide-info .guide-title { font-weight: 600; }
.guide-list .guide-info .guide-desc { font-size: 13px; color: var(--text-muted); }

/* ── Next / prev nav ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.page-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.page-nav a:hover { text-decoration: underline; }
.page-nav .prev::before { content: "← "; }
.page-nav .next::after  { content: " →"; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 24px 20px 48px; }
}
