:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f3f6;
  --text: #16202a;
  --muted: #5d6b79;
  --line: #dde3ea;
  --brand: #0f6e5c;
  --brand-2: #0b5448;
  --brand-soft: #e3f2ee;
  --accent: #e8a33d;
  --danger: #c2413b;
  --danger-soft: #fbe9e8;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --ok: #1f8a4c;
  --ok-soft: #e4f4ea;
  --wa: #1fa855;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 42, .06), 0 4px 16px rgba(16, 32, 42, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
}
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-2); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--danger); }
.btn.wa { background: var(--wa); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
.field { margin-bottom: 12px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--muted);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

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

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ---------------- Landing ---------------- */
.nav {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo img { flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { color: var(--brand); }
.logo-text small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.sidebar .logo-text b { color: #7fd6c2; }
.sidebar .logo-text small { color: #9bb3ad; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; line-height: 1.8; }
.footer-grid a { color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--brand-soft), var(--bg)); }
.hero .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 44px; letter-spacing: -.02em; }
.hero p.lead { font-size: 18px; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.hero-points span::before { content: "✓ "; color: var(--brand); font-weight: 700; }

.mock { background: var(--surface); border-radius: 16px; box-shadow: 0 20px 50px rgba(15, 110, 92, .15); border: 1px solid var(--line); overflow: hidden; }
.mock-head { padding: 12px 16px; background: var(--surface-2); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.mock-body { padding: 18px; }
.mock-total { font-size: 28px; font-weight: 800; }
.bar { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 8px 0; }
.bar-label { width: 110px; color: var(--muted); }
.bar-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 99px; }
.bar-val { width: 80px; text-align: right; font-variant-numeric: tabular-nums; }

section.block { padding: 72px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { font-size: 32px; letter-spacing: -.01em; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }

.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; align-items: center; }
.feature h3 { font-size: 17px; }
.feature ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.feature .icon { font-size: 26px; margin-bottom: 8px; }

.chat { background: #e9e2d8; border-radius: 16px; padding: 18px; max-width: 380px; margin-left: auto; }
.bubble { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; max-width: 90%; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.bubble.me { background: #d8fbc6; margin-left: auto; }
.bubble .btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bubble .btns span { border: 1px solid #b5d9c9; color: #1a7a55; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.pricing-toggle { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 28px; }
.pricing-toggle button { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.pricing-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); }
.plan .tag { position: absolute; top: -12px; left: 20px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan h3 { font-size: 18px; margin-bottom: 2px; }
.plan .price { font-size: 32px; font-weight: 800; margin: 12px 0 0; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan .per-unit { font-size: 13px; color: var(--brand); font-weight: 600; margin-bottom: 14px; }
.plan ul { padding-left: 18px; margin: 0 0 18px; font-size: 14px; color: var(--muted); flex: 1; }

.calc { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; margin-top: 28px; }
.calc-result { font-size: 15px; }
.calc-result strong { font-size: 22px; }

.addons { margin-top: 28px; }

.video-card { overflow: hidden; padding: 0; }
.video-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--brand), #1c8f7a); display: grid; place-items: center; color: #fff; font-size: 40px; }
.video-card .body { padding: 14px 16px; }
.video-card iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

.cta-box { background: var(--brand); color: #fff; border-radius: 20px; padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.cta-box h2 { color: #fff; }
.cta-box p { color: #cfe9e2; }
.cta-box .card { color: var(--text); }
.form-msg { font-size: 14px; margin-top: 8px; }
.form-msg.err { color: var(--danger); }

footer { padding: 32px 0; color: var(--muted); font-size: 13px; }

/* ---------------- Panel ---------------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #10231f; color: #cfe0dc; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { color: #fff; padding: 0 8px 18px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #cfe0dc; text-decoration: none; font-size: 14px; margin-bottom: 2px; cursor: pointer;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7d9892; padding: 14px 12px 6px; }

.main { padding: 0 28px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 22px; margin: 0; }
.topbar .spacer { flex: 1; }
.role-switch { display: flex; gap: 8px; align-items: center; }
.role-switch select { width: auto; }

.trial-banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.trial-banner.active { background: var(--brand-soft); color: var(--brand-2); }
.trial-banner.expired { background: var(--danger-soft); color: var(--danger); }
.trial-banner.paid { background: var(--ok-soft); color: var(--ok); }
.trial-banner .spacer { flex: 1; }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }

.panel-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.stack > * + * { margin-top: 18px; }

.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.alert-item:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.dot.red { background: var(--danger); } .dot.yellow { background: var(--accent); } .dot.green { background: var(--ok); }

.modal-bg { position: fixed; inset: 0; background: rgba(10, 20, 25, .45); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 620px; padding: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.toast { position: fixed; bottom: 20px; right: 20px; background: #10231f; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 60; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

.readonly .needs-write { opacity: .45; pointer-events: none; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.wizard-steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.wizard-steps span { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.wizard-steps span.on { background: var(--brand); color: #fff; }
tr.err td { background: var(--danger-soft); }
tr.dup td { background: var(--warn-soft); }

.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); }

.msg-preview { background: #d8fbc6; border-radius: 10px; padding: 12px; font-size: 14px; white-space: pre-wrap; margin: 10px 0; }

@media (max-width: 960px) {
  .hero .container, .grid-2, .cta-box, .calc { grid-template-columns: 1fr; }
  .grid-3, .plans { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar .sep { display: none; }
  .chat { margin: 0 auto; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 32px; }
  .grid-3, .plans, .kpis { grid-template-columns: 1fr; }
  .main { padding: 0 16px 32px; }
  .cta-box { padding: 24px; }
}

/* Yazdırma: yalnızca rapor alanı çıksın */
@media print {
  .sidebar, .topbar, .trial-banner, .no-print, .toast, .modal-bg { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  body { background: #fff; font-size: 11pt; }
  .print-area { border: 0; box-shadow: none; padding: 0; }
  .print-area .card { border: 1px solid #ccc; box-shadow: none; }
  .print-area h3 { break-after: avoid; }
  .print-area table { break-inside: auto; font-size: 10pt; }
  .print-area tr { break-inside: avoid; }
  .kpis { grid-template-columns: repeat(4, 1fr) !important; }
  .table-wrap { overflow: visible !important; max-height: none !important; }
}
