[hidden] { display: none !important; }
:root { --bg: #07070a; --bg-2: #0e0e13; --panel: #12121a; --line: rgba(255,255,255,0.08); --line-2: rgba(255,255,255,0.14); --text: #f2eee8; --muted: #a8a29a; --dim: #6f6a64; --gold: #f0a35e; --green: #3ddc84; --red: #ff8e8e; --blue: #7ab8ff; --serif: 'Instrument Serif', Georgia, serif; --sans: Inter, 'Segoe UI', system-ui, sans-serif; --mono: 'JetBrains Mono', Consolas, monospace; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); background: #16161f; border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
label { display: grid; gap: 6px; font-size: 0.8rem; color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 400; }
.serif { font-family: var(--serif); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(240,163,94,0.2); border-top-color: var(--gold); animation: sp 0.9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* giriş / kurulum */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(60% 50% at 70% 0%, rgba(240,163,94,0.12), transparent 70%), var(--bg); }
.gate-card { width: min(440px, 100%); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 26px; padding: 34px 30px; display: grid; gap: 16px; box-shadow: 0 40px 120px -40px #000; }
.gate-card .logo { font-family: var(--serif); font-size: 1.4rem; }
.gate-card .logo em { color: var(--gold); }
.gate-card h1 { font-family: var(--serif); font-size: 2.1rem; line-height: 1.05; }
.gate-card h1 em { color: var(--gold); }
.gate-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 0.92rem; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); }
.steps i.on { background: var(--gold); }
.qr { background: #fff; border-radius: 16px; padding: 14px; justify-self: center; line-height: 0; }
.qr img, .qr svg { width: 200px; height: 200px; }
.secret { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; background: #16161f; border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: 10px; color: var(--muted); }
.code-in { font-family: var(--mono); font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; }

/* butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; transition: all 0.2s; }
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #0b0b10; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.green { background: #25d366; border-color: #25d366; color: #06140c; }
.btn.danger { color: var(--red); border-color: rgba(255,142,142,0.4); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 0.8rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.err { color: var(--red); font-size: 0.85rem; margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* uygulama düzeni */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; background: var(--bg-2); }
.side .logo { font-family: var(--serif); font-size: 1.35rem; padding: 4px 10px 18px; }
.side .logo em { color: var(--gold); }
.side .logo small { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--dim); margin-top: 4px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.92rem; border: 0; background: none; text-align: left; }
.nav:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav.on { color: #0b0b10; background: var(--gold); }
.nav b { margin-left: auto; font-size: 0.7rem; background: var(--red); color: #1a0606; border-radius: 999px; padding: 2px 7px; }
.side .grow { flex: 1; }
.main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.top h1 { font-family: var(--serif); font-size: 2.2rem; }

/* kartlar */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; display: grid; gap: 6px; }
.kpi small { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kpi b { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.05; }
.kpi span { color: var(--muted); font-size: 0.82rem; }
.kpi.gold { border-color: rgba(240,163,94,0.4); background: linear-gradient(160deg, rgba(240,163,94,0.12), var(--bg-2)); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.card h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 12px; }

/* tablolar */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 0.9rem; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(255,255,255,0.025); }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl .sub { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.scroll { overflow-x: auto; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-paid { color: var(--green); background: rgba(61,220,132,0.12); }
.b-partial { color: var(--gold); background: rgba(240,163,94,0.12); }
.b-awaiting { color: var(--blue); background: rgba(122,184,255,0.12); }
.b-cancelled, .b-canceled, .b-archived { color: var(--dim); background: rgba(255,255,255,0.06); }
.b-new { color: var(--red); background: rgba(255,142,142,0.12); }
.b-contacted, .b-active { color: var(--green); background: rgba(61,220,132,0.12); }
.b-converted { color: var(--gold); background: rgba(240,163,94,0.12); }
.b-past_due, .b-unpaid { color: var(--red); background: rgba(255,142,142,0.12); }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,0.06); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 8px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { max-width: 320px; }
.empty { padding: 40px 12px; text-align: center; color: var(--muted); }

/* çekmece (detay) */
.drawer-bg { position: fixed; inset: 0; background: rgba(3,3,5,0.6); backdrop-filter: blur(6px); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line-2); z-index: 51; overflow-y: auto; padding: 26px 24px 60px; display: grid; gap: 18px; align-content: start; animation: dr 0.35s cubic-bezier(.2,.8,.2,1); }
@keyframes dr { from { transform: translateX(40px); opacity: 0; } }
.drawer .x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 1.2rem; }
.drawer h2 { font-family: var(--serif); font-size: 2rem; line-height: 1.05; padding-right: 50px; }
.ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ledger div { background: #16161f; border-radius: 14px; padding: 12px 14px; }
.ledger small { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.ledger b { font-size: 1.1rem; }
.ledger .due b { color: var(--gold); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.box { border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; display: grid; gap: 12px; }
.box.ok { border-color: rgba(61,220,132,0.4); background: rgba(61,220,132,0.05); }
.box h4 { margin: 0; font-size: 0.95rem; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.9rem; }
.checks input { width: auto; }
.list { display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: #16161f; font-size: 0.88rem; }
.row .sub { color: var(--muted); font-size: 0.78rem; }
textarea.out { font-family: var(--mono); font-size: 0.78rem; min-height: 70px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; opacity: 0; transition: all 0.3s; z-index: 99; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* mobil */
.mtop { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 60; transform: translateX(-102%); transition: transform 0.3s; height: auto; }
  .app.menu .side { transform: none; box-shadow: 30px 0 80px #000; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 40; }
  .mtop .logo { font-family: var(--serif); font-size: 1.2rem; }
  .mtop .logo em { color: var(--gold); }
  .main { padding-top: 18px; }
  .top h1 { font-size: 1.8rem; }
  .grid2, .ledger { grid-template-columns: 1fr; }
  .tbl .hide-m { display: none; }
  .drawer { padding: 22px 16px 60px; }
}
.b-err { color: #ff8f8f; background: rgba(255,120,120,0.12); }
