@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0b1120;
  --ink-2: #152238;
  --ink-3: #1e293b;
  --ink-text: #94a3b8;
  --canvas: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --teal: #0d9488;
  --teal-hover: #0f766e;
  --teal-soft: #ecfdf5;
  --indigo: #4f46e5;
  --indigo-soft: #eef2ff;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #e11d48;
  --red-soft: #fff1f2;
  --focus: #0d9488;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 24px -6px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
  --radius-lg: 16px;
  --radius: 10px;
  --radius-sm: 7px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #060a14;
  --ink-2: #0f172a;
  --ink-3: #1e293b;
  --ink-text: #94a3b8;
  --canvas: #090d16;
  --surface: #111827;
  --surface-2: #182235;
  --surface-3: #1e293b;
  --line: #1f2d44;
  --line-strong: #2e405e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --teal: #2dd4bf;
  --teal-hover: #14b8a6;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --indigo: #818cf8;
  --indigo-soft: rgba(129, 140, 248, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.14);
  --focus: #2dd4bf;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 36px -8px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--text);
  font: 14px/1.55 Onest, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--indigo); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.pos { color: var(--teal); }
.neg { color: var(--red); }
.num { text-align: right; white-space: nowrap; }

/* ---------- Banka Seçim Kartları ---------- */
.bank-pick-field { grid-column: 1 / -1; min-width: 0; }
.bank-pick-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 4px; }
.bank-pick {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; min-width: 0;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bank-pick:hover { border-color: var(--focus); }
.bank-pick input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 2px 0 0; flex: 0 0 18px; accent-color: var(--teal); }
.bank-pick:has(input:checked) {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 25%, transparent);
}
.bank-pick span { overflow-wrap: anywhere; }
.bank-pick .small { display: block; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }

/* ---------- Ana İskelet & Premium Sol Menü ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
  color: var(--ink-text);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
}
.brand {
  padding: 4px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand-row { display: flex; align-items: center; gap: 11px; }
.brand-row .mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 8px rgba(45, 212, 191, 0.25)); }
.brand .platform {
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  word-break: break-word;
}
.brand .dealer {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  padding-left: 45px;
}
.ctx {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
}
.ctx label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.ctx select {
  background: #162238; border: 1px solid #293b5c; color: #fff;
  border-radius: var(--radius-sm); padding: 7px 10px; font-weight: 600; font-size: 13px;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-group {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  padding: 14px 12px 4px;
}
.nav-group:first-child { padding-top: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: var(--radius);
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  text-decoration: none;
}
.nav a.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.04) 100%);
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(45, 212, 191, 0.25);
  box-shadow: inset 3px 0 0 #2dd4bf;
}
.nav a .count {
  margin-left: auto; font-size: 11px; background: var(--amber); color: #fff;
  border-radius: 99px; padding: 1px 7px; font-weight: 700;
}
.nav a .count.count-exp {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.side-foot {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; gap: 10px; font-size: 12.5px;
}
.side-foot .who { color: #f8fafc; font-weight: 600; font-size: 13.5px; }
.side-foot .row { display: flex; gap: 8px; }
.side-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all .15s;
}
.side-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.2); }

/* ---------- Ana İçerik & Üst Başlık ---------- */
.main {
  padding: 28px 36px 64px;
  min-width: 0;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #0b1120 0%, #16233b 55%, #114240 100%);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -10px rgba(11, 17, 32, 0.35);
  color: #ffffff;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
}
.page-head p { margin: 4px 0 0; color: #94a3b8; font-size: 13.5px; }
.page-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.btn-excel-master {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
  max-width: 100%;
}
.btn-excel-master:hover {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  border-color: #10b981;
  color: #ffffff;
}

/* ---------- Üst 4 Adımlı İş Akışı Barı (.workflow-bar) ---------- */
.workflow-bar { margin-bottom: 20px; }
.wf-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.wf-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all .16s ease;
  min-width: 0;
}
.wf-step:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.wf-step.active {
  background: linear-gradient(135deg, var(--teal-soft) 0%, var(--surface) 100%);
  border-color: var(--teal);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 22%, transparent), var(--shadow);
}
.wf-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: none;
}
.wf-step.active .wf-num {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}
.wf-step div { min-width: 0; }
.wf-step strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.wf-step small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }

