/* Satış sonrası portal — ortak stiller.
   Kimlik: teknik resim kadar net, sakin bir çalışma aracı. Renk kiracının markasından (--brand) gelir;
   platformun kendi dili nötr çelik griler, IBM Plex yazı ailesi ve parça/seri numaraları için gerçek eşaralıklı yazıdır. */
:root {
  --brand: #0f5bd7; --accent: #ff7a00;
  --bg: #f2f4f7; --panel: #fff; --surface: #fff; --surface-2: #f9fafb; --soft: #f4f6f8; --tint: #fff;
  --line: #e3e7ec; --line-strong: #cdd4dc;
  --text: #121a24; --text-2: #354152; --muted: #5b6878; --text-3: #8b95a3;
  --ok: #067647; --ok-bg: #e9f8ef; --ok-line: #abefc6;
  --warn: #8a4b06; --warn-bg: #fdf3dc; --warn-line: #f7d98c;
  --err: #b42318; --err-bg: #fdeeec; --err-line: #f9c9c3;
  --info: #1e3a8a; --info-bg: #eef4ff; --info-line: #c7dbff;
  --blue: #1d4ed8; --blue-bg: #e5edff; --gray: #475467; --gray-bg: #eef1f4; --indigo: #3538cd; --indigo-bg: #eef0ff;
  --internal-bg: #fffbeb; --chip: rgba(255,255,255,.94); --link: color-mix(in srgb, var(--brand) 88%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, var(--tint)); --brand-line: color-mix(in srgb, var(--brand) 30%, var(--tint));
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.04); --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --h-control: 38px; --h-control-sm: 30px;
  font-family: var(--font); color: var(--text);
  color-scheme: light;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
button, input, select, textarea { color: inherit; font-family: inherit; }
body { background: var(--bg); font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.012em; margin: 0; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; line-height: 1.35; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono, code { font-family: var(--font-mono); font-size: .93em; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spacer { flex: 1; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* --- üst çubuk (müşteri portalı) */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); height: 58px; display: flex; align-items: center;
          gap: 18px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); white-space: nowrap; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; }
.brand:hover { text-decoration: none; }
.brand img { height: 32px; max-width: 180px; object-fit: contain; }
.brand .dot { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); flex: 0 0 auto;
              box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--brand) 70%, #fff); }
.nav { display: flex; gap: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--soft); text-decoration: none; color: var(--text); }
.nav a.active { color: var(--text); background: var(--soft); box-shadow: inset 0 -2px 0 var(--brand); }
.nav .count { margin-left: 2px; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 28px 28px 72px; }
.container.narrow { max-width: 540px; }

/* kullanıcı menüsü (avatar) */
.umenu { position: relative; }
.umenu > summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px 4px 4px;
                   border-radius: 999px; border: 1px solid transparent; }
.umenu > summary::-webkit-details-marker { display: none; }
.umenu > summary:hover, .umenu[open] > summary { background: var(--soft); border-color: var(--line); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
          background: var(--brand-soft); color: var(--link); flex: 0 0 auto; letter-spacing: .02em; }
.umenu .u-name { font-size: 13.5px; color: var(--text); font-weight: 500; line-height: 1.2; }
.umenu .u-sub { font-size: 12px; color: var(--muted); line-height: 1.2; }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.umenu-pop .u-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.umenu-pop a, .umenu-pop button.mi { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; color: var(--text-2);
             font: inherit; font-size: 14px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.umenu-pop a:hover, .umenu-pop button.mi:hover { background: var(--soft); text-decoration: none; }
.umenu-pop form { margin: 0; }
.umenu.up .umenu-pop { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }

/* --- sayfa başlığı */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.page-head h1 .badge { font-size: 12px; margin-left: 6px; vertical-align: 3px; }
.page-head h1 .h-rev { color: var(--muted); font-weight: 500; font-size: .75em; margin-left: 4px; }
.page-head p { margin: 0; }
.page-head .muted { font-size: 13.5px; }
.page-head > .row { gap: 8px; }
.back { display: flex; width: fit-content; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); margin: -4px 0 10px; }
.back:hover { color: var(--text); text-decoration: none; }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13.5px; }

/* --- üretici paneli: kenar menü */
.panel-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 12px 12px; display: flex; flex-direction: column;
           gap: 1px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 35; }
.sidebar .brand { padding: 6px 10px 16px; }
.sidebar a.item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
                  color: var(--text-2); font-weight: 500; font-size: 14px; min-height: 36px; }
.sidebar a.item .ico { color: var(--text-3); }
.sidebar a.item .lbl { flex: 1; }
.sidebar a.item:hover { background: var(--soft); text-decoration: none; color: var(--text); }
.sidebar a.item:hover .ico { color: var(--text-2); }
.sidebar a.item.active { background: var(--brand-soft); color: var(--link); }
.sidebar a.item.active .ico { color: var(--link); }
.sidebar .sep { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 18px 10px 6px; }
.sidebar .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.sidebar .foot .umenu { flex: 1; min-width: 0; }
.sidebar .foot .umenu > summary { border-radius: var(--radius-sm); padding: 6px; }
.sidebar .foot .u-text { min-width: 0; }
.sidebar .foot .u-name, .sidebar .foot .u-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; background: var(--accent); color: #fff; border-radius: 999px;
         font-size: 11.5px; font-weight: 600; padding: 0 6px; line-height: 1; }
.panel-main { min-width: 0; }
.panel-main .container { max-width: 1280px; }
.m-top { display: none; }
.nav-scrim { display: none; }

/* --- kartlar, tablolar */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); min-height: 56px; }
.card-head h2 { margin: 0; }
.card-head a:not(.btn) { font-size: 13.5px; font-weight: 500; }
.card-body { padding: 18px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: block; color: inherit; position: relative; }
a.stat:hover { text-decoration: none; border-color: var(--brand-line); }
.stat .n { font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat a { color: inherit; }
.stat a:hover { text-decoration: none; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 500;
            padding: 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.right { text-align: right; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.mono { white-space: nowrap; }
.table td .small { line-height: 1.35; }
.table tr.link:hover td { background: var(--surface-2); cursor: pointer; }
.table tr.link td:first-child a { font-weight: 500; }
.table input { width: 100%; }
.table tfoot td, .table tfoot th { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }

/* --- rozetler */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 500;
         white-space: nowrap; line-height: 18px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-blue { background: var(--blue-bg); color: var(--blue); } .badge-amber { background: var(--warn-bg); color: var(--warn); }
.badge-green { background: var(--ok-bg); color: var(--ok); } .badge-gray { background: var(--gray-bg); color: var(--gray); }
.badge-red { background: var(--err-bg); color: var(--err); }
.badge.plain::before { display: none; }

/* --- formlar */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
label.btn { flex-direction: row; align-items: center; gap: 6px; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--text); }
label.check input { margin-top: 3px; accent-color: var(--brand); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; line-height: 1.45; }
input, select, textarea { font: inherit; font-size: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 11px;
                          background: var(--surface); color: var(--text); min-width: 0; min-height: var(--h-control); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--text-3)); }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 22%, transparent); outline-offset: 0; border-color: var(--brand); }
