/* ===================================================
   SEO OPERATIONS PLAYBOOK — DOTCOM DESIGN
   Matches the visual style of the Website Operations Playbook
   =================================================== */

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

:root {
  --sidebar-width: 220px;
  --sidebar-bg: #0d1b2a;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-text: #b0bec5;
  --sidebar-text-hover: #ffffff;
  --sidebar-active-bg: rgba(41, 128, 185, 0.25);
  --sidebar-active-text: #5dade2;
  --sidebar-section-label: #546e7a;
  --topbar-height: 48px;
  --main-bg: #f8f9fa;
  --content-bg: #ffffff;
  --border-color: #e8ecef;
  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --accent-blue: #1a5276;
  --accent-blue-light: #2980b9;
  --accent-red: #c0392b;
  --accent-green: #27ae60;
  --accent-yellow: #f39c12;
  --code-bg: #1e2d3d;
  --code-text: #a8d8ea;
  --warning-bg: #fff3cd;
  --warning-border: #f39c12;
  --info-bg: #e8f4fd;
  --info-border: #2980b9;
  --error-bg: #fdf2f2;
  --error-border: #e74c3c;
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--main-bg);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent-red);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.logo-text {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--sidebar-text);
  display: block;
}

.sidebar-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-search input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #fff;
  font-family: var(--font-main);
  outline: none;
}

.sidebar-search input::placeholder { color: var(--sidebar-text); }
.sidebar-search input:focus { border-color: var(--accent-blue-light); }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sidebar-section-label);
  padding: 14px 16px 4px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--sidebar-text-hover);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left: 3px solid var(--sidebar-active-text);
  padding-left: 13px;
}

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

.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent-green);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.version-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--main-bg);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ===== PAGES ===== */
.page {
  display: none;
  padding: 40px 48px 80px;
  max-width: 960px;
  animation: fadeIn 0.2s ease;
}

.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.page-breadcrumb {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 8px;
}

.prose {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #f0f4f8;
  border: 1px solid #d8e0e8;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-blue);
}

/* ===== HERO CARD ===== */
.hero-card {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 60%, #1a5276 100%);
  border-radius: 12px;
  padding: 36px 40px;
  margin-bottom: 28px;
  color: #fff;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 600px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 16px;
}

.hero-meta strong { color: rgba(255,255,255,0.9); }

.status-active {
  background: rgba(39, 174, 96, 0.25);
  color: #2ecc71;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* ===== QUICK CARDS ===== */
.quick-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.quick-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: block;
}

.quick-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--accent-blue-light);
}

.quick-card-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.quick-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.quick-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== CALLOUT BOXES ===== */
.info-callout {
  background: var(--info-bg);
  border-left: 4px solid var(--info-border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.warning-callout {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning-border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 13px;
  color: #7d4e00;
  line-height: 1.6;
  margin-bottom: 20px;
}

.warning-callout strong { color: #5d3900; }

/* ===== TABLES ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 24px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table thead tr {
  background: var(--accent-blue);
  color: #fff;
}

.data-table thead th {
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.1s;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f7fafc; }

.data-table tbody td {
  padding: 10px 14px;
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.5;
}

.data-table tbody td:first-child { color: var(--text-primary); }

.meta-table { box-shadow: none; border: 1px solid var(--border-color); }
.meta-table .meta-label {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 120px;
  background: #f8f9fa;
}

/* ===== CODE BLOCKS ===== */
.code-block {
  position: relative;
  background: var(--code-bg);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

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

.code-block pre {
  padding: 12px 16px 16px;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--code-text);
  background: none;
  border: none;
  padding: 0;
  line-height: 1.7;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ===== EXAMPLE BLOCK ===== */
.example-block {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.example-label {
  background: var(--accent-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
}

.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.example-col {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.example-col:first-child {
  border-right: 1px solid var(--border-color);
}

.example-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ===== ERROR CARDS ===== */
.error-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-red);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.error-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--error-bg);
  border-bottom: 1px solid #fde8e8;
}

.error-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.error-title {
  font-size: 13px;
  font-weight: 700;
  color: #7b1a1a;
}

.error-body {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.error-body p { margin-bottom: 8px; }
.error-body p:last-child { margin-bottom: 0; }
.error-body strong { color: var(--text-primary); }

/* ===== ORDERED LIST ===== */
.ordered-list {
  padding-left: 20px;
  margin-bottom: 20px;
}

.ordered-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
  padding-left: 4px;
}

/* ===== QA CHECKLIST ===== */
.checklist-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.checklist-section-title {
  background: var(--accent-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: #f7fafc; }

.checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent-blue);
}

.checklist-item.checked {
  background: #f0faf5;
  color: #2d7a4f;
  text-decoration: line-through;
  opacity: 0.7;
}

.checklist-reset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 16px 0;
}

.reset-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: var(--main-bg);
  border-color: var(--accent-blue-light);
  color: var(--accent-blue);
}

.checklist-progress {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ===== LIVE BADGE ===== */
.live-badge {
  background: var(--accent-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 8px;
}

/* ===== SCROLLBAR ===== */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .page { padding: 24px 20px 60px; }
  .quick-cards { grid-template-columns: 1fr; }
  .example-grid { grid-template-columns: 1fr; }
  .example-col:first-child { border-right: none; border-bottom: 1px solid var(--border-color); }
}
