/* BirTabela · ideStudio tarzı arayüz sistemi */
:root {
  --bg: #0a0b0e;
  --bg-soft: #101217;
  --panel: #14161c;
  --panel-2: #191c23;
  --line: #262a33;
  --line-soft: #1e222a;
  --text: #e8eaee;
  --muted: #8b93a1;
  --muted-2: #626a78;
  --accent: #3b9eff;
  --accent-soft: rgba(59, 158, 255, .12);
  --ok: #35c48a;
  --warn: #f5a524;
  --danger: #f26a6a;
  --radius: 12px;
  --radius-sm: 8px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f4f7;
  --line: #e2e6ec;
  --line-soft: #eceff4;
  --text: #14161c;
  --muted: #616a79;
  --muted-2: #8b93a1;
  --accent: #0a7cff;
  --accent-soft: rgba(10, 124, 255, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; letter-spacing: -.3px; font-size: 17px; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 6px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 13.5px; font-weight: 500;
  transition: .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: #3a4050; background: #1f232c; }
[data-theme="light"] .btn:hover { background: #e9edf3; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card-tight { padding: 14px; }
.card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 3px 8px;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); background: var(--panel-2);
}
.tag-ok { color: var(--ok); border-color: rgba(53,196,138,.3); background: rgba(53,196,138,.08); }
.tag-warn { color: var(--warn); border-color: rgba(245,165,36,.3); background: rgba(245,165,36,.08); }
.tag-danger { color: var(--danger); border-color: rgba(242,106,106,.3); background: rgba(242,106,106,.08); }
.tag-accent { color: var(--accent); border-color: rgba(59,158,255,.32); background: var(--accent-soft); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .1px; }
.input, .select {
  width: 100%; padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  transition: .15s;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted-2); }

/* ---------- Alerts ---------- */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.alert-error { color: #ffb4b4; background: rgba(242,106,106,.1); border-color: rgba(242,106,106,.28); }
.alert-ok { color: #8ff0c4; background: rgba(53,196,138,.1); border-color: rgba(53,196,138,.28); }

/* ---------- Landing ---------- */
.hero { padding: 90px 0 70px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.04; letter-spacing: -2.2px;
  margin: 0 0 20px; font-weight: 700;
}
.hero h1 em { font-style: normal; color: var(--muted-2); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 580px; line-height: 1.6; margin: 0 0 32px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  color: var(--accent); margin-bottom: 22px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(59,158,255,.28); background: var(--accent-soft);
}
.section { padding: 74px 0; border-top: 1px solid var(--line-soft); }
.section h2 { font-size: clamp(24px, 3.2vw, 36px); letter-spacing: -1px; margin: 0 0 14px; font-weight: 680; }
.section .sub { color: var(--muted); max-width: 560px; line-height: 1.6; margin: 0 0 36px; font-size: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.step-num { font-family: var(--mono); font-size: 11.5px; color: var(--accent); letter-spacing: 1px; margin-bottom: 10px; }

.price-card { position: relative; overflow: hidden; }
.price-card.featured { border-color: rgba(59,158,255,.45); box-shadow: 0 0 0 1px rgba(59,158,255,.15), 0 20px 50px -25px rgba(59,158,255,.4); }
.price-amount { font-size: 34px; font-weight: 700; letter-spacing: -1.4px; margin: 14px 0 2px; }
.price-amount small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.feature-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; }
.feature-list li { font-size: 13px; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }
.feature-list li::before { content: "✓"; color: var(--ok); font-weight: 700; flex-shrink: 0; }

.faq-item { border-bottom: 1px solid var(--line-soft); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--muted); font-size: 13.5px; line-height: 1.65; margin: 12px 0 0; }

.footer { border-top: 1px solid var(--line-soft); padding: 34px 0; color: var(--muted-2); font-size: 12.5px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 214px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--bg-soft);
  border-right: 1px solid var(--line-soft);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 4px 10px 16px; font-size: 16px; }
.sidebar small { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 500; letter-spacing: .6px; text-transform: uppercase; padding: 0 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--muted); font-weight: 500;
  transition: .13s;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 16px; text-align: center; opacity: .85; font-size: 13px; }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.sidebar-user { font-size: 11.5px; color: var(--muted-2); padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 26px 30px 60px; min-width: 0; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 25px; letter-spacing: -.7px; margin: 0 0 6px; font-weight: 680; }
