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

:root {
  --sidebar-w: 260px;
  --accent:    #005a96;
  --accent-light: #e6f0f8;
  --accent-hover: #004b80;
  --text:      #1a1a2e;
  --muted:     #64748b;
  --border:    #e2e8f0;
  --bg:        #f8fafc;
  --white:     #ffffff;
  --code-bg:   #1e293b;
  --code-text: #e2e8f0;
  --success:   #15803d;
  --success-bg:#dcfce7;
  --warn-bg:   #fefce8;
  --warn:      #854d0e;
  --info-bg:   #eff6ff;
  --info:      #1d4ed8;
  --radius:    8px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

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

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

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

.sidebar-brand .logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-brand .logo-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.sidebar-brand .logo-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

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

.nav-section-title {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-section-title:not(:first-child) { margin-top: 8px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  font-size: 13.5px;
  color: #4a5568;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all .15s;
}

.sidebar-nav a:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-left-color: var(--accent);
}

.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
  border-left-color: var(--accent);
  font-weight: 600;
}

.nav-icon { font-size: 14px; opacity: .7; }

/* ── MAIN ── */
#main { margin-left: var(--sidebar-w); min-height: 100vh; }

#topbar {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 48px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#topbar .breadcrumb { font-size: 13px; color: var(--muted); }
#topbar .breadcrumb span { color: var(--text); font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-version { background: var(--accent-light); color: var(--accent); }
.badge-oc      { background: #fef3c7; color: #92400e; }
.badge-php     { background: #f3e8ff; color: #6b21a8; }

#content {
  padding: 48px 48px 96px;
  max-width: 900px;
}

.section { margin-bottom: 72px; }

h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 12px;
}

h1 .highlight { color: var(--accent); }

.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 28px;
  line-height: 1.6;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

p { margin-bottom: 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── FEATURE CARDS ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.feature-card .icon { font-size: 28px; margin-bottom: 10px; }
.feature-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* ── REQ GRID ── */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.req-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.req-item .req-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.req-item strong { display: block; font-size: 13px; font-weight: 700; }
.req-item span   { font-size: 12px; color: var(--muted); }

/* ── FLOW ── */
.flow { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 24px 0; }

.flow-step { display: flex; align-items: center; gap: 14px; }

.flow-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 14px;
  box-shadow: var(--shadow);
  min-width: 300px;
}

.flow-box.trigger { border-left: 4px solid #f59e0b; }
.flow-box.process { border-left: 4px solid var(--accent); }
.flow-box.js      { border-left: 4px solid #f59e0b; }
.flow-box.ajax    { border-left: 4px solid #8b5cf6; }
.flow-box.session { border-left: 4px solid #06b6d4; }
.flow-box.event   { border-left: 4px solid #ec4899; }
.flow-box.done    { border-left: 4px solid #10b981; }

.flow-arrow {
  margin-left: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 2px 0;
}

.flow-note { font-size: 12px; color: var(--muted); margin-left: 14px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; margin: 16px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

thead tr { background: var(--accent); color: #fff; }
thead th { padding: 11px 14px; text-align: left; font-weight: 600; font-size: 13px; }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--accent-light); }
td { padding: 10px 14px; vertical-align: top; }
td code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 12.5px; }
td .default { font-size: 12px; color: var(--muted); }

/* ── CODE ── */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 14px 0;
  position: relative;
}

code { font-family: 'SF Mono', 'Fira Code', Consolas, monospace; }

p code, li code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #be185d;
}

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert p:last-child { margin-bottom: 0; }
.alert-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid #bfdbfe; }
.alert-warning { background: var(--warn-bg);    color: var(--warn);    border: 1px solid #fde68a; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #bbf7d0; }

/* ── STEPS ── */
.steps { list-style: none; margin: 16px 0; }

.steps li {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.steps li .step-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}

.steps li .step-body { font-size: 14.5px; }
.steps li .step-body strong { display: block; margin-bottom: 2px; }

/* ── TROUBLE ── */
.trouble-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.trouble-item .problem {
  font-weight: 700;
  font-size: 14px;
  color: #dc2626;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trouble-item .solution { font-size: 14px; color: var(--text); margin: 0; }

/* ── FILE TREE ── */
.file-tree {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px 24px;
  border-radius: var(--radius);
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
  margin: 14px 0;
  white-space: pre;
  overflow-x: auto;
}

.file-tree .dir  { color: #93c5fd; }
.file-tree .file { color: #86efac; }
.file-tree .comment { color: #64748b; }

/* ── UNINSTALL ── */
.uninstall-steps { list-style: decimal; padding-left: 22px; }
.uninstall-steps li { margin-bottom: 8px; font-size: 14px; }

/* ── FOOTER ── */
#page-footer {
  margin-top: 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  #sidebar { display: none; }
  #main { margin-left: 0; }
  #content { padding: 24px 20px 60px; }
  #topbar { padding: 12px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
}
