/*
 * MYK Teklif — tasarım sistemi, BRIDCONN müşteri panelinin (globals.css, DashboardShell, login) değerleriyle aynıdır:
 * Arial, 15px taban; krem sayfa zemini; lacivert (#000a1b) kenar çubuğu; #00132f düğmeler/tablo başlıkları;
 * 8px köşeli düğmeler, 6px köşeli menü satırları, yumuşak (200ms) geçişler.
 */
:root {
  --bg-page: #f9f8f5; --bg-surface: #f7f7f8; --bg-inset: #f4f4f5; --bg-hover: #e4e4e7; --bg-hover-soft: rgba(0, 0, 0, .03);
  --border-color: #e4e4e7; --border-color-strong: #d4d4d8;
  --text-primary: #18181b; --text-secondary: #3f3f46; --text-muted: #52525b; --text-faint: #71717a;
  --sb-bg: #000a1b; --sb-text: #b8c7d9; --sb-text-dim: #8597ad; --sb-text-active: #fff;
  --sb-hover-bg: #051d42; --sb-active-bg: #0a3568; --sb-active-hover-bg: #0d4a82; --sb-divider: var(--bg-page);
  --btn-primary-bg: #00132f; --btn-primary-hover-bg: #011c43; --btn-primary-text: #f1f3f5;
  --brand-navy: #011c43;
  --ok: #1a8f5a; --ok-bg: #e6f5ee; --err: #c0392b; --err-bg: #fbeae8; --warn: #b7791f; --warn-bg: #fdf3e0;
  --side: 17.5rem; --sb-line: rgba(255, 255, 255, .22);
  /* eski adlar (formlar/tablolar) yeni değerlere bağlı */
  --navy: var(--brand-navy); --accent: var(--sb-active-bg); --bg: var(--bg-page); --card: #fff; --line: var(--border-color); --text: var(--text-primary); --muted: var(--text-muted);
  --radius: 8px;
}
* { box-sizing: border-box; }
html { font-size: 93.75%; overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg-page); color: var(--text-primary); }
a { color: var(--sb-active-bg); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; margin: 0; }
h2, h3 { font-size: .875rem; line-height: 1.25rem; font-weight: 600; margin: 0 0 12px; } h3 { margin: 14px 0 8px; }
.muted { color: var(--text-muted); } .small { font-size: .8rem; } .center { text-align: center; } .num { text-align: right; font-variant-numeric: tabular-nums; }
.c-ok { color: var(--ok); } .c-err { color: var(--err); } .c-warn { color: var(--warn); }
button, [role=button], .btn { transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s, opacity .2s, transform .2s cubic-bezier(.4, 0, .2, 1); }

