/* ============================================================
   NewdawnSS Software Manual - Stylesheet
   NDIS & Care Management Platform
   Newdawn Support Services
   Version 1.0.0 | April 2024
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  --brand-orange: #E8672A;
  --brand-orange-light: #f4a574;
  --brand-orange-bg: #fef3ec;
  --brand-dark: #1a1f2e;
  --brand-dark-light: #252b3d;
  --brand-dark-lighter: #2f3649;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  --bg-page: #f8f9fb;
  --bg-white: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-code: #0f172a;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #2563eb;
  --info-bg: #eff6ff;

  --sidebar-width: 280px;
  --topbar-height: 60px;
  --content-max-width: 900px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --transition: 0.2s ease;
}


/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #c4541f;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}


/* ----- Layout: Sidebar + Content ----- */
.manual-layout {
  display: flex;
  min-height: 100vh;
}

.manual-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--brand-dark);
  color: var(--text-inverse);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.manual-sidebar::-webkit-scrollbar {
  width: 4px;
}

.manual-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.manual-sidebar::-webkit-scrollbar-thumb {
  background: var(--brand-dark-lighter);
  border-radius: 2px;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--brand-dark-lighter);
  flex-shrink: 0;
}

.sidebar-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sidebar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--brand-orange);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar-brand .brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.sidebar-nav .nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 20px 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  color: #c5ccdb;
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: #fff;
  background: var(--brand-dark-light);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: #fff;
  background: var(--brand-dark-light);
  border-left-color: var(--brand-orange);
}

.sidebar-nav a .nav-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 22px;
}

.sidebar-nav a.active .nav-number {
  color: var(--brand-orange);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--brand-dark-lighter);
  flex-shrink: 0;
}

.sidebar-footer .version-badge {
  font-size: 11px;
  color: var(--text-muted);
}


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


/* ----- Topbar / Search Header ----- */
.manual-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0 40px;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.topbar-breadcrumb a {
  color: var(--text-secondary);
}

.topbar-breadcrumb a:hover {
  color: var(--brand-orange);
}

.topbar-breadcrumb .separator {
  color: var(--border-medium);
  font-size: 11px;
}

.topbar-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

.topbar-search {
  position: relative;
  width: 280px;
}

.topbar-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--bg-subtle);
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
}

.topbar-search input:focus {
  border-color: var(--brand-orange);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(232, 103, 42, 0.1);
}

.topbar-search input::placeholder {
  color: var(--text-muted);
}

.topbar-search::before {
  content: "\2315";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}


/* ----- Content Area ----- */
.manual-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 40px;
}


/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}