/* ---------- Dönem Seçici ---------- */
.period {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.65); padding: 4px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px);
}
.seg { display: inline-flex; background: rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 2px; }
.seg button {
  background: none; border: 0; padding: 6px 12px; border-radius: 6px;
  color: #cbd5e1; cursor: pointer; font-weight: 600; font-size: 12.5px;
  transition: all .15s;
}
.seg button:hover { color: #ffffff; }
.seg button.active {
  background: #14b8a6;
  color: #042f2e;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(20, 184, 166, 0.35);
}
:root[data-theme="dark"] .seg button.active { background: #2dd4bf; color: #042f2e; }
.step {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; font-size: 16px; color: #cbd5e1;
}
.step:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.period-label { min-width: 108px; text-align: center; font-weight: 700; font-size: 12.5px; padding: 0 4px; color: #ffffff; }
.custom-range { display: inline-flex; gap: 6px; }
.custom-range input { width: auto; padding: 5px 8px; font-size: 12.5px; background: #0f172a; color: #fff; border-color: rgba(255,255,255,0.2); }

/* ---------- Kartlar & Yüzeyler (.sheet) ---------- */
.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sheet-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  flex-wrap: wrap;
}
.sheet-head h2 { margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-head .sub { color: var(--muted); font-size: 12.5px; }
.sheet-head .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.scroll { overflow-x: auto; }

/* ---------- Tablolar ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
td { white-space: nowrap; font-size: 13.5px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .12s; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td.name { font-weight: 700; }
td.small, .small { font-size: 12px; color: var(--muted); }
tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--line-strong); border-bottom: 0; }
.empty { padding: 36px 20px; color: var(--muted); text-align: center; font-size: 13.5px; }

/* ---------- USDT Raporu: İki Taraf Defter ---------- */
.ledger-side { border-left: 4px solid var(--teal); }
.ledger-side.alici { border-left-color: var(--indigo); }
.ledger-side + .ledger-side { border-top: 1px solid var(--line); }
.ledger-title { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px 10px; }
.ledger-title h3 { margin: 0; font-size: 16px; font-weight: 800; }
.ledger-title .sub { color: var(--muted); font-size: 12.5px; }
.ledger-title .total { margin-left: auto; font-weight: 800; font-size: 16px; }
.groups th { background: transparent; border-bottom: 0; padding-bottom: 2px; font-size: 11px; }
.groups th span { display: block; border-top: 2px solid; padding-top: 5px; }
.g-akt span { border-color: var(--teal); color: var(--teal); }
.alici .g-akt span { border-color: var(--indigo); color: var(--indigo); }
.g-tes span { border-color: var(--amber); color: var(--amber); }
.g-kasa span { border-color: var(--text); color: var(--text); }
td.amount { font-weight: 600; }
td.usdt { color: var(--amber); font-weight: 600; }

/* ---------- Kasa Çubuğu ---------- */
.kasa { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.kasa .v { min-width: 104px; text-align: right; font-weight: 700; }
.bar { position: relative; width: 120px; height: 8px; background: var(--surface-2); border-radius: 99px; }
.bar::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.bar i.p { left: 50%; background: var(--teal); }
.bar i.n { right: 50%; background: var(--red); }

/* ---------- Kasa Özeti ---------- */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.summary.summary-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary div { padding: 18px 20px; border-right: 1px solid var(--line); }
.summary div:last-child { border-right: 0; }
.summary .lbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.summary .val { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.summary .net .val { font-size: 28px; }

/* ---------- Form & Butonlar ---------- */
.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  padding: 20px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9.5px 12px;
  width: 100%;
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover { border-color: var(--muted); }
input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent);
}
.amount-input { font-size: 17px; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9.5px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
.btn:hover {
  border-color: var(--muted);
  background: var(--surface-2);
  text-decoration: none;
}
.btn.primary {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #0f172a;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 4px rgba(15, 23, 42, 0.12);
}
.btn.primary:hover { background: linear-gradient(180deg, #334155 0%, #1e293b 100%); }
:root[data-theme="dark"] .btn.primary {
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  border-color: #4f46e5;
  color: #fff;
}
.btn.go {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  border-color: #0d9488;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 6px rgba(13, 148, 136, 0.25);
}
.btn.go:hover { background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, var(--line-strong)); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: .55; cursor: progress; }
.actions { display: flex; gap: 6px; align-items: center; }

.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 9.5px 12px;
  color: var(--muted); cursor: pointer; font-weight: 500; background: var(--surface-2);
  transition: all .15s;
}
.drop:hover { border-color: var(--teal); color: var(--text); }
.drop.has { border-style: solid; border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.preview-img { max-height: 64px; border-radius: var(--radius-sm); margin-top: 6px; border: 1px solid var(--line); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.b-pending { background: var(--amber-soft); color: var(--amber); }
.b-approved { background: var(--teal-soft); color: var(--teal); }
.b-rejected { background: var(--red-soft); color: var(--red); }
.b-atici { background: var(--teal-soft); color: var(--teal); }
.b-alici { background: var(--indigo-soft); color: var(--indigo); }
.b-off { background: var(--surface-2); color: var(--muted); }
.b-tg {
  background: color-mix(in srgb, #0ea5e9 13%, var(--surface));
  color: #0284c7;
  border: 1px solid color-mix(in srgb, #0ea5e9 28%, transparent);
}
:root[data-theme="dark"] .b-tg { color: #38bdf8; }
.b-panel {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.notice {
  margin: 0 0 18px; padding: 13px 18px; border-radius: var(--radius);
  background: var(--amber-soft); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  font-size: 13px;
}

/* ---------- Bildirimler (Toast) ---------- */
#toast { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
#toast div {
  background: #0f172a; color: #fff; padding: 12px 16px; border-radius: var(--radius);
  max-width: 380px; box-shadow: var(--shadow-lg); border-left: 4px solid var(--indigo);
  font-size: 13.5px; font-weight: 500;
  animation: toast-in .18s ease-out;
}
#toast div.ok { border-left-color: #2dd4bf; }
#toast div.err { border-left-color: #fb7185; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

/* ---------- Premium Giriş Ekranı ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art {
  background:
    radial-gradient(circle at 18% 22%, rgba(20, 184, 166, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(79, 70, 229, 0.22) 0%, transparent 50%),
    linear-gradient(160deg, #070b14 0%, #0f172a 100%);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-mark { width: 56px; height: 56px; display: block; margin-bottom: 28px; filter: drop-shadow(0 4px 16px rgba(45, 212, 191, 0.3)); }
.login-art .platform { font-size: clamp(34px, 4.5vw, 56px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 11ch; word-break: break-word; }
.login-art .dealer { font-size: 17px; color: var(--ink-text); margin-top: 12px; }
.login-art .foot { color: #64748b; font-size: 13px; }
.login-form-wrap { display: grid; place-items: center; padding: 32px 20px; background: var(--canvas); }
.login-form {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 16px;
}
.login-form h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.login-form p { margin: -8px 0 4px; color: var(--muted); font-size: 13.5px; }
.err-text { color: var(--red); font-size: 13px; min-height: 18px; }

/* ---------- Kurlar & Pager ---------- */
.rate-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding: 16px 20px; }
.rate-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: transform .15s, border-color .15s;
}
.rate-card:hover { border-color: var(--line-strong); }
.rate-value { font-size: 17px; font-weight: 800; margin: 6px 0; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rate-stale { border-color: var(--red); background: var(--red-soft); }
.rates-panel { margin-bottom: 20px; }
.rates-panel > p { margin: 0 20px 16px; }
.manual-gold-form { border-top: 1px solid var(--line); }
.gold-rate-input { max-width: 155px; width: 100%; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.manual-gold-actions { padding: 14px 20px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; gap: 10px; }
.pager { padding: 12px 20px; justify-content: flex-end; border-top: 1px solid var(--line); background: var(--surface-2); }

/* ---------- Muhasebe & Gün Sonu Premium Kartlar ---------- */
.accounting-tabs {
  display: inline-flex;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
  padding: 5px;
  margin-bottom: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.accounting-tabs button {
  flex: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8.5px 15px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.accounting-tabs button:hover { color: var(--text); }
.accounting-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--teal);
  border-color: var(--line);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.accounting-panel { min-width: 0; }

.accounting-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.accounting-summary.accounting-summary-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.accounting-summary > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--indigo);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.accounting-summary > div:nth-child(2) { border-top-color: #6366f1; }
.accounting-summary > div:nth-child(3) { border-top-color: #10b981; }
.accounting-summary > div:nth-child(4) { border-top-color: #f43f5e; }
.accounting-summary > div:nth-child(5) { border-top-color: #f59e0b; }
.accounting-summary .accounting-expense-card {
  border-top: 3px solid var(--red);
  background: color-mix(in srgb, var(--red) 4%, var(--surface-2));
}
.accounting-summary .accounting-expense-card a {
  color: var(--red);
  font-weight: 700;
}
.accounting-summary .accounting-income-hero {
  background: linear-gradient(135deg, #052e2b 0%, #0f5132 100%);
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-top: 3px solid #2dd4bf;
  color: #ffffff;
}
.accounting-summary .accounting-income-hero > span { color: #99f6e4 !important; }
.accounting-summary .accounting-income-hero strong { color: #ffffff; }
.accounting-summary .accounting-income-hero strong small { color: #99f6e4; }
.accounting-summary .accounting-expense-hero {
  background: linear-gradient(135deg, #2a0a18 0%, #4c0519 100%);
  border: 1px solid rgba(251, 113, 133, 0.35);
  border-top: 3px solid #fb7185;
  color: #ffffff;
}
.accounting-summary .accounting-expense-hero > span { color: #fda4af !important; }
.accounting-summary .accounting-expense-hero strong { color: #ffffff; }
.accounting-summary .accounting-expense-hero strong small { color: #fda4af; }
.accounting-summary > div > span:first-child {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.accounting-summary strong {
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.accounting-summary strong small { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.accounting-summary .accounting-primary {
  background: linear-gradient(135deg, #0b192c 0%, #0d3b38 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-top: 3px solid #2dd4bf;
  color: #ffffff;
}
.accounting-summary .accounting-primary > span { color: #94a3b8 !important; }
.accounting-summary .accounting-primary strong { color: #ffffff; }
.accounting-summary .accounting-primary strong.pos { color: #5eead4; }
.accounting-summary .accounting-primary strong.neg { color: #fda4af; }
.accounting-summary .accounting-primary strong small { color: #94a3b8; }

.accounting-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px;
}
.accounting-breakdown > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.accounting-breakdown span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.accounting-breakdown strong { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.accounting-details {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  color: var(--muted);
  font-size: 12.5px;
  background: var(--surface-2);
}
.accounting-details summary { cursor: pointer; font-weight: 600; }
.accounting-details .accounting-note { margin: 10px 0 0; }
.accounting-note { margin: 14px 20px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* Hızlı İşlem Barı */
.accounting-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.accounting-quick h2 { font-size: 15px; font-weight: 700; margin: 0; }
.accounting-quick p { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.quick-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-buttons button:first-child {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: white;
  border-color: #0d9488;
}
.btn.btn-income-link {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: color-mix(in srgb, var(--teal) 40%, var(--line-strong));
  font-weight: 700;
}
.btn.btn-income-link:hover {
  background: color-mix(in srgb, var(--teal) 18%, var(--surface));
  border-color: var(--teal);
}
.btn.btn-expense-link {
  background: var(--red-soft);
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--line-strong));
  font-weight: 700;
}
.btn.btn-expense-link:hover {
  background: color-mix(in srgb, var(--red) 16%, var(--surface));
  border-color: var(--red);
}

/* Hızlı Gelir & Gider Sayfası (#view-giderler) */
.quick-income-form {
  grid-template-columns: minmax(120px, 0.9fr) minmax(140px, 1fr) minmax(150px, 1.1fr) minmax(220px, 1.8fr) minmax(135px, 0.95fr) auto;
  align-items: end;
}
.quick-expense-form {
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.1fr) minmax(240px, 2.2fr) minmax(140px, 1fr) auto;
  align-items: end;
}
.expense-filters { align-items: center; gap: 8px; }
.expense-filters select,
.expense-filters input[type="search"] {
  width: auto;
  min-width: 170px;
  padding: 6.5px 11px;
  font-size: 12.5px;
}
.seg-light {
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 3px;
}
.seg-light button {
  color: var(--muted);
  padding: 5px 11px;
  font-size: 12px;
}
.seg-light button:hover { color: var(--text); }
.seg-light button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
td.expense-desc {
  white-space: normal;
  min-width: 200px;
  max-width: 440px;
}

/* ---------- Rehber Kutusu (.guide-box) & Kurulum Adımları ---------- */
.guide-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 13px 18px;
  margin-bottom: 18px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.guide-box summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}
.guide-box summary::-webkit-details-marker { display: none; }
.guide-box summary::after {
  content: 'Rehberi aç ▾';
  font-size: 11.5px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 3px 9px;
  border-radius: 99px;
  flex: none;
}
.guide-box[open] summary::after { content: 'Kapat ▴'; }
.guide-box h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 700; }
.guide-box p { margin: 8px 0 4px; color: var(--muted); font-size: 12.5px; }
.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: 12px;
}
.guide-step {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 0;
}
.guide-step strong { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.guide-step p { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.45; }
.guide-step code {
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--teal);
  font-weight: 600;
}

/* ---------- Telegram & Dekont Ayarları ---------- */
.receipt-group-settings > summary {
  cursor: pointer;
  padding: 15px 20px;
  font-weight: 700;
  font-size: 14px;
  color: var(--teal);
  background: linear-gradient(90deg, var(--teal-soft) 0%, var(--surface) 100%);
  border-radius: var(--radius-lg);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.receipt-group-settings > summary::-webkit-details-marker { display: none; }
.receipt-group-settings > summary::after {
  content: 'Grup bağla ▾';
  font-size: 12px;
  background: var(--teal);
  color: #fff;
  padding: 4px 11px;
  border-radius: 99px;
  flex: none;
}
.receipt-group-settings[open] > summary {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid var(--line);
}
.receipt-group-settings[open] > summary::after { content: 'Gizle ▴'; }
.receipt-reason { white-space: normal; max-width: 300px; min-width: 180px; }
#receiptReviewForm .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#receiptReviewForm .field { min-width: 0; }

/* ---------- Banka & IBAN Yönetimi (#view-ibanlar) ---------- */
.bank-management {
  margin: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.bank-management > summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.bank-management h3 {
  margin: 18px 20px 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bank-management details {
  margin: 14px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.bank-management details > summary {
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
#accountingBankForm.form { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }

/* ---------- Form Özel Kuralları ---------- */
#accountingForm { max-width: 960px; }
#accountingForm .form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
#accountingForm .field { min-width: 0; }
#accountingSubmit { grid-column: 1 / -1; justify-self: start; min-width: 190px; }
#accounting-panel-people .form { grid-template-columns: minmax(0, 1fr); max-width: 640px; align-items: start; }
#accounting-panel-people .btn { justify-self: start; }
#accounting-panel-people .manager-only { border-top: 1px solid var(--line); }

.report-main { max-width: 1100px; margin: 32px auto; padding: 0 16px; }
.report-body { padding: 20px; }
.report-filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.onboarding-intro {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 0 0 22px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.onboarding-intro h2 { margin: 0; font-size: 18px; font-weight: 800; }
.onboarding-intro p { max-width: 640px; margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.business-legacy { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.business-legacy summary { cursor: pointer; margin-bottom: 10px; font-weight: 600; }
#dealerForm { max-width: 900px; }
#dealerForm .form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.onboarding-step { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.onboarding-step > span {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px;
  border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700;
}
.onboarding-step p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
#dealerForm .field { min-width: 0; }
#dealerForm .hint { overflow-wrap: anywhere; }
#dealerSubmit { grid-column: 1 / -1; justify-self: start; }
.handover-body { padding: 20px; display: flex; flex-direction: column; align-items: start; gap: 10px; }
.handover-body p { margin: 0; }
.handover-body a { overflow-wrap: anywhere; max-width: 100%; }
.handover-body .tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- TRON Cüzdan & Akıllı Asistan Formları ---------- */
.tron-wallet-form {
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1.2fr) minmax(150px, 1fr) auto;
  align-items: end;
}
.tron-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
#tronLookupBox {
  margin: 0 18px 16px;
}
.asst-staff-form,
.asst-plan-form {
  grid-template-columns: minmax(170px, 1.6fr) minmax(130px, 1fr) minmax(120px, 1fr) minmax(135px, 1fr) minmax(110px, 0.9fr) auto;
  align-items: end;
}
.asst-settings-form {
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(220px, 1.2fr) auto;
  align-items: end;
}
.asst-check-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.35;
}

/* ---------- Tablet & Mobil Uyumluluk ---------- */
@media (max-width: 1180px) {
  .accounting-summary.accounting-summary-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-income-form,
  .quick-expense-form,
  .tron-wallet-form,
  .asst-staff-form,
  .asst-plan-form,
  .asst-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-income-form .field-wide,
  .quick-expense-form .field-wide { grid-column: 1 / -1; }
  .quick-income-form button[type="submit"],
  .quick-expense-form button[type="submit"],
  .asst-staff-form button[type="submit"],
  .asst-plan-form button[type="submit"],
  .asst-settings-form button[type="submit"],
  .tron-form-actions { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: static;
    height: auto;
    padding: 14px 16px;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .brand { padding: 0 0 10px; }
  .brand .dealer { padding-left: 0; margin-top: 4px; }
  .nav { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .nav-group { display: none; }
  .nav a { white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  .nav a.active { box-shadow: inset 0 -3px 0 #2dd4bf; }
  .side-foot { margin-top: 0; padding: 10px 0 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .side-foot .row { flex: none; }
  .main { padding: 18px 16px 48px; }
  .summary, .summary.summary-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary div:nth-child(2n) { border-right: 0; }
  .summary div { border-bottom: 1px solid var(--line); }
  .accounting-summary, .accounting-summary.accounting-summary-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounting-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { padding: 18px; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { padding: 28px 20px; gap: 24px; }
}

@media (max-width: 600px) {
  .shell, .side, .nav { min-width: 0; }
  .page-head .tools { margin-left: 0; width: 100%; }
  .page-head .period { width: 100%; justify-content: center; }
  .btn-excel-master { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .wf-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .wf-step { padding: 10px 12px; }
  #dealerForm .form,
  #receiptReviewForm .form,
  #accountingBankForm.form,
  #accountingForm .form,
  .quick-income-form,
  .quick-expense-form,
  .tron-wallet-form,
  .asst-staff-form,
  .asst-plan-form,
  .asst-settings-form { grid-template-columns: minmax(0, 1fr); }
  .quick-income-form button[type="submit"],
  .quick-expense-form button[type="submit"],
  .asst-staff-form button[type="submit"],
  .asst-plan-form button[type="submit"],
  .asst-settings-form button[type="submit"],
  .tron-form-actions button { width: 100%; }
  .tron-form-actions { flex-direction: column; width: 100%; }
  .expense-filters { width: 100%; }
  .expense-filters select,
  .expense-filters input[type="search"] { width: 100%; min-width: 0; }
  .accounting-summary, .accounting-summary.accounting-summary-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 12px; }
  .accounting-summary > div { padding: 12px; }
  .accounting-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 12px; }
  .quick-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .accounting-tabs { display: flex; width: 100%; }
  .accounting-tabs button { padding: 8px 12px; font-size: 12.5px; }
  .sheet-head { padding: 13px 14px; }
  .sheet-head .tools { margin-left: 0; }
  .form { padding: 14px; }
  .bank-management { margin: 12px; }
  .bank-management h3 { margin: 14px 14px 4px; }
  .receipt-group-settings > summary { padding: 14px; font-size: 13px; }
}

/* ---------- USDT Giriş (Alış) / Çıkış (Satış) & Kasa Farkı ---------- */
.usdt-vault-sheet .accounting-summary { border-bottom: 0; }
.usdt-vault-sheet .accounting-income-hero .small { color: #a7f3d0 !important; font-size: 12px; }
.usdt-vault-sheet .accounting-expense-hero .small { color: #fecdd3 !important; font-size: 12px; }
.usdt-vault-sheet .accounting-primary .small { color: #cbd5e1 !important; font-size: 12px; }
.usdt-ozet-bar { background: color-mix(in srgb, var(--teal) 3%, var(--surface)); }

.usdt-dir-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 0;
}
.usdt-dir-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  cursor: pointer;
  transition: all .15s ease;
  min-width: 0;
}
.usdt-dir-btn strong { font-size: 14px; font-weight: 800; color: var(--text); }
.usdt-dir-btn small { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.usdt-dir-btn:hover { border-color: var(--muted); }
.usdt-dir-btn.dir-in.active {
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal-soft) 0%, var(--surface) 100%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 22%, transparent);
}
.usdt-dir-btn.dir-in.active strong { color: var(--teal); }
.usdt-dir-btn.dir-out.active {
  border-color: var(--indigo);
  background: linear-gradient(135deg, var(--indigo-soft) 0%, var(--surface) 100%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--indigo) 22%, transparent);
}
.usdt-dir-btn.dir-out.active strong { color: var(--indigo); }

.usdt-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.usdt-source-chip {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s;
}
.usdt-source-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

@media (max-width: 600px) {
  .usdt-dir-bar { grid-template-columns: minmax(0, 1fr); padding: 12px 14px 0; }
  #fDeliveryDir { width: 100% !important; max-width: 100%; }
}

/* ---------- Mutabık AI Yönetici (Web Panel Copilot & Mikrofon) ---------- */
.ai-copilot-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 44;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 999px;
  border: 1px solid #0d9488;
  background: linear-gradient(135deg, #0f172a 0%, #0d9488 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform .15s ease, box-shadow .15s ease;
  max-width: calc(100vw - 28px);
}
.ai-copilot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.42);
}
.ai-fab-icon { font-size: 15px; line-height: 1; }

.ai-copilot-panel {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 45;
  width: min(440px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ai-copilot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}
.ai-copilot-head strong { display: block; font-size: 14.5px; font-weight: 800; }
.ai-copilot-head small { display: block; font-size: 11.5px; color: #94a3b8; margin-top: 1px; }
.ai-copilot-head .btn.sm {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.ai-copilot-head .btn.sm:hover { background: rgba(255, 255, 255, 0.2); }

.ai-copilot-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.ai-chip {
  flex: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s;
}
.ai-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.ai-copilot-messages {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 390px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--canvas);
}
.ai-msg {
  max-width: 92%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.48;
  word-break: break-word;
}
.ai-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg-bot {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.ai-msg-title { font-weight: 800; margin-bottom: 4px; }
.ai-voice-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 700;
  margin-right: 4px;
}
.ai-preview-box, .ai-summary-card {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
}
.ai-preview-box code, .ai-summary-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
}
.ai-confirm-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.ai-done-box {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
  font-size: 12.5px;
}

.ai-voice-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--red-soft);
  color: var(--red);
  border-top: 1px solid color-mix(in srgb, var(--red) 28%, transparent);
  font-size: 12px;
  font-weight: 600;
}
.ai-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
  animation: ai-pulse 1s infinite ease-in-out;
}
@keyframes ai-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
}

.ai-copilot-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.ai-copilot-form input {
  flex: 1 1 auto;
  min-width: 0;
}
.ai-mic-btn {
  flex: none;
  padding: 8px 11px;
  font-size: 15px;
  line-height: 1;
}
.ai-mic-btn.recording {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 600px) {
  .ai-copilot-panel {
    right: 10px;
    left: 10px;
    bottom: 68px;
    width: auto;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 88px);
  }
  .ai-copilot-fab {
    right: 12px;
    bottom: 12px;
    padding: 9px 14px;
    font-size: 12.5px;
  }
}

/* ---------- Yazdırma / PDF Görünümü ---------- */
@media print {
  body { background: white; color: black; }
  .side, .page-head, .workflow-bar, .rates-panel, .guide-box, .ai-copilot-fab, .ai-copilot-panel, #view-muhasebe form, #view-muhasebe .rate-cards, #view-muhasebe .manager-only, #view-muhasebe button, #view-muhasebe .sheet:has(#goldCards), #view-muhasebe .sheet:has(#accountingContactForm), #view-muhasebe .sheet:has(#accountingForm), .report-filters, .pager, #printDeliveryReport, #toast, #view-muhasebe .accounting-tabs, #view-muhasebe .accounting-quick, #view-muhasebe .accounting-panel { display: none !important; }
  .shell { display: block; }
  .main, .report-main { padding: 0; margin: 0; max-width: none; }
  .sheet { box-shadow: none; break-inside: auto; }
  .scroll { overflow: visible; }
  table { min-width: 0; }
  th, td { padding: 5px; font-size: 10px; }
  #view-muhasebe .accounting-panel[data-print-report] { display: block !important; }
  #view-muhasebe .accounting-details > p { display: block !important; }
  #view-muhasebe .accounting-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  a { color: black; }
  tr { break-inside: avoid; }
}