/* ---------- Kenar çubuğu (DashboardShell) ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--sb-bg); color: var(--sb-text); display: flex; flex-direction: column; padding: 16px; z-index: 20; overflow-y: auto; }
.brand { display: block; margin: 0 -16px 18px; padding: 6px 20px 20px 24px; border-bottom: 1px solid var(--sb-line); }
.brand img { height: 58px; max-width: 220px; object-fit: contain; object-position: left center; display: block; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar a, .logout { position: relative; display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 6px; color: var(--sb-text); text-decoration: none; font-size: .875rem; line-height: 1; font-weight: 600; letter-spacing: .025em; background: none; border: 0; width: 100%; cursor: pointer; font-family: inherit; text-align: left; }
.sidebar a svg, .logout svg { transform: translateY(-1px); }
.sidebar a:hover, .logout:hover { background: var(--sb-hover-bg); color: var(--sb-text-active); text-decoration: none; }
.sidebar a.on { background: var(--sb-active-bg); color: var(--sb-text-active); } .sidebar a.on:hover { background: var(--sb-active-hover-bg); }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.side-foot::before { content: ""; display: block; margin: 0 -16px 8px; border-top: 1px solid var(--sb-line); }
.who { display: flex; align-items: center; gap: 10px; margin: 8px -16px -16px; padding: 14px 16px 16px; border-top: 1px solid var(--sb-line); font-size: .75rem; line-height: 1.25; min-width: 0; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--sb-active-bg); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.who-t { min-width: 0; } .who b { display: block; color: #fff; font-size: .875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .who small { display: block; color: var(--sb-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.content { margin-left: var(--side); padding: 28px 32px 40px; }
.scrim { display: none; }
.menu-toggle { display: none; position: fixed; top: 10px; left: 10px; z-index: 30; background: var(--sb-bg); color: #fff; border: 0; border-radius: 6px; width: 40px; height: 40px; font-size: 1.2rem; }

/* ---------- Sayfa başlığı, paneller ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { text-transform: uppercase; letter-spacing: .025em; }
.page-head p.muted { margin: 4px 0 0; font-size: .875rem; }
.panel { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 20px 24px; margin-bottom: 16px; }
.panel:has(> .table-wrap:only-child) { padding: 0; } .panel:has(> .table-wrap:only-child) .table-wrap { border-radius: 8px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; } .panel-head h2 { margin: 0; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .875rem; } .alert.ok { background: var(--ok-bg); color: #11643f; } .alert.err { background: var(--err-bg); color: #8f2a20; }

/* ---------- Form ---------- */
label { display: block; font-size: .875rem; color: var(--text-muted); font-weight: 400; margin-bottom: 12px; }
input, select, textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border-color-strong); border-radius: 6px; font: inherit; font-size: .875rem; color: var(--text-primary); background: var(--bg-inset); margin-top: 4px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-navy); background: #fff; }
input[readonly] { background: var(--bg-surface); } textarea { resize: vertical; }
input[type=checkbox] { width: auto; margin: 0 6px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; } .form-grid.cols5 { grid-template-columns: repeat(5, 1fr); }
.form-grid .span2 { grid-column: span 2; } .form-grid .span3 { grid-column: span 3; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.block-label { margin-top: 10px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border-color-strong); background: #fff; color: var(--text-secondary); font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.2; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--bg-inset); text-decoration: none; }
.btn.primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); color: var(--btn-primary-text); } .btn.primary:hover { background: var(--btn-primary-hover-bg); border-color: var(--btn-primary-hover-bg); }
.btn.block { display: block; width: 100%; text-align: center; margin: 16px 0 8px; padding: 12px; }
.btn:disabled, .btn[aria-disabled=true] { background: var(--bg-inset); border-color: var(--bg-inset); color: #94a0b2; cursor: not-allowed; opacity: 1; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row-gap.end { justify-content: flex-end; }
form.inline { display: inline; } label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text-primary); } label.inline select { width: auto; margin: 0; }
button.link { background: none; border: 0; color: var(--sb-active-bg); cursor: pointer; font: inherit; padding: 0; } button.link:hover { text-decoration: underline; } button.link.danger, .danger { color: var(--err); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; } .filters input[type=search] { max-width: 300px; margin: 0; } .filters select { width: auto; margin: 0; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 8px; margin-bottom: 6px; } .kv.two { grid-template-columns: 240px 1fr; } .kv input, .kv textarea { margin: 0; }
.infobox { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 6px; padding: 10px 12px; font-size: .8125rem; line-height: 1.5; margin: 8px 0 6px; }
.result { background: var(--ok-bg); border-radius: 8px; padding: 10px 14px; }

