:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #0ea5e9;
  --ok: #059669;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Top Navbar */
.topbar {
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
}
.brand-badge {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #cbd5e1;
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: #ffffff; }

/* Admin Subnav */
.subnav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.subnav-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
}
.subnav-inner a {
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
}
.subnav-inner a:hover { background: #f1f5f9; color: var(--ink); }
.subnav-inner a.active { background: #eff6ff; color: var(--brand); }

/* Hero */
.hero {
  background: radial-gradient(circle at 80% 20%, #1e3a8a 0%, #0f172a 65%);
  color: #ffffff;
  padding: 68px 0 60px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.14;
  margin: 14px 0 18px;
  letter-spacing: -0.03em;
}
.hero p.lead {
  color: #cbd5e1;
  font-size: 1.12rem;
  max-width: 720px;
  margin: 0 0 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.btn-sm { padding: 6px 12px; font-size: 0.83rem; border-radius: 8px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-success { background: var(--ok); color: #fff; }
.btn-danger { background: var(--err); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { background: #f1f5f9; }
.btn-ghost-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.22); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.2); }

/* Cards & Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card.featured {
  border: 2px solid var(--brand);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
  position: relative;
}
.card h2, .card h3 { margin-top: 0; }

.stat-card .stat-label { font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.stat-card .stat-val { font-size: 1.85rem; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-err { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-dark { background: #e2e8f0; color: #1e293b; }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 11px;
  margin: 18px 0;
  font-weight: 500;
}
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }

/* Forms & Tables */
label { display: block; font-size: 0.86rem; font-weight: 600; color: #334155; margin-bottom: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 0.93rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}
.form-row { margin-bottom: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 0.79rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #f8fafc; }
tr:hover td { background: #f8fafc; }

.pkg-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  display: block;
}

.footer {
  margin-top: 64px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

/* --- Görselli Dokümantasyon & Tanıtım Ekran Çerçeveleri --- */
.doc-shell {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}
@media (max-width: 960px) {
  .doc-shell { grid-template-columns: 1fr; }
}
.doc-sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.doc-sidebar h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.doc-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}
.doc-toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.doc-toc a:hover, .doc-toc a.active {
  background: #eff6ff;
  color: var(--brand);
}
.doc-toc a .ch-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
}
.doc-toc a:hover .ch-no, .doc-toc a.active .ch-no {
  background: var(--brand);
  color: #fff;
}

.doc-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 26px;
  scroll-margin-top: 86px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.doc-section h2 {
  margin: 4px 0 10px;
  font-size: 1.48rem;
  letter-spacing: -0.02em;
}
.doc-section h3 {
  margin: 22px 0 10px;
  font-size: 1.1rem;
  color: #0f172a;
}
.doc-path {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 4px 11px;
  border-radius: 8px;
  font-size: 0.81rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Gerçekçi Görsel Panel / Tarayıcı Ekran Diyagramı */
.ui-shot {
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  margin: 18px 0 20px;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.14);
}
.ui-browser {
  background: #1e293b;
  color: #cbd5e1;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.79rem;
}
.ui-dots { display: inline-flex; gap: 6px; }
.ui-dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ui-dots i:nth-child(1) { background: #ef4444; }
.ui-dots i:nth-child(2) { background: #f59e0b; }
.ui-dots i:nth-child(3) { background: #22c55e; }
.ui-url {
  background: #0f172a;
  color: #93c5fd;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-frame {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  min-height: 250px;
}
@media (max-width: 720px) {
  .ui-frame { grid-template-columns: 1fr; }
}
.ui-rail {
  background: #0f2437;
  color: #cbd5e1;
  padding: 14px 10px;
  font-size: 0.8rem;
}
.ui-rail-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
}
.ui-rail-brand b {
  background: #0d9488;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ui-rail-item {
  padding: 6px 9px;
  border-radius: 7px;
  margin-bottom: 3px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ui-rail-item.on {
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;
  font-weight: 700;
}
.ui-body {
  padding: 18px 20px;
  background: #f8fafc;
}
.ui-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.ui-head strong { font-size: 1rem; color: #0f172a; }
.ui-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ui-tab {
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
}
.ui-tab.on {
  background: #2563eb;
  color: #fff;
}
.ui-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.ui-field {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 11px;
  position: relative;
}
.ui-field.hl {
  border: 2px solid #2563eb;
  background: #eff6ff;
}
.ui-field small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 3px;
}
.ui-field code, .ui-field span {
  font-size: 0.84rem;
  color: #0f172a;
  font-weight: 600;
  word-break: break-all;
}
.pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.38);
  margin-right: 6px;
  flex-shrink: 0;
}
.ui-caption {
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px 16px;
  font-size: 0.81rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.step-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}
.step-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.92rem;
}
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 13px 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 0.85rem;
}

@media print {
  .topbar, .subnav, .doc-sidebar, .footer, .no-print { display: none !important; }
  .doc-shell { display: block; }
  .doc-section { break-inside: avoid; box-shadow: none; border-color: #94a3b8; }
  body { background: #fff; }
}



/* --- BiriCP Merkez Sürükle-Bırak Tema & Modül Stüdyosu --- */
.bcp-studio-shell { display: grid; grid-template-columns: 295px minmax(0, 1fr) 320px; gap: 14px; align-items: start; margin-top: 16px; }
@media (max-width: 1200px) { .bcp-studio-shell { grid-template-columns: 1fr; } }
.bcp-studio-col { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.bcp-studio-col-head { padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f8fafc; }
.bcp-studio-col-body { padding: 12px; max-height: 76vh; overflow-y: auto; }
.bcp-palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bcp-palette-item { padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: grab; background: #f8fafc; font-size: 0.78rem; font-weight: 700; user-select: none; }
.bcp-palette-item:hover { border-color: var(--brand); }
.bcp-palette-item small { display: block; font-weight: 500; color: var(--muted); margin-top: 2px; font-size: 0.7rem; }
.bcp-canvas-list { display: flex; flex-direction: column; gap: 8px; min-height: 110px; padding: 10px; border: 2px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; }
.bcp-canvas-block { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: grab; }
.bcp-canvas-block.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16); }
.bcp-preview-wrap { background: #0f172a; padding: 12px; display: flex; justify-content: center; min-height: 540px; }
.bcp-preview-iframe { width: 100%; height: 560px; border: 0; border-radius: 10px; background: #fff; transition: width .22s ease; }
.bcp-code-box { background: #0b1220; color: #e2e8f0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; padding: 14px; border-radius: 10px; max-height: 500px; overflow: auto; white-space: pre; margin: 0; }
.bcp-rule-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.bcp-rule-row.pass { border-left: 4px solid #10b981; }
.bcp-rule-row.fail { border-left: 4px solid #ef4444; background: #fef2f2; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn-group { display: inline-flex; align-items: center; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; cursor: pointer; margin: 0; }
.check input { width: auto; }
.field label { margin-bottom: 4px; }
