/* VCPMS Documentation Suite - Shared Styles */
/* Version: 1.0 | No external dependencies */

:root {
  --primary: #1a5276;
  --primary-light: #2980b9;
  --primary-dark: #0e3a5c;
  --accent: #16a085;
  --accent-light: #1abc9c;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --bg-sidebar: #1a2332;
  --text-primary: #2c3e50;
  --text-secondary: #5d6d7e;
  --text-light: #95a5a6;
  --border: #dce1e6;
  --border-light: #eaecee;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --sidebar-width: 280px;
  --header-height: 70px;
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #ecf0f1;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.sidebar-logo {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  font-weight: 700;
  color: white;
}
.sidebar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: white;
}
.sidebar-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 0.5px;
}
.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #bdc3c7;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: white;
  border-left-color: var(--accent);
}
.sidebar-nav a.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left-color: var(--accent);
  font-weight: 600;
}
.sidebar-nav a .nav-icon {
  width: 20px;
  margin-right: 12px;
  text-align: center;
  font-size: 0.85rem;
}
.sidebar-nav .nav-group-label {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #bdc3c7;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  cursor: default;
}
.sidebar-nav .nav-group-label .nav-icon {
  width: 20px;
  margin-right: 12px;
  text-align: center;
  font-size: 0.85rem;
}
.sidebar-nav .nav-sub a {
  padding-left: 40px;
  font-size: 0.84rem;
}
.sidebar-nav .nav-sub .nav-sub a {
  padding-left: 56px;
  font-size: 0.8rem;
}
.sidebar-nav .nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 20px;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 48px 48px 40px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--font-heading);
}
.page-header .subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  font-weight: 300;
}
.page-header .badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 12px;
}

/* Content Area */
.content {
  padding: 40px 48px 80px;
  max-width: 1100px;
}

/* Table of Contents */
.toc {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}
.toc h2 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.toc ol {
  padding-left: 20px;
  columns: 2;
  column-gap: 40px;
}
.toc li {
  padding: 4px 0;
  font-size: 0.9rem;
  break-inside: avoid;
}
.toc a {
  color: var(--primary-light);
  text-decoration: none;
}
.toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Section Headers */
.section {
  margin-bottom: 48px;
}
.section h2 {
  font-size: 1.6rem;
  color: var(--primary);
  font-family: var(--font-heading);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}
