/* ============================================================
   DOTCOM DESIGN — OPERATIONS PLAYBOOK
   styles.css — v1.0
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Colors */
  --color-primary:        #1a56db;
  --color-primary-dark:   #1240a8;
  --color-primary-light:  #ebf0ff;
  --color-accent:         #f59e0b;
  --color-accent-dark:    #d97706;
  --color-success:        #10b981;
  --color-warning:        #f59e0b;
  --color-danger:         #ef4444;

  --color-text-primary:   #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted:     #9ca3af;
  --color-text-inverse:   #ffffff;

  --color-bg-primary:     #ffffff;
  --color-bg-secondary:   #f9fafb;
  --color-bg-dark:        #111827;
  --color-bg-sidebar:     #1e2433;
  --color-bg-sidebar-hover: #2d3448;
  --color-bg-sidebar-active: #1a56db;

  --color-border:         #e5e7eb;
  --color-border-strong:  #d1d5db;

  /* Typography */
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;

  /* Spacing (8-point grid) */
  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  40px;
  --space-6:  48px;
  --space-8:  64px;
  --space-10: 80px;

  /* Layout */
  --sidebar-width:      280px;
  --content-max-width:  860px;
  --header-height:      64px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);

  /* Transitions */
  --transition: 0.2s ease;

  /* Border radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  overflow-x: hidden;
}

/* ── Skip Link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus {
  top: var(--space-2);
}

/* ── Top Header Bar ─────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-3);
  z-index: 200;
  box-shadow: var(--shadow-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.header-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-brand-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-inverse);
  letter-spacing: -0.01em;
}

.header-brand-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header-version {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* Search */
.search-wrapper {
  position: relative;
}

.search-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  padding: 8px 16px 8px 36px;
  width: 240px;
  transition: all var(--transition);
  outline: none;
}

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

.search-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.3);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 300;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--color-bg-secondary);
}

.search-result-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.search-result-section {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.search-result-item mark {
  background: #fef08a;
  color: var(--color-text-primary);
  border-radius: 2px;
  padding: 0 2px;
}

.search-no-results {
  padding: var(--space-3);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--color-text-inverse);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.mobile-menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-bg-sidebar);
  overflow-y: auto;
  z-index: 100;
  padding: var(--space-3) 0 var(--space-6);
  transition: transform var(--transition);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.sidebar-section {
  margin-bottom: var(--space-1);
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3) var(--space-1);
  display: block;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}

.sidebar-nav a:hover {
  background: var(--color-bg-sidebar-hover);
  color: rgba(255,255,255,0.9);
  border-left-color: rgba(255,255,255,0.2);
}

.sidebar-nav a.active {
  background: rgba(26,86,219,0.2);
  color: #93c5fd;
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.sidebar-nav a .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon {
  opacity: 1;
}

.sidebar-nav a .nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--color-primary);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.4;
}

/* Sub-nav */
.sidebar-subnav {
  list-style: none;
  display: none;
}

.sidebar-subnav.open {
  display: block;
}

.sidebar-subnav a {
  padding-left: 48px;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
  border-left: none;
  padding-top: 6px;
  padding-bottom: 6px;
}

.sidebar-subnav a:hover {
  color: rgba(255,255,255,0.75);
  background: transparent;
  border-left: none;
}

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

.content-page {
  display: none;
  padding: var(--space-6) var(--space-8);
  max-width: calc(var(--content-max-width) + var(--space-8) * 2);
}