h3 {
  font-size: 1.2rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

h4 {
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

h5 {
  font-size: 0.95rem;
  margin-top: 20px;
  margin-bottom: 6px;
}

h6 {
  font-size: 0.875rem;
  margin-top: 16px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

p {
  margin-bottom: 16px;
}

strong {
  font-weight: 600;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.chapter-header {
  margin-bottom: 32px;
}

.chapter-header .chapter-number {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-orange);
  margin-bottom: 4px;
}

.chapter-header h1 {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.chapter-header .chapter-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ----- Lists ----- */
ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

ul li, ol li {
  margin-bottom: 6px;
}

ul ul, ol ol, ul ol, ol ul {
  margin-top: 6px;
  margin-bottom: 0;
}

.check-list {
  list-style: none;
  padding-left: 0;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}


/* ----- Code Blocks ----- */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-subtle);
  color: var(--brand-orange);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

pre {
  background: var(--bg-code);
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 24px;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 13px;
}

.code-block {
  position: relative;
  margin-bottom: 24px;
}

.code-block .code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #151b2b;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.code-block .code-header .code-lang {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  color: var(--brand-orange-light);
}

.code-block pre {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 0;
}

/* Syntax Highlighting (manual classes) */
.token-keyword { color: #c084fc; }
.token-string { color: #86efac; }
.token-number { color: #fbbf24; }
.token-comment { color: #64748b; font-style: italic; }
.token-function { color: #60a5fa; }
.token-type { color: #f472b6; }
.token-variable { color: #e2e8f0; }
.token-operator { color: #f97316; }


/* ----- Tables ----- */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--bg-subtle);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

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

tbody tr:hover {
  background: var(--brand-orange-bg);
}

.table-compact th,
.table-compact td {
  padding: 6px 12px;
}


/* ----- Callout / Note / Warning Boxes ----- */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border-left: 4px solid;
  font-size: 14px;
}

.callout-title {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout-info {
  background: var(--info-bg);
  border-color: var(--info);
}

.callout-info .callout-title {
  color: var(--info);
}

.callout-success {
  background: var(--success-bg);
  border-color: var(--success);
}

.callout-success .callout-title {
  color: var(--success);
}

.callout-warning {
  background: var(--warning-bg);
  border-color: var(--warning);
}

.callout-warning .callout-title {
  color: var(--warning);
}

.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.callout-danger .callout-title {
  color: var(--danger);
}

.callout-note {
  background: #f5f3ff;
  border-color: #7c3aed;
}

.callout-note .callout-title {
  color: #7c3aed;
}

.callout-tip {
  background: var(--brand-orange-bg);
  border-color: var(--brand-orange);
}

.callout-tip .callout-title {
  color: var(--brand-orange);
}


/* ----- Badges & Tags ----- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.badge-orange { background: var(--brand-orange-bg); color: var(--brand-orange); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--info-bg); color: var(--info); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); }
.badge-dark { background: var(--brand-dark); color: var(--text-inverse); }
.badge-gray { background: var(--bg-subtle); color: var(--text-secondary); }


/* ----- Cards ----- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 14px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: 13px;
  color: var(--text-secondary);
}


/* ----- Table of Contents ----- */
.toc {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.toc-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand-orange);
  color: var(--text-primary);
}

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

.toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 0;
}

.toc-list li a {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.toc-list li a:hover {
  background: var(--brand-orange-bg);
  color: var(--brand-orange);
  text-decoration: none;
  border-left-color: var(--brand-orange);
}

.toc-list li a .toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 14px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.toc-list li a:hover .toc-number {
  background: var(--brand-orange);
  color: #fff;
}

.toc-list li a .toc-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: auto;
  padding-left: 12px;
}

.toc-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 16px 4px;
}


/* ----- Cover Page ----- */
.cover-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-height));
  padding: 40px;
}

.cover-card {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.cover-brand-icon {
  width: 72px;
  height: 72px;
  background: var(--brand-orange);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(232, 103, 42, 0.3);
}

.cover-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.1;
}

.cover-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

.cover-divider {
  width: 80px;
  height: 4px;
  background: var(--brand-orange);
  border-radius: 2px;
  margin: 0 auto 32px;
}

.cover-meta {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: left;
  background: var(--bg-subtle);
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.cover-meta .meta-row {
  display: flex;
  gap: 12px;
}

.cover-meta .meta-label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}


/* ----- Dividers & Spacing ----- */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 32px 0;
}

.spacer-sm { height: 16px; }
.spacer-md { height: 32px; }
.spacer-lg { height: 48px; }
.spacer-xl { height: 64px; }


/* ----- Steps / Procedure ----- */
.steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
  margin-bottom: 24px;
}

.steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 48px;
  padding-bottom: 24px;
  border-left: 2px solid var(--border-light);
  margin-left: 14px;
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: -15px;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--brand-orange);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.steps li .step-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}


/* ----- Key-Value Definition Lists ----- */
dl.definition-list {
  margin-bottom: 24px;
}

dl.definition-list dt {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 12px;
}

dl.definition-list dd {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 0;
  padding-left: 16px;
  border-left: 2px solid var(--border-light);
  margin-top: 4px;
}


/* ----- Keyboard Shortcuts ----- */
kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 var(--border-medium);
  color: var(--text-secondary);
}


/* ----- Figure & Caption ----- */
figure {
  margin-bottom: 24px;
}

figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}


/* ============================================================
   WIREFRAME UI COMPONENT STYLES
   Use these classes to build CSS-only representations of the
   NewdawnSS application interface within documentation.
   ============================================================ */

.wireframe-container {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.wireframe-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 8px;
  background: var(--bg-subtle);
  display: inline-block;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* Wireframe App Shell */
.wireframe-app {
  display: flex;
  min-height: 360px;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--bg-page);
}

/* Sidebar */
.wireframe-sidebar {
  width: 200px;
  background: var(--brand-dark);
  color: var(--text-inverse);
  padding: 16px 0;
  flex-shrink: 0;
  border-right: 2px dashed var(--border-medium);
}

.wireframe-sidebar-brand {
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--brand-dark-lighter);
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wireframe-sidebar-brand .ws-icon {
  width: 22px;
  height: 22px;
  background: var(--brand-orange);
  border-radius: 4px;
  flex-shrink: 0;
}

