:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --input-bg: #ffffff;
  --border: #e3e6ea;
  --border-strong: #cfd4da;
  --border-hover: #b9c0c8;
  --row-hover: #fafbfc;
  --hover-tint: rgba(0, 0, 0, .04);
  --count-bg: #e9ebee;
  --text: #1b1f24;
  --muted: #6b7280;
  --accent: #e8631c;
  --accent-hover: #cf5410;
  --accent-soft: #fdeee4;
  --focus-ring: rgba(232, 99, 28, .15);
  --topbar: #17191c;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --danger-border: #f5c2bc;
  --danger-text: #7f1d1d;
  --success: #1e8a4c;
  --success-soft: #e6f5ec;
  --success-border: #bfe3cd;
  --success-text: #14532d;
  --info-soft: #e8f0fe;
  --info-border: #c7d7fb;
  --info-text: #1e3a8a;
  --badge-yeni-bg: #e8f0fe;        --badge-yeni-fg: #1d4ed8;
  --badge-goruldu-bg: #eef0f3;     --badge-goruldu-fg: #475569;
  --badge-kesim-bg: #fef3c7;       --badge-kesim-fg: #92400e;
  --badge-boya-bg: #f3e8ff;        --badge-boya-fg: #7e22ce;
  --badge-boyadan-bg: #fce7f3;     --badge-boyadan-fg: #9d174d;
  --badge-paket-bg: #dff5f3;       --badge-paket-fg: #0f766e;
  --badge-muted-bg: #eef0f3;       --badge-muted-fg: #9ca3af;
  --file-ext-bg: #1d4ed8;
  --swatch-border: rgba(0, 0, 0, .15);
  --overlay: rgba(17, 20, 24, .5);
  --dialog-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}

/* Karanlık tema: kullanıcı seçtiyse data-theme="dark", seçmediyse cihaz ayarı */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #171a1f;
    --surface-2: #1d2127;
    --input-bg: #12151a;
    --border: #2a2f37;
    --border-strong: #3a414b;
    --border-hover: #4b535f;
    --row-hover: #1c2026;
    --hover-tint: rgba(255, 255, 255, .05);
    --count-bg: #2a2f37;
    --text: #e4e7eb;
    --muted: #98a1ac;
    --accent: #f0782f;
    --accent-hover: #f58c4b;
    --accent-soft: rgba(240, 120, 47, .14);
    --focus-ring: rgba(240, 120, 47, .25);
    --topbar: #0a0b0d;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .12);
    --danger-border: rgba(248, 113, 113, .35);
    --danger-text: #fca5a5;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, .1);
    --success-border: rgba(74, 222, 128, .3);
    --success-text: #86efac;
    --info-soft: rgba(96, 165, 250, .12);
    --info-border: rgba(96, 165, 250, .35);
    --info-text: #93c5fd;
    --badge-yeni-bg: rgba(96, 165, 250, .16);     --badge-yeni-fg: #93c5fd;
    --badge-goruldu-bg: rgba(148, 163, 184, .16); --badge-goruldu-fg: #cbd5e1;
    --badge-kesim-bg: rgba(251, 191, 36, .15);    --badge-kesim-fg: #fcd34d;
    --badge-boya-bg: rgba(192, 132, 252, .16);    --badge-boya-fg: #d8b4fe;
    --badge-boyadan-bg: rgba(244, 114, 182, .15); --badge-boyadan-fg: #f9a8d4;
    --badge-paket-bg: rgba(45, 212, 191, .14);    --badge-paket-fg: #5eead4;
    --badge-muted-bg: rgba(148, 163, 184, .12);   --badge-muted-fg: #7c8591;
    --file-ext-bg: #2563eb;
    --swatch-border: rgba(255, 255, 255, .25);
    --overlay: rgba(0, 0, 0, .65);
    --dialog-shadow: 0 20px 50px rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #171a1f;
    --surface-2: #1d2127;
    --input-bg: #12151a;
    --border: #2a2f37;
    --border-strong: #3a414b;
    --border-hover: #4b535f;
    --row-hover: #1c2026;
    --hover-tint: rgba(255, 255, 255, .05);
    --count-bg: #2a2f37;
    --text: #e4e7eb;
    --muted: #98a1ac;
    --accent: #f0782f;
    --accent-hover: #f58c4b;
    --accent-soft: rgba(240, 120, 47, .14);
    --focus-ring: rgba(240, 120, 47, .25);
    --topbar: #0a0b0d;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .12);
    --danger-border: rgba(248, 113, 113, .35);
    --danger-text: #fca5a5;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, .1);
    --success-border: rgba(74, 222, 128, .3);
    --success-text: #86efac;
    --info-soft: rgba(96, 165, 250, .12);
    --info-border: rgba(96, 165, 250, .35);
    --info-text: #93c5fd;
    --badge-yeni-bg: rgba(96, 165, 250, .16);     --badge-yeni-fg: #93c5fd;
    --badge-goruldu-bg: rgba(148, 163, 184, .16); --badge-goruldu-fg: #cbd5e1;
    --badge-kesim-bg: rgba(251, 191, 36, .15);    --badge-kesim-fg: #fcd34d;
    --badge-boya-bg: rgba(192, 132, 252, .16);    --badge-boya-fg: #d8b4fe;
    --badge-boyadan-bg: rgba(244, 114, 182, .15); --badge-boyadan-fg: #f9a8d4;
    --badge-paket-bg: rgba(45, 212, 191, .14);    --badge-paket-fg: #5eead4;
    --badge-muted-bg: rgba(148, 163, 184, .12);   --badge-muted-fg: #7c8591;
    --file-ext-bg: #2563eb;
    --swatch-border: rgba(255, 255, 255, .25);
    --overlay: rgba(0, 0, 0, .65);
    --dialog-shadow: 0 20px 50px rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Sabit metinlere tıklanınca yanıp sönen imleç görünmesin (tarayıcının "imleçle gezinme" modu dahil);
   imleç yalnızca yazılabilir alanlarda görünür. */