.content-page.active {
  display: block;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.page-breadcrumb {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.page-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.page-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 680px;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.page-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Typography ─────────────────────────────────────────────── */
.content-page h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
  line-height: 1.3;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.content-page h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content-page h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.content-page h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.content-page p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.75;
  font-size: var(--text-base);
}

.content-page strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.content-page a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.content-page a:hover {
  color: var(--color-primary-dark);
}

/* ── Lists ──────────────────────────────────────────────────── */
.content-page ul,
.content-page ol {
  margin-bottom: var(--space-3);
  padding-left: var(--space-3);
  color: var(--color-text-secondary);
}

.content-page li {
  margin-bottom: var(--space-1);
  line-height: 1.7;
}

.content-page li strong {
  color: var(--color-text-primary);
}

/* ── Callout Boxes ──────────────────────────────────────────── */
.callout {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  border-left: 4px solid;
  display: flex;
  gap: var(--space-2);
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content {
  flex: 1;
  min-width: 0;
}

.callout-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 4px;
}

.callout-body {
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: 0;
}

.callout.info {
  background: #eff6ff;
  border-color: var(--color-primary);
}
.callout.info .callout-title { color: var(--color-primary-dark); }
.callout.info .callout-body { color: #1e40af; }

.callout.success {
  background: #f0fdf4;
  border-color: var(--color-success);
}
.callout.success .callout-title { color: #065f46; }
.callout.success .callout-body { color: #047857; }

.callout.warning {
  background: #fffbeb;
  border-color: var(--color-accent);
}
.callout.warning .callout-title { color: #92400e; }
.callout.warning .callout-body { color: #b45309; }

.callout.danger {
  background: #fef2f2;
  border-color: var(--color-danger);
}
.callout.danger .callout-title { color: #991b1b; }
.callout.danger .callout-body { color: #b91c1c; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-4) 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead {
  background: var(--color-bg-secondary);
}

th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  vertical-align: top;
  line-height: 1.6;
}

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

tbody tr:hover {
  background: var(--color-bg-secondary);
}

td strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* ── Code Blocks ────────────────────────────────────────────── */
pre {
  background: #1e2433;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  margin: var(--space-4) 0;
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}

pre code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #e2e8f0;
  line-height: 1.7;
  background: none;
  padding: 0;
  border-radius: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.copy-btn {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-size: var(--text-xs);
  font-family: var(--font-sans);
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}

.copy-btn.copied {
  background: rgba(16,185,129,0.2);
  border-color: rgba(16,185,129,0.3);
  color: #6ee7b7;
}

/* ── Tool Cards ─────────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.tool-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--color-primary-light);
}

.tool-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.tool-card-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.tool-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.tool-card-meta {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  line-height: 1.4;
}

.tag-blue   { background: #dbeafe; color: #1d4ed8; }
.tag-green  { background: #d1fae5; color: #065f46; }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-gray   { background: #f3f4f6; color: #374151; }
.tag-purple { background: #ede9fe; color: #5b21b6; }

/* ── Step Cards ─────────────────────────────────────────────── */
.steps {
  margin: var(--space-4) 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: var(--color-border);
}

.step {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: var(--text-sm);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--color-bg-primary), 0 0 0 6px var(--color-border);
}

.step-content {
  flex: 1;
  padding-top: 8px;
  padding-bottom: var(--space-3);
}

.step-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.step-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: var(--space-1);
  background: var(--color-bg-secondary);
  padding: 3px 8px;
  border-radius: 20px;
}

/* ── Checklist ──────────────────────────────────────────────── */
.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition);
  border-radius: var(--radius-sm);
  padding: 8px var(--space-2);
  margin: 0 calc(-1 * var(--space-2));
}

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

.checklist li:hover {
  background: var(--color-bg-secondary);
}

.checklist li.checked {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.checklist-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border-strong);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.checklist li.checked .checklist-box {
  background: var(--color-success);
  border-color: var(--color-success);
}

.checklist-check {
  display: none;
  color: white;
}

.checklist li.checked .checklist-check {
  display: block;
}

.checklist-group-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-border);
}

.checklist-progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-label {
  font-weight: 700;
  color: var(--color-text-primary);
  min-width: 40px;
  text-align: right;
}

/* ── Prompt Block ───────────────────────────────────────────── */
.prompt-block {
  background: #0f172a;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.prompt-block-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-block-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.prompt-block pre {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.prompt-block pre code {
  color: #94a3b8;
  font-size: var(--text-sm);
}

