/* ── MBS Attendance Documentation — Stylesheet ───────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy:           #1a3050;
  --navy-hover:     #243f65;
  --blue:           #1e50a0;
  --blue-light:     #2563eb;
  --green:          #15803d;
  --green-bg:       #f0fdf4;
  --green-border:   #bbf7d0;
  --amber:          #92400e;
  --amber-bg:       #fffbeb;
  --amber-border:   #fde68a;
  --red:            #991b1b;
  --red-bg:         #fef2f2;
  --red-border:     #fecaca;
  --bg:             #f5f7fa;
  --surface:        #ffffff;
  --border:         #e2e8f0;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --sidebar-width:  260px;
  --topbar-height:  64px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: var(--navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.sidebar-logo .logo-placeholder {
  height: 36px;
  display: flex;
  align-items: center;
}

.sidebar-logo .brand-name {
  font-size: .8rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-logo .brand-sub {
  font-size: .7rem;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.sidebar-nav {
  padding: 16px 0 24px;
  flex: 1;
}

.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,0.35);
  padding: 16px 20px 6px;
}

.nav-section-label:first-child {
  padding-top: 8px;
}

.sidebar-nav a {
  display: block;
  padding: 7px 20px;
  font-size: .875rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}

.sidebar-nav a.active {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
  border-left-color: #4a90d9;
}

/* ── Main wrapper ────────────────────────────────────────────────────────── */

.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */

.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.topbar-logo img {
  height: 32px;
  width: auto;
}

/* placeholder shown when no logo src is set */
.topbar-logo .logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.topbar-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Content ─────────────────────────────────────────────────────────────── */

.content {
  flex: 1;
  padding: 40px 40px 60px;
  max-width: 900px;
}

.page-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.page-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* ── Typography ──────────────────────────────────────────────────────────── */

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}

p { margin-bottom: 12px; }

p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

ul, ol {
  padding-left: 24px;
  margin-bottom: 14px;
}

li { margin-bottom: 5px; }

/* ── Info boxes ──────────────────────────────────────────────────────────── */

.box {
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  border-left: 4px solid;
  font-size: .925rem;
}

.box p:last-child { margin-bottom: 0; }

.box-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.box-tip {
  background: var(--green-bg);
  border-color: var(--green);
  color: #14532d;
}

.box-tip .box-label { color: var(--green); }

.box-warn {
  background: var(--amber-bg);
  border-color: #d97706;
  color: var(--amber);
}

.box-warn .box-label { color: #d97706; }

.box-important {
  background: var(--red-bg);
  border-color: #dc2626;
  color: var(--red);
}

.box-important .box-label { color: #dc2626; }

.box-info {
  background: #eff6ff;
  border-color: var(--blue);
  color: #1e3a8a;
}

.box-info .box-label { color: var(--blue); }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

.card h3 { margin-top: 0; }

/* ── Tables ──────────────────────────────────────────────────────────────── */

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: .9rem;
}

.doc-table th {
  background: var(--navy);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.doc-table th:first-child { border-radius: 6px 0 0 0; }
.doc-table th:last-child  { border-radius: 0 6px 0 0; }

.doc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.doc-table tr:last-child td { border-bottom: none; }

.doc-table tr:nth-child(even) td { background: var(--bg); }

/* ── Steps ───────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.steps li::before {
  content: counter(step-counter);
  background: var(--blue);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Tags / badges ───────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-navy   { background: #dde6f5; color: #1a3050; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 40px;
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--surface);
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--blue); }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-wrapper { margin-left: 0; }
  .content { padding: 24px 20px 40px; }
  .topbar { padding: 0 20px; }
}