/* ---------- Kartlar ve tablolar (tablo başlığı = düğme rengi) ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.card { background: var(--bg-surface); border: 1px solid var(--border-color); border-left: 4px solid var(--btn-primary-bg); border-radius: 8px; padding: 16px 20px; }
.card span { display: block; color: var(--text-muted); font-size: .875rem; } .card b { font-size: 1.75rem; }
.card.ok { border-left-color: var(--ok); } .card.err { border-left-color: var(--err); } .card.warn { border-left-color: var(--warn); }
.table-wrap { overflow-x: auto; border-radius: 8px; }
table.grid { width: 100%; border-collapse: collapse; font-size: .875rem; }
.grid th { text-align: left; padding: 10px 16px; background: var(--btn-primary-bg); color: #f5f7fa; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.grid td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.grid tbody tr:hover { background: var(--bg-hover-soft); } .grid th.num { text-align: right; }
.grid tfoot td { font-weight: 600; background: var(--bg-inset); border-top: 2px solid var(--border-color-strong); }
.grid th.grp { text-align: center; } .grid th.grp.ok { background: #0f6b45; color: #fff; } .grid th.grp.warn { background: #8a5b10; color: #fff; }
.actions { white-space: nowrap; } .actions a, .actions form { margin-right: 12px; font-size: .8125rem; }
.chip { background: var(--bg-hover); color: var(--text-muted); border-radius: 20px; padding: 1px 8px; font-size: .75rem; }
select.status { width: auto; margin: 0; padding: 4px 8px; border-radius: 20px; font-weight: 600; font-size: .8rem; }
select.status.ok { background: var(--ok-bg); color: #11643f; border-color: #b9e2cf; } select.status.err { background: var(--err-bg); color: #8f2a20; border-color: #efc4be; } select.status.warn { background: var(--warn-bg); color: #8a5b10; border-color: #f0dbab; }
.status-chip { display: inline-block; padding: 4px 10px; border-radius: 20px; font-weight: 600; font-size: .8rem; } .status-chip.ok { background: var(--ok-bg); color: #11643f; } .status-chip.err { background: var(--err-bg); color: #8f2a20; } .status-chip.warn { background: var(--warn-bg); color: #8a5b10; }
.grid.editable input, .grid.editable select { margin: 0; padding: 5px 8px; } .grid.editable .new td { background: var(--bg-surface); }

/* ---------- Teklif kalemleri ---------- */
table.items th, table.items td { padding: 8px 6px; } table.items .idx { color: var(--text-faint); text-align: center; width: 28px; }
table.items input, table.items select, table.items textarea { margin: 0; padding: 5px 6px; font-size: .8125rem; }
table.items textarea { min-width: 260px; overflow: hidden; } table.items td.num { white-space: nowrap; font-weight: 600; }
table.items th.int, table.items td.int { background: #f8f6ee; } table.items th.int { background: #f1ecd9; color: #6b5a1c; }
table.items tr.special { background: #f3f7ff; } input.clickable { cursor: pointer; background: #eaf1ff; }
.acts { white-space: nowrap; } .acts button { border: 1px solid var(--border-color-strong); background: #fff; border-radius: 6px; padding: 3px 7px; cursor: pointer; font-size: .75rem; } .acts button:hover { background: var(--bg-inset); } .acts .danger { color: var(--err); }
tr.grand td { background: var(--btn-primary-bg) !important; color: #fff; font-size: 1rem; } tr.grand td b { color: #fff; }
.pills { display: inline-flex; gap: 4px; margin-left: 6px; } .pills button { border: 1px solid var(--border-color-strong); background: #fff; border-radius: 20px; padding: 3px 14px; cursor: pointer; font: inherit; font-weight: 600; } .pills button.on { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); color: #fff; }
.ac { position: relative; } .suggest { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--border-color-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,10,27,.18); width: 380px; max-width: calc(100vw - 16px); max-height: 280px; overflow: auto; }
.suggest div { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--border-color); } .suggest div:hover, .suggest div.sel { background: var(--bg-hover); } .suggest span { color: var(--text-muted); margin-left: 6px; } .suggest small { display: block; color: var(--text-muted); }
dialog { border: 0; border-radius: 8px; padding: 0; width: min(980px, 94vw); box-shadow: 0 20px 50px rgba(0,0,0,.3); } dialog::backdrop { background: rgba(0,0,0,.5); } .dlg { padding: 20px 24px; }
.grouprow td { background: var(--bg-hover); } #hizmetTable input, #sarfTable input { margin: 0; padding: 4px 6px; width: 80px; }
.kvt { display: flex; gap: 8px; align-items: flex-start; } .kvt textarea { flex: 1; }
table.items tr.special td.acts button { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Tablo/kalem düzeni (Excel: solda teklif görünümü, sağda iç alanlar) ---------- */
table.items td.num { text-align: right; }
table.items th.int.first, table.items td.int.first { border-left: 3px solid #d9cfa3; }
table.items td.acts, table.items th.acts-h { position: sticky; right: 0; background: #fff; box-shadow: -6px 0 8px -6px rgba(0,0,0,.18); }
table.items tr.special td.acts { background: #f3f7ff; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain:disabled input, fieldset.plain:disabled select, fieldset.plain:disabled textarea { color: var(--text-primary); opacity: 1; -webkit-text-fill-color: var(--text-primary); background: var(--bg-surface); border-color: var(--border-color); cursor: default; }
fieldset.plain:disabled .pills button { opacity: 1; color: var(--text-primary); } fieldset.plain:disabled .pills button.on { color: #fff; }
body.ro .edit-only, body.ro .kvt .link, body.ro table.items .acts, body.ro table.items .acts-h, body.ro .totals .disc { display: none !important; }
body.ro .totals .disc.has { display: flex !important; }
body.ro select { appearance: none; -webkit-appearance: none; background-image: none; }

/* ---------- Toplamlar ---------- */
.totals { margin: 16px 0 12px auto; width: min(720px, 100%); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: #fff; }
.totals .trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.totals .trow:last-child { border-bottom: 0; }
.totals .trow .lab { font-weight: 700; } .totals .trow b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals .trow.main { background: var(--bg-surface); }
.totals .trow.main .lab { flex: 1 1 200px; } .totals .trow.main > b { font-size: 1.05rem; }
.totals .disc { display: flex; gap: 10px; flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
.totals .disc label { margin: 0; font-size: .75rem; flex: 1 1 140px; max-width: 220px; } .totals .disc input { text-align: right; font-weight: 600; background: #fff; }
.totals .trow.grand { background: var(--btn-primary-bg); color: #fff; font-size: 1.05rem; } .totals .trow.grand b, .totals .trow.grand small { color: #fff; }
.totals .trow.sub { padding: 6px 16px; }
.totals .pills { margin-left: 10px; }

/* ---------- Üç nokta menüsü, listeler ---------- */
.dots-col { width: 44px; padding-right: 0 !important; }
button.dots { width: 34px; height: 34px; border: 0; background: none; border-radius: 6px; font-size: 1.35rem; line-height: 1; cursor: pointer; color: var(--text-muted); } button.dots:hover { background: var(--bg-hover); color: var(--text-primary); }
.menu { position: fixed; z-index: 70; min-width: 190px; background: #fff; border: 1px solid var(--border-color-strong); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,10,27,.2); padding: 6px; display: flex; flex-direction: column; }
.menu a, .menu button { display: block; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 6px; font: inherit; font-size: .875rem; color: var(--text-primary); cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--bg-inset); text-decoration: none; } .menu .danger { color: var(--err); }
tr.rowlink { cursor: pointer; } tr.rowlink:hover { background: #eef2f8 !important; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 4px 0 20px; }
.btn.danger-btn { color: var(--err); border-color: #efc4be; margin-right: auto; }

/* ---------- Ana sayfa: aylar yatayda ---------- */
table.months th.stick { position: sticky; left: 0; z-index: 2; text-align: left; white-space: nowrap; min-width: 150px; }
table.months tbody th.row { background: #fff; color: var(--text-primary); border-bottom: 1px solid var(--border-color); box-shadow: 6px 0 8px -6px rgba(0,0,0,.12); font-weight: 600; }
table.months td.num { white-space: nowrap; min-width: 92px; } table.months td.tot { background: var(--bg-inset); font-weight: 700; }
table.months th.num { min-width: 92px; }
table.months tr.grp th { background: #0f6b45; color: #fff; text-align: left; position: static; box-shadow: none; } table.months tr.grp.warn th { background: #8a5b10; }
table.months tr.grp th.stick { position: sticky; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .menu-toggle { display: block; } .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: none; } body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.45); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 15; }
  .content { margin-left: 0; padding: 64px 18px 40px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid.cols5, .two-col { grid-template-columns: 1fr 1fr; } .form-grid .span3 { grid-column: span 2; }
}
/* ---------- Telefon ---------- */
@media (max-width: 700px) {
  html { font-size: 100%; }
  .content { padding: 62px 12px 32px; }
  .page-head { margin-bottom: 14px; } .page-head > .row-gap, .page-head > .btn { width: 100%; } .page-head > .btn { text-align: center; }
  .page-head .row-gap > .btn, .page-head .row-gap > form { flex: 1 1 auto; } .page-head .row-gap form .btn { width: 100%; }
  .panel { padding: 14px 14px; } .panel-head { align-items: stretch; }
  .form-grid, .form-grid.cols5, .two-col { grid-template-columns: 1fr; } .form-grid .span2, .form-grid .span3 { grid-column: auto; }
  #dlgCust .form-grid, #dlgProd .form-grid { grid-template-columns: 1fr !important; } #dlgCust label, #dlgProd label { grid-column: auto !important; }
  .kv, .kv.two { grid-template-columns: 1fr; } .kvt { flex-direction: column; } .kvt .link { align-self: flex-end; }
  .btn, button.link, select, input { min-height: 44px; } button.dots { width: 44px; height: 44px; }
  .filters { padding: 12px; } .filters input[type=search], .filters select, .filters .btn { flex: 1 1 100%; max-width: none; width: 100%; }
  .cards { gap: 10px; } .card { padding: 12px 14px; } .card b { font-size: 1.4rem; }
  .row-gap { gap: 8px; } dialog { width: 96vw !important; max-height: 94vh; overflow: auto; } .dlg { padding: 16px; }
  .row-gap.end .btn { flex: 1 1 auto; }
  .totals { width: 100%; } .totals .disc label { max-width: none; }
  .auth-card { padding: 24px 20px; }

  /* tablolar kart görünümüne geçer (Teklifler, Cari, Ürün, Kullanıcılar) */
  table.cards-sm, table.cards-sm tbody, table.cards-sm tr, table.cards-sm td { display: block; width: 100%; }
  table.cards-sm thead { display: none; }
  table.cards-sm tr { position: relative; border-bottom: 8px solid var(--bg-page); padding: 40px 12px 10px 12px; background: #fff; }
  table.cards-sm td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 5px 0; text-align: right; }
  table.cards-sm td[data-l]::before { content: attr(data-l); color: var(--text-muted); font-size: .8rem; text-align: left; flex: none; }
  table.cards-sm td.dots-col { position: absolute; top: 4px; right: 4px; width: auto; padding: 0; z-index: 1; } table.cards-sm td.dots-col::before { display: none; }
  table.cards-sm td.num { text-align: right; }

  /* teklif kalemleri: her satır bir kart */
  .table-wrap:has(> table.items) { overflow: visible; }
  table.items, table.items tbody, table.items tr, table.items td { display: block; width: 100%; }
  table.items thead { display: none; }
  table.items tr { border: 1px solid var(--border-color-strong); border-radius: 10px; margin-bottom: 14px; padding: 10px 12px; background: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
  table.items tr.special { background: #f3f7ff; }
  table.items td { padding: 4px 0; border: 0; min-width: 0; }
  table.items td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--text-muted); margin-bottom: 2px; }
  table.items td.idx { grid-column: 1 / -1; text-align: left; font-weight: 700; color: var(--brand-navy); width: auto; }
  table.items td[data-l="Açıklama"], table.items td[data-l="Marka"], table.items td[data-l="Ürün Kodu"] { grid-column: 1 / -1; }
  table.items td.num { text-align: left; font-weight: 700; }
  table.items td.int { background: #f8f6ee; padding: 6px 8px; } table.items td.int.first { grid-column: 1 / -1; border-left: 0; margin-top: 6px; border-top: 2px dashed #d9cfa3; }
  table.items td.acts { grid-column: 1 / -1; position: static; box-shadow: none; display: flex; gap: 8px; justify-content: flex-end; padding-top: 8px; background: none !important; } table.items td.acts button { min-height: 40px; padding: 4px 14px; }
  table.items input, table.items select, table.items textarea { width: 100%; min-height: 40px; }
  table.items textarea { min-width: 0; }
  .suggest { width: calc(100vw - 16px); }
}
@media (max-width: 767px) { input, select, textarea { font-size: 16px; } } /* telefonda odaklanınca yakınlaşmayı engeller (BRIDCONN ile aynı) */

/* ---------- Giriş ekranı (BRIDCONN login ile aynı ölçüler) ---------- */
.auth-body { position: relative; display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 32px 16px; background: var(--bg-page); overflow: hidden; }
.auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg .tile { position: absolute; inset: 0; opacity: .035; background: url(/assets/logo-mark.png) 0 0 / 44px 34px space;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 22%, #000 72%); mask-image: radial-gradient(ellipse at center, transparent 22%, #000 72%); }
.auth-bg img { position: absolute; max-width: none; }
.auth-bg .m1 { bottom: -14vmin; left: -10vmin; width: 62vmin; transform: rotate(-10deg); opacity: .05; }
.auth-bg .m2 { top: -10vmin; right: -8vmin; width: 40vmin; transform: rotate(8deg); opacity: .04; }
.auth-card { position: relative; height: fit-content; width: 100%; max-width: 24rem; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-surface); padding: 32px; }
.auth-logo { display: block; height: 4.5rem; max-width: 100%; object-fit: contain; margin: 0 auto 28px; }
.auth-card h1 { text-align: center; font-size: 1.05rem; margin-bottom: 4px; }
.auth-card > p.muted { text-align: center; margin: 0 0 20px; font-size: .8125rem; }
.auth-card label { margin-bottom: 16px; }
.auth-card .btn.primary { padding: 10px 16px; font-weight: 500; margin: 8px 0 16px; }
.auth-card a { color: var(--text-muted); } .auth-card a:hover { color: var(--text-secondary); text-decoration: none; }
.pw { position: relative; display: block; } .pw input { padding-right: 40px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; margin-top: 2px; border: 0; background: none; cursor: pointer; color: var(--text-faint); border-radius: 6px; display: grid; place-items: center; } .pw button:hover { color: var(--text-secondary); }
.auth-foot { text-align: center; font-size: .75rem; color: var(--text-faint); margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.auth-card .alert { font-size: .875rem; }

/* ---------- v4: sıkı satırlar, revizyon alt satırları, kalem tablosu genişlikleri ---------- */
.grid.cards-sm th { padding: 8px 14px; } .grid.cards-sm td { padding: 5px 14px; vertical-align: middle; line-height: 1.3; }
.grid.cards-sm select.status { padding: 1px 8px; font-size: .78rem; } .grid.cards-sm .status-chip { padding: 2px 9px; font-size: .78rem; }
button.dots { width: 28px; height: 28px; font-size: 1.2rem; }
tr.child td { background: #fafbfd; font-size: .84rem; } tr.child td.no { padding-left: 38px; } tr.child .arrow { color: var(--text-faint); margin-right: 6px; }
@media (min-width: 701px) {
  table.items td[data-l="Açıklama"] textarea { min-width: 460px; } table.items th.wide { min-width: 470px; }
  table.items td[data-l="Ürün Kodu"] input { min-width: 210px; } table.items td[data-l="Marka"] input { min-width: 120px; }
  table.items td.int { padding: 8px 3px; } table.items td.int select { width: 92px; padding-left: 4px; padding-right: 2px; } table.items td.int input { width: 68px; }
  table.items th.int { padding-left: 3px; padding-right: 3px; }
}
@media (max-width: 700px) {
  table.cards-sm tr.child { margin-left: 18px; width: calc(100% - 18px); border-left: 3px solid var(--border-color-strong); }
  table.cards-sm tr { padding-top: 40px; } .grid.cards-sm td { padding: 5px 0; }
  .totals { width: 100% !important; }
}

/* menü çizgisi: Ana Sayfa ile Teklifler arasında; Ayarlar'ın üstündeki çizgi kaldırıldı */
.nav-sep { border-top: 1px solid var(--sb-line); margin: 6px -16px; }
.side-foot::before { display: none; }

/* v5: kullanıcılar sayfası hizası, ürün sayfalama */
.user-form { display: grid; grid-template-columns: 1.2fr 1.4fr 1.2fr 1fr auto; gap: 0 16px; align-items: end; }
.user-form label { margin: 0; } .user-form label small { color: var(--text-muted); font-size: .72rem; }
.user-form input, .user-form select, .user-form .btn { height: 40px; margin: 0; box-sizing: border-box; }
.user-form .btn { padding-top: 0; padding-bottom: 0; white-space: nowrap; }
th.c, td.c { text-align: center; vertical-align: middle; }
.ua { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; } .ua-f { margin: 0; display: block; }
.btn.sm { padding: 0 12px; height: 32px; line-height: 30px; font-size: .8125rem; white-space: nowrap; }
.pager-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 20px; }
.pager-bar .pg-nav { display: flex; gap: 8px; align-items: center; }
.pager-bar select, .pager-bar input { width: auto; margin: 0; height: 36px; } .pager-bar input { width: 64px; text-align: center; }
.pager-bar label { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .user-form { grid-template-columns: 1fr 1fr; gap: 12px 16px; } .user-form .btn { grid-column: span 2; } }
@media (max-width: 600px) { .user-form { grid-template-columns: 1fr; } .user-form .btn { grid-column: auto; } .ua { justify-content: flex-start; } }

/* v6: menü logosu ortalı, ayarlar açılır bölümleri */
.brand { text-align: center; padding-left: 20px; } .brand img { margin: 0 auto; object-position: center; }
details.panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary h2 { margin: 0; } details.panel > summary h2 small { font-weight: 400; }
details.panel > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; margin: 0 6px 4px 0; flex: none; color: var(--text-muted); }
details.panel[open] > summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
details.panel[open] > summary { margin-bottom: 14px; }
.remember { margin: 4px 0 0; font-size: .875rem; color: var(--text-muted); } .remember input { width: auto; margin: 0; min-height: 0; }
/* v8: revizyon satırlarında tüm sütunlar biraz sağa kayık */
@media (min-width: 701px) { tr.child td:not(.dots-col):not(.num):not(.no) { padding-left: 26px; } tr.child td.no { padding-left: 50px; } }
/* v9: revizyonlu teklifler (ana + revizyonlar) koyu zeminde; revizyon satırlarında her sütun ok ile başlar */
tr.chain td, tr.child td { background: #e8edf5; } tr.chain:hover td, tr.child:hover td { background: #dde4f0; }
@media (min-width: 701px) {
  tr.child td:not(.dots-col)::before { content: '↳'; color: var(--text-faint); margin-right: 6px; }
  tr.child td.num::before { content: none; }
}

/* v11: pasif (gri) revizyon durumu */
select.status.mute { background: #eceff3; color: #7b8494; border-color: #d5dae1; } .status-chip.mute { background: #eceff3; color: #7b8494; }

/* v12: pasif durum boş gri kutucuk */
.status-chip[hidden], form.inline[hidden] { display: none; } .status-chip.mute:empty { min-width: 74px; height: 22px; vertical-align: middle; }
.grid.cards-sm .status-chip.mute:empty { height: 20px; }


/* v14: fiyat penceresi, toplamlar solda ve yan yana, kalem tablosu tam genişlik */
table.items td.pick { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; } table.items td.pick:hover { background: #eaf1ff; }
.totals { width: fit-content; min-width: min(460px, 100%); max-width: 100%; margin: 16px 0 12px 0; }
.totals .trow { justify-content: flex-start; gap: 18px; } .totals .trow .lab { min-width: 250px; } .totals .trow.main .lab { flex: 0 0 auto; }
.totals .disc { flex: 1 1 100%; justify-content: flex-start; }
@media (min-width: 701px) { table.items td[data-l="Açıklama"] textarea { width: 100%; } table.items td.num.unit { min-width: 110px; } }
@media (max-width: 700px) { .totals .trow .lab { min-width: 0; } }

@media (min-width: 1101px) { .form-grid.c6 { grid-template-columns: repeat(6, 1fr); } }

/* v16: toplamlar sağda, Toplam sütunuyla aynı hizada; başlık rengi sağ uca kadar devam eder */
.totals { margin-left: auto; } .totals .trow { justify-content: space-between; } .totals .disc { justify-content: flex-end; }
table.items th.acts-h { background: var(--btn-primary-bg); box-shadow: none; }
@media (max-width: 700px) { .totals { margin-left: 0; width: 100%; } }

/* v17: kalem satırlarında kutu yükseklikleri eşit, hücreler dikeyde ortalı */
@media (min-width: 701px) {
  table.items td { vertical-align: middle; }
  table.items input, table.items select, table.items textarea { height: 36px; min-height: 36px; box-sizing: border-box; line-height: 20px; padding-top: 7px; padding-bottom: 7px; }
  table.items textarea { resize: none; }
  table.items td.acts button { height: 36px; box-sizing: border-box; }
  table.items td.num, table.items td.idx { line-height: 36px; }
}

/* v18: toplamlar en sağa yaslı, iskonto kutuları küçük */

.totals .disc label { flex: 0 0 120px; max-width: 120px; font-size: .7rem; } .totals .disc input { height: 30px; padding: 3px 8px; font-size: .8rem; }

/* v19: değerler Toplam sütununun altında; kutu dar, yazılar değerlere yakın */
@media (min-width: 701px) { .totals { width: 340px; min-width: 0; } .totals .trow .lab { min-width: 0; } .totals .trow { gap: 12px; } }

/* v20: birim fiyat ve toplam kutu içinde, kutu yükseklikleri 30px */
.cellbox { display: block; box-sizing: border-box; height: 30px; line-height: 28px; padding: 0 8px; border: 1px solid var(--border-color-strong); border-radius: 6px; background: var(--bg-surface); text-align: right; font-weight: 600; white-space: nowrap; }
table.items td.pick .cellbox { text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; } table.items td.pick:hover .cellbox { background: #eaf1ff; }
table.items td.pick { text-decoration: none; } table.items td.pick:hover { background: transparent; }
@media (min-width: 701px) {
  table.items input, table.items select, table.items textarea { height: 30px; min-height: 30px; line-height: 18px; padding-top: 5px; padding-bottom: 5px; }
  table.items td.acts button { height: 30px; }
  table.items td.num, table.items td.idx { line-height: 30px; }
  table.items td.num .cellbox { line-height: 28px; }
}

/* v21: toplamlar kutusu sola doğru genişledi, yazılar değerlerden uzak */
@media (min-width: 701px) { .totals { width: 470px; } }

/* v22: toplamlar kutusu biraz daha geniş */
@media (min-width: 701px) { .totals { width: 600px; } }

/* v23: kutular birbirine hizalı (aynı üst çizgi, aynı yükseklik) */
table.items input, table.items select, table.items textarea { display: block; margin: 0; vertical-align: middle; }
table.items td { vertical-align: middle; }
.totals .disc { align-items: flex-end; gap: 10px; }
.totals .disc label { flex: 0 0 130px !important; max-width: 130px !important; display: block; }
.totals .disc input { width: 100% !important; height: 30px !important; box-sizing: border-box; padding: 3px 8px !important; margin: 2px 0 0 !important; }