.prompt-block .copy-btn {
  top: var(--space-3);
  right: var(--space-3);
}

/* ── Audit Grid ─────────────────────────────────────────────── */
.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.audit-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  background: var(--color-bg-primary);
  transition: all var(--transition);
}

.audit-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.audit-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.audit-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.audit-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.audit-url {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-mono);
}

.audit-url:hover {
  text-decoration: underline;
}

.audit-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.audit-target {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-success);
  background: #f0fdf4;
  padding: 3px 8px;
  border-radius: 20px;
}

/* ── Cost Table ─────────────────────────────────────────────── */
.cost-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.cost-column {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.cost-column-header {
  padding: var(--space-3);
  font-weight: 700;
  font-size: var(--text-sm);
  text-align: center;
}

.cost-column.old .cost-column-header {
  background: #fef2f2;
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
}

.cost-column.new .cost-column-header {
  background: #f0fdf4;
  color: #065f46;
  border-bottom: 1px solid #a7f3d0;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.cost-row:last-child {
  border-bottom: none;
}

.cost-item-name {
  color: var(--color-text-secondary);
}

.cost-item-price {
  font-weight: 700;
  color: var(--color-text-primary);
}

.cost-column.old .cost-item-price {
  color: #dc2626;
}

.cost-column.new .cost-item-price {
  color: var(--color-success);
}

.cost-total {
  background: var(--color-bg-secondary);
  font-weight: 800;
}

.cost-total .cost-item-name {
  color: var(--color-text-primary);
  font-weight: 700;
}

/* ── Role Cards ─────────────────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.role-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: var(--color-bg-primary);
}

.role-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.role-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.role-skills {
  list-style: none;
  padding: 0;
}

.role-skills li {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-skills li:last-child {
  border-bottom: none;
}

.role-skills li::before {
  content: '→';
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Summary Table ──────────────────────────────────────────── */
.summary-table {
  margin: var(--space-4) 0;
}

/* ── Transition Cards ───────────────────────────────────────── */
.transition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.transition-card {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
}

.transition-card-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.transition-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.transition-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.transition-card.duda { border-top: 3px solid #6366f1; }
.transition-card.duda .transition-card-label { color: #4f46e5; }

.transition-card.wordpress { border-top: 3px solid #3b82f6; }
.transition-card.wordpress .transition-card-label { color: #2563eb; }

.transition-card.nextjs { border-top: 3px solid #10b981; }
.transition-card.nextjs .transition-card-label { color: #059669; }

/* ── Dashboard / Home Page ──────────────────────────────────── */
.dashboard-hero {
  background: linear-gradient(135deg, #1e2433 0%, #1a56db 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-8);
  margin-bottom: var(--space-6);
  color: white;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-2);
}

.dashboard-hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.dashboard-hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: var(--space-5);
}

.dashboard-hero-meta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

.hero-meta-item strong {
  color: white;
}

/* Stats row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

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

/* Quick links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.quick-link-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.quick-link-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.quick-link-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.quick-link-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.quick-link-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ── Overlay (mobile) ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

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

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

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

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .search-input {
    width: 180px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .audit-grid {
    grid-template-columns: 1fr;
  }

  .cost-comparison {
    grid-template-columns: 1fr;
  }

  .transition-grid {
    grid-template-columns: 1fr;
  }

  .content-page {
    padding: var(--space-4) var(--space-3);
  }
}

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

  .header-version {
    display: none;
  }

  .dashboard-hero {
    padding: var(--space-5) var(--space-4);
  }

  .dashboard-hero-title {
    font-size: var(--text-3xl);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .steps::before {
    display: none;
  }

  .page-title {
    font-size: var(--text-3xl);
  }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .site-header,
  .sidebar,
  .sidebar-overlay {
    display: none !important;
  }

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

  .content-page {
    display: block !important;
  }
}