.wireframe-sidebar-item {
  padding: 6px 12px;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.wireframe-sidebar-item.active {
  color: #fff;
  background: var(--brand-dark-light);
  border-left: 3px solid var(--brand-orange);
}

.wireframe-sidebar-item .ws-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

.wireframe-sidebar-item.active .ws-dot {
  background: var(--brand-orange);
  opacity: 1;
}

/* Main area next to wireframe sidebar */
.wireframe-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.wireframe-topbar {
  height: 44px;
  background: var(--bg-white);
  border-bottom: 2px dashed var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.wireframe-topbar-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.wireframe-topbar-actions {
  display: flex;
  gap: 6px;
}

/* Content area */
.wireframe-body {
  flex: 1;
  padding: 16px;
  overflow: auto;
}

/* Cards */
.wireframe-card {
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  margin-bottom: 12px;
}

.wireframe-card-header {
  padding: 10px 14px;
  border-bottom: 1px dashed var(--border-light);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wireframe-card-body {
  padding: 14px;
}

/* Stat cards in a row */
.wireframe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wireframe-stat {
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg-white);
  text-align: center;
}

.wireframe-stat .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-orange);
}

.wireframe-stat .stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Tables */
.wireframe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.wireframe-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px dashed var(--border-light);
  background: var(--bg-subtle);
}

.wireframe-table td {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--border-light);
  color: var(--text-secondary);
}

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

/* Buttons */
.wireframe-button {
  display: inline-block;
  padding: 5px 12px;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-white);
  cursor: default;
  text-align: center;
}

.wireframe-button-primary {
  border-color: var(--brand-orange);
  background: var(--brand-orange-bg);
  color: var(--brand-orange);
}

.wireframe-button-dark {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: var(--text-inverse);
  border-style: solid;
}

.wireframe-button-sm {
  padding: 3px 8px;
  font-size: 10px;
}

/* Inputs */
.wireframe-input {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-white);
  margin-bottom: 8px;
}

.wireframe-input-group {
  margin-bottom: 12px;
}

.wireframe-input-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.wireframe-textarea {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-white);
  min-height: 60px;
  resize: none;
  margin-bottom: 8px;
}

.wireframe-select {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-white);
  margin-bottom: 8px;
}

/* Badges in wireframe context */
.wireframe-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wireframe-badge-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.wireframe-badge-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.wireframe-badge-inactive {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.wireframe-badge-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info);
}

.wireframe-badge-default {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

/* Avatar placeholder */
.wireframe-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px dashed var(--border-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.wireframe-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

/* Icon placeholder */
.wireframe-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-medium);
  display: inline-block;
  flex-shrink: 0;
}

.wireframe-icon-sm {
  width: 12px;
  height: 12px;
}

.wireframe-icon-lg {
  width: 24px;
  height: 24px;
}

/* Chart placeholder */
.wireframe-chart {
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.wireframe-chart-bar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  justify-content: center;
}

.wireframe-chart-bar .bar {
  width: 20px;
  background: var(--brand-orange);
  border-radius: 3px 3px 0 0;
  opacity: 0.6;
}

.wireframe-chart-bar .bar:nth-child(odd) {
  opacity: 0.4;
}

/* Tabs */
.wireframe-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px dashed var(--border-light);
  margin-bottom: 12px;
}

.wireframe-tab {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: default;
}

.wireframe-tab.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
}

/* Modal / Dialog */
.wireframe-modal-overlay {
  position: relative;
  background: rgba(0,0,0,0.08);
  padding: 30px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  margin-bottom: 24px;
}

.wireframe-modal {
  width: 100%;
  max-width: 400px;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
}

.wireframe-modal-header {
  padding: 14px 16px;
  border-bottom: 1px dashed var(--border-light);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wireframe-modal-body {
  padding: 16px;
}

.wireframe-modal-footer {
  padding: 12px 16px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Form row */
.wireframe-form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.wireframe-form-row > * {
  flex: 1;
}

/* Pagination */
.wireframe-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.wireframe-page {
  width: 28px;
  height: 28px;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-white);
}

.wireframe-page.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
  border-style: solid;
}

/* Toggle / Switch placeholder */
.wireframe-toggle {
  width: 32px;
  height: 18px;
  border: 1.5px dashed var(--border-medium);
  border-radius: 10px;
  display: inline-block;
  position: relative;
  background: var(--bg-subtle);
}

.wireframe-toggle.active {
  background: var(--brand-orange-bg);
  border-color: var(--brand-orange);
}

.wireframe-toggle::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-medium);
  top: 1.5px;
  left: 2px;
  transition: all var(--transition);
}

.wireframe-toggle.active::after {
  left: 14px;
  background: var(--brand-orange);
}

/* Progress bar */
.wireframe-progress {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  border: 1px dashed var(--border-light);
}

