/* DM-XTech UK Ltd, Restructuring Document Stylesheet */

:root {
  --navy: #0B1E3D;
  --navy-mid: #1E3A5F;
  --gold: #C8952A;
  --gold-light: #E8B84B;
  --bg: #F5F7FA;
  --bg-white: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #5A6478;
  --border: #D1DBE8;
  --success: #1B7A4A;
  --warning: #B45309;
  --danger: #991B1B;
  --info: #1E40AF;
  --sidebar-width: 280px;
}

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

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--navy-mid);
  text-decoration: none;
}
a:hover { color: var(--gold); }

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar Navigation ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--navy);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.sidebar-brand-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

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

.sidebar-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 12px 24px 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 24px;
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-left-color: var(--gold-light);
}

.sidebar-nav a.active {
  color: #fff;
  background: rgba(200,149,42,0.15);
  border-left-color: var(--gold);
  font-weight: 600;
}

.sidebar-nav a .nav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  margin-top: 1px;
  flex-shrink: 0;
}

.sidebar-nav a.active .nav-num {
  background: var(--gold);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
}

.sidebar-footer strong {
  display: block;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}

/* ── Main Content ── */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

/* ── Page Header ── */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 52px 56px 44px;
  border-bottom: 4px solid var(--gold);
}

.page-header-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.page-header h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.page-header .subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  max-width: 700px;
  line-height: 1.6;
}

.page-header-meta {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.meta-value {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

/* ── Content Body ── */
.content {
  padding: 48px 56px;
  max-width: 960px;
}

.content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.01em;
}

.content h2:first-child { margin-top: 0; }

.content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 28px 0 10px;
}

.content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-mid);
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.content p {
  margin-bottom: 16px;
  color: #2D3748;
  font-size: 15px;
}

.content ul, .content ol {
  margin: 12px 0 16px 20px;
  color: #2D3748;
  font-size: 15px;
}

.content li {
  margin-bottom: 8px;
  padding-left: 4px;
}

/* ── Summary Box ── */
.summary-box {
  background: linear-gradient(135deg, #EFF4FB 0%, #E8F0F8 100%);
  border: 1px solid #BFD3EA;
  border-left: 5px solid var(--navy-mid);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.summary-box .summary-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-mid);
  margin-bottom: 8px;
}

.summary-box p {
  font-size: 14.5px;
  color: #1E3A5F;
  margin: 0;
  font-style: italic;
  line-height: 1.65;
}

/* ── Callout Boxes ── */
.callout {
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14.5px;
}

.callout-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout-body p strong,
.callout-body li strong {
  display: inline;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
  margin: 0;
  font-weight: 700;
}

.callout-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.callout.correction {
  background: #FEF2F2;
  border: 1px solid #FECACA;
}
.callout.correction .callout-body strong { color: var(--danger); }
.callout.correction p { color: #7F1D1D; }

.callout.verified {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}
.callout.verified .callout-body strong { color: var(--success); }
.callout.verified p { color: #14532D; }

.callout.recommendation {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
}
.callout.recommendation .callout-body strong { color: var(--warning); }
.callout.recommendation p { color: #7C2D12; }

.callout.info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
}
.callout.info .callout-body strong { color: var(--info); }
.callout.info p { color: #1E3A8A; }

/* ── Phase Cards ── */
.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.phase-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--navy);
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.phase-card.gold-top { border-top-color: var(--gold); }
.phase-card.green-top { border-top-color: var(--success); }
.phase-card.blue-top { border-top-color: var(--info); }

.phase-card .phase-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.phase-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}

.phase-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.phase-card ul {
  font-size: 13.5px;
  color: #3A4A5C;
  margin: 8px 0 0 16px;
}

.phase-card li {
  margin-bottom: 5px;
}

/* ── Diagram Image ── */
.diagram-wrap {
  margin: 28px 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.diagram-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-caption {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: #F8FAFB;
  border-top: 1px solid var(--border);
  font-style: italic;
  text-align: center;
}

/* ── Checklist / Step List ── */
.step-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.step-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}

.step-list li:last-child { border-bottom: none; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 3px;
}

.step-text span {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Stat Cards (index page) ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px 0;
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.data-table th {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: #2D3748;
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #F8FAFB; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-green { background: #DCFCE7; color: #166534; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-navy { background: #E0E7FF; color: #312E81; }

/* ── Next Page Nav ── */
.page-nav {
  margin: 48px 0 0;
  padding: 24px 0 0;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s;
}

.page-nav a:hover { background: var(--navy-mid); color: #fff; }
.page-nav a.back { background: var(--bg-white); color: var(--navy); border: 1px solid var(--border); }
.page-nav a.back:hover { background: var(--bg); }
.page-nav .spacer { flex: 1; }

/* ── Disclaimer ── */
.disclaimer {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 12.5px;
  color: #78350F;
  margin: 28px 0;
  line-height: 1.6;
}

.disclaimer strong { color: #92400E; }

/* ── Horizontal Rule ── */
.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .page-header { padding: 32px 24px 28px; }
  .page-header h1 { font-size: 24px; }
  .content { padding: 28px 24px; }
  .phase-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .page-nav { display: none; }
  .page-header { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