input[type=checkbox], input[type=radio] { min-height: 0; accent-color: var(--brand); width: 16px; height: 16px; }
input[type=color] { padding: 2px; height: 40px; width: 64px; }
input[type=file] { padding: 6px; }
input[type=range] { min-height: 0; padding: 0; border: 0; accent-color: var(--brand); }
select { padding-right: 30px; }
textarea { resize: vertical; min-height: 72px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 500;
       border-radius: var(--radius-sm); padding: 0 14px; height: var(--h-control); border: 1px solid var(--line-strong); background: var(--surface);
       color: var(--text); cursor: pointer; white-space: nowrap; transition: background-color .12s, border-color .12s; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn .ico { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.danger { color: var(--err); border-color: var(--err-line); }
.btn.danger:hover { background: var(--err-bg); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--soft); }
.btn.small { height: var(--h-control-sm); padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.link { border: 0; background: none; color: var(--link); padding: 0; height: auto; font-weight: 500; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
summary.btn { list-style: none; }
form.inline { display: inline; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 0; background: none; color: var(--muted);
            cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.icon-btn:hover { background: var(--soft); color: var(--text); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
             background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; }
.filters a:hover { text-decoration: none; background: var(--soft); }
.filters a.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.filters a .n { color: var(--muted); font-weight: 400; }
.filters a.on .n { color: color-mix(in srgb, var(--surface) 70%, transparent); }

/* --- uyarılar */
.flash { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 18px; font-size: 14px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.flash.error { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.flash.info, .note { background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.note.action { background: var(--brand-soft); border-color: var(--brand-line); color: var(--text); }
.note strong { font-weight: 600; }
.copybox { display: flex; gap: 8px; align-items: center; }
.copybox input { flex: 1; font-family: var(--font-mono); font-size: 12px; }

/* --- giriş sayfaları */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card .brand { justify-content: center; margin-bottom: 20px; font-size: 18px; }

/* --- makine kartları (müşteri) */
.machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.machine-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column;
                color: inherit; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.machine-card:hover { text-decoration: none; border-color: var(--brand-line); box-shadow: var(--shadow-lg); }
.machine-card .thumb { aspect-ratio: 16 / 9; background: linear-gradient(180deg, var(--surface-2), var(--soft)); display: grid; place-items: center;
                       border-bottom: 1px solid var(--line); position: relative; }
.machine-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.machine-card .thumb .ph { color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; }
.machine-card .thumb .ph .ico { width: 40px; height: 40px; stroke-width: 1.2; }
.machine-card .thumb .flag { position: absolute; left: 10px; top: 10px; }
.machine-card .mc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.machine-card .model { font-weight: 600; font-size: 16px; line-height: 1.3; }
.machine-card .serial { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.machine-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.machine-card .mc-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line);
                         font-size: 13px; color: var(--muted); background: var(--surface-2); }
.machine-card .mc-foot .go { color: var(--link); font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.machine-card .mc-foot .go .ico { width: 16px; height: 16px; }

/* --- mesaj akışı */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; background: var(--surface); max-width: 86%; }
.msg.mine { align-self: flex-end; background: var(--brand-soft); border-color: var(--brand-line); }
.msg.internal { background: var(--internal-bg); border-color: var(--warn-line); }
.msg.system { align-self: center; background: none; border: 0; padding: 0; color: var(--muted); font-size: 12.5px; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg .body { white-space: pre-wrap; }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos a img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* --- adım listesi */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.steps .tick { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 600;
               background: var(--gray-bg); color: var(--text-3); flex: 0 0 auto; }
.steps .done .tick { background: var(--ok-bg); color: var(--ok); }
.steps .done a, .steps .done span.t { color: var(--muted); text-decoration: line-through; }

pre.log { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: var(--radius-sm); font-size: 12px; overflow: auto; max-height: 340px; white-space: pre-wrap; font-family: var(--font-mono); }

/* --- dar ekran */
@media (max-width: 960px) {
  .panel-layout { grid-template-columns: 1fr; }
  .m-top { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line);
           position: sticky; top: 0; z-index: 30; }
  .m-top .brand { font-size: 15px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-102%); transition: transform .2s ease;
             box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 34; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 0 12px; gap: 8px; }
  .nav a { padding: 7px 9px; }
  .topbar .umenu .u-text { display: none; }
  .container { padding: 18px 14px 56px; }
  h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .no-print, .topbar, .sidebar, .m-top { display: none !important; }
  body { background: #fff; }
  .panel-layout { display: block; }
}

/* --- demo modu (PORTAL_DEMO=1): şifresiz hesap değiştirme */
.demo-pill { display: inline-block; background: #f5b335; color: #1f2937; font-weight: 700; font-size: 10.5px;
             letter-spacing: .04em; border-radius: 999px; padding: 1px 7px; line-height: 1.5; }
.demo-bar { position: fixed; right: 14px; bottom: 14px; z-index: 1000; font-size: 13px; }
.demo-bar summary { list-style: none; cursor: pointer; background: #1f2937; color: #fff; border-radius: 999px;
                    padding: 5px 12px 5px 5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
                    user-select: none; max-width: calc(100vw - 28px); white-space: nowrap; opacity: .92; }
.demo-bar summary:hover, .demo-bar[open] summary { opacity: 1; }
.demo-bar summary::-webkit-details-marker { display: none; }
.demo-bar[open] .demo-caret { transform: rotate(180deg); }
.demo-caret { font-size: 10px; opacity: .7; }
.demo-pop { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(360px, calc(100vw - 28px)); max-height: 72vh;
            overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
            box-shadow: var(--shadow-lg); padding: 14px; }
.demo-groups { display: flex; flex-direction: column; gap: 14px; }
.demo-group-name { font-weight: 600; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.demo-btns { display: flex; flex-direction: column; gap: 6px; }
.demo-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px;
            border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text); background: var(--surface); }
.demo-btn:hover { text-decoration: none; border-color: var(--brand); background: var(--soft); }
.demo-btn.current { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.demo-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-role { font-size: 12px; white-space: nowrap; border-radius: 999px; padding: 1px 8px; background: var(--soft); color: var(--muted); }
.role-customer .demo-role { background: var(--ok-bg); color: var(--ok); }
.role-owner .demo-role, .role-staff .demo-role { background: var(--indigo-bg); color: var(--indigo); }
.role-platform_admin .demo-role { background: var(--warn-bg); color: var(--warn); }
.auth-demo { margin: 16px 0 4px; }
.auth-demo-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
@media print { .demo-bar { display: none; } }

/* --- tema düğmesi */
.theme-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--line);
             background: var(--surface); color: var(--text-2); cursor: pointer; padding: 0; font-size: 15px; line-height: 1; flex: 0 0 auto; }
.theme-btn:hover { background: var(--soft); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .i-sun, .theme-btn .i-moon, .theme-btn .i-auto { display: none; }
:root[data-theme-pref="light"] .theme-btn .i-sun, :root[data-theme-pref="dark"] .theme-btn .i-moon,
:root:not([data-theme-pref="light"]):not([data-theme-pref="dark"]) .theme-btn .i-auto { display: block; }
.auth-theme { position: fixed; top: 14px; right: 14px; }

/* --- karanlık tema: <html data-theme="dark"> */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1218; --panel: #161b23; --surface: #161b23; --surface-2: #1b212a; --soft: #212833; --tint: #161b23;
  --line: #29313c; --line-strong: #3a4350;
  --text: #e8edf3; --muted: #9da8b6; --text-2: #c9d2dc; --text-3: #6f7a88;
  --ok: #5ad178; --ok-bg: #11271a; --ok-line: #1f4d2c;
  --warn: #e8b84a; --warn-bg: #2a2112; --warn-line: #5a4518;
  --err: #ff8078; --err-bg: #2d1517; --err-line: #5c2125;
  --info: #a9c6ff; --info-bg: #121d33; --info-line: #24395f;
  --blue: #93b6ff; --blue-bg: #15264a; --gray: #b4bdc8; --gray-bg: #242b35; --indigo: #a9b6fd; --indigo-bg: #1d2246;
  --internal-bg: #2a2412; --chip: rgba(22,27,35,.92);
  --link: color-mix(in srgb, var(--brand) 50%, #ffffff);
  --brand-soft: color-mix(in srgb, var(--brand) 22%, var(--tint)); --brand-line: color-mix(in srgb, var(--brand) 45%, var(--tint));
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
}
:root[data-theme="dark"] .demo-bar summary { background: #2b3442; }
:root[data-theme="dark"] .filters a.on { background: var(--text); color: var(--bg); }

/* --- yedek parça seti düzenleyici */
#kit-table tr.kit-on td { background: color-mix(in srgb, var(--brand) 8%, var(--tint)); }
.card-head input[type=search] { padding: 6px 10px; }

label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; }
label.check .hint { color: var(--muted); font-weight: 400; }

/* --- yaşam döngüsü zaman çizelgesi */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0; margin: 16px 0 6px; padding: 0; }
.timeline li { position: relative; padding: 18px 8px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line-strong); }
.timeline li.done::before { background: var(--ok); }
.timeline .dot { position: absolute; top: 1px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.future .dot { border-color: var(--blue); }
.timeline .tl-label { font-weight: 600; color: var(--text-2); }
.timeline .tl-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline li.todo .tl-label { color: var(--text-3); font-weight: 500; }
.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
details > summary.btn { list-style: none; display: inline-flex; }
details > summary.btn::-webkit-details-marker { display: none; }
.doc-upload { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; padding: 14px 18px; border-top: 1px solid var(--line); }
td.err, .err { color: var(--err); }

/* --- FAT / SAT raporları */
.report-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.sticky-side { position: sticky; top: 76px; }
@media (max-width: 1000px) { .report-layout { grid-template-columns: minmax(0, 1fr); } .sticky-side { position: static; } }
.ri { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.ri:first-of-type { border-top: 0; }
.ri[data-result="nok"] { background: color-mix(in srgb, var(--err) 7%, var(--tint)); }
.ri[data-result="ok"] .ri-text::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.ri-text { font-size: 14px; }
.ri-text .req { color: var(--err); }
.ri-input { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ri-input textarea { min-width: 260px; }
.ri-note { grid-column: 1 / -1; font-size: 13px; padding: 6px 10px; }
.measure { display: inline-flex; align-items: center; gap: 6px; }
.measure input { width: 110px; text-align: right; }
.measure .unit { color: var(--muted); font-size: 13px; min-width: 24px; }
.ans-seg { display: inline-flex; }
.ans-opt { display: inline-flex; flex-direction: row; margin: 0; cursor: pointer; }
.ans-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ans-opt span { padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ans-opt + .ans-opt span { border-left: 1px solid var(--line); }
.ans-opt.ans-ok input:checked + span { background: var(--ok-bg); color: var(--ok); }
.ans-opt.ans-nok input:checked + span { background: var(--err-bg); color: var(--err); }
.ans-opt.ans-na input:checked + span { background: var(--gray-bg); color: var(--gray); }
.ans-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.auto-res { font-size: 12px; font-weight: 700; }
.auto-res.ok { color: var(--ok); } .auto-res.nok { color: var(--err); }
.save-state.ok { color: var(--ok); } .save-state.err { color: var(--err); }
.progress { height: 8px; background: var(--gray-bg); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.rows-head { display: flex; justify-content: space-between; align-items: center; }
.rows-head h3 { margin: 0; }
.row-item { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 6px; }
.sigpad { position: relative; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fff; }
.sigpad canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.sigpad [data-sig-clear] { position: absolute; right: 6px; top: 4px; font-size: 12px; }
.sigpad.need { border-color: var(--err); }
.sigpad::after { content: "İmza"; position: absolute; left: 10px; bottom: 6px; font-size: 11px; color: #98a2b3; pointer-events: none; }
.punch { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.punch.closed { opacity: .65; }
.punch input[type=date] { width: 140px; }
ul.log { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
/* rapor içeriği (ekranda ve baskıda) */
.rp { font-size: 13.5px; color: var(--text); }
.rp-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--text); padding-bottom: 10px; margin-bottom: 12px; }
.rp-head h1 { font-size: 20px; margin: 4px 0 0; }
.rp-brand { font-weight: 700; color: var(--brand); }
.rp-brand img { height: 36px; }
.rp-sub { color: var(--muted); }
.rp-no { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.rp-no .mono { font-size: 15px; font-weight: 700; }
.rp h3 { font-size: 14px; margin: 18px 0 6px; }
.rp-meta, .rp-table { width: 100%; border-collapse: collapse; }
.rp-meta th, .rp-meta td, .rp-table th, .rp-table td { border: 1px solid var(--line-strong); padding: 5px 8px; text-align: left; vertical-align: top; }
.rp-meta th, .rp-table th { background: var(--soft); font-weight: 600; font-size: 12px; }
.rp-table tr.res-nok td { background: color-mix(in srgb, var(--err) 7%, var(--tint)); }
.ans { font-weight: 700; font-size: 12px; }
.ans-ok { color: var(--ok); } .ans-nok { color: var(--err); } .ans-na { color: var(--gray); }
.rp-note { background: var(--soft); border-left: 3px solid var(--line-strong); padding: 8px 10px; white-space: pre-wrap; }
.rp-sigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .rp-sigs { grid-template-columns: minmax(0, 1fr); } }
.rp-sig { border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px; min-height: 140px; display: flex; flex-direction: column; gap: 3px; }
.rp-sig img { height: 70px; max-width: 100%; object-fit: contain; object-position: left; background: #fff; border-radius: 4px; }
.rp-sig-role { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.rp-sig-empty { flex: 1; display: grid; place-items: center; color: var(--text-3); }
.rp-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; word-break: break-all; }
.print-page { background: var(--bg); }
.print-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 5; }
.print-sheet { max-width: 210mm; margin: 20px auto; background: #fff; padding: 14mm; box-shadow: var(--shadow-lg); }
@media print {
  @page { size: A4; margin: 12mm; }
  .print-sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .rp-table, .rp-sigs { page-break-inside: auto; } .rp-table tr, .rp-sig { page-break-inside: avoid; }
  .rp h3 { page-break-after: avoid; }
}
/* taslak düzenleyici */
.ed-sec { display: flex; flex-direction: column; gap: 10px; }
.ed-sec-head { display: flex; align-items: center; gap: 8px; }
.ed-title { font-weight: 700; font-size: 15px; flex: 1; }
.ed-items { display: flex; flex-direction: column; gap: 8px; }
.ed-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.ed-item-main { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto auto; gap: 8px; align-items: center; }
.ed-item-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-hint { flex: 1; min-width: 200px; font-size: 13px; }
.ed-measure { display: flex; gap: 6px; }
.ed-unit { width: 90px; } .ed-num { width: 100px; }
.ed-req { white-space: nowrap; font-size: 13px; }
.ed-tools { display: inline-flex; gap: 2px; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .ed-item-main { grid-template-columns: 1fr 1fr; } .row-item { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- teklifler */
.q-lines input { padding: 5px 7px; font-size: 13px; }
.q-lines input.right { text-align: right; }
.q-lines input.missing { border-color: var(--warn-line, #e9b44c); background: var(--warn-bg); }
.q-lines tfoot td { border-top: 1px solid var(--line); }
.q-add { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); }
.q-add-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.q-add-row > label:first-child { flex: 1; min-width: 220px; }
.q-revs, .q-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.q-revs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; }
.q-hist li { border-left: 2px solid var(--line-strong); padding-left: 10px; }
.q-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.q-steps li { position: relative; padding-top: 14px; border-top: 4px solid var(--line); color: var(--muted); font-size: 13px; display: flex; flex-direction: column; }
.q-steps li.done { border-top-color: var(--ok); color: var(--text); font-weight: 600; }
.q-3d { display: inline-grid; place-items: center; width: 30px; height: 22px; border-radius: 5px; font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--brand) 14%, var(--tint)); color: var(--link); text-decoration: none; }
.q-lines tr.link:hover .q-3d { background: var(--brand); color: #fff; }
.q-respond .q-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; margin: 4px 0 14px; }
.q-tabs button { border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; cursor: pointer; }
.q-tabs button + button { border-left: 1px solid var(--line); }
.q-tabs button.on { background: color-mix(in srgb, var(--brand) 14%, var(--tint)); color: var(--link); }
.new-quote { position: relative; }
.new-quote > summary { list-style: none; }
.new-quote > summary::-webkit-details-marker { display: none; }
.new-quote[open] > form { position: absolute; right: 0; top: calc(100% + 6px); width: min(420px, 90vw); z-index: 20; box-shadow: var(--shadow-lg); }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
@media (max-width: 720px) { .q-steps { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- açılır seçim ve takvim (ui.js) */
.pick { position: relative; display: flex; min-width: 0; }
label > .pick, .form-grid > .pick { width: 100%; }
.pick-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.pick-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: var(--h-control);
            padding: 0 10px 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
            color: var(--text); font: inherit; font-size: 14px; font-weight: 400; text-align: left; cursor: pointer; }
.pick-btn:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--text-3)); }
.pick-btn[aria-expanded="true"], .pick-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 22%, transparent); outline-offset: 0; border-color: var(--brand); }
.pick-btn .ico { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.pick-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.pick-btn:disabled { opacity: .55; cursor: not-allowed; }
.pick-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-val.placeholder { color: var(--muted); }
.pick.small .pick-btn, .btn.small + .pick .pick-btn { min-height: var(--h-control-sm); font-size: 13px; }
.pick.need .pick-btn, .pick.need .pick-text { border-color: var(--err); }
.pick-pop { position: fixed; z-index: 2000; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
            box-shadow: var(--shadow-lg); padding: 5px; display: flex; flex-direction: column; max-width: min(420px, calc(100vw - 8px));
            overflow: hidden; animation: pickIn .12s ease-out; }
@keyframes pickIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.pick-pop:focus { outline: none; }
.pick-search { margin: 2px 2px 6px; min-height: 34px; font-size: 13.5px; }
.pick-list { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.pick-group { font-size: 12px; color: var(--muted); padding: 8px 10px 4px; font-weight: 500; }
.pick-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px;
            cursor: pointer; font-size: 14px; color: var(--text); }
.pick-opt.muted { color: var(--muted); }
.pick-opt .ico { width: 16px; height: 16px; color: var(--link); visibility: hidden; flex: 0 0 auto; }
.pick-opt[aria-selected="true"] { font-weight: 500; }
.pick-opt[aria-selected="true"] .ico { visibility: visible; }
.pick-opt.act { background: var(--soft); }
.pick-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.pick-date .pick-text { width: 100%; padding-right: 38px; font-variant-numeric: tabular-nums; }
.pick-cal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center;
            border: 0; background: none; color: var(--muted); border-radius: 6px; cursor: pointer; padding: 0; }
.pick-cal:hover, .pick-date.open .pick-cal { color: var(--link); background: var(--soft); }
.pick-cal .ico { width: 17px; height: 17px; }
.cal-pop { width: 288px; padding: 10px; }
.cal-head { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.cal-head .icon-btn { width: 28px; height: 28px; font-size: 16px; }
.cal-title { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: 11.5px; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { height: 34px; border: 0; background: none; border-radius: 7px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.cal-day:hover { background: var(--soft); }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--link); font-weight: 600; }
.cal-day.sel { background: var(--brand); color: #fff; font-weight: 600; }
.cal-day:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.cal-day:disabled { opacity: .3; cursor: not-allowed; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- pano */
.todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.todo { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: end; padding: 14px 16px;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); position: relative; }
.todo:hover { text-decoration: none; border-color: var(--brand-line); }
.todo .t-label { font-weight: 500; font-size: 14px; align-self: start; }
.todo .t-n { grid-row: 1 / 3; grid-column: 2; font-size: 30px; font-weight: 600; line-height: 1; color: var(--text-3); letter-spacing: -.02em; }
.todo .t-sub { font-size: 12.5px; color: var(--muted); }
.todo.hot { border-color: var(--brand-line); box-shadow: inset 3px 0 0 var(--brand); }
.todo.hot .t-n { color: var(--link); }
@media (max-width: 1100px) { .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .todo-grid { gap: 8px; }
  .todo { grid-template-columns: 1fr; padding: 12px; }
  .todo .t-n { grid-row: auto; grid-column: 1; font-size: 24px; order: -1; }
  .todo .t-sub { display: none; }
}
.q-lines td { vertical-align: top; }
.q-lines.editing td { padding-top: 10px; padding-bottom: 10px; }
.q-item { min-width: 220px; }
.q-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.q-name input { font-weight: 500; }
.q-code { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.q-note { display: block; width: 100%; margin-top: 4px; min-height: 28px !important; padding: 3px 8px !important; font-size: 13px !important; border-color: transparent !important; background: transparent !important; margin-left: -8px; }
.q-note::placeholder { color: var(--link); opacity: .8; }
.q-note:hover { border-color: var(--line) !important; border-style: dashed !important; }
.q-note:focus, .q-note:not(:placeholder-shown) { border-color: var(--line-strong) !important; border-style: solid !important; background: var(--surface) !important; margin-left: 0; }
.q-lines input { padding: 5px 8px; font-size: 13.5px; min-height: 34px; }
.affix { position: relative; display: block; }
.affix input { padding-right: 30px; }
html[lang="en"] .affix input { padding-right: 42px; }
.affix span { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.q-total-cell { padding-top: 17px !important; font-weight: 500; }
.q-del { display: grid; place-items: center; width: 30px; height: 34px; cursor: pointer; margin: 0; }
.q-del input { position: absolute; opacity: 0; pointer-events: none; }
.q-del span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted); font-size: 18px; }
.q-del:hover span { background: var(--err-bg); color: var(--err); }
.q-del input:checked + span { background: var(--err); color: #fff; }
.q-del input:focus-visible + span { outline: 2px solid var(--brand); }
tr:has(.q-del input:checked) td { opacity: .5; text-decoration: line-through; }
.q-lines tfoot tr.grand td { font-weight: 600; font-size: 15px; border-top: 1px solid var(--line-strong); }

/* ---------------------------------------------------------------- makine belgeleri */
.ftype { display: inline-grid; place-items: center; min-width: 52px; height: 24px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600;
         background: var(--gray-bg); color: var(--gray); flex: 0 0 auto; letter-spacing: .02em; }
.ftype-pdf { background: var(--err-bg); color: var(--err); }
.ftype-img { background: var(--info-bg); color: var(--info); }
.ftype-zip, .ftype-sw { background: var(--indigo-bg); color: var(--indigo); }
.ftype-cad { background: var(--warn-bg); color: var(--warn); }
.ftype-xls { background: var(--ok-bg); color: var(--ok); }
.ftype-vid { background: var(--warn-bg); color: var(--text); }
.ftype-doc { background: var(--blue-bg); color: var(--blue); }
.doc-group + .doc-group { border-top: 1px solid var(--line); }
.doc-group-head { padding: 12px 20px 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.doc-group-head .muted { font-weight: 400; margin-left: 4px; }
.doc-table td { padding-top: 10px; padding-bottom: 10px; }
.doc-main { display: flex; gap: 12px; align-items: flex-start; }
.doc-main .ftype { margin-top: 1px; }
.doc-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-text > a, .doc-title { font-weight: 500; }
.doc-older { font-size: 13px; margin-top: 4px; }
.doc-older summary { cursor: pointer; color: var(--link); width: fit-content; }
.doc-older ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; letter-spacing: .08em; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); min-width: 200px; background: var(--surface); border: 1px solid var(--line);
            border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 25; display: flex; flex-direction: column; text-align: left; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; border: 0; background: none;
            font: inherit; font-size: 14px; color: var(--text-2); cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--soft); text-decoration: none; }
.menu-pop button.danger { color: var(--err); }
.menu-pop form { margin: 0; }
.doc-upload-v2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; padding: 18px 20px; border-top: 1px solid var(--line);
                 background: var(--surface-2); }
.doc-upload-v2 .full { grid-column: 1 / -1; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
            border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 22px 16px; background: var(--surface); cursor: pointer;
            transition: border-color .12s, background-color .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.dz-text { display: flex; flex-direction: column; gap: 3px; color: var(--text); font-weight: 400; pointer-events: none; }
.dz-text strong { font-weight: 600; }
.dz-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; pointer-events: none; }
.dz-files span { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; }
.doc-section { margin-bottom: 16px; }
.doc-rows { list-style: none; margin: 0; padding: 0; }
.doc-rows li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px; border-top: 1px solid var(--line); }
.doc-rows li:first-child { border-top: 0; }
.doc-rows .doc-text { flex: 1; }
.doc-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.doc-search { width: min(320px, 100%); }
.sha code { font-size: 12px; }
@media (max-width: 960px) {
  .doc-upload-v2 { grid-template-columns: 1fr 1fr; }
  .doc-rows li { flex-wrap: wrap; } .doc-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 640px) {
  .card.flush { overflow-x: auto; }
  table.table { min-width: 540px; }
  .table td, .table th { padding-left: 12px; padding-right: 12px; }
  .card-head { padding: 12px 14px; }
  .card { padding: 16px; }
  .card.flush { padding: 0; }
  .page-head { margin-bottom: 16px; }
  .page-head > .row { width: 100%; }
}
@media (max-width: 640px) {
  .topbar .brand > span:last-child { display: none; }
  .topbar { gap: 6px; }
  .topbar .nav a { padding: 7px 8px; font-size: 13.5px; white-space: nowrap; }
  .topbar .nav { min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  .topbar .nav:has(> a:nth-child(3)) a > svg { display: none; }
  .topbar .nav:has(> a:nth-child(3)) a { padding: 7px 6px; }
  .topbar .spacer { display: none; }
  .userbox .who { display: none; }
}
.q-mobile { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 640px) {
  .q-mobile { display: block; }
  .q-mobile ~ .table-wrap, .q-mobile ~ table.q-lines { display: none; }
  .q-mobile li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .q-mobile li:first-child { border-top: 0; }
  .q-mobile .q-m-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .q-mobile .q-m-total { background: var(--surface-2); padding-top: 9px; padding-bottom: 9px; }
  .q-mobile .q-m-total.grand { font-size: 15px; }
}

/* ---------------------------------------------------------------- giriş: iki bölmeli */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); }
.auth-split > .auth-wrap { min-height: 100vh; }
.auth-split > .auth-wrap:only-child { grid-column: 1 / -1; }
.auth-side { background: color-mix(in srgb, var(--brand) 88%, #0b1220); color: #fff; display: flex; align-items: center; padding: 56px;
             position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(120deg, transparent 20%, #000 90%); }
.auth-side-in { position: relative; z-index: 1; max-width: 520px; }
.auth-side-brand { font-weight: 600; font-size: 18px; margin-bottom: 40px; opacity: .95; }
.auth-side-brand img { height: 40px; filter: brightness(0) invert(1); }
.auth-side h2 { font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; margin: 0 0 32px; }
.auth-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.auth-side li { display: flex; gap: 14px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: rgba(255,255,255,.82); }
.auth-side li strong { display: block; color: #fff; font-weight: 600; font-size: 15px; }
.auth-side .ico { width: 22px; height: 22px; margin-top: 2px; color: #fff; opacity: .9; }
.auth-split .auth-card { box-shadow: none; border: 0; background: transparent; }
.auth-split .auth-card h1 { text-align: left !important; }
.auth-split .auth-card > p.muted { text-align: left !important; }
.auth-split .auth-card .brand { justify-content: flex-start; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-split .auth-card .brand { justify-content: center; } }
.filepick { position: relative; display: flex; align-items: center; gap: 10px; min-height: var(--h-control); padding: 4px 10px 4px 4px;
            border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.filepick:hover { border-color: var(--brand); }
.filepick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; }
.filepick .btn { pointer-events: none; }
.filepick .fp-name { color: var(--muted); font-size: 13.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filepick .fp-name.has { color: var(--text); }
.filepick:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 22%, transparent); border-color: var(--brand); }

/* model sayfası: bilgiler, silme */
details.model-info > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
details.model-info > summary::-webkit-details-marker { display: none; }
details.model-info[open] > summary .btn { display: none; }
.danger-zone { border-color: var(--err-line); }
.btn.danger-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger-solid:hover { background: color-mix(in srgb, var(--err) 88%, #000); }
.menu-pop a.danger-link { color: var(--err); }
dialog.confirm-dlg { border: 0; border-radius: 14px; padding: 22px; width: min(460px, 94vw); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.confirm-dlg::backdrop { background: rgba(15,23,42,.45); }

/* ---------------------------------------------------------------- panel: makine sayfası */
.m-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--radius); margin-bottom: 18px; }
.ms-cell { padding: 14px 18px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ms-cell + .ms-cell { border-left: 1px solid var(--line); }
.ms-label { font-size: 12.5px; color: var(--muted); }
.ms-val { font-size: 17px; font-weight: 600; line-height: 1.3; }
.ms-val .badge { font-size: 12.5px; }
.ms-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.m-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.m-tabs button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); padding: 10px 14px 11px;
                 border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.m-tabs button:hover { color: var(--text); }
.m-tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.m-tabs .n { font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li + li { border-top: 1px solid var(--line); }
.todo-list a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: var(--text); }
.todo-list a:hover { background: var(--surface-2); text-decoration: none; }
.tl-kind { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 2px 7px; flex: 0 0 74px; text-align: center; }
.tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.v-timeline { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.v-timeline li { display: flex; justify-content: space-between; gap: 10px; padding: 0 0 12px 22px; position: relative; font-size: 14px; }
.v-timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.v-timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.v-timeline li:last-child::after { display: none; }
.v-timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.v-timeline li.future::before { border-color: var(--blue); }
.v-timeline li.wait { color: var(--text-3); }
.v-timeline li .small { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .m-summary { grid-template-columns: 1fr 1fr; } .ms-cell:nth-child(3) { border-left: 0; } .ms-cell:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------------------------------------------------------------- değişiklik geçmişi */
.hist-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 12px; margin-bottom: 16px; padding: 14px 16px; }
@media (max-width: 1100px) { .hist-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hist-filters { grid-template-columns: minmax(0, 1fr); } }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-item { padding: 14px 20px; border-top: 1px solid var(--line); }
.hist-item:first-child { border-top: 0; }
.hist-item.reverted { opacity: .62; }
.hist-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hist-who { flex: 1; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.avatar.small-av { width: 26px; height: 26px; font-size: 11.5px; }
.hist-changes { list-style: none; margin: 0 0 0 36px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hc-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.hc-diffs { border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.hc-diffs th { text-align: left; font-weight: 500; color: var(--muted); padding: 2px 14px 2px 0; vertical-align: top; white-space: nowrap; }
.hc-diffs td { padding: 2px 0; word-break: break-word; }
.hc-diffs del { color: var(--err); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--err) 50%, transparent); }
.hc-diffs ins { color: var(--ok); text-decoration: none; font-weight: 500; }

/* ---------------------------------------------------------------- ekip ve yetkiler */
.m-tabs a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 10px 14px 11px; border-bottom: 2px solid transparent; margin-bottom: -1px;
            display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.m-tabs a:hover { color: var(--text); text-decoration: none; }
.m-tabs a.on { color: var(--text); border-bottom-color: var(--brand); }
.m-tabs a .n:empty { display: none; }
.team-tools { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.team-search input { width: 260px; height: 32px; }
.person { display: flex; gap: 10px; align-items: center; min-width: 0; }
.person strong { font-weight: 600; color: var(--text); }
.avatar.ghost { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--muted); }
.avatar.xl { width: 52px; height: 52px; font-size: 18px; }
.person.big { gap: 14px; }
.person.big h1 { margin: 0; }
.team-table tr.off td { color: var(--muted); }
.team-table tr.off .avatar { opacity: .5; }
.lvl-tag.owner { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
                 background: var(--text); color: var(--surface); }

/* yetki düzeyi rozetleri: renk düzeyle koyulaşır */
.lvl { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; height: 26px; padding: 0 10px; border-radius: 6px;
       font-size: 12.5px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.lvl.lv0 { color: var(--text-3); background: transparent; border-color: var(--line); border-style: dashed; }
.lvl.lv1 { color: var(--blue); background: var(--blue-bg); }
.lvl.lv2 { color: var(--ok); background: var(--ok-bg); }
.lvl.lv3 { color: #fff; background: var(--brand); }
:root[data-theme="dark"] .lvl.lv3 { color: #fff; }
.lvl-legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lvl-legend .lvl { min-width: 0; }
.lvl-legend .small { margin-left: 6px; }

.perm-wrap { overflow-x: auto; }
.perm-matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1040px; }
.perm-matrix th, .perm-matrix td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.perm-matrix tbody tr:last-child > * { border-bottom: 0; }
.perm-matrix thead th { background: var(--surface-2); font-weight: 500; vertical-align: bottom; position: sticky; top: 0; z-index: 2; }
.perm-matrix .area-col { text-align: left; width: 280px; min-width: 240px; position: sticky; left: 0; background: var(--surface); z-index: 1;
                         box-shadow: inset -1px 0 0 var(--line); }
.perm-matrix thead .area-col { background: var(--surface-2); z-index: 3; font-size: 12.5px; color: var(--muted); }
.perm-matrix tbody .area-col strong { display: block; font-weight: 600; font-size: 13.5px; }
.perm-matrix tbody .area-col .small { display: block; font-weight: 400; line-height: 1.35; margin-top: 1px; }
.perm-matrix .owner-col { background: color-mix(in srgb, var(--soft) 60%, var(--surface)); }
.perm-matrix .dh { display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative; padding: 0 16px; }
.perm-matrix .dh strong { font-size: 13.5px; white-space: nowrap; }
.perm-matrix .dh-edit { position: absolute; right: -8px; top: -4px; width: 26px; height: 26px; opacity: .55; }
.perm-matrix th:hover .dh-edit, .perm-matrix .dh-edit:focus-visible { opacity: 1; }
.perm-matrix tbody tr:hover td, .perm-matrix tbody tr:hover .area-col { background: color-mix(in srgb, var(--brand) 3%, var(--surface)); }
.lvl-select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 12.5px; font-weight: 500; height: 28px; min-width: 92px;
              padding: 0 24px 0 10px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; text-align: center; text-align-last: center;
              background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
              background-repeat: no-repeat; background-position: right 8px center; }
.lvl-select.lv0 { color: var(--text-3); background-color: transparent; border: 1px dashed var(--line-strong); }
.lvl-select.lv1 { color: var(--blue); background-color: var(--blue-bg); }
.lvl-select.lv2 { color: var(--ok); background-color: var(--ok-bg); }
.lvl-select.lv3 { color: #fff; background-color: var(--brand);
                  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.lvl-select.changed { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.lvl-select option { color: var(--text); background: var(--surface); }
.save-bar { position: sticky; bottom: 16px; margin: 14px auto 0; width: fit-content; display: flex; align-items: center; gap: 12px; z-index: 20;
            background: var(--text); color: var(--surface); padding: 8px 8px 8px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); }
.save-bar[hidden] { display: none; }
.save-bar .btn.ghost { color: var(--surface); }
.save-bar .btn.ghost:hover { background: color-mix(in srgb, var(--surface) 14%, transparent); }
.perm-note { margin: 12px 2px 20px; max-width: 760px; }
.dept-new-form { display: grid; grid-template-columns: 220px 240px 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 1000px) { .dept-new-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dept-new-form { grid-template-columns: minmax(0, 1fr); } }
dialog.confirm-dlg.wide { width: min(620px, 94vw); }

/* kişi sayfası */
.member-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .member-grid { grid-template-columns: minmax(0, 1fr); } }
.access-top { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.access-top .dept-field { min-width: min(260px, 100%); }
.seg-field { border: 0; padding: 0; margin: 0; }
.seg-field legend { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.seg { position: relative; display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.seg span { white-space: nowrap; }
.seg label:hover span { color: var(--text); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.seg input:disabled + span { cursor: default; }
.seg.small span { height: 26px; padding: 0 9px; font-size: 12.5px; }
.owner-note { padding: 18px 20px; background: var(--surface-2); }
.owner-note[hidden], [data-staff-only][hidden] { display: none; }
.perm-person th, .perm-person td { vertical-align: middle; }
.perm-person tbody th { font-weight: 400; text-align: left; }
.perm-person tbody th strong { font-weight: 600; font-size: 13.5px; }
.perm-person .result { min-width: 200px; }
.perm-person .result .small { margin-top: 3px; line-height: 1.35; }
.perm-person tr.custom { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
#access-form .card-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.member-stats .n { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; }
.member-stats .small { display: block; line-height: 1.3; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; display: contents; }
fieldset.plain[disabled] .btn.primary, fieldset.plain[disabled] .danger-zone { display: none; }
.page-head > .person.big { flex-direction: row; align-items: center; gap: 14px; }
.page-head > .person.big > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.perm-person .seg { flex-wrap: nowrap; }
.perm-person .seg.small span { padding: 0 8px; }
.perm-person tbody th { min-width: 150px; }
.perm-person .result { min-width: 170px; max-width: 240px; }
.perm-person .result .small { display: none; }
.perm-person .result { min-width: 110px; }
.perm-person-wrap { overflow-x: auto; }

/* 5'ten fazla seçenekli seçim kutuları: ortada açılan pencere (ui.js) */
.pick-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 1999; animation: pm-fade .12s ease-out; }
.pick-pop.pick-modal { left: 50% !important; top: 12vh !important; transform: translateX(-50%); width: min(560px, 94vw); min-width: 0 !important;
                       max-height: 76vh !important; padding: 0; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.pick-modal .pm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 18px; }
.pick-modal .pm-head strong { font-size: 16px; font-weight: 600; }
.pick-modal .pick-search { margin: 0 16px 10px; min-height: 40px; font-size: 14.5px; }
.pick-modal .pm-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 10px; border-bottom: 1px solid var(--line); }
.pick-modal .pick-list { padding: 8px; flex: 1; min-height: 120px; }
.pick-modal .pick-opt { padding: 10px 12px; font-size: 14.5px; }
@keyframes pm-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pick-scrim { animation: none; } }
@media (max-width: 600px) { .pick-pop.pick-modal { top: auto !important; bottom: 0 !important; width: 100vw; max-height: 85vh !important; border-radius: 16px 16px 0 0; } }

/* teklif: parça ekleme penceresi */
.q-add-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
dialog.parts-dlg { border: 0; padding: 0; border-radius: 16px; width: min(920px, 96vw); height: min(780px, 90vh); background: var(--surface); color: var(--text);
                   box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; }
dialog.parts-dlg[open] { display: flex; }
dialog.parts-dlg::backdrop { background: rgba(15,23,42,.45); }
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 6px; }
.pd-head h2 { margin: 0; }
.pd-head p { margin: 2px 0 0; }
.pd-tools { display: flex; gap: 12px; align-items: flex-end; padding: 8px 20px 10px; }
.pd-search { flex: 1; min-height: 42px; font-size: 15px; }
.pd-sort { width: 230px; }
.pd-filters { display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.pd-filters .check { margin: 0; font-size: 13.5px; }
.pd-list { flex: 1; overflow-y: auto; padding: 6px 10px; }
.pd-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 110px 130px; gap: 12px; align-items: center; padding: 10px 10px; border-radius: 10px; cursor: pointer; }
.pd-row:hover { background: var(--soft); }
.pd-row.on { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.pd-check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; padding: 0; display: grid; place-items: center; }
.pd-row.on .pd-check { background: var(--brand); border-color: var(--brand); }
.pd-row.on .pd-check::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.pd-code { font-weight: 500; }
.pd-main .small { margin-top: 2px; }
.pd-price { text-align: right; font-weight: 500; white-space: nowrap; }
.pd-qty { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pd-qty input { width: 56px; height: 32px; text-align: center; padding: 0 4px; }
.pd-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 700px) {
  dialog.parts-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
  .pd-tools { flex-direction: column; align-items: stretch; } .pd-sort { width: auto; }
  .pd-row { grid-template-columns: 28px minmax(0, 1fr) auto; } .pd-price { grid-column: 2; text-align: left; } .pd-qty { grid-column: 3; grid-row: 1 / span 2; }
}
dialog.upload-dlg { width: min(940px, 96vw); max-height: 92vh; overflow-y: auto; }
dialog.upload-dlg .grid-2 .card { box-shadow: none; }
details.company-info > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
details.company-info > summary::-webkit-details-marker { display: none; }
details.company-info > summary > span:first-child { display: flex; flex-direction: column; gap: 2px; }
details.company-info[open] > summary .btn, details.company-info[open] .ci-sum { display: none; }
.kit-grid > .card.stack { position: sticky; top: 16px; }
.q-await { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px;
           background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); }
.q-await > div { display: flex; flex-direction: column; gap: 2px; }
.open-jobs { list-style: none; margin: 0; padding: 0; }
.open-jobs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.open-jobs li:first-child { border-top: 0; }
.open-jobs a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.open-jobs .mono { color: var(--muted); margin-right: 4px; }
dialog.p3d-dlg { border: 0; padding: 0; border-radius: 16px; width: min(1000px, 96vw); height: min(720px, 88vh); background: var(--surface); color: var(--text);
                 box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.p3d-dlg[open] { display: flex; flex-direction: column; }
dialog.p3d-dlg::backdrop { background: rgba(15,23,42,.5); }
.p3d-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.p3d-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3d-dlg iframe { flex: 1; width: 100%; border: 0; background: var(--surface-2); }
tr[data-part3d] { cursor: pointer; }
tr[data-part3d]:hover td { background: var(--soft); }
@media (max-width: 700px) { dialog.p3d-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; } }

/* teklif PDF önizleme penceresi */
dialog.pdf-dlg { border: 0; padding: 0; border-radius: 16px; width: min(980px, 96vw); height: 92vh; background: var(--surface); color: var(--text);
                 box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.pdf-dlg[open] { display: flex; flex-direction: column; }
dialog.pdf-dlg::backdrop { background: rgba(15,23,42,.55); }
.pdf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pdf-head .row { align-items: center; }
.pdf-tpl { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.pdf-tpl .pick, .pdf-tpl select { min-width: 220px; }
.pdf-body { position: relative; flex: 1; background: #525659; }
.pdf-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.pdf-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; background: #525659; }
.pdf-wait[hidden] { display: none; }

/* teklif şablonları listesi ve düzenleyici */
.qtpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.qtpl-card { padding: 0; overflow: hidden; color: var(--text); display: flex; flex-direction: column; }
.qtpl-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow); }
.qtpl-thumb { height: 128px; background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 16px 22px; display: flex; flex-direction: column; gap: 7px; }
.qtpl-thumb span { height: 4px; background: var(--acc); border-radius: 2px; width: 100%; margin-bottom: 4px; }
.qtpl-thumb i { height: 6px; background: var(--line-strong); border-radius: 3px; width: 70%; opacity: .7; }
.qtpl-thumb i:nth-of-type(2) { width: 90%; } .qtpl-thumb i:nth-of-type(3) { width: 55%; }
.qtpl-thumb b { margin-top: auto; height: 16px; width: 45%; align-self: flex-end; background: var(--acc); border-radius: 3px; }
.qtpl-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.qt-grid { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .qt-grid { grid-template-columns: 1fr; } }
.qt-form { display: flex; flex-direction: column; gap: 12px; }
.qt-form h3 { margin: 8px 0 0; }
.qt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-btn { font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
.qt-color input[type=color] { width: 44px; height: 34px; padding: 2px; border-radius: 8px; }
.qt-toggles { display: flex; flex-direction: column; gap: 8px; }
.qt-toggles .check { margin: 0; }
.qt-save { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
           margin: 4px -20px -20px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.qt-preview { position: sticky; top: 16px; overflow: hidden; }
.qt-pv-head { display: flex; gap: 12px; align-items: flex-end; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.qt-pv-head label { margin: 0; min-width: 260px; }
.qt-pv-head #pv-state { flex: 1; padding-bottom: 8px; }
.qt-preview iframe { width: 100%; height: calc(100vh - 170px); min-height: 520px; border: 0; display: block; background: #525659; }
dialog.ask-dlg { width: min(440px, 94vw); }
dialog.ask-dlg .ask-msg { margin: 0 0 18px; font-size: 15px; line-height: 1.5; white-space: pre-line; }

/* müşteri: makine kartı hızlı eylemler + makine seçme penceresi */
.machine-card { position: relative; }
.machine-card .mc-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.machine-card .mc-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.machine-card:hover { cursor: pointer; }
.machine-card .mc-foot { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; gap: 0; }
.machine-card .mc-act { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 6px; font-size: 13px; font-weight: 500;
                        color: var(--link); text-decoration: none; }
.machine-card .mc-act + .mc-act { border-left: 1px solid var(--line); }
.machine-card .mc-act:hover { background: var(--soft); text-decoration: none; }
.machine-card .mc-act .ico { width: 15px; height: 15px; }
.machine-card .mc-act:first-child { color: var(--text); }
.mp-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.mp-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.mp-item:hover { border-color: var(--brand); background: var(--soft); text-decoration: none; }
.mp-item img, .mp-item .mp-ph { width: 84px; height: 52px; object-fit: contain; background: var(--surface-2); border-radius: 6px; flex: 0 0 auto; }
.mp-item > span { display: flex; flex-direction: column; gap: 2px; }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .ticket-grid { grid-template-columns: 1fr; } }
.t-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.t-steps li { position: relative; padding: 0 0 14px 26px; font-size: 14px; color: var(--muted); }
.t-steps li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.t-steps li::after { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.t-steps li:last-child { padding-bottom: 0; } .t-steps li:last-child::after { display: none; }
.t-steps li.done { color: var(--text); } .t-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.t-steps li.done::after { background: var(--ok); }
.t-steps li.now { color: var(--text); font-weight: 600; } .t-steps li.now::before { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.q-lines tr.q-deleted td { opacity: .45; text-decoration: line-through; }
.q-req { font-size: 11.5px; color: var(--warn); white-space: nowrap; }

/* müşteri sayfası: özet, kişiler, adresler */
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cterms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cstats { margin-bottom: 18px; }
.cstats-head { margin-bottom: 10px; }
.cstats-head h2 { margin: 0; font-size: 15px; }
.cstats .stat .n { font-size: 22px; }
.cstats .stat .n .small { font-size: 13px; font-weight: 400; }
.cstats-more { margin-top: 12px; padding: 12px 18px; }
.cstats-more summary { cursor: pointer; }
.chip-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
a.chip-btn:hover { text-decoration: none; }
.text-warn { color: var(--warn); }
.pre { white-space: pre-line; }
.table.compact td { padding-top: 7px; padding-bottom: 7px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people .p-main { min-width: 0; }
.people .p-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.people .p-act { display: flex; gap: 4px; align-items: flex-start; flex-shrink: 0; }
.addr-list { display: flex; flex-direction: column; margin-top: 12px; }
.addr { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.addr > .btn, .addr > .row { grid-column: 2; justify-self: start; margin-left: -10px; }
.addr > .row { gap: 0 !important; flex-wrap: wrap !important; }
.addr:first-child { border-top: 0; padding-top: 0; }
.addr-k { color: var(--muted); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.addr-sub { font-size: 13px; font-weight: 600; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.addr-sub + .addr { border-top: 0; }
@media (max-width: 640px) { .addr { grid-template-columns: 1fr; gap: 4px; } .addr > .btn, .addr > .row { grid-column: 1; } }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.access-list, .ship-pick { display: flex; flex-direction: column; gap: 6px; }
.ship-pick { border: 0; padding: 0; margin: 0; }
.ship-pick legend { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; padding: 0; }
label.ship-opt { flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
label.ship-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
label.ship-opt input { margin-top: 3px; accent-color: var(--brand); }
label.ship-opt > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
label.ship-opt textarea { margin-top: 6px; }

/* makineler listesi */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filter-bar input[type=search] { flex: 1 1 240px; min-width: 180px; }
.filter-bar .fb-item { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; min-width: 170px; }
.filter-bar .fb-check { align-self: center; white-space: nowrap; }
.d-block { display: block; }
.m-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.m-thumb { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--soft); border: 1px solid var(--line); flex-shrink: 0; }
.m-ph { display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.mtable td { vertical-align: middle; }
.qtpl-h { font-size: 15px; margin: 18px 0 10px; }
/* sipariş belgeleri */
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.doc-list li:first-child { border-top: 0; padding-top: 0; }
.doc-list li.is-cancelled .doc-main { opacity: .55; }
.doc-list li.is-cancelled strong, .doc-list li.is-cancelled .mono { text-decoration: line-through; }
.doc-main { min-width: 0; }
.doc-main .linklike { text-align: left; }
.doc-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.text-err { color: var(--err); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* satış sayfası */
.follow { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.follow li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.follow li:first-child { border-top: 0; }
.follow li > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow li > a .mono { color: var(--muted); margin-right: 4px; }
.follow li > .small { grid-column: 1; }
.follow-why { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--gray-bg); color: var(--gray); text-align: right; max-width: 220px; }
.follow-why.p0, .follow-why.p1 { background: var(--err-bg); color: var(--err); }
.follow-why.p2, .follow-why.p3 { background: var(--warn-bg); color: var(--warn); }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 180px; margin-top: 14px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-col { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar-col span { width: 42%; max-width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; }
.b-sent { background: color-mix(in srgb, var(--brand) 35%, var(--surface)); }
.b-won { background: var(--brand); }
.bar-l { font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.lg-sent { background: color-mix(in srgb, var(--brand) 35%, var(--surface)); }
.lg-won { background: var(--brand); }
.card-head .seg { margin-left: auto; }

/* dar ekran düzeltmeleri (taşma taraması) */
@media (max-width: 640px) {
  .rp-head { flex-wrap: wrap; }
  .rp-no { text-align: left; align-items: flex-start; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .row.between { flex-wrap: wrap; }
  .people li { flex-wrap: wrap; }
  .thread .msg { max-width: 100%; }
  .msg .body { overflow-wrap: anywhere; }
  .page-head { flex-wrap: wrap; }
  .page-head > .row { flex-wrap: wrap; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar .fb-item { min-width: 0; flex: 1 1 140px; }
  .follow-why { max-width: 140px; }
  .bars { gap: 3px; }
  .perm-person-wrap, .perm-wrap { overflow-x: auto; }
}
.perm-person-wrap { overflow-x: auto; }
.thread, .msg { min-width: 0; }
.msg .body { overflow-wrap: anywhere; }

/* Sıralanabilir tablo başlıkları */
.table th .th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; border-radius: 4px; }
.table th .th-sort:hover { color: var(--text); }
.table th .th-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.table th .th-sort::after { content: "↕"; font-size: 11px; opacity: .35; }
.table th[aria-sort="ascending"] .th-sort, .table th[aria-sort="descending"] .th-sort { color: var(--text); font-weight: 600; }
.table th[aria-sort="ascending"] .th-sort::after { content: "▲"; opacity: .8; font-size: 9px; }
.table th[aria-sort="descending"] .th-sort::after { content: "▼"; opacity: .8; font-size: 9px; }
.table th.right .th-sort { flex-direction: row; }

/* Teklif aşaması: sıradaki iş bandı ve listedeki aşama hücresi */
.next-step { --t: var(--brand); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 16px;
             border: 1px solid color-mix(in srgb, var(--t) 35%, var(--line)); border-radius: var(--radius);
             background: color-mix(in srgb, var(--t) 7%, var(--surface)); }
.next-step .ns-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
                     background: color-mix(in srgb, var(--t) 16%, var(--surface)); color: var(--t); }
.next-step .ns-ico .ico { width: 20px; height: 20px; }
.next-step .ns-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 240px; }
.next-step .ns-l { font-size: 12.5px; color: var(--t); font-weight: 600; }
.next-step strong { font-size: 16px; font-weight: 600; line-height: 1.35; }
.next-step.stage-red { --t: var(--err); } .next-step.stage-amber { --t: var(--warn); }
.next-step.stage-green { --t: var(--ok); } .next-step.stage-gray { --t: var(--gray); }
.qtable .q-stage { min-width: 200px; }
.qtable .q-stage .small { margin-top: 3px; line-height: 1.3; }
:target { scroll-margin-top: 80px; }
.q-kpis { margin-bottom: 16px; }
.q-kpis a.stat:hover { border-color: var(--brand); }
.q-kpis .stat.hot .n { color: var(--warn); }
.q-kpis .kpi-amt { font-size: 20px; }

/* Siparişin adımları */
.osteps { list-style: none; margin: 0 0 16px; padding: 14px 16px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
         background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.osteps .step { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 0 4px; }
.osteps .step::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--line); }
.osteps .step:first-child::before { display: none; }
.osteps .step.s-done::before, .osteps .step.s-current::before { background: var(--ok); }
.osteps .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600;
              border: 2px solid var(--line); color: var(--muted); background: var(--surface); position: relative; z-index: 1; }
.osteps .s-done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.osteps .s-current .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.osteps .s-label { font-size: 13px; font-weight: 500; line-height: 1.25; }
.osteps .s-todo .s-label { color: var(--muted); }
.osteps .s-at { font-size: 12px; color: var(--muted); min-height: 1em; }
.osteps .s-current .s-at { color: var(--brand); }
@media (max-width: 640px) {
  .osteps { grid-auto-flow: row; gap: 10px; }
  .osteps .step { grid-template-columns: 28px 1fr auto; justify-items: start; text-align: left; align-items: center; gap: 10px; }
  .osteps .step::before { top: -10px; bottom: auto; left: 13px; right: auto; width: 2px; height: 10px; }
}

/* Özet kartları (kpi makrosu): simge kutusu + değer + alt çizgi rengiyle durum */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { --t: var(--blue); --tb: var(--blue-bg); display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; color: inherit;
       background: var(--surface); border: 1px solid var(--line); border-bottom: 3px solid color-mix(in srgb, var(--t) 55%, var(--line));
       border-radius: var(--radius); min-width: 0; transition: border-color .15s, transform .15s; }
a.kpi:hover { text-decoration: none; border-color: color-mix(in srgb, var(--t) 60%, var(--line)); border-bottom-color: var(--t); }
.kpi .kpi-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--tb); color: var(--t); }
.kpi .kpi-ico .ico { width: 18px; height: 18px; }
.kpi .kpi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .kpi-l { font-size: 13px; color: var(--muted); }
.kpi .kpi-v { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .kpi-v.amt { font-size: 18px; }
.kpi .kpi-s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.kpi.hot .kpi-v { color: var(--t); }
.kpi.tone-amber { --t: var(--warn); --tb: var(--warn-bg); } .kpi.tone-green { --t: var(--ok); --tb: var(--ok-bg); }
.kpi.tone-red { --t: var(--err); --tb: var(--err-bg); } .kpi.tone-violet { --t: var(--indigo); --tb: var(--indigo-bg); }
.kpi.tone-teal { --t: #0e7490; --tb: #e0f4f8; }
[data-theme="dark"] .kpi.tone-teal { --t: #5fc8dc; --tb: #10262c; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.qtable td { vertical-align: top; }
.qtable td .btn { white-space: nowrap; }
.qtable td:first-child { min-width: 150px; }
.qtable .q-act { margin-top: 8px; }
@media (min-width: 1200px) { .kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Yeni teklif penceresi: önceki siparişlerden seçim */
.link-btn { all: unset; cursor: pointer; color: var(--brand); font-size: 13px; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.nq-dlg { width: min(720px, calc(100vw - 24px)); }
.nq-hist { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); }
.nq-hist-list { display: flex; flex-direction: column; max-height: 300px; overflow: auto; margin: 0 -4px; }
.nq-row { display: grid; grid-template-columns: 20px 1fr auto 76px; gap: 10px; align-items: center; padding: 7px 4px; border-radius: 6px; cursor: pointer; font-weight: 400; }
.nq-row + .nq-row { border-top: 1px solid var(--line); }
.nq-row:hover { background: var(--soft); }
.nq-row .nq-main { display: flex; flex-direction: column; min-width: 0; }
.nq-row .nq-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nq-row .nq-price { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.nq-row .nq-qty { width: 76px; padding: 5px 8px; text-align: right; }
.nq-row:has(input:checked) { background: color-mix(in srgb, var(--brand) 8%, transparent); }
@media (max-width: 560px) { .nq-row { grid-template-columns: 20px 1fr 64px; } .nq-row .nq-price { grid-column: 2; } .nq-row .nq-qty { grid-row: 1; grid-column: 3; width: 64px; } }

/* Sipariş: tedarik tablosu, hazırlık göstergesi, ödemeler */
.supply-card { margin-bottom: 16px; }
.supply-card .card-head { gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ready-meter { display: flex; align-items: center; gap: 8px; }
.ready-meter .rm-bar, .rm-bar { display: inline-block; width: 90px; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; vertical-align: middle; }
.rm-bar > span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.supply-table td { vertical-align: top; }
.ship-list h3 { margin: 0 0 8px; font-size: 14px; }
.ship-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pay-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.seg-field { border: 0; padding: 0; margin: 0; }
.seg-field legend { margin-bottom: 6px; }
.seg-field .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-field .seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; font-size: 13.5px; }
.seg-field .seg label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.ready-list { list-style: none; margin: 0; padding: 0; }
.ready-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.c-ships, .c-pay { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.c-ships ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.c-pay > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.o-ready { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.otable td:first-child { min-width: 140px; }
.otable td { vertical-align: top; }
.kv .link-btn { margin-left: 6px; }

/* E-postalar */
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list > li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mail-list .ml-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mail-list .ml-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-list .ml-actions { gap: 6px; flex-wrap: wrap; }
.mail-list .ml-actions form { display: inline; }
.ml-body pre, .ml-pre { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0 0; }
.tpl-card code { font-size: 12px; background: var(--soft); padding: 1px 4px; border-radius: 4px; }

/* Ekip notları */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list > li { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.note-list > li:first-child { border-top: 0; }
.note-list > li.is-pinned { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.note-list > li.is-resolved .note-body { color: var(--muted); }
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; padding-left: 32px; }
.note-reply { margin-left: 32px; padding: 8px 0 0 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.note-reply .note-body { padding-left: 32px; }
.note-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-left: 32px; }
.note-actions details[open] { flex-basis: 100%; }
.note-actions details form { margin-top: 6px; gap: 6px; flex-wrap: nowrap; }
.note-actions details input { flex: 1; }
.link-btn.small { font-size: 12.5px; }
.link-btn.danger-link { color: var(--err); }
.note-form textarea { resize: vertical; }

/* Müşteri aktivitesi */
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 44px minmax(120px, 200px) 1fr 52px; gap: 12px; align-items: center; }
.funnel .f-n { font-size: 20px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.funnel .f-bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.funnel .f-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.rank { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rank li span:first-child { margin-right: 8px; }
.visit-trail { max-width: 460px; line-height: 1.45; }
@media (max-width: 560px) { .funnel li { grid-template-columns: 36px 1fr 44px; } .funnel .f-bar { grid-column: 2; grid-row: 2; } }

/* Pano: yapılacaklar, kısa sayaçlar, eksik bilgiler */
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; color: var(--text-2); background: var(--surface); }
.dchip .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--soft); font-weight: 600; font-size: 12px; }
.dchip.hot .n { background: var(--warn-bg); color: var(--warn); }
.dchip:hover { text-decoration: none; border-color: var(--brand); }
.today .card-head { align-items: flex-start; }
.today-grp { padding: 10px 16px 4px; border-top: 1px solid var(--line); }
.today-grp .tg-l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.today-grp .tg-l.acil { color: var(--err); }
.today-list { list-style: none; margin: 0; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.today-list li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px;
                 border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; background: var(--surface); }
.today-list li.lvl-acil { border-left-color: var(--err); }
.today-list li.lvl-hafta { border-left-color: var(--warn); }
.today-list .tl-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--text-2); }
.today-list .lvl-acil .tl-ico { background: var(--err-bg); color: var(--err); }
.today-list .tl-ico .ico { width: 18px; height: 18px; }
.today-list .tl-main { display: flex; flex-direction: column; min-width: 0; }
.today-list .tl-main strong { font-weight: 600; font-size: 14px; }
.today-list .tl-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .today-list li { grid-template-columns: 34px 1fr; } .today-list .tl-when { display: none; } .today-list .btn { grid-column: 2; justify-self: start; } }
.gap-list, .dash-notes { list-style: none; margin: 0; padding: 0; }
.gap-list li > a:not(.btn), .dash-notes li a { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); color: inherit; }
.gap-list li > a:not(.btn):hover, .dash-notes li a:hover { background: var(--soft); text-decoration: none; }
.gap-list .g-n { min-width: 34px; text-align: right; font-size: 18px; font-weight: 600; color: var(--warn); font-variant-numeric: tabular-nums; }
.dash-notes li a { flex-direction: column; align-items: flex-start; gap: 2px; }
.lead-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.gap-list li { display: flex; align-items: center; border-top: 1px solid var(--line); }
.gap-list li > a:not(.btn) { border-top: 0; }
.gap-list li > a:first-child { flex: 1; min-width: 0; }
.loss-bars { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.loss-bars li { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 70px; gap: 10px; align-items: center; font-size: 13.5px; }
.loss-bars .lb-bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.loss-bars .lb-bar > span { display: block; height: 100%; background: var(--err); border-radius: 99px; }

/* Deneme portalı şeridi ve demo süreci (platform yönetimi) */
.trial-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 14px; margin-bottom: 16px;
  border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: 10px; font-size: 14px; }
.trial-bar strong { font-weight: 600; }
.dfunnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; }
.dfunnel > div { padding: 12px 14px; border-top: 3px solid var(--line); }
.dfunnel > div:last-child { border-top-color: var(--brand); }
.dfunnel b { display: block; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dfunnel span { color: var(--muted); font-size: 13px; }
.stage { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); white-space: nowrap; }
.stage.s-yeni { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.stage.s-deneme, .stage.s-gorusme { background: var(--brand-soft); border-color: var(--brand-line); }
.stage.s-musteri { background: var(--ok-bg, #e7f6ec); border-color: transparent; color: var(--ok, #18794e); }
.stage.s-kaybedildi { color: var(--muted); }
.dtl { list-style: none; margin: 0; padding: 0; }
.dtl li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; }
.dtl li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface, #fff); border: 2px solid var(--line); }
.dtl li.k-durum::before { border-color: var(--brand); }
.dtl li.k-otomatik::before, .dtl li.k-eposta::before { border-color: var(--accent); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li::before { content: "○"; margin-right: 8px; color: var(--muted); }
.checks li.done::before { content: "●"; color: var(--brand); }
@media (max-width: 800px) { .dfunnel { grid-template-columns: repeat(2, 1fr); } }

/* Paket sayfası */
.plan-usage { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; margin-bottom: 18px; }
.plan-table th[scope=row] { min-width: 170px; }
.plan-table td, .plan-table thead th { min-width: 110px; }
@media (max-width: 640px) {
  .plan-usage { grid-template-columns: 1fr; gap: 10px; }
  .plan-table th[scope=row] { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 140px; max-width: 160px; white-space: normal; }
  .plan-table thead th:first-child { position: sticky; left: 0; background: var(--surface-2, var(--surface)); z-index: 1; }
}

/* Yönetim: üretici ayrıntısı */
.ad-head { align-items: flex-start; }
.page-head > div.ad-id { display: flex; flex-direction: row; gap: 14px; align-items: flex-start; min-width: 0; }
.ad-logo { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); flex: none; }
.ad-logo-ph { display: grid; place-items: center; font-size: 22px; font-weight: 600; color: var(--brand); background: var(--soft); }
.ad-alerts { margin-bottom: 16px; }
.ad-alerts ul { list-style: none; margin: 0; padding: 6px 0; }
.ad-alert { display: flex; gap: 10px; align-items: flex-start; padding: 8px 20px; font-size: 14px; }
.ad-alert .ico { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.ad-alert.ad-error .ico { color: var(--err); } .ad-alert.ad-warn .ico { color: var(--warn); } .ad-alert.ad-info .ico { color: var(--muted); }
.ad-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 8px 0 16px;
  padding: 6px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.ad-tabs::-webkit-scrollbar { display: none; }
.ad-tabs button { font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; padding: 8px 14px; border-radius: 8px; border: 0;
  background: none; color: var(--muted); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.ad-tabs button:hover { color: var(--text); background: var(--soft); }
.ad-tabs button.on { color: var(--text); background: var(--soft); box-shadow: inset 0 -2px 0 var(--brand); }
.ad-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ad-n { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.ad-panel { scroll-margin-top: 70px; }
.ad-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; margin-bottom: 12px; }
.ad-model { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.ad-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--soft); border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.ad-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ad-thumb-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); }
.ad-thumb-ph .ico { width: 34px; height: 34px; opacity: .6; }
.ad-thumb-badge { position: absolute; top: 10px; left: 10px; }
.ad-model-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.ad-model-body h3 { margin: 0; font-size: 16px; }
.ad-dl { margin: 6px 0 8px; display: grid; gap: 0; }
.ad-dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ad-dl > div:last-child { border-bottom: 0; }
.ad-dl dt { color: var(--muted); }
.ad-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.ad-err { border: 1px solid var(--err-line, var(--line)); background: var(--err-bg); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.ad-err summary { cursor: pointer; color: var(--err); font-weight: 500; }
.ad-err pre { white-space: pre-wrap; font-size: 12px; margin: 6px 0 0; max-height: 220px; overflow: auto; }
.ad-two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; margin: 14px 0; }
.ad-two .card h2 { margin-top: 0; }
.ad-wide { width: min(860px, 94vw); }
.ad-h3 { font-size: 14px; margin: 14px 0 6px; }
.ad-list { margin: 0; padding-left: 18px; font-size: 14px; }
.ad-list li { padding: 2px 0; }
.ad-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .ad-limits { grid-template-columns: 1fr; } .ad-id { flex-direction: row; } .ad-logo { width: 42px; height: 42px; } }
.ad-panel > p.small { margin-top: 10px; }
@media (max-width: 640px) {
  .ad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ad-kpis .kpi { flex-direction: column; gap: 6px; padding: 12px; }
  .ad-kpis .kpi .kpi-ico { width: 28px; height: 28px; }
  .ad-kpis .kpi-v { font-size: 19px; }
  .ad-panel .table td, .ad-panel .table th, .ad-wide .table td { white-space: nowrap; }
}

/* Yönetim üst menüsü: "Diğer" açılır menüsü */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; cursor: pointer; user-select: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.nav-more > summary:hover, .nav-more[open] > summary { background: var(--soft); color: var(--text); }
.nav-more > summary.active { color: var(--text); background: var(--soft); box-shadow: inset 0 -2px 0 var(--brand); }
.nav-more-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 200px; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15, 23, 42, .14); }
.nav-more-menu a { padding: 8px 10px; }
.nav .nav-m { display: none; }
@media (max-width: 640px) {
  .nav-more { display: none; }
  .nav .nav-m { display: inline-flex; }
  .site-link { padding: 5px 8px; font-size: 12.5px; }
}
.support-bar { background: var(--err-bg); border-color: var(--err-line, var(--line)); }
.support-bar strong { color: var(--err); }
.ann-bar { background: var(--blue-bg); }
.ann-bar.ann-warn { background: var(--warn-bg); }
.trial-bar form.inline { margin-left: auto; }

/* Yönetim: genel bakış */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.ov-grid .card h2 { margin-top: 0; }
.ov-todo { list-style: none; margin: 0; padding: 4px 0; }
.ov-todo li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 9px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ov-todo li:last-child { border-bottom: 0; }
.ov-todo .badge { flex: none; }
.ov-plans { display: grid; gap: 12px; }
.ov-plan .progress { margin-top: 6px; }
.seg a.seg-a { display: inline-block; padding: 5px 11px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.seg a.seg-a:hover { color: var(--text); }
.seg a.seg-a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12); }

/* Yönetim: üretici ayrıntısı — fatura, notlar, grafikler, hesap */
.ad-n-red { background: var(--err-bg); color: var(--err); border-color: transparent; }
.ad-health { margin-bottom: 16px; padding: 12px 18px; }
.ad-health summary { cursor: pointer; }
.ad-health-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 4px 24px; margin-top: 8px; }
.ad-health ul { margin: 0; padding-left: 18px; font-size: 14px; }
.ad-good li::marker { color: var(--ok); } .ad-bad li::marker { color: var(--err); }
.ad-form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.ad-charts-card { margin-bottom: 14px; }
.ad-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px 22px; margin-top: 12px; }
.ad-chart { margin: 0; }
.ad-chart figcaption { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ad-chart figcaption strong { color: var(--text); font-variant-numeric: tabular-nums; }
.ad-chart svg { width: 100%; height: auto; display: block; }
.ad-chart rect:hover { opacity: .75; }
.ad-chart-l { font-size: 9px; fill: var(--muted); }
.ad-notes { list-style: none; margin: 0; padding: 0; }
.ad-notes li { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ad-notes li:last-child { border-bottom: 0; }
.ad-notes li.done p { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.ad-notes p { margin: 6px 0 8px; white-space: pre-wrap; }
.ad-note-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.ad-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ad-steps > li h2 { margin-top: 0; }
.ad-samples { margin-bottom: 14px; }
.ad-steps > li.done h2::after { content: " ✓"; color: var(--ok); }
.ad-danger { border-color: var(--err-line, var(--line)); }
.ad-danger h2 { color: var(--err); }
.ad-pre { white-space: pre-wrap; font-size: 12px; background: var(--soft); border-radius: 8px; padding: 10px; max-height: 320px; overflow: auto; }
@media (max-width: 640px) { .ad-form2 { grid-template-columns: 1fr; } }
.site-short { display: none; }
@media (max-width: 640px) { .site-long { display: none; } .site-short { display: inline; } }

/* Servis işletmesi: iş emri takvimi, iş emri, servis formu, anket, bilgi bankası, performans */
.wo-cal { margin-bottom: 16px; }
.wo-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 880px; }
.wo-grid th, .wo-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; vertical-align: top; font-size: 13px; }
.wo-grid thead th { background: var(--surface-2); font-weight: 600; text-align: left; }
.wo-grid thead th span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.wo-grid tbody th { width: 140px; text-align: left; font-weight: 500; background: var(--surface-2); }
.wo-grid td { height: 64px; }
.wo-grid .weekend { background: var(--surface-2); }
.wo-grid th.today, .wo-grid td.today { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.wo-grid thead th.today { color: var(--link); box-shadow: inset 0 -2px 0 var(--brand); }
.wo-chip { display: block; border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; background: var(--blue-bg); color: var(--text); font-size: 12px; line-height: 1.3; text-decoration: none; border-left: 3px solid var(--blue); }
.wo-chip:hover { text-decoration: none; filter: brightness(.97); }
.wo-chip span { display: block; color: var(--muted); }
.wo-chip.st-sahada { background: var(--warn-bg); border-left-color: var(--warn); }
.wo-chip.st-tamamlandi { background: var(--ok-bg); border-left-color: var(--ok); }
.wo-top { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; margin-bottom: 14px; }
.wo-top .card h2, .card > h2:first-child { margin-top: 0; }
.wo-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.wo-add label { flex: 1; min-width: 140px; }
.wo-add-checks { display: flex; gap: 12px; padding-bottom: 8px; }
.wo-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.wo-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
#parcalar, #fotograflar, #tamamla { margin-bottom: 14px; }
.wo-sign { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; }
.wo-sign legend { font-size: 13px; font-weight: 500; padding: 0 4px; }
#sig-pad { width: 100%; max-width: 600px; aspect-ratio: 3 / 1; height: auto; background: #fff; border: 1px dashed var(--line-strong, var(--line)); border-radius: 8px; touch-action: none; cursor: crosshair; }
.wo-sig-img { max-width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.rp-h { font-size: 13px; margin: 14px 0 6px; text-transform: none; }
.sf-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sf-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.survey-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.survey { max-width: 520px; width: 100%; padding: 28px; }
.survey h1 { font-size: 24px; margin: 0 0 6px; }
.survey-scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.survey-scores .score { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.survey-scores .score b { font-size: 22px; }
.survey-scores .score span { font-size: 11.5px; color: var(--muted); text-align: center; }
.survey-scores .score:hover, .survey-scores .score.on { border-color: var(--brand); background: var(--blue-bg); }
.survey-scores .score:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.kb-card { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.kb-card:hover { text-decoration: none; border-color: var(--brand); }
.kb-article { max-width: 760px; }
.kb-article h1 { font-size: 24px; margin: 0 0 4px; }
.kb-article h2 { font-size: 15px; margin: 18px 0 6px; }
.kb-steps { padding-left: 22px; display: grid; gap: 8px; }
.kb-vote { max-width: 760px; margin-top: 14px; }
.pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pf-grid .pf-wide { grid-column: 1 / -1; }
.pf-bars { width: 100%; height: auto; margin-top: 10px; }
.pf-axis { stroke: var(--line); }
.pf-v { font-size: 11px; fill: var(--muted); text-anchor: middle; font-variant-numeric: tabular-nums; }
.pf-l { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.pf-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-rank li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; font-size: 14px; }
.pf-rank li i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, #0e7490 12%, transparent); border-radius: 6px; z-index: 0; }
.pf-rank li span, .pf-rank li strong { position: relative; z-index: 1; }
.pf-rank li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-survey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; }
.pf-dist { display: grid; gap: 6px; }
.pf-dist div { display: grid; grid-template-columns: 110px 1fr 30px; gap: 8px; align-items: center; font-size: 13px; }
.pf-dist i { height: 10px; border-radius: 99px; background: var(--ok); min-width: 2px; }
.pf-dist i.s3 { background: var(--warn); } .pf-dist i.s2, .pf-dist i.s1 { background: var(--err); }
.pf-dist i.zero { visibility: hidden; }
.pf-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 280px; overflow: auto; }
@media (max-width: 760px) { .pf-grid, .pf-survey { grid-template-columns: 1fr; } .survey-scores .score span { display: none; } }

/* dar ekranda tablo satırı kart olur: <table class="table cards-sm">, hücrede data-label */
@media (max-width: 640px) {
  .table.cards-sm thead { display: none; }
  .table.cards-sm, .table.cards-sm tbody { display: block; width: 100%; min-width: 0; }
  .table.cards-sm tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
  .table.cards-sm tbody tr:first-child { border-top: 0; }
  .table.cards-sm td { display: block; padding: 0; border: 0; min-width: 0; }
  .table.cards-sm td.c-main { grid-column: 1; }
  .table.cards-sm td.c-side { grid-column: 2; text-align: right; }
  .table.cards-sm td.c-full { grid-column: 1 / -1; font-size: 13px; color: var(--muted); text-align: left; white-space: normal; }
  .table.cards-sm td.c-hide { display: none; }
  .table.cards-sm td[data-label]:not(.c-main):not(.c-side)::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* müşteri: bakım ve servis geçmişi */
.mt-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.mt-list { list-style: none; margin: 0; padding: 0; }
.mt-list > li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: flex-start; }
.mt-list > li:first-child { border-top: 0; }
.mt-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mt-main details summary { cursor: pointer; color: var(--link); }
.mt-when { text-align: right; display: flex; flex-direction: column; gap: 2px; flex: none; }
.mt-when .row { justify-content: flex-end; }
.mt-big { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 760px) {
  .mt-grid { grid-template-columns: minmax(0, 1fr); }
  .mt-list > li { flex-direction: column; gap: 8px; }
  .mt-when { text-align: left; }
  .mt-when .row { justify-content: flex-start; }
}

/* müşteri: Hesabım */
.ac-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 860px) { .ac-grid { grid-template-columns: minmax(0, 1fr); } }
.ac-toggles { list-style: none; margin: 0; padding: 0; }
.ac-toggles li { border-top: 1px solid var(--line); }
.ac-toggles li:first-child { border-top: 0; }
label.switch-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; cursor: pointer; color: var(--text); font-weight: 400; }
label.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
input.switch { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-strong, #c8ced6);
  position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; padding: 0; border: 0; min-height: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
input.switch:checked { background: var(--brand); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }

/* müşteri: Siparişlerim */
.chip-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip-tabs a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--text-2, var(--text)); font-size: 13.5px; background: var(--surface); }
.chip-tabs a:hover { text-decoration: none; border-color: var(--brand); }
.chip-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-tabs .n { opacity: .75; margin-left: 2px; }
.or-list { display: flex; flex-direction: column; gap: 12px; }
.or-card { padding: 0; }
.or-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.or-no { font-weight: 600; color: var(--text); }
.or-total { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-size: 15px; }
.or-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 14px 20px; }
.or-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.or-bar { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.or-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.or-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px 14px; border-top: 1px solid var(--line); }
.or-foot .doc-chips { margin: 0; padding: 0; border: 0; }
.or-qty { width: 84px; text-align: right; padding: 5px 8px; min-height: 34px; }
.or-send { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .or-head { flex-direction: column; } .or-total { align-items: flex-start; text-align: left; }
  .or-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .or-send > * { width: 100%; } .or-send label { min-width: 0 !important; }
}

/* müşteri menüsü telefonda: ekranın altında sabit sekme çubuğu */
@media (max-width: 640px) {
  .topbar .nav.c-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around; gap: 0;
    background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); overflow: visible; margin: 0; }
  .topbar .nav.c-nav a { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 6px 2px !important; font-size: 11px; border-radius: 8px; min-width: 0; text-align: center; }
  .topbar .nav.c-nav a > svg { display: block !important; width: 22px; height: 22px; }
  .topbar .nav.c-nav a span { display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .topbar .nav.c-nav a.active { box-shadow: none; color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
  body:has(.c-nav) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body:has(.c-nav) .demo-bar, body:has(.c-nav) [class*="demo-chip"] { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  body:has(.c-nav) .topbar .spacer { display: block; flex: 1; }
}
.install-hint { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.install-hint[hidden] { display: none; }
.install-hint img { border-radius: 9px; display: block; }
.install-hint .ih-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.install-hint .ih-txt .small { color: var(--muted); }
.install-hint .ih-act { display: flex; gap: 6px; align-items: center; }
.or-reorder input.or-qty { width: 90px; display: inline-block; }
.or-reorder th:first-child, .or-reorder td:first-child { width: 44px; }
/* Ayarlar: müşterinin göreceği ilgili kişiler */
.contacts-form td { padding: 6px 6px 6px 0; vertical-align: middle; }
.contacts-form input, .contacts-form select { width: 100%; min-width: 120px; }

/* Model sayfası: veri eksikleri */
.gaps > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.gaps > summary::-webkit-details-marker { display: none; }
.gaps > summary h2 { margin: 0; }
.gaps-score { font-size: 13px; color: var(--muted); }
.gaps-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.gap { padding: 10px 0 10px 12px; border-top: 1px solid var(--line); border-left: 3px solid var(--warn, #c98a12); }
.gap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gap-sample { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.gap-sample .chip { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.gaps-ok { margin: -4px 0 14px; }

/* Müşteri makine kartı: durum satırı */
.machine-card .mc-status { margin: auto 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.machine-card .mcs { padding: 7px 9px; border-left: 1px solid var(--line); min-width: 0; }
.machine-card .mcs:first-child { border-left: 0; }
.machine-card .mcs dt { font-size: 11.5px; color: var(--muted); margin: 0 0 2px; }
.machine-card .mcs dd { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.machine-card .mcs-when { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.machine-card .mcs-green dd { color: var(--ok, #1f7a3d); }
.machine-card .mcs-amber { background: var(--warn-bg, #fff6e5); }
.machine-card .mcs-red { background: var(--danger-bg, #fdecec); }
.machine-card .mcs-red dd, .machine-card .mcs-red .mcs-when { color: var(--danger, #b42318); }
.machine-card .mcs-none dd { color: var(--text-2, inherit); }
.machine-card .mc-in { position: relative; z-index: 2; }
@media (max-width: 420px) { .machine-card .mcs { padding: 6px 7px; } .machine-card .mcs dd { font-size: 12.5px; } }

/* Müşteri ana sayfası: ilk giriş yönlendirmesi */
.first-run { border: 1px solid var(--brand-line, var(--line)); background: var(--brand-soft, var(--surface-2)); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }
.first-run ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: fr; }
.first-run li { counter-increment: fr; display: grid; grid-template-columns: 26px 1fr; column-gap: 9px; row-gap: 2px; }
.first-run li::before { content: counter(fr); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.first-run li span { font-size: 13px; color: var(--muted); }
.first-run .fr-act { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .first-run ol { grid-template-columns: 1fr; } }

/* Model sayfası: STEP dönüştürme ilerlemesi */
.conv-progress .cp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.conv-progress .cp-pct { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 18px; }
.conv-progress .cp-bar { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.conv-progress .cp-bar > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .6s ease; }
.conv-progress .cp-sub { margin-top: 8px; }
.conv-progress .cp-log { margin-top: 10px; }
.conv-progress .cp-log .log { margin-top: 8px; max-height: 260px; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .conv-progress .cp-bar > span { transition: none; } }

/* Genel arama */
.gsearch { position: relative; display: flex; align-items: center; min-width: 0; }
.gsearch > .ico { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.gsearch input { width: 280px; max-width: 100%; height: var(--h-control-sm, 34px); padding: 0 30px 0 32px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; }
.gsearch input:focus { background: var(--surface); border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft, rgba(0,0,0,.06)); }
.gsearch input::-webkit-search-cancel-button { display: none; }
.gs-key { position: absolute; right: 8px; font: 11px/1 var(--font-mono, monospace); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; pointer-events: none; }
.gsearch input:focus ~ .gs-key { display: none; }
.gs-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: min(440px, 92vw); max-height: min(70vh, 520px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); padding: 6px; }
.sidebar .gs-pop { position: fixed; left: 16px; right: auto; z-index: 80; }
.gs-h { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px 8px 4px; }
.gs-h em { font-style: normal; font-weight: 400; margin-left: 6px; }
.gs-row { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 1px; align-items: baseline; padding: 7px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.gs-row:hover, .gs-row.on { background: var(--brand-soft, var(--surface-2)); text-decoration: none; }
.gs-row b { font-family: var(--font-mono, monospace); font-size: 12.5px; font-weight: 600; }
.gs-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.gs-row small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-row .gs-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.gs-row:has(.gs-tag) { grid-template-columns: auto auto 1fr; }
.gs-all { display: block; text-align: center; padding: 8px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 13px; }
.gs-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }
.sidebar .gsearch { margin: 0 4px 12px; }
.sidebar .gsearch input { width: 100%; }
.topbar .gsearch { margin-right: 6px; }
@media (max-width: 900px) { .topbar .gsearch input { width: 170px; } .gs-key { display: none; } }
@media (max-width: 560px) { .topbar .gsearch { display: none; } }
.search-big { display: flex; gap: 8px; margin: 0 0 18px; max-width: 640px; }
.search-big input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--text); }
.search-group { margin-bottom: 16px; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-list li + li { border-top: 1px solid var(--line); }
.search-list a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 11px 16px; color: var(--text); text-decoration: none; }
.search-list a:hover { background: var(--surface-2); }
.search-list small { flex-basis: 100%; }
.search-list em { margin-left: auto; font-style: normal; color: var(--link); }
.gs-mobile { display: none; }
@media (max-width: 560px) { .gs-mobile { display: inline-flex; } }

/* Bildirim zili */
.bell { position: relative; }
.bell-btn, .bell-m { position: relative; }
.bell-n { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger, #d92d20);
  color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; }
.bell-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; width: min(380px, 92vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bell-list { max-height: min(60vh, 440px); overflow: auto; }
.bell-item { display: grid; gap: 1px; padding: 9px 12px 9px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative; }
.bell-item:hover { background: var(--surface-2); text-decoration: none; }
.bell-item.unread::before { content: ""; position: absolute; left: 6px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.bell-item b { font-size: 13.5px; font-weight: 600; }
.bell-item small, .bell-kind { font-size: 12px; color: var(--muted); }
.bell-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-empty { padding: 16px 12px; }
.bell-all { display: block; text-align: center; padding: 9px; }
.side-tools { display: flex; align-items: center; gap: 4px; margin: 0 4px 12px; }
.side-tools .gsearch { margin: 0; flex: 1; min-width: 0; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li + li { border-top: 1px solid var(--line); }
.notif-list a { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; color: var(--text); text-decoration: none; }
.notif-list a:hover { background: var(--surface-2); }
.notif-list .nl-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.notif-list li.unread strong::before { content: "● "; color: var(--brand); font-size: 10px; vertical-align: 2px; }
.notif-list .nl-at { white-space: nowrap; }
@media (max-width: 600px) { .notif-list a { flex-wrap: wrap; } .notif-list .nl-at { flex-basis: 100%; } }

/* Parçalarım */
.my-parts { margin-bottom: 16px; }
.my-parts .w-check { width: 36px; }
.my-parts .mp-qty { width: 76px; text-align: right; }
.my-parts .mp-star { color: #e0a100; }
.my-parts .card-foot { padding: 12px 16px; border-top: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }

/* Parçalar ve fiyatlar tablosu */
.parts-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 12px; }
.pt-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chip-btn span { color: var(--muted); margin-left: 3px; }
.chip-btn[aria-pressed="true"] { background: var(--brand-soft, var(--surface-2)); border-color: var(--brand); color: var(--link); }
#pt-search { min-width: 240px; flex: 0 1 320px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.bulk-bar { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 14px; margin-bottom: 12px;
  border-color: var(--brand); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); }
.bulk-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bulk-lbl { font-size: 12px; color: var(--muted); }
.bulk-bar select, .bulk-bar input { height: 32px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--surface); color: var(--text); }
.parts-wrap { max-height: calc(100vh - 260px); overflow: auto; }
.parts-table { font-size: 13px; }
.parts-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); white-space: nowrap; }
.parts-table .th-hint { font-weight: 400; color: var(--muted); font-size: 11px; }
.parts-table td { padding: 5px 6px; vertical-align: top; }
.parts-table input:not([type=checkbox]), .parts-table select { width: 100%; min-width: 0; height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.parts-table input:not([type=checkbox]):hover, .parts-table select:hover { border-color: var(--line); }
.parts-table input:not([type=checkbox]):focus, .parts-table select:focus { border-color: var(--brand); background: var(--surface); outline: none; }
.parts-table input:disabled, .parts-table select:disabled { color: var(--muted); }
.parts-table .in-code { min-width: 140px; }
.parts-table td:nth-child(3) input { min-width: 180px; }
.parts-table td:nth-child(4) input { min-width: 140px; }
.parts-table .num { text-align: right; min-width: 80px; }
.parts-table .num.short { min-width: 52px; }
.parts-table select { min-width: 62px; }
.parts-table select.mini { width: auto; min-width: 58px; margin-top: 2px; }
.parts-table .cad { padding: 1px 7px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; font-size: 11px; }
.parts-table .dirty { background: var(--warn-bg, #fff6e5) !important; border-color: var(--warn, #c98a12) !important; }
.parts-table input[type=checkbox].dirty { outline: 2px solid var(--warn, #c98a12); }
.parts-table tr.is-archived td { opacity: .55; }
.parts-table .margin.neg { color: var(--danger, #b42318); }
.save-bar { position: sticky; bottom: 10px; z-index: 7; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: flex-end; margin-top: 12px;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--warn, #c98a12); border-radius: 10px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.18)); }
.save-bar #save-n { font-weight: 600; margin-right: auto; }
/* yönetim üst menüsünde cevap bekleyen destek talebi sayısı */
.topbar .nav .n { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--danger, #c2410c); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 18px; text-align: center; }
/* dil düğmesi (giriş sayfası) ve kullanıcı menüsündeki dil satırı */
.lang-switch { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.lang-switch .link-btn { padding: 2px 8px; border-radius: 6px; color: var(--muted); }
.lang-switch .link-btn.on { color: var(--text); font-weight: 600; background: var(--soft); }
.umenu-pop .lang-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; font-size: 10px; font-weight: 700; border: 1.5px solid currentColor; border-radius: 4px; }
/* müşteri menüsü: İngilizce başlıklar ("My machines") iki satıra kırılmasın; dar masaüstünde arama kutusu küçülür */
.topbar .nav.c-nav a span { white-space: nowrap; }
.topbar .nav.c-nav { flex-shrink: 0; }
