/* Doping Travel Muhasebe */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --ink: #1d2433;
  --ink-2: #4a5468;
  --muted: #7a8296;
  --line: #e3dfd7;
  --line-2: #efece6;
  --brand: #0e5e6f;
  --brand-ink: #ffffff;
  --brand-soft: #e4f0f2;
  --accent: #e08a1e;
  --pos: #12794a;
  --pos-bg: #e6f4ec;
  --neg: #b42318;
  --neg-bg: #fbeae8;
  --warn: #9a6200;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(29, 36, 51, .06), 0 2px 8px rgba(29, 36, 51, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .15rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
p { margin: .4rem 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
small, .small { font-size: .85em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
[hidden] { display: none !important; }

/* ---- Üst çubuk ---- */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1240px; margin: 0 auto; padding: .55rem 16px; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 650; }
.brand:hover { text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #1d2433; font-weight: 800; font-size: .8rem; letter-spacing: .02em; }
.mark.lg { width: 46px; height: 46px; font-size: 1.05rem; border-radius: 12px; }
.brand-t { font-size: 1rem; }
.menu { flex: 1; }
.menu > summary { list-style: none; cursor: pointer; width: 38px; height: 34px; display: none; flex-direction: column; justify-content: center; gap: 4px; padding: 0 8px; margin-left: auto; border-radius: 8px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary span { display: block; height: 2px; background: #fff; border-radius: 2px; }
.nav { display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; }
.nav a, .nav .linkbtn { color: #cfd5e2; padding: .4rem .65rem; border-radius: 7px; font-size: .92rem; }
.nav a:hover, .nav .linkbtn:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav a.on { background: rgba(255,255,255,.14); color: #fff; }
.usermenu { margin-left: auto; position: relative; }
.usermenu > summary { list-style: none; cursor: pointer; color: #cfd5e2; padding: .4rem .65rem; border-radius: 7px; font-size: .92rem; white-space: nowrap; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover, .usermenu[open] > summary { background: rgba(255,255,255,.08); color: #fff; }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(29,36,51,.15); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.usermenu-pop a, .usermenu-pop .linkbtn { color: var(--ink) !important; padding: .5rem .7rem; border-radius: 7px; font-size: .9rem; text-align: left; width: 100%; }
.usermenu-pop a:hover, .usermenu-pop .linkbtn:hover { background: var(--line-2) !important; text-decoration: none; }
.usermenu-pop form { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.langs { display: flex; gap: 2px; }
.langs a { color: #aab3c5; font-size: .75rem; font-weight: 650; padding: .25rem .4rem; border-radius: 6px; }
.langs a.on { color: #fff; background: rgba(255,255,255,.14); }
.langs a:hover { text-decoration: none; color: #fff; }

@media (max-width: 959px) {
  .top-in { flex-wrap: wrap; }
  .menu { order: 3; flex-basis: 100%; }
  .menu > summary { display: flex; position: absolute; right: 16px; top: .55rem; }
  .menu[open] > summary { background: rgba(255,255,255,.1); }
  .nav { flex-direction: column; align-items: stretch; padding: .4rem 0 .6rem; }
  .usermenu { margin: .4rem 0 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: .4rem; }
  .usermenu-pop { position: static; box-shadow: none; background: transparent; border: 0; padding: 0 0 0 .6rem; }
  .usermenu-pop a, .usermenu-pop .linkbtn { color: #cfd5e2 !important; }
  .usermenu-pop a:hover, .usermenu-pop .linkbtn:hover { background: rgba(255,255,255,.08) !important; }
  .usermenu-pop form { border-color: rgba(255,255,255,.12); }
  .langs { margin-left: auto; margin-right: 48px; }
}

/* ---- Sayfa ---- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 { margin-bottom: 18px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

.flash { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash.success { background: var(--pos-bg); border-color: #b7e0c8; color: #0b5132; }
.flash.error { background: var(--neg-bg); border-color: #f2c5c0; color: #7d1a12; }
.flash.info { background: var(--brand-soft); border-color: #c4dde2; color: #0b4652; }

/* ---- Düğmeler ---- */
.btn { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: #cfc9be; background: #faf9f7; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #0b4e5d; }
.btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.sm { padding: .3rem .6rem; font-size: .83rem; }
.btn.wide { width: 100%; justify-content: center; padding: .7rem; }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.linkbtn.danger { color: var(--neg); }
.linkbtn:hover { text-decoration: underline; }
form.inline { display: inline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Formlar ---- */
.form label, .stack label { display: flex; flex-direction: column; gap: .3rem; font-weight: 550; font-size: .9rem; margin-bottom: .85rem; }
.form.narrow { max-width: 620px; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #d6d1c7; border-radius: 8px; padding: .5rem .65rem; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgba(14, 94, 111, .15); outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
label.check { flex-direction: row !important; align-items: center; gap: .45rem !important; font-weight: 400 !important; }
.has-error input, .has-error select { border-color: var(--neg); }
.ferr { color: var(--neg); font-size: .82rem; font-weight: 500; }
.row2, .row3, .row4 { display: grid; gap: 0 14px; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: repeat(3, 1fr); }
.row4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } .row4 { grid-template-columns: 1fr 1fr; } }
.half { max-width: 50%; }
@media (max-width: 640px) { .half { max-width: none; } }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem .1rem; margin: 0 0 .9rem; }
legend { font-weight: 650; font-size: .88rem; padding: 0 .3rem; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.opt-filter { margin-bottom: .3rem; font-size: .88rem; padding: .35rem .6rem; background: #fbfaf8; }
.price-status { font-weight: 500; }
.price-status.ok { color: var(--pos); }
.price-status.warn { color: var(--warn); }
.calc-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: .9rem; }
.calc-box > div { background: #faf8f5; padding: .65rem .8rem; display: flex; flex-direction: column; gap: .1rem; }
.calc-box span { font-size: .8rem; color: var(--muted); }
.calc-box b { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.calc-box .eff { background: var(--brand-soft); }
#pay-form .calc-box { grid-template-columns: 1fr; }
@media (max-width: 640px) { .calc-box { grid-template-columns: 1fr; } }
.cur-balance { font-weight: 400; }
.open-vouchers .ov-list { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: .2rem; padding-bottom: .6rem; }
.check.ov { font-size: .87rem !important; margin: 0 !important; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { width: auto; }
.filters input[type="search"] { min-width: 220px; }
.filters label { display: flex; align-items: center; gap: .35rem; font-size: .87rem; color: var(--ink-2); }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-form label { display: flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; }
.inline-form input, .inline-form select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: .45rem .8rem; color: var(--ink-2); font-weight: 600; font-size: .88rem; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--brand); color: #fff; }
.seg a:hover { text-decoration: none; }

/* ---- Tablolar ---- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card .tbl-wrap { border: 0; border-radius: 0; margin: 0 -18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 600; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: #fbfaf8; white-space: nowrap; }
.tbl td { padding: .6rem .75rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fcfbf9; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.cancelled td { color: var(--muted); }
.tbl tr.cancelled td a { color: var(--muted); }
.tbl tr.cancelled .bal, .tbl tr.cancelled .amt { opacity: .55; }
.tbl tr.sum td { background: #f7f5f1; font-weight: 600; }
.tbl tfoot td { border-top: 2px solid var(--line); }
.tbl tr.row-bad td { background: #fff7f6; }
.tbl.small { font-size: .84rem; }
pre { font: .78rem/1.4 var(--mono); white-space: pre-wrap; margin: .3rem 0 0; }

.bal { display: inline-flex; align-items: baseline; gap: .3rem; font-variant-numeric: tabular-nums; }
.bal b { font-weight: 650; }
.bal small { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: .05rem .35rem; border-radius: 5px; }
.bal.pos b { color: var(--pos); }
.bal.pos small { background: var(--pos-bg); color: var(--pos); }
.bal.neg b { color: var(--neg); }
.bal.neg small { background: var(--neg-bg); color: var(--neg); }
.bal.zero { color: #b8b2a7; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; }

.tag { display: inline-block; font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; padding: .1rem .4rem; border-radius: 5px; background: #ece8e1; color: var(--ink-2); vertical-align: middle; }
.tag.red { background: var(--neg-bg); color: var(--neg); }
.tag.green { background: var(--pos-bg); color: var(--pos); }
.tag.blue { background: var(--brand-soft); color: var(--brand); }

/* ---- Özet kartları ---- */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 10px; }
@media (max-width: 760px) { .cards3 { grid-template-columns: 1fr; } }
.cards3 .card { margin-bottom: 0; }
.stat-cur { font-weight: 750; font-size: .95rem; letter-spacing: .02em; margin-bottom: .4rem; }
.stat-cur span { color: var(--muted); font-weight: 500; }
.stat-big { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.2; }
.stat dl { margin: 0; display: grid; gap: .3rem; }
.stat dl > div { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.stat dt { color: var(--muted); font-size: .85rem; }
.stat dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .net { border-top: 1px dashed var(--line); padding-top: .35rem; margin-top: .15rem; }
a.card.link { color: inherit; display: block; transition: border-color .15s; }
a.card.link:hover { border-color: var(--brand); text-decoration: none; }
.rates { list-style: none; padding: 0; margin: 0 0 .6rem; font-variant-numeric: tabular-nums; }
.rates li { padding: .25rem 0; }
.sums { display: flex; flex-direction: column; gap: .25rem; background: var(--brand-soft); border-radius: 8px; padding: .55rem .8rem; margin-bottom: 12px; font-size: .86rem; color: #0b4652; }

.kv { width: 100%; border-collapse: collapse; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; font-size: .87rem; padding: .35rem .8rem .35rem 0; vertical-align: top; white-space: nowrap; width: 1%; }
.kv td { padding: .35rem 0; }
.kv tr.sum th, .kv tr.sum td { border-top: 1px solid var(--line); padding-top: .55rem; font-weight: 650; }

.share-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.share-row .copy-src { flex: 1 1 260px; font: .8rem var(--mono); background: #fbfaf8; }
.foot-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.danger-zone { border-color: #f2c5c0; }
.confirm-box { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pager { display: flex; gap: .8rem; align-items: center; justify-content: center; margin-top: 14px; }
.empty-state { text-align: center; padding: 60px 16px; }
.cols-list { padding-left: 1.1rem; }

/* ---- Giriş ---- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: radial-gradient(circle at 20% 0%, #e9e3d8 0, var(--bg) 55%); }
.auth-box { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(29,36,51,.08); }
.auth-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.auth-head h1 { font-size: 1.2rem; margin: 0; }
.langs.center { justify-content: center; margin-top: 1.1rem; }
.langs.center a { color: var(--muted); font-size: .82rem; font-weight: 500; }
.langs.center a.on { color: var(--ink); background: var(--line-2); }

/* ---- Yazdırma ---- */
.print-page { background: #fff; padding: 24px; max-width: 1100px; margin: 0 auto; }
.print-bar { margin-bottom: 16px; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.print-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .4rem; }
.print-head .kv { width: auto; }
.print-note { font-size: .8rem; color: var(--muted); margin-top: 12px; }
.print-page .tbl-wrap { border-radius: 0; }

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .top, .no-print, .filters, .actions, .print-bar { display: none !important; }
  .wrap, .print-page { padding: 0; max-width: none; }
  .card { box-shadow: none; }
  .tbl-wrap { overflow: visible; border: 1px solid #ccc; }
  .tbl th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl td, .tbl th { padding: 4px 6px; }
  .tbl tr { page-break-inside: avoid; }
  .bal small { border: 1px solid currentColor; }
  a { color: inherit; }
}