.page-head p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ---------- Stat / tables ---------- */
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .k { font-size: 11.5px; color: var(--muted-2); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.8px; margin-top: 7px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 700;
  color: var(--muted-2); letter-spacing: .5px; text-transform: uppercase;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:hover td { background: rgba(255,255,255,.018); }
table.data .cat-row td { background: var(--panel-2); font-weight: 700; font-size: 11.5px; color: var(--accent); letter-spacing: .4px; text-transform: uppercase; padding: 8px 12px; }
.cell-input { width: 88px; padding: 6px 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; }
.cell-input:focus { outline: none; border-color: var(--accent); }
.cell-input.wide { width: 66px; }
.num { font-family: var(--mono); font-size: 12.5px; text-align: right; }

/* ---------- Studio ---------- */
.studio { display: grid; grid-template-columns: 60px 268px 1fr 300px; height: 100vh; overflow: hidden; }
.toolstrip {
  background: var(--bg-soft); border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 0;
}
.tool-btn {
  width: 42px; height: 38px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  border-radius: 8px; border: none; background: transparent;
  color: var(--muted); font-size: 9.5px; font-weight: 600; transition: .13s;
}
.tool-btn:hover { background: var(--panel-2); color: var(--text); }
.tool-btn.active { background: var(--accent-soft); color: var(--accent); }
.tool-btn .ico { font-size: 15px; line-height: 1; }
.tool-strip-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 3px; }

.inspector {
  background: var(--bg-soft); border-right: 1px solid var(--line-soft);
  overflow-y: auto; padding: 16px 14px;
}
.inspector h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); margin: 0 0 12px; font-weight: 700; }
.insp-group { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.insp-group:last-child { border-bottom: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button {
  padding: 8px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel); font-size: 12px; color: var(--muted); font-weight: 500;
}
.seg button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255,255,255,.14); cursor: pointer; }
.swatch.on { outline: 2px solid var(--accent); outline-offset: 1px; }

.stage-wrap { position: relative; background: var(--bg); display: flex; flex-direction: column; min-width: 0; }
.stage-bar {
  height: 46px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: var(--bg-soft); flex-shrink: 0;
}
.stage-bar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.mini { font-size: 11.5px; color: var(--muted); padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); }
.mini.on { border-color: var(--accent); color: var(--accent); }

.stage { position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#canvas2d { display: block; cursor: crosshair; }
.ruler-h, .ruler-v { position: absolute; background: var(--bg-soft); pointer-events: none; z-index: 5; }
.ruler-h { top: 0; left: 34px; right: 0; height: 22px; border-bottom: 1px solid var(--line-soft); }
.ruler-v { top: 22px; left: 0; width: 34px; bottom: 0; border-right: 1px solid var(--line-soft); }

.rightpanel {
  width: 300px; border-left: 1px solid var(--line-soft);
  background: var(--bg-soft); overflow-y: auto; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.quote-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 5px 0; color: var(--muted); }
.quote-line b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.quote-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 13px; }
.quote-total .big { font-size: 21px; font-weight: 700; letter-spacing: -.7px; color: var(--accent); }

.viewtoggle { display: flex; gap: 4px; background: var(--panel); padding: 3px; border-radius: 8px; border: 1px solid var(--line); }
.viewtoggle button { flex: 1; padding: 6px; border: none; background: transparent; border-radius: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.viewtoggle button.on { background: var(--accent); color: #fff; }

#three-canvas { width: 100%; height: 100%; display: block; }

.drafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.draft-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.draft-thumb { height: 128px; background: #0d0f13; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.draft-thumb img, .draft-thumb svg { max-width: 100%; max-height: 100%; }
.draft-body { padding: 12px 13px; }
.draft-body h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.draft-meta { font-size: 11.5px; color: var(--muted-2); line-height: 1.7; font-family: var(--mono); }
.draft-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 11px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.6); opacity: 0;
  transition: .25s ease; z-index: 200; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

  @media (max-width: 1280px) {
  .studio { grid-template-columns: 60px 240px 1fr; }
  .rightpanel { display: none; }
}

@media (max-width: 980px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .studio { grid-template-columns: 1fr; height: auto; }
  .inspector { display: none; }
  .rightpanel { width: 100%; border-left: none; border-top: 1px solid var(--line); }
}
