:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #1f2328;
  --ink-2: #57606a;
  --line: #d8dde3;
  --line-2: #eceff2;
  --brand: #a52d75;
  --brand-gray: #acabab;
  --brand-soft: #f8edf3;
  --primary: #a52d75;
  --primary-ink: #ffffff;
  --accent: #c2410c;
  --success: #15803d;
  --danger: #b42318;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --t-rulo: #7c3aed;
  --t-dijital: #0e7490;
  --t-teneke: #b45309;
  --t-silindir: #be185d;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; }
h1 small { font-size: .95rem; color: var(--ink-2); font-weight: 500; margin-left: .4rem; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--ink-2); }
.r { text-align: right; }
.inline { display: inline; margin: 0; }
.hint { color: var(--ink-2); font-size: .88rem; margin: .8rem 0 0; }
.req { color: var(--danger); }

/* ---------- Üst menü ---------- */
.topbar {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--brand); color: #fff; padding: .55rem 1.2rem;
  position: sticky; top: 0; z-index: 20;
}
.brand, .login-brand { display: flex; align-items: baseline; gap: .5rem; color: #fff; text-decoration: none !important; }
.brand-mark { font-weight: 800; font-size: 1.45rem; letter-spacing: -.04em; }
.brand-sub { font-size: .85rem; opacity: .75; }
.nav { display: flex; align-items: center; gap: .3rem; flex: 1; }
.nav > a, .nav summary {
  color: #e6e8eb; padding: .4rem .7rem; border-radius: 6px; cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav > a:hover, .nav summary:hover, .nav > a.active { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.menu { position: relative; }
.menu-list {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: .35rem; z-index: 30;
}
.menu-list a { display: block; color: var(--ink); padding: .5rem .7rem; border-radius: 6px; }
.menu-list a:hover { background: var(--line-2); text-decoration: none; }
.me { display: flex; align-items: center; gap: .9rem; font-size: .9rem; }
.me a, .me .link { color: #e6e8eb; }
.me-name { color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.role { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; vertical-align: 1px; }
.role-yetkili { background: #dbeafe; color: #1e40af; }
.role-muhasebe { background: #fef3c7; color: #92400e; }

/* ---------- Genel düzen ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 1.3rem 1.2rem 5rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: .5rem .95rem; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: none !important; white-space: nowrap; min-height: 38px;
}
.btn:hover { background: var(--line-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #8a2462; border-color: #8a2462; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #9a3412; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #116530; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1c13; }
.btn-ghost { background: transparent; }
.btn-warn { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.btn-warn:hover { background: #ffedd5; }
.btn-small { padding: .3rem .7rem; min-height: 32px; font-size: .9rem; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: .25rem .45rem; border-radius: 4px; }
.icon-btn:hover { background: #fee2e2; color: var(--danger); }

/* ---------- Uyarılar ---------- */
.alert { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-success { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.alert-error { background: #fef3f2; border-color: #fecdca; color: #912018; }
.alert-warn { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.alert-info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }

/* ---------- Form elemanları ---------- */
input[type=text], input[type=password], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 6px; padding: .45rem .6rem; min-height: 38px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(165, 45, 117, .3); outline-offset: 0; border-color: var(--primary); }
input[disabled] { background: var(--line-2); color: var(--ink-2); }
input[readonly].calc { background: #f6f8fa; font-weight: 600; }
textarea { resize: vertical; }
textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 500; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: .5rem; }
.stack-form { display: flex; flex-direction: column; gap: .8rem; }
.stack-form h2 { margin: .6rem 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem 1rem; }
.grid .span2 { grid-column: span 2; }
.grid .span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.flabel { font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.checks { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.checks label { flex-direction: row; align-items: center; gap: .35rem; font-weight: 400; color: var(--ink); font-size: .9rem; }
.checks label.muted { color: var(--ink-2); }
.checks.stack { flex-direction: column; gap: .15rem; }
.checks input[type=checkbox], .checks input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.radio-other .other input[type=text] { min-height: 30px; padding: .2rem .45rem; width: 150px; }
.cap-row { display: flex; align-items: center; gap: .5rem; }
.cap-row select { flex: 1 1 140px; min-width: 130px; }
.cap-row input { flex: 1; max-width: 110px; }
.cap-row span { font-size: .88rem; color: var(--ink-2); }
.cap-table { margin-top: 1rem; }
.cap-table summary { cursor: pointer; color: var(--primary); font-size: .9rem; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .3rem .8rem; margin-top: .6rem; font-size: .88rem; }
.cap-grid b { display: inline-block; min-width: 58px; }

.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.form-actions.sticky {
  position: sticky; bottom: 0; background: rgba(243, 244, 246, .95); backdrop-filter: blur(4px);
  padding: .8rem 0; border-top: 1px solid var(--line); margin-top: .5rem; z-index: 10;
}

/* ---------- İş satırları tablosu ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
table.items th { font-size: .78rem; font-weight: 600; color: var(--ink-2); text-align: left; padding: .45rem .35rem; border-bottom: 2px solid var(--line); vertical-align: bottom; }
table.items td { padding: .3rem .25rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.items td input[type=text] { min-height: 34px; padding: .3rem .45rem; }
table.items .sno { width: 38px; text-align: center; color: var(--ink-2); font-weight: 600; }
table.items .wide { min-width: 220px; width: 30%; }
table.items .t-number, table.items .t-money { min-width: 88px; }
table.items .t-text { min-width: 120px; }
table.items .t-checks { min-width: 120px; }
table.items .row-del { width: 34px; }
table.items tfoot td { padding-top: .6rem; border: 0; font-size: .95rem; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Liste ---------- */
.new-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.new-card {
  display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--tc, var(--primary)); border-radius: var(--radius); padding: .75rem .9rem;
  color: var(--ink); font-weight: 600; box-shadow: var(--shadow);
}
.new-card span { font-size: 1.2rem; color: var(--tc); }
.new-card:hover { text-decoration: none; background: #fafbfc; }
.nc-rulo_etiket, .tur-rulo_etiket { --tc: var(--t-rulo); }
.nc-dijital_baski, .tur-dijital_baski { --tc: var(--t-dijital); }
.nc-teneke_kutu, .tur-teneke_kutu { --tc: var(--t-teneke); }
.nc-silindir_kutu, .tur-silindir_kutu { --tc: var(--t-silindir); }

.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem; overflow-x: auto; }
.tabs a { padding: .55rem .9rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.count { display: inline-block; min-width: 22px; text-align: center; font-size: .75rem; background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 1px 6px; }
.tabs a.active .count { background: #dbeafe; color: #1e40af; }
.tabs a.tab-fatura .count { background: #ffedd5; color: #9a3412; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: flex-end; }
.filters input[type=search] { flex: 1 1 260px; width: auto; }
.filters select { width: auto; flex: 0 1 220px; }
.filters .date-f { flex-direction: row; align-items: center; gap: .35rem; font-weight: 400; }
.filters .date-f input { width: auto; }

table.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.list th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); padding: .6rem .7rem; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
table.list td { padding: .6rem .7rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tr.clickable { cursor: pointer; }
table.list td:first-child { white-space: nowrap; }
table.list tr.clickable:hover td { background: #f7f9fc; }
table.list tr.inactive td { color: var(--ink-2); }
table.list tfoot td { border-top: 1px solid var(--line); background: #fafbfc; }
.tur { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--tc); background: color-mix(in srgb, var(--tc) 10%, white); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.st-acik { background: #dbeafe; color: #1e40af; }
.st-teslim { background: #fef3c7; color: #92400e; }
.st-islendi { background: #dcfce7; color: #166534; }
.st-arsiv { background: #ede9fe; color: #5b21b6; }
.st-fatura { background: #ffedd5; color: #9a3412; margin-left: .25rem; }
.st-faturali { background: #f3f4f6; color: #374151; margin-left: .25rem; }
.st-iptal { background: #e5e7eb; color: #4b5563; text-decoration: line-through; }
.st-iade { background: #fee2e2; color: #991b1b; margin-left: .25rem; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.5rem; text-align: center; color: var(--ink-2); }
.pager { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; }
.pager a { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.pager a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Görüntüleme ---------- */
.action-panel {
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.inline-details summary { list-style: none; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details[open] summary { background: var(--line-2); }
.note-form { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; min-width: min(420px, 100%); }
.note-form.inline-grid { flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-top: 0; }
.note-form.inline-grid label { flex: 1 1 180px; }

.sheet {
  background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--tc, var(--brand));
  border-radius: var(--radius); padding: 1.6rem 1.8rem; max-width: 1000px; margin: 0 auto 1rem; box-shadow: var(--shadow);
  position: relative;
}

/* Muhasebe kaşeleri */
.stamps {
  position: absolute; top: 1.1rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: .9rem; align-items: center; pointer-events: none; z-index: 2;
}
.stamp {
  --sc: #15803d;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px double var(--sc); color: var(--sc); border-radius: 6px;
  padding: .3rem .8rem; font-weight: 800; font-size: 1.05rem; letter-spacing: .08em; line-height: 1.1;
  transform: rotate(-7deg); opacity: .85; background: rgba(255,255,255,.6); white-space: nowrap;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.stamp small { font-size: .68rem; font-weight: 700; letter-spacing: .02em; margin-top: 2px; }
.stamp-fatura { --sc: #c2410c; transform: rotate(4deg); }
.stamp-arsiv { --sc: #5b21b6; transform: rotate(-3deg); }
.stamp-iptal { --sc: #b42318; }
.stamp-check { font-weight: 600; color: var(--accent); align-self: center; }
.stamp-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.sheet-brand { display: flex; flex-direction: column; }
.sheet-brand .brand-mark { font-size: 2rem; line-height: 1; }
.sheet-title { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; color: var(--tc, var(--ink)); margin-top: .3rem; letter-spacing: .02em; }
.sheet-meta { margin: 0; display: grid; gap: .2rem; font-size: .9rem; }
.sheet-meta div { display: flex; gap: .6rem; justify-content: flex-end; }
.sheet-meta dt { color: var(--ink-2); }
.sheet-meta dd { margin: 0; font-weight: 600; min-width: 120px; }
.sheet-table { margin-bottom: 1.1rem; border: 1.5px solid #333; }
.sheet-table caption { text-align: center; font-weight: 700; padding: .35rem; border: 1.5px solid #333; border-bottom: 0; text-transform: uppercase; font-size: .9rem; letter-spacing: .03em; }
.sheet-table th, .sheet-table td { border: 1px solid #555; padding: .45rem .6rem; text-align: left; vertical-align: top; }
.sheet-table.kv th { width: 200px; background: #f6f7f8; font-weight: 600; font-size: .9rem; }
.sheet-table.items-view th { font-size: .75rem; text-transform: uppercase; background: #f6f7f8; text-align: center; vertical-align: middle; }
.sheet-table.items-view td.t-number, .sheet-table.items-view td.t-money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-table .sno { width: 44px; text-align: center; }
.sheet-table tfoot td { font-size: 1rem; }
.boxes { display: inline-flex; flex-wrap: wrap; gap: .15rem .7rem; }
.box { font-size: .85rem; color: #8a929b; white-space: nowrap; }
/* Kutular karakterle değil çizgiyle çizilir: ☐/☑ karakterleri yazıcıya resim gibi gider ve çıktıyı yavaşlatır */
.box::before { content: ""; display: inline-block; box-sizing: border-box; width: .8em; height: .8em; border: 1px solid currentColor;
  margin-right: .3em; vertical-align: -.08em; font: 700 .72em/.95 Arial, Helvetica, sans-serif; text-align: center; }
.box.on { color: var(--ink); font-weight: 600; }
.box.on::before { content: "X"; width: 1.1em; height: 1.1em; }
.items-view .boxes { flex-direction: column; }
.sheet-notes { border: 1.5px solid #333; padding: .6rem .8rem; min-height: 90px; margin-bottom: 1rem; }
.sheet-notes h3 { margin: 0 0 .3rem; font-size: .85rem; text-transform: uppercase; }
.sheet-bar { background: #333; color: #fff; font-weight: 700; font-size: .8rem; padding: .45rem .7rem; margin: 0 0 1rem; text-align: center; }
.sheet-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; font-size: .85rem; border-top: 1px dashed var(--line); padding-top: .7rem; }
.sheet-foot span { display: block; color: var(--ink-2); font-size: .75rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: .5rem 0 .5rem 1rem; border-left: 2px solid var(--line); position: relative; font-size: .92rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline time { color: var(--ink-2); margin-right: .5rem; font-size: .85rem; }
.timeline .note { background: var(--line-2); border-radius: 6px; padding: .4rem .6rem; margin-top: .3rem; white-space: normal; }

/* ---------- Giriş ---------- */
.login-page { display: flex; min-height: 100vh; align-items: center; background: linear-gradient(160deg, #26292e 0%, #3b4048 100%); }
.login-page .container { width: 100%; }
.login-box { max-width: 380px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 1.8rem; box-shadow: 0 20px 50px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 1rem; }
.login-box.wide { max-width: 520px; }
.login-box form { display: flex; flex-direction: column; gap: .9rem; }
.login-brand { color: var(--brand); justify-content: center; margin-bottom: .3rem; }
.login-brand .brand-mark { font-size: 2.2rem; }

/* ---------- Mobil ---------- */
@media (max-width: 820px) {
  .container { padding: 1rem 1rem 5rem; }
  .topbar { padding: .5rem 1rem; gap: .5rem 1rem; }
  .nav { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; }
  .me-name { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .grid .span2 { grid-column: 1 / -1; }
  .sheet { padding: 1rem; }
  .sheet-foot { grid-template-columns: repeat(2, 1fr); }
  .stamps { position: static; transform: none; flex-wrap: wrap; justify-content: center; margin: -.3rem 0 1rem; }
  .sheet-table.kv th { width: 130px; }

  /* Liste tablosu kart görünümüne geçer */
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list { border: 0; background: none; box-shadow: none; }
  table.list thead { display: none; }
  table.list tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; padding: .4rem .2rem; }
  table.list td { border: 0; padding: .2rem .7rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  table.list td::before { content: attr(data-l); color: var(--ink-2); font-size: .82rem; text-align: left; }
  table.list td:not([data-l]) { justify-content: flex-end; }
  table.list tfoot { display: block; }
  table.list tfoot tr { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; }
  table.list tfoot td { display: block; width: auto; border: 0; background: none; padding: 0; text-align: left; }
  table.list tfoot td:last-child { display: none; }
  .new-cards { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .new-card { padding: .6rem .7rem; font-size: .9rem; }
  .filters select { flex: 1 1 100%; }
  .filters .date-f { flex: 1 1 45%; }
  .filters .date-f input { flex: 1; }
}

/* ---------- Yazdırma ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .no-print, .topbar, .alert { display: none !important; }
  .container { padding: 0; max-width: none; }
  .sheet { border: 0; box-shadow: none; padding: 0; max-width: none; border-top: 0; }
  .sheet-table, .sheet-notes { page-break-inside: auto; }
  .sheet-table tr { page-break-inside: avoid; }
  .sheet-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
}

/* =================== İş takibi & matbaa formları =================== */
.wide-page .container { max-width: none; }
.hint.top { margin: -.4rem 0 .9rem; }
.sub-head { font-size: .95rem; margin: .6rem 0 0; padding-top: .6rem; border-top: 1px solid var(--line-2); }

/* Matbaa işlem satırları */
table.ops th.op-name { text-align: left; font-size: .9rem; color: var(--ink); font-weight: 600; min-width: 170px; padding: .45rem .5rem .45rem 0; }
table.ops th.op-name small { font-weight: 400; font-size: .75rem; }
table.ops th.op-name .checks { margin-top: .2rem; gap: .1rem .7rem; }
table.ops th.op-name .checks label { font-size: .82rem; font-weight: 500; }
table.ops thead th.op-name { font-size: .78rem; color: var(--ink-2); }
table.ops tbody tr:has(input:not([value=""]):not([type=checkbox])) th.op-name,
table.ops tbody tr:has(input:checked) th.op-name { color: var(--primary); }
.sheet-table.ops-view th.op-name { text-align: left; width: 190px; background: #f6f7f8; font-size: .85rem; text-transform: none; }
.sheet-table.ops-view th.op-name .boxes { flex-direction: row; font-weight: 400; margin-top: .15rem; }
.sheet-table .sec-row { background: #eef0f2 !important; text-align: center; text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; width: auto !important; }

/* Çizim alanı */
.sketch canvas {
  width: 100%; height: auto; aspect-ratio: 2 / 1; display: block; touch-action: none; cursor: crosshair;
  border: 1px solid var(--line); border-radius: 6px;
  background-color: #fff;
  background-image: linear-gradient(#e3e7ec 1px, transparent 1px), linear-gradient(90deg, #e3e7ec 1px, transparent 1px);
  background-size: 20px 20px;
}
.sketch-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.sketch-tools .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sketch-img { max-width: 100%; border: 1px solid var(--line);
  background-image: linear-gradient(#eef1f4 1px, transparent 1px), linear-gradient(90deg, #eef1f4 1px, transparent 1px); background-size: 12px 12px; }

/* Termin ve aşama rozetleri */
.termin { white-space: nowrap; font-variant-numeric: tabular-nums; }
.termin b { font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; margin-left: .2rem; vertical-align: 1px; }
.termin-gecikti { color: var(--danger); font-weight: 600; }
.termin-gecikti b { background: #fee2e2; color: #991b1b; }
.termin-bugun { color: #b45309; font-weight: 600; }
.termin-bugun b { background: #fef3c7; color: #92400e; }
.termin-yakin b { background: #fef9c3; color: #854d0e; }
.termin-bitti { color: var(--ink-2); text-decoration: line-through; }
.asama { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: #e0f2fe; color: #075985; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.asama-yok { background: var(--line-2); color: var(--ink-2); font-weight: 500; }
.asama-son { background: #dcfce7; color: #166534; }

/* "İş Nerede?" paneli */
.track { border-left: 4px solid var(--primary); }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; }
.track-head h2 { margin: 0; }
.track-now { display: flex; align-items: center; gap: .5rem .9rem; flex-wrap: wrap; font-size: .9rem; }
.track-now .asama { font-size: .9rem; padding: 3px 11px; max-width: none; }
.track-note { margin: .6rem 0 0; background: #f0f7ff; border-radius: 6px; padding: .45rem .7rem; font-size: .92rem; }
.stepper { list-style: none; margin: 1rem 0; padding: 0; display: flex; overflow-x: auto; gap: 0; scrollbar-width: thin; }
.stepper li { flex: 1 0 auto; min-width: 88px; position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--success); }
.stepper .step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%;
  background: none; border: 0; font: inherit; font-size: .78rem; color: var(--ink-2); padding: 0 .25rem .2rem; cursor: default; line-height: 1.2; }
.stepper button.step { cursor: pointer; }
.stepper button.step:hover .dot { border-color: var(--primary); }
.stepper .dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--line); transition: transform .15s; }
.stepper li.done .dot { background: var(--success); border-color: var(--success); }
.stepper li.current .dot { background: var(--primary); border-color: #bfdbfe; box-shadow: 0 0 0 4px rgba(31,95,191,.15); transform: scale(1.1); }
.stepper li.current .step { color: var(--primary); font-weight: 700; }
.stepper li.done .step { color: var(--ink); }
.stepper li.picked .dot { border-color: var(--accent); }
.track-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; background: #fafbfc; border: 1px solid var(--line-2); border-radius: 8px; padding: .7rem; }
.track-form label { flex: 1 1 170px; }
.track-form label.grow { flex: 3 1 260px; }
.track-history { margin-top: .9rem; }
.track-history summary { cursor: pointer; color: var(--primary); font-size: .9rem; margin-bottom: .5rem; }

/* Pano */
.filters.compact { margin: 0; }
.filters.compact input[type=search] { flex: 0 1 240px; }
.filters .check { flex-direction: row; align-items: center; gap: .35rem; font-weight: 400; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .9rem; display: flex; align-items: baseline; gap: .6rem; color: var(--ink); box-shadow: var(--shadow); }
a.stat:hover { text-decoration: none; border-color: var(--danger); }
.stat b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--ink-2); }
.stat-danger b { color: var(--danger); }
.stat-warn b { color: #b45309; }
.stat.zero b { color: var(--ink-2); }
.board-hint { margin: 0 0 .6rem; }
.board { display: flex; gap: .7rem; overflow-x: auto; align-items: flex-start; padding-bottom: 1rem; scroll-snap-type: x proximity; min-height: 60vh; }
.col { flex: 0 0 264px; background: #e9ecef; border-radius: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); scroll-snap-align: start; }
.col > header { display: flex; justify-content: space-between; align-items: center; padding: .6rem .75rem; font-weight: 700; font-size: .88rem; position: sticky; top: 0; }
.col > header .count { background: rgba(0,0,0,.08); color: var(--ink); }
.col-done { background: #e3f1e7; }
.cards { padding: 0 .5rem .6rem; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; min-height: 60px; flex: 1; border-radius: 8px; transition: background .15s; }
.cards.drag-over { background: rgba(31, 95, 191, .12); outline: 2px dashed rgba(31, 95, 191, .5); outline-offset: -4px; }
.kcard { position: relative; background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.1); border-left: 4px solid var(--tc, var(--line)); }
.kcard[draggable=true] { cursor: grab; }
.kcard.dragging { opacity: .45; }
.kcard.saving { opacity: .6; pointer-events: none; }
.kc-link { display: block; padding: .55rem .65rem .5rem; color: var(--ink); text-decoration: none !important; }
.kc-top { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.kc-no { font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.kc-top .tur { font-size: .68rem; padding: 1px 6px; }
.kc-firma { font-weight: 700; font-size: .95rem; margin: .15rem 1.4rem .1rem 0; line-height: 1.25; }
.kc-is { font-size: .82rem; color: var(--ink-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-note { font-size: .8rem; background: #f0f7ff; border-radius: 5px; padding: .25rem .45rem; margin-top: .35rem; line-height: 1.3; }
.kc-foot { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .78rem; }
.kc-st { margin-top: .35rem; }
.kc-gecikti { box-shadow: 0 0 0 2px #fecaca, 0 1px 2px rgba(16,24,40,.1); }
.kc-bugun { box-shadow: 0 0 0 2px #fde68a, 0 1px 2px rgba(16,24,40,.1); }
.kc-next { position: absolute; top: 1.35rem; right: .35rem; margin: 0; }
.kc-next button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--primary); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0 2px 1px; }
.kc-next button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.move-dialog { border: 0; border-radius: 12px; padding: 1.2rem; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.move-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.move-dialog form { display: flex; flex-direction: column; gap: .8rem; }
.move-dialog h3 { margin: 0; font-size: 1rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px; font-size: .9rem; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.err { background: var(--danger); }

/* Tanımlar */
.tanim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; align-items: start; }
.tanim-grid .card { margin: 0; }
.tanim-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.tanim-row { display: flex; align-items: center; gap: .3rem; margin: 0; }
.tanim-row input[type=text] { min-height: 34px; padding: .3rem .5rem; }
.tanim-row .sira { width: 22px; text-align: center; font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.tanim-list li.pasif input[type=text] { color: var(--ink-2); text-decoration: line-through; background: var(--line-2); }
.icon-btn.ok:hover { background: #dcfce7; color: var(--success); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.tanim-add { display: flex; gap: .4rem; flex-wrap: wrap; }
.tanim-add input { flex: 1 1 160px; min-height: 34px; }
.tanim-add select { flex: 0 1 180px; width: auto; min-height: 34px; }

@media (max-width: 820px) {
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav > a, .nav summary { white-space: nowrap; }
  .menu-list { position: fixed; left: 1rem; right: 1rem; top: 96px; }
  .desk-only { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Telefonda pano dikey listeye döner; boş aşamalar tek satır başlık olarak kalır */
  .board { flex-direction: column; align-items: stretch; overflow: visible; min-height: 0; gap: .5rem; }
  .col { flex: none; width: 100%; max-height: none; }
  .col-empty > header { padding: .4rem .75rem; font-weight: 500; color: var(--ink-2); }
  .col-empty .cards { display: none; }
  .cards { overflow: visible; }
  .tanim-grid { grid-template-columns: 1fr; }
  .page-head .filters.compact { width: 100%; }
  .filters.compact input[type=search] { flex: 1 1 auto; }
}
@media print {
  .track, .board { display: none !important; }
  .sheet-table.ops-view th.op-name { width: 150px; }
}

/* =================== Döviz, ürün seçimi, fiyat listesi =================== */
.doviz { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.doviz select { width: auto; flex: 0 0 auto; }
.doviz .kur-input { width: 110px; flex: 0 0 110px; }
.doviz .kur-info { flex-basis: 100%; font-size: .78rem; }
.doviz.try .kur-input, .doviz.try .js-kur, .doviz.try .kur-info { display: none; }
.urun-select { font-size: .82rem; min-height: 30px !important; padding: .2rem .4rem !important; margin-bottom: .25rem; color: var(--ink-2); }
.urun-select:has(option:checked:not([value=""])) { color: var(--primary); font-weight: 600; }
.urun-info { display: block; font-size: .74rem; color: var(--ink-2); margin-top: .15rem; line-height: 1.25; }
.urun-info:empty { display: none; }
.urun-info.warn { color: var(--danger); font-weight: 600; }
.card.flush { padding: 0; overflow-x: auto; }
table.price-list th, table.price-list td { padding: .3rem .35rem; }
table.price-list thead th { padding: .6rem .35rem; background: #fafbfc; }
table.price-list .cat-row th { text-align: left; background: #f1f3f5; font-size: .85rem; padding: .5rem .6rem; color: var(--ink); border-top: 1px solid var(--line); }
table.price-list td input[type=text], table.price-list td select { min-height: 32px; padding: .25rem .4rem; font-size: .88rem; }
table.price-list td:nth-child(1) { min-width: 150px; }
table.price-list td:nth-child(5), table.price-list td:nth-child(6) { width: 90px; }
table.price-list td:nth-child(7), table.price-list td:nth-child(8) { width: 100px; }
table.price-list .c { text-align: center; }
table.price-list tr.pasif input[type=text] { color: var(--ink-2); text-decoration: line-through; }
.zam-form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0; }
.zam-form select { width: auto; }
.zam-form input { width: 70px; min-height: 38px; }

/* Üretici firma rozeti */
.uretici { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: #fdf2e9; color: #9a3412; border: 1px solid #fed7aa; white-space: nowrap; }
.kc-uretici { margin: .1rem 0 .15rem; }
.kc-uretici .uretici { font-size: .72rem; padding: 1px 7px; }

/* Matbaa form türü renkleri */
.nc-matbaa_is, .tur-matbaa_is { --tc: #1d4ed8; }
.nc-matbaa_teklif, .tur-matbaa_teklif { --tc: #475569; }

/* =================== Cariler =================== */
.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(16,24,40,.18); max-height: 340px; overflow-y: auto; }
.ac-list li { padding: .45rem .6rem; border-radius: 6px; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; color: var(--ink); font-size: .92rem; }
.ac-list li small { flex-basis: 100%; color: var(--ink-2); font-size: .78rem; }
.ac-list li.active, .ac-list li:hover { background: #eff6ff; }
.ac-list li.ac-empty { cursor: default; color: var(--ink-2); font-size: .85rem; }
.ac-list li.ac-empty:hover { background: none; }
.cari-durum { font-size: .82rem; min-height: 1.2rem; }
.cari-bagli { color: var(--success); font-weight: 600; }
.cari-bagli a { color: var(--success); }
.cari-bagli .link { color: var(--ink-2); font-weight: 400; margin-left: .4rem; text-decoration: underline; }
.cari-ekle { font-weight: 400; color: var(--ink-2); font-size: .82rem; }
.cari-field > label { font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.cari-ref { font-size: .8rem; margin-left: .6rem; font-weight: 500; }
.print-only { display: none; }
.firma-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.firma-link:hover { color: var(--primary); }
.kod { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; color: var(--ink-2); background: var(--line-2); padding: 1px 6px; border-radius: 4px; font-weight: 500; }
h1 .kod { font-size: .85rem; }
.st-tedarikci { background: #fdf2e9; color: #9a3412; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cari-bilgi { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem 1.2rem; }
.cari-bilgi .wide { grid-column: 1 / -1; }
.cari-bilgi dt { font-size: .78rem; color: var(--ink-2); margin-bottom: .15rem; }
.cari-bilgi dd { margin: 0; font-weight: 500; }
.card .pad, .card h2.pad { padding: 1rem 1.2rem 0; }
.empty-inline { padding: 0 1.2rem 1.2rem; color: var(--ink-2); margin: 0; }
table.list.plain { border: 0; box-shadow: none; border-radius: 0; }
.narrow-lg { max-width: 720px; }
.menu-light summary { list-style: none; }
.menu-light summary::-webkit-details-marker { display: none; }
.menu-list.right { left: auto; right: 0; }
@media (max-width: 820px) {
  .cari-bilgi { grid-template-columns: 1fr 1fr; }
  .stats.three { grid-template-columns: 1fr; }
}
@media print { .print-only { display: inline; } }

/* Satır ekleme */
.btn.add-row { width: 100%; margin-top: .5rem; border-style: dashed; color: var(--primary); background: #f8fbff; }
.btn.add-row:hover { background: #eff6ff; }
.btn.add-row .muted { font-weight: 400; font-size: .82rem; }
@media (max-width: 820px) { .btn.add-row .muted { display: none; } }

/* =================== Dosyalar =================== */
.file-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.file-group { border: 1px solid var(--line-2); border-radius: 8px; padding: .8rem; background: #fcfcfd; }
.fg-baski_onay { border-color: #ddd6fe; background: #faf8ff; }
.fg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; }
.fg-head h3 { margin: 0; font-size: .95rem; }
.fg-head .hint { margin: .15rem 0 0; font-size: .8rem; }
.fg-empty { margin: .2rem 0; font-size: .88rem; }
.upload-form { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex-shrink: 0; }
.upload-btn { cursor: pointer; position: relative; }
.upload-btn input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.upload-btn.busy { opacity: .6; pointer-events: none; }
.upload-btn.busy span::after { content: " …"; }
.upload-progress { width: 120px; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.thumb { margin: 0; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.thumb > a:first-child { display: block; aspect-ratio: 4 / 3; background: #f1f3f5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-tile { display: flex !important; align-items: center; justify-content: center; text-decoration: none !important; }
.file-tile .ext { font-weight: 800; font-size: 1.1rem; color: #fff; background: #6d28d9; padding: .45rem .6rem; border-radius: 6px; letter-spacing: .03em; }
.thumb.is-file .file-tile { background: #f5f3ff; }
.thumb figcaption { padding: .35rem .45rem .4rem; font-size: .72rem; line-height: 1.3; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.thumb .fname { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.thumb-del { position: absolute; top: 4px; right: 4px; margin: 0; }
.thumb-del .icon-btn { background: rgba(255,255,255,.92); width: 26px; height: 26px; padding: 0; border-radius: 50%; font-size: 1.05rem; box-shadow: 0 1px 3px rgba(0,0,0,.2); opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb-del .icon-btn, .thumb-del .icon-btn:focus { opacity: 1; }
@media (hover: none) { .thumb-del .icon-btn { opacity: 1; } }
.track-remind { margin: .6rem 0 0; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: .45rem .7rem; font-size: .9rem; }
.clip { font-size: .75rem; color: var(--ink-2); margin-left: .25rem; text-decoration: none !important; white-space: nowrap; }
.kc-right { display: inline-flex; gap: .5rem; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 12, 16, .88); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-cap { position: fixed; bottom: 18px; left: 0; right: 0; text-align: center; color: #e5e7eb; font-size: .9rem; }
.lb-cap a { color: #93c5fd; margin-left: .6rem; }
@media (max-width: 820px) {
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto !important; bottom: 56px; transform: none !important; }
  .file-groups { grid-template-columns: 1fr; }
}

/* Birim fiyattan hesaplanan (elle de yazılabilen) tutar */
input.calc.soft { background: #f6f8fa; font-weight: 600; }
input.calc.soft:focus { background: #fff; }

/* Öneri listeli alanlar (kağıt cinsi, tabaka ölçüsü) */
table.items td input[list] { min-width: 150px; }

/* =================== Kurumsal kimlik: logo ve beyaz üst menü =================== */
.topbar { background: #fff; color: var(--ink); border-bottom: 3px solid var(--brand); box-shadow: 0 1px 4px rgba(16,24,40,.06); padding-top: .4rem; padding-bottom: .4rem; }
.brand { align-items: center; gap: .6rem; color: var(--ink); }
.brand-logo { height: 38px; width: auto; display: block; }
.brand .brand-sub { color: var(--ink-2); opacity: 1; font-weight: 600; font-size: .8rem; border-left: 1px solid var(--line); padding-left: .6rem; letter-spacing: .02em; }
.nav > a, .nav summary { color: var(--ink-2); font-weight: 500; }
.nav > a:hover, .nav summary:hover { background: var(--brand-soft); color: var(--brand); }
.nav > a.active { background: var(--brand-soft); color: var(--brand); }
.me a, .me .link { color: var(--ink-2); }
.me a:hover, .me .link:hover { color: var(--brand); }
.me-name { color: var(--ink); }
.login-page { background: linear-gradient(160deg, #f8edf3 0%, #eceaea 100%); }
.login-brand { flex-direction: column; align-items: center; gap: .3rem; margin-bottom: .6rem; }
.login-logo { width: 220px; height: auto; }
.login-brand .brand-sub { color: var(--ink-2); opacity: 1; font-weight: 600; letter-spacing: .04em; }
.login-box { border-top: 4px solid var(--brand); }
.sheet-logo { height: 54px; width: auto; display: block; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs a.active .count { background: var(--brand-soft); color: var(--brand); }
.pager a.active { background: var(--brand); border-color: var(--brand); }
.stepper li.current .dot { border-color: #f1c6de; box-shadow: 0 0 0 4px rgba(165,45,117,.15); }
.track { border-left-color: var(--brand); }
@media (max-width: 820px) {
  .brand-logo { height: 30px; }
  .brand .brand-sub { display: none; }
}
@media print { .sheet-logo { height: 48px; } }

/* =================== Görevler =================== */
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; text-align: center; line-height: 18px; margin-left: .15rem; }
.gorev-list { list-style: none; margin: 0; padding: 0; }
.gorev-list.card { padding: 0; }
.gorev { display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between; padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); border-left: 4px solid #cbd5e1; }
.gorev:last-child { border-bottom: 0; }
.gorev.gd-yapiliyor { border-left-color: #f59e0b; }
.gorev.gd-tamam { border-left-color: var(--success); opacity: .75; }
.gorev.gd-tamam .g-baslik b { text-decoration: line-through; }
.gorev.gecikti { border-left-color: var(--danger); background: #fff8f8; }
.g-main { min-width: 0; flex: 1; }
.g-baslik { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.g-is { font-size: .85rem; }
.g-meta { font-size: .82rem; color: var(--ink-2); margin-top: .15rem; }
.g-aciklama { font-size: .88rem; margin-top: .3rem; background: var(--line-2); border-radius: 6px; padding: .3rem .55rem; }
.gbadge { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #e2e8f0; color: #334155; }
.gbadge.gd-yapiliyor { background: #fef3c7; color: #92400e; }
.gbadge.gd-tamam { background: #dcfce7; color: #166534; }
.g-actions { display: flex; gap: .35rem; align-items: center; flex-shrink: 0; margin: 0; }
.gorev-ekle { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .8rem; }
.gorev-ekle label { flex: 1 1 150px; }
.gorev-ekle .g-form { flex: 2 1 240px; }
.gorev-ekle .g-not { flex: 2 1 220px; }
.gorev-yeni summary, .gorev-yeni-inline summary { cursor: pointer; color: var(--primary); }
.gorev-yeni-inline { margin-top: .8rem; border-top: 1px dashed var(--line); padding-top: .7rem; }
#gorevler h2 .count { font-size: .75rem; vertical-align: middle; }
@media (max-width: 820px) {
  .gorev { flex-direction: column; }
  .g-actions { align-self: flex-end; }
}

.role-matbaa { background: #f8edf3; color: #a52d75; }

/* =================== Bildirimler =================== */
.bell { position: relative; font-size: 1.15rem; text-decoration: none !important; padding: .15rem .3rem; border-radius: 6px; line-height: 1; }
.bell:hover, .bell.active { background: var(--brand-soft); }
.bell .nav-badge { position: absolute; top: -6px; right: -8px; font-size: .65rem; min-width: 16px; line-height: 16px; }
.bildirim-list { list-style: none; margin: 0; padding: 0; }
.bildirim-list li { border-bottom: 1px solid var(--line-2); }
.bildirim-list li:last-child { border-bottom: 0; }
.bildirim-list a { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; color: var(--ink); text-decoration: none; }
.bildirim-list a:hover { background: #fafbfc; }
.bildirim-list li.yeni a { background: var(--brand-soft); border-left: 4px solid var(--brand); }
.bildirim-list li.yeni .b-baslik { font-weight: 700; }
.b-mesaj { font-size: .88rem; color: var(--ink-2); }
.bildirim-list time { font-size: .76rem; color: var(--ink-2); }
.bildirim-secim { display: flex; flex-direction: column; gap: .45rem; }
.bildirim-secim label, #bildirim label.check { font-weight: 400; color: var(--ink); font-size: .92rem; }
.tg-box { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.tg-box h3 { margin: 0 0 .5rem; font-size: 1rem; }
.tg-ok { color: var(--success); font-weight: 600; }
.steps { margin: .3rem 0 .8rem; padding-left: 1.2rem; font-size: .9rem; line-height: 1.6; }

/* =================== Kargo, bağlı işler, renkler =================== */
.track-kargo { margin: .6rem 0 0; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; padding: .45rem .7rem; font-size: .92rem; }
.kargo-alan { display: flex; flex-wrap: wrap; gap: .6rem; flex-basis: 100%; background: #f0fdf4; border-radius: 6px; padding: .5rem; }
.kargo-alan label { flex: 1 1 180px; }
.kargo-alan[hidden] { display: none; }
.kc-bagli { font-size: .74rem; color: #1d4ed8; margin: .1rem 0; font-weight: 600; }
.bagli-bant .asama { margin: 0 .3rem; }
.baski-kart { border-left: 4px solid var(--t-silindir); }
.bagli-liste { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.bagli-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; background: #fafbfc; border: 1px solid var(--line-2); border-radius: 6px; padding: .45rem .7rem; }
.renk-nokta { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #cbd5e1; margin-right: .35rem; vertical-align: -1px; }
table.price-list td:nth-child(9) { min-width: 230px; }

.role-admin { background: #a52d75; color: #fff; }
.admin-bant form { margin-left: .5rem; }

/* =================== Stoklar ve müşteri formu =================== */
.stok-wrap { position: relative; }
.stok-wrap .stok-kod { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: ui-monospace, Menlo, monospace;
  font-size: .68rem; background: var(--brand-soft); color: var(--brand); padding: 1px 5px; border-radius: 4px; pointer-events: none; }
.stok-wrap .stok-kod[hidden] { display: none; }
.stok-wrap:has(.stok-kod:not([hidden])) input[type=text] { padding-right: 70px; }
.ac-list.stok-ac { position: fixed; z-index: 60; right: auto; }
.ac-list.stok-ac li .kod { font-size: .72rem; }
.kalem-uretim { display: flex; flex-direction: column; gap: .2rem; margin-top: .3rem; align-items: center; }
.kalem-is { font-size: .68rem; font-weight: 700; white-space: nowrap; background: #eff6ff; border-radius: 4px; padding: 1px 4px; }
.kalem-btn { font-size: .68rem !important; min-height: 24px !important; padding: .1rem .35rem !important; white-space: nowrap; }
.sheet-table .sno:has(.kalem-uretim) { width: 92px; }
.grup-secim { display: flex; flex-direction: column; gap: .3rem; max-height: 420px; overflow-y: auto; }
.grup-secim label { font-weight: 400; color: var(--ink); font-size: .88rem; }
.nc-matbaa_musteri, .tur-matbaa_musteri { --tc: #a52d75; }

/* Web tasarım, tabela, promosyon */
.nc-web_tasarim, .tur-web_tasarim { --tc: #0e7490; }
.nc-tabela, .tur-tabela { --tc: #b45309; }
.nc-promosyon, .tur-promosyon { --tc: #15803d; }

/* Fatura Kesildi kaşesi */
.stamp-kesildi { --sc: #047857; transform: rotate(4deg); }
.st-kesildi { background: #d1fae5; color: #065f46; margin-left: .25rem; }
.tabs a.tab-kesildi .count { background: #d1fae5; color: #065f46; }

/* =================== Yazdırma: hızlı çıktı ===================
   Saydamlık (opacity, yarı saydam renk, gölge, degrade) yazıcı sürücüsünde sayfanın resme çevrilmesine ve
   çok yavaş yazdırmaya yol açar. Çıktıda hepsi düz renge çevrilir; düzen de sıkılaştırılır. */
@media print {
  *, *::before, *::after {
    box-shadow: none !important; text-shadow: none !important; filter: none !important;
    backdrop-filter: none !important; transition: none !important; animation: none !important;
  }
  html, body { background: #fff !important; }
  /* Sistem yazı tipleri (San Francisco, Segoe UI Variable) değişken yazı tipidir; Chrome bunları yazıcıya her harfi ayrı
     çizim olarak (Type3) gönderir ve çıktı çok yavaşlar. Çıktıda her bilgisayarda bulunan sabit Arial kullanılır. */
  body, body * { font-family: Arial, "Liberation Sans", Helvetica, sans-serif !important; }
  body { font-size: 9.5pt; line-height: 1.3; }
  @page { margin: 10mm; }
  .stamp { opacity: 1 !important; background: #fff !important; }
  .sketch-img { background-image: none !important; }
  .sheet-head { margin-bottom: .5rem; }
  .sheet-logo { height: 40px; }
  .sheet-title { font-size: 11pt; margin-top: .1rem; }
  .sheet-meta { font-size: 9pt; gap: 0; }
  .sheet-table { margin-bottom: .45rem; border-width: 1px; }
  .sheet-table caption { padding: .15rem; font-size: 8.5pt; border-width: 1px; }
  .sheet-table th, .sheet-table td { padding: .12rem .4rem; }
  .sheet-table.kv th { width: 150px; font-size: 9pt; }
  .sheet-table.items-view th { font-size: 7.5pt; }
  .sheet-table.ops-view th.op-name { width: 140px; font-size: 9pt; }
  .sheet-table.ops-view th.op-name small, .sheet-table.ops-view th.op-name .boxes { font-size: 7.5pt; }
  .sheet-table .sec-row { font-size: 7.5pt; padding: .1rem !important; }
  .sheet-notes { min-height: 0; padding: .3rem .5rem; margin-bottom: .45rem; border-width: 1px; }
  .sheet-bar { padding: .2rem .5rem; margin-bottom: .45rem; font-size: 8pt; }
  .sheet-foot { font-size: 8pt; padding-top: .3rem; gap: .2rem; }
}

/* =================== Günlük işler =================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: pre; }
.gunluk-tarih { font-size: 1rem; font-weight: 500; }
.gunluk-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .8rem; }
.gunluk-form label { flex: 1 1 160px; }
.gunluk-form .gf-metin { flex: 3 1 300px; }
.gunluk-grup { padding: 0; }
.gunluk-grup h2 { margin: 0; padding: .7rem 1rem; font-size: 1rem; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: .5rem; }
.gunluk-list { list-style: none; margin: 0; padding: 0; }
.gi { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 1rem; border-bottom: 1px solid var(--line-2); }
.gi:last-child { border-bottom: 0; }
.gi-kutu { flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid #94a3b8; border-radius: 4px; margin-top: .15rem; }
.gi-main { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.gi-metin { font-weight: 600; }
.gi-yer { font-weight: 400; color: var(--ink-2); }
.gi-yapildi .gi-kutu { background: var(--success); border-color: var(--success); }
.gi-yapildi .gi-metin { text-decoration: line-through; color: var(--ink-2); font-weight: 500; }
.gi-yapilamadi { background: #fff8f8; }
.gi-yapilamadi .gi-kutu { border-color: var(--danger); }
.gi-devir { background: #fef3c7; color: #92400e; }
.gi .ok { color: var(--success); }
.gi-neden summary { list-style: none; }
.gi-not { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.gi-not input { min-width: 0; flex: 1 1 170px; }
.gi .g-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.gi .g-actions details[open] { flex-basis: 100%; }
@media (max-width: 640px) {
  .gi { flex-wrap: wrap; }
  .gi .g-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
.gunluk-baslik { font-size: 13pt; margin-bottom: .5rem; }
@media print {
  .gunluk-grup { border: 1px solid #333; border-radius: 0; margin-bottom: .4rem; }
  .gunluk-grup h2 { padding: .2rem .5rem; font-size: 10.5pt; }
  .gi { padding: .25rem .5rem; }
  .gi-kutu { width: 12px; height: 12px; border: 1px solid #333; }
  .gi-yapildi .gi-kutu { background: #333; }
  .gunluk-baslik.print-only { display: block; }
}
/* Geliştirme talepleri */
.talep { border-left-color: #94a3b8; }
.talep.gt-yeni { border-left-color: var(--brand); }
.talep.gt-deg { border-left-color: #f59e0b; }
.talep.gt-plan { border-left-color: #2563eb; }
.talep.gt-yapildi { border-left-color: var(--success); }
.talep.gt-vazgec { opacity: .7; }
.gbadge.gt-yeni { background: var(--brand-soft); color: var(--brand); }
.gbadge.gt-deg { background: #fef3c7; color: #92400e; }
.gbadge.gt-plan { background: #dbeafe; color: #1e40af; }
.gbadge.gt-yapildi { background: #dcfce7; color: #166534; }
.gbadge.gt-acil { background: #fee2e2; color: #991b1b; }
.talep-yanit { margin-top: .4rem; padding: .4rem .6rem; background: #f8fafc; border-left: 3px solid #94a3b8; font-size: .9rem; }
.talep-duzenle { margin-top: .4rem; }
.talep-duzenle summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); }
.talep-duzenle .gorev-ekle { margin-top: .4rem; }

.teklif-no { display: block; font-size: .75rem; }

/* =================== Notlarım =================== */
.not-satir { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem .9rem; border-bottom: 1px solid var(--line-2); }
.not-satir:last-child { border-bottom: 0; }
.not-satir.gecikti { background: #fff8f8; }
.not-kutu { margin: 0; flex: 0 0 auto; }
.not-check { width: 22px; height: 22px; border: 2px solid #94a3b8; border-radius: 5px; background: #fff; cursor: pointer; padding: 0; margin-top: .1rem; }
.not-check:hover { border-color: var(--success); background: #f0fdf4; }
.not-tamam .not-check { background: var(--success); border-color: var(--success); }
.not-tamam .not-metin { text-decoration: line-through; color: var(--ink-2); }
.not-satir .g-main { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.not-metin { font-weight: 500; }
.not-grup h2 { flex-wrap: wrap; }
.not-grup h2 a { color: var(--ink); }
.not-termin { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.not-etiket { font-size: .78rem; font-weight: 400; }
#notlarim .gorev-list { border: 1px solid var(--line-2); border-radius: 8px; }

/* "hidden" işaretli öğeler (ör. 0 bildirim rozeti) hiçbir stilde görünmesin */
[hidden] { display: none !important; }

/* Stok çıkışı (fatura no girilmeden arşivlenen iş) */
.stamp-stok { --sc: #0f766e; transform: rotate(3deg); }
.st-stok { background: #ccfbf1; color: #115e59; margin-left: .25rem; }
.stok-hint { margin: 0; font-size: .8rem; flex-basis: 100%; }

/* =================== Müşteri teslim imzası =================== */
.imza-kayit { display: flex; gap: .8rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.imza-kayit .imza-bilgi { flex: 1 1 0; min-width: 0; }
.imza-img { width: 180px; max-width: 40%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.imza-yeni { margin-top: .8rem; }
.imza-yeni > summary { list-style: none; display: inline-flex; }
.imza-yeni > summary::-webkit-details-marker { display: none; }
.imza-form { margin-top: .8rem; display: flex; flex-direction: column; gap: .7rem; }
.imza-alanlar { display: flex; flex-wrap: wrap; gap: .6rem; }
.imza-alanlar label { flex: 1 1 220px; }
.imza-pad { position: relative; border: 2px dashed #94a3b8; border-radius: 10px; background: #fff; max-width: 900px; }
.imza-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; border-radius: 10px; }
.imza-cizgi { position: absolute; left: 6%; right: 6%; bottom: 22%; border-top: 1px solid #cbd5e1; font-size: .75rem; color: #94a3b8; padding-top: .15rem; pointer-events: none; }
.imza-tablo th { width: 90px; }
.imza-td img { height: 55px; width: auto; display: block; }
@media print { .imza-td img { height: 45px; } }

/* =================== Yenilikler penceresi =================== */
.yenilik-dialog { border: 0; border-radius: 14px; padding: 1.4rem 1.5rem; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.yenilik-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.yenilik-dialog h2 { margin: 0 0 .2rem; font-size: 1.3rem; color: var(--brand); }
.yenilik-liste { list-style: none; margin: .8rem 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.yenilik-liste li { display: flex; gap: .8rem; align-items: flex-start; }
.yenilik-liste p { margin: .15rem 0 0; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.yenilik-ikon { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; }
.yenilik-dialog .form-actions .muted { font-size: .8rem; }