.wireframe-progress-fill {
  height: 100%;
  background: var(--brand-orange);
  border-radius: 4px;
}

/* Grid layouts for wireframes */
.wireframe-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wireframe-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.wireframe-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* Placeholder line (text line mockup) */
.wireframe-line {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  margin-bottom: 6px;
}

.wireframe-line-short { width: 40%; }
.wireframe-line-medium { width: 65%; }
.wireframe-line-long { width: 85%; }

/* Annotation callout for wireframes */
.wireframe-annotation {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--brand-orange);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

/* Notification dot */
.wireframe-notif {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

/* Divider in wireframe */
.wireframe-divider {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: 8px 0;
}

/* Breadcrumb in wireframe */
.wireframe-breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.wireframe-breadcrumb span {
  margin: 0 4px;
}

/* Search bar in wireframe */
.wireframe-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-white);
  margin-bottom: 10px;
}

/* Timeline */
.wireframe-timeline {
  padding-left: 20px;
  border-left: 2px dashed var(--border-light);
}

.wireframe-timeline-item {
  position: relative;
  padding: 0 0 16px 16px;
  font-size: 12px;
}

.wireframe-timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--brand-orange);
  border-radius: 50%;
  border: 2px solid var(--bg-white);
}

.wireframe-timeline-item .timeline-time {
  font-size: 10px;
  color: var(--text-muted);
}


/* ----- Footer ----- */
.manual-footer {
  border-top: 1px solid var(--border-light);
  padding: 20px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-white);
}

.manual-footer a {
  color: var(--brand-orange);
}

.manual-footer .footer-brand {
  font-weight: 600;
  color: var(--text-secondary);
}


/* ----- Utility Classes ----- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-orange { color: var(--brand-orange); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.hidden { display: none; }


/* ----- Mobile Sidebar Toggle ----- */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  width: 48px;
  height: 48px;
  background: var(--brand-orange);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  align-items: center;
  justify-content: center;
}


/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .manual-sidebar {
    transform: translateX(-100%);
  }

  .manual-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }

  .manual-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .manual-content {
    padding: 24px 20px;
  }

  .manual-topbar {
    padding: 0 20px;
  }

  .topbar-search {
    width: 200px;
  }

  .cover-title {
    font-size: 2rem;
  }

  .wireframe-app {
    min-height: 280px;
  }

  .wireframe-sidebar {
    width: 140px;
  }
}

@media (max-width: 640px) {
  .topbar-search {
    display: none;
  }

  .topbar-meta {
    display: none;
  }

  .cover-title {
    font-size: 1.5rem;
  }

  .cover-meta {
    width: 100%;
  }

  .toc {
    padding: 20px;
  }

  .wireframe-grid-2,
  .wireframe-grid-3,
  .wireframe-grid-4 {
    grid-template-columns: 1fr;
  }

  .wireframe-app {
    flex-direction: column;
  }

  .wireframe-sidebar {
    width: 100%;
    min-height: auto;
    max-height: 100px;
    border-right: none;
    border-bottom: 2px dashed var(--border-medium);
  }
}


/* ----- Print Styles ----- */
@media print {
  @page {
    margin: 2cm;
    size: A4;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .manual-sidebar,
  .manual-topbar,
  .sidebar-toggle,
  .topbar-search {
    display: none !important;
  }

  .manual-main {
    margin-left: 0 !important;
  }

  .manual-content {
    max-width: 100%;
    padding: 0;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  h2 {
    border-bottom-color: #ccc;
  }

  table, pre, .callout, .wireframe-container, .wireframe-app {
    page-break-inside: avoid;
  }

  pre {
    background: #f5f5f5;
    color: #000;
    border: 1px solid #ccc;
  }

  code {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  .sidebar-nav a[href]::after {
    content: none;
  }

  .toc-list li a::after {
    content: none;
  }

  .callout {
    border-left-width: 3px;
  }

  .wireframe-container,
  .wireframe-app,
  .wireframe-card,
  .wireframe-modal {
    border-style: solid;
    border-color: #ccc;
  }

  .badge, .wireframe-badge {
    border: 1px solid #999;
  }

  .cover-brand-icon {
    box-shadow: none;
    border: 2px solid #ccc;
  }

  .manual-footer {
    border-top: 1px solid #ccc;
    padding-top: 12px;
    font-size: 9pt;
  }

  .cover-page {
    min-height: auto;
    padding: 0;
    page-break-after: always;
  }

  .toc {
    page-break-after: always;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Anti-Copy Protection */
body, html {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