.section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}
.section h3 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin: 24px 0 12px;
  font-family: var(--font-heading);
}
.section h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 16px 0 8px;
  font-weight: 600;
}
.section p {
  margin-bottom: 12px;
  color: var(--text-primary);
}
.section ul, .section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.section li {
  margin-bottom: 6px;
  color: var(--text-primary);
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feature-card .card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Portal Cards (for overview) */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.portal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.portal-card .portal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin: 0 auto 16px;
}
.portal-card .portal-icon.office { background: linear-gradient(135deg, #1a5276, #2980b9); }
.portal-card .portal-icon.online { background: linear-gradient(135deg, #16a085, #1abc9c); }
.portal-card .portal-icon.provider { background: linear-gradient(135deg, #8e44ad, #9b59b6); }
.portal-card .portal-icon.advocate { background: linear-gradient(135deg, #d35400, #e67e22); }
.portal-card .portal-icon.agency { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.portal-card .portal-icon.connect { background: linear-gradient(135deg, #2c3e50, #34495e); }
.portal-card .portal-icon.admin { background: linear-gradient(135deg, #7f8c8d, #95a5a6); }
.portal-card .portal-icon.security { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.portal-card .portal-icon.emergency { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.portal-card .portal-icon.law { background: linear-gradient(135deg, #2c3e50, #1a252f); }
.portal-card .portal-icon.board { background: linear-gradient(135deg, #0f6b62, #14b8a6); }
.portal-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.portal-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.portal-card .portal-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.portal-card .portal-link:hover { text-decoration: underline; }

/* Workflow Steps */
.workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 20px 0;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.workflow-step {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}
.workflow-step.alt { background: var(--accent); }
.workflow-step.danger { background: var(--danger); }
.workflow-step.warning { background: var(--warning); color: var(--text-primary); }
.workflow-step.success { background: var(--success); }
.workflow-arrow {
  font-size: 1.2rem;
  color: var(--text-light);
  margin: 0 4px;
}

/* Vertical Workflow */
.workflow-vertical {
  margin: 20px 0;
  padding-left: 30px;
  border-left: 3px solid var(--accent);
}
.workflow-vertical .step {
  position: relative;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.workflow-vertical .step::before {
  content: attr(data-step);
  position: absolute;
  left: -42px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.workflow-vertical .step h4 {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.95rem;
}
.workflow-vertical .step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Screenshot Placeholder */
.screenshot {
  background: #e8ecef;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  margin: 20px 0;
  color: var(--text-light);
  font-style: italic;
  font-size: 0.9rem;
}
.screenshot::before {
  content: '\1F4F7';
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
  font-style: normal;
}

/* Callout Boxes */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 16px 0;
  border-left: 4px solid;
  font-size: 0.9rem;
}
.callout.info {
  background: #eaf2f8;
  border-color: var(--info);
  color: #1a5276;
}
.callout.success {
  background: #eafaf1;
  border-color: var(--success);
  color: #1e8449;
}
.callout.warning {
  background: #fef9e7;
  border-color: var(--warning);
  color: #7d6608;
}
.callout.highlight {
  background: #f4ecf7;
  border-color: #8e44ad;
  color: #6c3483;
}
.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* Diagrams (SVG flow diagrams) */
.diagram {
  margin: 20px 0 28px;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.diagram svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
.diagram figcaption {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}
.diagram figcaption code {
  font-style: normal;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
thead {
  background: var(--primary);
  color: white;
}
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
tbody tr:hover {
  background: #f8f9fa;
}
tbody tr:last-child td {
  border-bottom: none;
}

/* Comparison Table */
.comparison-table td:first-child {
  font-weight: 600;
  color: var(--primary);
}
.check { color: var(--success); font-weight: bold; }
.cross { color: var(--danger); }

/* Benefits Section */
.benefits-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px;
  border-radius: var(--radius);
  margin: 40px 0;
}
.benefits-section h2 {
  color: white;
  border-bottom-color: rgba(255,255,255,0.2);
  margin-bottom: 24px;
}
.benefits-section h2::after {
  background: var(--accent);
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.benefit-item {
  padding: 16px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
}
.benefit-item h4 {
  color: var(--accent-light);
  margin-bottom: 8px;
  font-size: 1rem;
}
.benefit-item p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Footer */
.page-footer {
  background: var(--bg-sidebar);
  color: var(--text-light);
  padding: 24px 48px;
  font-size: 0.8rem;
  text-align: center;
  margin-left: var(--sidebar-width);
}
.page-footer a {
  color: var(--accent-light);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
  :root { --sidebar-width: 240px; }
  .content { padding: 30px 32px 60px; }
  .page-header { padding: 36px 32px 32px; }
  .toc ol { columns: 1; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .page-footer { margin-left: 0; }
  .content { padding: 20px 16px 40px; }
  .page-header { padding: 24px 16px 20px; }
  .page-header h1 { font-size: 1.6rem; }
  .feature-grid, .portal-grid { grid-template-columns: 1fr; }
  .workflow { flex-direction: column; align-items: flex-start; }
}

/* Print Styles */
@media print {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .page-footer { margin-left: 0; }
  .page-header { background: white; color: var(--text-primary); padding: 20px 0; }
  .page-header h1 { color: var(--primary); }
  .content { padding: 0; }
  .feature-card, .portal-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .screenshot { border: 1px solid #ccc; }
  .benefits-section { background: white; color: var(--text-primary); border: 2px solid var(--primary); }
  .benefits-section h2 { color: var(--primary); }
  .benefit-item { background: var(--bg-light); }
  .benefit-item h4 { color: var(--primary); }
  .benefit-item p { color: var(--text-primary); }
  a { color: var(--primary) !important; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-blue { background: #d6eaf8; color: var(--primary); }
.tag-green { background: #d5f5e3; color: #1e8449; }
.tag-orange { background: #fdebd0; color: #a04000; }
.tag-red { background: #fadbd8; color: #922b21; }
.tag-purple { background: #e8daef; color: #6c3483; }