body { caret-color: transparent; }
input:not([readonly]), textarea:not([readonly]), [contenteditable="true"] { caret-color: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0 0 .9rem; }
h3 { font-size: .8rem; margin: 1.1rem 0 .4rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
h3:first-child { margin-top: 0; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1.mono { font-size: 1.4rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---- Üst çubuk ---- */
.topbar { background: var(--topbar); color: #e5e7eb; }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; min-height: 58px; flex-wrap: wrap;
}
.brand { color: #fff; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 5px;
  background: linear-gradient(135deg, var(--accent) 0 50%, #ffb07a 50% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: #b8bec7; padding: 8px 12px; border-radius: 6px; font-weight: 500; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav a.active { color: #fff; background: rgba(255, 255, 255, .1); }
.userbox { display: flex; align-items: center; gap: 12px; font-size: .88rem; }
.userbox form { margin: 0; }
.role-chip {
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 999px; background: rgba(232, 99, 28, .18); color: #ffb98f;
}
.role-chip.light { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.uname { color: #fff; }
.btn-link { background: none; border: 0; color: #b8bec7; cursor: pointer; font: inherit; padding: 0; }
.btn-link:hover { color: #fff; }
.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; background: transparent;
  color: #b8bec7; cursor: pointer; padding: 0;
}
.theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.guest .theme-toggle { margin-left: auto; }

/* ---- Yerleşim ---- */
.container { max-width: 1280px; width: 100%; margin: 0 auto; padding: 24px 20px 48px; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: 12px; }
.back-link { font-size: .85rem; display: inline-block; margin-bottom: 4px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 520px; margin: 40px auto; }
.card.empty { text-align: center; padding: 48px 20px; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.info-grid .card { margin-bottom: 0; }
.detail-layout > div > .info-grid { margin-bottom: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.card > .grid-2, .card > .grid-4 { margin-bottom: 14px; }
.card > :last-child { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }

/* ---- Form ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.grid-2 .field, .grid-4 .field, .stack .field { margin-bottom: 0; }
.field > span, .field > label { font-size: .85rem; font-weight: 600; }
.field small { color: var(--muted); font-size: .78rem; }
.opt { font-style: normal; font-weight: 400; color: var(--muted); font-size: .78rem; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--input-bg);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
input.readonly { background: var(--surface-2); color: var(--muted); }
.big-input { font-size: 1.15rem; padding: 12px; letter-spacing: .04em; }
.color-input { display: flex; gap: 8px; }
.color-input input[type=color] { width: 46px; padding: 3px; flex: none; height: 40px; cursor: pointer; }

.upload {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; cursor: pointer;
  background: var(--surface-2); transition: border-color .15s, background .15s; min-height: 110px;
}
.upload:hover, .upload:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.upload.has-file { border-style: solid; border-color: var(--success); background: var(--success-soft); }
.upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-title { font-weight: 600; }
.upload-hint { font-size: .82rem; color: var(--muted); word-break: break-all; }
.upload-thumb { max-height: 120px; max-width: 100%; object-fit: contain; border-radius: 6px; margin-top: 8px; align-self: flex-start; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }

.stepper { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.stepper li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.stepper li.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---- Düğmeler ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover-tint); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-copy { font: inherit; font-size: .75rem; margin-left: 6px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); cursor: pointer; color: var(--muted); }
.btn-copy:hover { color: var(--text); }
form.inline { display: inline; margin: 0; }

/* ---- Uyarılar ---- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.alert ul { margin: 6px 0; padding-left: 20px; }
.alert-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.alert-error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
.alert-info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }

/* ---- Tablolar ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; background: var(--surface-2);
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--row-hover); }
.table tr.is-new { box-shadow: inset 3px 0 0 var(--accent); }
.table.compact td { padding: 5px 8px; font-size: .82rem; }
.table.clickable tbody tr { cursor: pointer; }
.table td .btn + .btn { margin-left: 6px; }
.thumb-cell { width: 58px; padding-right: 0 !important; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; background: var(--surface-2); }
.addr { max-width: 260px; font-size: .85rem; white-space: pre-line; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a {
  padding: 9px 14px; color: var(--muted); font-weight: 500; font-size: .88rem; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--count-bg); font-size: .75rem; text-align: center; color: var(--muted); }
.tabs a.active .count { background: var(--accent); color: #fff; }

.search { display: flex; gap: 8px; }
.search input { width: 300px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 12px; }

/* ---- Durum rozetleri ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-yeni { background: var(--badge-yeni-bg); color: var(--badge-yeni-fg); }
.badge-goruldu { background: var(--badge-goruldu-bg); color: var(--badge-goruldu-fg); }
.badge-kesim_tamam { background: var(--badge-kesim-bg); color: var(--badge-kesim-fg); }
.badge-boyada { background: var(--badge-boya-bg); color: var(--badge-boya-fg); }
.badge-boyadan_alindi { background: var(--badge-boyadan-bg); color: var(--badge-boyadan-fg); }
.badge-paketlendi { background: var(--badge-paket-bg); color: var(--badge-paket-fg); }
.badge-tamamlandi { background: var(--success-soft); color: var(--success); }
.badge-muted { background: var(--badge-muted-bg); color: var(--badge-muted-fg); }

/* ---- Anahtar-değer listeleri ---- */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--swatch-border); vertical-align: -2px; margin-right: 6px; }

/* ---- Zaman çizelgesi ---- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--border);
}
.timeline li.done:not(:last-child)::after { background: var(--success); }
.timeline .dot {
  flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); margin-top: 2px; position: relative; z-index: 1;
}
.timeline li.done .dot { background: var(--success); border-color: var(--success); }
.timeline li.done .dot::after { content: "✓"; color: #fff; font-size: 11px; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; }
.timeline li.current .dot { box-shadow: 0 0 0 4px rgba(30, 138, 76, .18); }
.tl-label { font-weight: 600; font-size: .9rem; }
.timeline li:not(.done) .tl-label { color: var(--muted); font-weight: 500; }
.tl-meta { font-size: .78rem; color: var(--muted); }

/* ---- Dosyalar ---- */
.detail-image { width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: block; }
.files-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.files-row .file-list { margin-top: 0; }
.file-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .88rem; overflow-wrap: anywhere;
}
a.file-chip:hover { border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.file-chip.big { padding: 12px 14px; }
.file-ext { flex: none; font-size: .7rem; font-weight: 700; padding: 4px 6px; border-radius: 4px; background: var(--file-ext-bg); color: #fff; font-family: var(--mono); }
.file-ext.dxf, .preview-files .file-ext { background: var(--accent); }

/* ---- Önizleme ---- */
.preview-head { border-bottom: 1px solid var(--border); margin: -20px -20px 20px; padding: 18px 20px 6px; background: var(--accent-soft); border-radius: var(--radius) var(--radius) 0 0; }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.preview-files figure { margin: 0 0 12px; }
.preview-files img { width: 100%; max-height: 280px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.preview-files figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }

/* ---- Kargo takip ---- */
.tracking-box {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--success-soft); border: 1px solid var(--success-border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
}
.tracking-box p { margin: 4px 0 0; }
.tracking-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--success); font-weight: 700; }
.tracking-number { font-size: 1.5rem; font-weight: 700; letter-spacing: .04em; }
.tracking-form { border-top: 3px solid var(--accent); }

/* ---- Diyalog ---- */
.dialog { border: 1px solid var(--border); border-radius: 12px; padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: var(--dialog-shadow); background: var(--surface); color: var(--text); }
.dialog::backdrop { background: var(--overlay); }
.dialog form { margin: 0; }
.dialog h2 { font-size: 1.15rem; margin-bottom: 2px; }
.radio-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 20px; }
.radio-card { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.radio-card:hover { border-color: var(--border-hover); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { width: auto; margin: 0; accent-color: var(--accent); }
.radio-card small { flex-basis: 100%; padding-left: 26px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---- Giriş ---- */
.auth-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 32px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: 4px; }

/* ---- Bildirim zili ---- */
.notif { position: relative; }
.notif > summary { list-style: none; }
.notif > summary::-webkit-details-marker { display: none; }
.notif-btn {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; color: #b8bec7;
}
.notif-btn:hover, .notif[open] .notif-btn { color: #fff; background: rgba(255, 255, 255, .06); }
.notif-btn svg { width: 18px; height: 18px; }
.notif-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.notif-panel {
  position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 24px));
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--dialog-shadow); overflow: hidden;
}
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.btn-text { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--accent); cursor: pointer; }
.notif-empty { padding: 18px 14px; margin: 0; color: var(--muted); font-size: .88rem; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif-list.full { max-height: none; }
.notif-list li + li { border-top: 1px solid var(--border); }
.notif-list a { display: block; padding: 10px 14px; color: var(--text); }
.notif-list a:hover { background: var(--row-hover); text-decoration: none; }
.notif-list li.unread a { background: var(--accent-soft); }
.notif-list li.unread .notif-msg { font-weight: 600; }
.notif-list li.kind-kargo_secenegi .notif-msg::before { content: "● "; color: var(--accent); }
.notif-msg { display: block; font-size: .88rem; }
.notif-time { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.notif-all { display: block; padding: 10px 14px; text-align: center; font-size: .85rem; border-top: 1px solid var(--border); }

/* ---- Kargo seçenekleri ---- */
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin-bottom: 4px; }
.offer-card { scroll-margin-top: 16px; }
.offer-action { border: 2px solid var(--accent); background: var(--accent-soft); }
.offer { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 10px; background: var(--surface); }
.offer-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.offer-status { font-weight: 700; font-size: .88rem; }
.offer-bekliyor .offer-status { color: var(--accent); }
.offer-secildi .offer-status { color: var(--success); }
.offer-geri_cekildi { opacity: .65; }
.offer-note { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 4px; font-size: .88rem; white-space: pre-line; }
.offer-options { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.offer-options li { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); counter-increment: opt; }
.offer-options li::before { content: counter(opt) "."; color: var(--muted); font-weight: 600; width: 18px; }
.offer-options { counter-reset: opt; }
.offer-options li.chosen { background: var(--success-soft); outline: 1px solid var(--success-border); }
.offer-price { font-weight: 700; font-size: 1rem; }
.offer-days { color: var(--muted); }
.offer-tag { margin-left: auto; font-size: .75rem; font-weight: 700; color: var(--success); }
.offer-actions { margin: 8px 0 0; text-align: right; }
.offer-history { margin-top: 12px; }
.offer-history summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.offer-choices { display: grid; gap: 8px; }
.offer-choice { flex-wrap: nowrap; background: var(--surface); }
.offer-choice .offer-price { font-size: 1.1rem; }
.offer-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.offer-form > * + * { margin-top: 12px; }
.offer-form-top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.offer-form-top .field { margin: 0; width: 140px; }
.offer-form-top p { margin: 0 0 8px; }
.offer-rows { display: grid; gap: 8px; }
.offer-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 10px; align-items: end; }
.offer-row .field { margin: 0; }
.offer-no { font-weight: 700; color: var(--muted); padding-bottom: 10px; }
.offer-remove {
  width: 34px; height: 40px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface);
  color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.offer-remove:hover { color: var(--danger); border-color: var(--danger); }
.offer-remove[hidden] { display: block !important; visibility: hidden; }
.badge-action { background: var(--accent); color: #fff; margin-top: 4px; }
.awaiting { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.awaiting .badge-action { margin-top: 0; }
.badge-action:hover { text-decoration: none; background: var(--accent-hover); }

.qty { color: var(--accent); white-space: nowrap; }

/* ---- Palet renk seçimi ---- */
.span-3 { grid-column: span 3; }
.palette-select { display: flex; align-items: center; gap: 8px; }
.palette-swatch { width: 40px; height: 40px; border-radius: 7px; flex: none; margin: 0; }
.palette-swatch.empty { background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--border) 6px 12px); }

/* ---- Boya listesi dışa aktarımı ---- */
.export-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--surface);
}
.export-bar .muted { margin-left: 8px; }
.export-actions { display: flex; gap: 8px; }
.btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---- Hesaplar / mağazalar ---- */
.invite { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 3px solid var(--accent); }
.invite h2 { margin-bottom: 4px; }
.invite p { margin-bottom: 8px; }
.invite-link { display: inline-block; padding: 6px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; user-select: all; }
.bind-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.bind-form select { width: auto; max-width: 220px; padding: 5px 8px; font-size: .85rem; }
.search select { width: auto; }
b.text { color: var(--text); }

/* ---- Duyarlı ---- */
@media (max-width: 980px) {
  .detail-layout, .preview-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3 { grid-column: span 2; }
}
@media (max-width: 680px) {
  .container { padding: 16px 16px 40px; }
  .topbar-inner { padding: 10px 16px; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .userbox { margin-left: auto; }
  .uname { display: none; }
  .grid-2, .grid-4, .info-grid, .files-row { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .kv { grid-template-columns: 120px minmax(0, 1fr); }
  .search, .search input { width: 100%; }
  .page-head { align-items: flex-start; }
}
