/* ============================================================
   GWS Sipariş Paneli · Premium tema
   ============================================================ */
:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e7e9f0;
  --border-strong: #d5d9e3;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #8a94a6;

  --primary: #4f46e5;
  --primary-h: #4338ca;
  --primary-soft: #eef2ff;
  --primary-ring: rgba(79, 70, 229, .18);

  --danger: #dc2626;  --danger-soft: #fef2f2;  --danger-line: #fecaca;
  --warn: #d97706;    --warn-soft: #fffbeb;    --warn-line: #fde68a;
  --success: #059669; --success-soft: #ecfdf5; --success-line: #a7f3d0;
  --info: #2563eb;    --info-soft: #eff6ff;    --info-line: #bfdbfe;

  --sidebar: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-w: 250px;

  --r: 14px;
  --r-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -16px rgba(15, 23, 42, .14);
  --shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, .3);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--primary-soft); }

/* ---------- Uygulama iskeleti ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--sidebar);
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(99, 102, 241, .22), transparent 60%);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  padding: 22px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; padding: 4px 8px 22px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff;
  box-shadow: 0 6px 16px -6px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
  letter-spacing: -.02em;
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.15; }
.brand-sub { font-size: 11.5px; color: var(--sidebar-text); font-weight: 500; }

.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #64748b; font-weight: 600; padding: 0 12px; margin: 4px 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--sidebar-text); font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #e2e8f0; text-decoration: none; }
.nav-item.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.nav-item.active svg { opacity: 1; }
.nav-item .count { margin-left: auto; font-size: 11.5px; background: rgba(255, 255, 255, .1); padding: 1px 8px; border-radius: 999px; }

.sidebar-cta { margin-top: 18px; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; font-size: 12px; color: #64748b; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar-foot strong { color: #cbd5e1; font-weight: 600; display: block; }
.sidebar-user { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); color: #94a3b8; }
.sidebar-user a { color: #cbd5e1; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: rgba(255, 255, 255, .07); }
.sidebar-user a:hover { background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; }

.content { flex: 1; min-width: 0; }
main { max-width: none; margin: 0; padding: 32px 36px 64px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px; padding: 12px 14px; }
  .brand { padding: 0 8px 0 0; margin-right: 8px; }
  .brand-sub { display: none; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-item { padding: 7px 10px; }
  .sidebar-cta { margin: 0 0 0 auto; }
  main { padding: 20px 16px 48px; }
}

/* ---------- Sayfa başlığı ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .crumb { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.page-head .crumb:hover { color: var(--text-2); text-decoration: none; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: 12px; line-height: 1.2; }
.page-sub { color: var(--muted); margin-top: 4px; font-size: 13px; }
h2 { font-size: 12px; font-weight: 600; margin: 0 0 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-side { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .grid-2, .grid-side { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

/* ---------- İstatistik kartları ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow-sm); color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--stat-color, var(--primary)); opacity: .9; }
.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.stat.active { border-color: var(--stat-color, var(--primary)); box-shadow: 0 0 0 3px var(--primary-ring); }
.stat-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.stat-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stat-color, var(--primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stat-color, var(--primary)) 18%, transparent); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 12px; color: var(--muted); }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .stats-3 { grid-template-columns: 1fr; } }

.alert-late {
  display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; padding: 11px 14px;
  background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: var(--r-sm);
  color: #991b1b; font-size: 13px; transition: background .15s;
}
.alert-late:hover { text-decoration: none; background: #fee2e2; }
.alert-late strong { color: #7f1d1d; }
.alert-late-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }

/* ---------- Form elemanları ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.field label .opt { color: var(--muted); font-weight: 400; font-size: 12px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font: inherit; background: #fff; color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
input::placeholder, textarea::placeholder { color: #a3adbf; }
input:hover, select:hover, textarea:hover { border-color: #bcc3d0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error select:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.error-text { color: var(--danger); font-size: 12.5px; margin-top: 5px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }

/* Açma/kapama anahtarı (ahşap şövale) */
.field label.check {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px;
  border: 1.5px solid var(--border-strong); border-radius: 12px; cursor: pointer; background: #fff;
  font-weight: 400; transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.field label.check:hover { border-color: #b4bccb; background: var(--surface-2); }
.field label.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.field label.check:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-ring); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-icon { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: #9aa3b5; transition: color .15s, background .15s, border-color .15s; }
.check-icon svg { width: 20px; height: 20px; }
.check:has(input:checked) .check-icon { background: #fff; border-color: var(--info-line); color: var(--primary); }
.check-text { flex: 1; min-width: 0; line-height: 1.3; }
.check-title { font-weight: 600; font-size: 13.5px; color: var(--text); display: block; }
.check-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; }
.switch { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: #cfd5e0; transition: background .18s var(--ease); box-shadow: inset 0 1px 2px rgba(15, 23, 42, .12); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .18s var(--ease); }
.check:has(input:checked) .switch { background: var(--primary); }
.check:has(input:checked) .switch::after { transform: translateX(18px); }

/* Cam ölçüsü seçimi (radyo mantığı, kart listesi) */
.size-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.field label.size-option {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 12px;
  border: 1.5px solid var(--border-strong); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 400;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.field label.size-option:hover { border-color: #b4bccb; background: var(--surface-2); }
.size-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.size-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: #9aa3b5; transition: color .15s, background .15s, border-color .15s; }
.size-icon svg { width: 17px; height: 17px; }
.size-name { font-weight: 600; font-size: 13.5px; color: var(--text); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-sub { font-size: 11px; color: var(--muted); margin-left: auto; }
.field label.size-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-ring); }
.size-option:has(input:checked) .size-icon { background: #fff; border-color: var(--info-line); color: var(--primary); }
.size-option:has(input:checked)::after {
  content: ""; position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.size-option:has(input:checked) .size-name { padding-right: 22px; }
.field label.size-option:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-ring); }
.size-option.is-inactive { border-style: dashed; }
.field.has-error .size-option { border-color: var(--danger); }

/* Yan yana ikonlu durum seçici (liste + detay) */
.status-seg { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; position: relative; }
.status-native { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.status-opt {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: #a3adbf; cursor: pointer; font: inherit; font-weight: 600; font-size: 12.5px;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), padding .15s var(--ease);
}
.status-opt-icon { display: grid; place-items: center; width: 16px; height: 16px; }
.status-opt-icon svg { width: 16px; height: 16px; }
.status-opt-label { display: none; white-space: nowrap; }
.status-opt:hover { background: #fff; color: var(--text-2); }
.status-opt.is-active { padding: 0 11px 0 9px; }
.status-opt.is-active .status-opt-label { display: inline; }
.status-opt.status-beklemede.is-active { background: var(--warn-soft); color: #92400e; border-color: var(--warn-line); }
.status-opt.status-baskida.is-active { background: var(--info-soft); color: #1e40af; border-color: var(--info-line); }
.status-opt.status-tamamlandi.is-active { background: var(--success-soft); color: #065f46; border-color: var(--success-line); }
.status-opt.status-beklemede:not(.is-active):hover { color: var(--warn); }
.status-opt.status-baskida:not(.is-active):hover { color: var(--info); }
.status-opt.status-tamamlandi:not(.is-active):hover { color: var(--success); }
.status-opt:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.badge-has-icon::before { display: none; }
.badge-icon { display: inline-grid; place-items: center; width: 14px; height: 14px; }
.badge-icon svg { width: 14px; height: 14px; }
.seg-icon { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 6px; }
.seg-icon svg { width: 15px; height: 15px; }

/* Durum seçimi (segment) */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.field label.seg-item { position: relative; margin: 0; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease); }
.seg-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg-item span { display: inline-flex; align-items: center; white-space: nowrap; }
.seg-item .seg-icon { opacity: .55; }
.seg-item:has(input:checked) .seg-icon { opacity: 1; }
.field label.seg-item:hover { color: var(--text); }
.field label.seg-item:has(input:checked) { background: #fff; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg-beklemede:has(input:checked) { color: #92400e; }
.seg-baskida:has(input:checked) { color: #1e40af; }
.seg-tamamlandi:has(input:checked) { color: #065f46; }
.seg-item:has(input:checked) span::before { opacity: 1; }
.field label.seg-item:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-ring); }

/* Yatay / Dikey seçimi (radyo mantığı, ikonlu kartlar) */
.orient-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label.orient {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; font-weight: 400;
  padding: 14px 12px 12px; border: 1.5px solid var(--border-strong); border-radius: 12px;
  background: #fff; cursor: pointer; text-align: center;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
.orient:hover { border-color: #b4bccb; background: var(--surface-2); }
.orient input { position: absolute; opacity: 0; width: 0; height: 0; }
.orient-icon { width: 56px; height: 56px; color: #9aa3b5; display: grid; place-items: center; transition: color .15s, transform .15s var(--ease); }
.orient-icon svg { width: 52px; height: 52px; }
.orient-label { font-weight: 600; font-size: 13.5px; color: var(--text); }
.orient-sub { font-size: 11.5px; color: var(--muted); }
.orient:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-ring); }
.orient:has(input:checked) .orient-icon { color: var(--primary); transform: scale(1.06); }
.orient:has(input:checked)::after {
  content: ""; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.orient:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-ring); }
.field.has-error .orient { border-color: var(--danger); }
.chip-orient .chip-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--primary); }
.chip-orient .chip-icon svg { width: 16px; height: 16px; }

.dropzone {
  border: 1.5px dashed #c9cfdb; border-radius: 12px; padding: 20px; text-align: center;
  background: var(--surface-2); transition: border-color .15s, background .15s; position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone-icon { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--primary); box-shadow: var(--shadow-sm); }
.dropzone-icon svg { width: 20px; height: 20px; }
.dropzone-title { font-weight: 600; font-size: 13.5px; }
.dropzone-title span { color: var(--primary); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-current { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; font-size: 13px; position: relative; z-index: 1; flex-wrap: wrap; }
.dropzone-current label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--muted); }
#design-preview:not(:empty) { margin-top: 14px; }
#design-preview .preview-img { margin: 0 auto; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: #bcc3d0; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #5b54ea, var(--primary)); border-color: var(--primary-h); color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background: linear-gradient(180deg, #514aea, var(--primary-h)); border-color: var(--primary-h); }
.btn-danger { color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-soft); border-color: #fca5a5; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); border-color: transparent; color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- Toast bildirimleri ---------- */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(400px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #0f172a; color: #f8fafc; padding: 12px 14px 12px 12px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-weight: 500; font-size: 13.5px;
  animation: toastIn .3s var(--ease);
  transition: opacity .3s, transform .3s;
}
.toast-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast-icon svg { width: 13px; height: 13px; }
.toast-success .toast-icon { background: rgba(52, 211, 153, .18); color: #34d399; }
.toast-error .toast-icon { background: rgba(248, 113, 113, .18); color: #f87171; }
.toast.hide { opacity: 0; transform: translateX(12px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.flash { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 18px; border: 1px solid; font-weight: 500; }
.flash-error { background: var(--danger-soft); border-color: var(--danger-line); color: #991b1b; }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-beklemede { background: var(--warn-soft); color: #92400e; border-color: var(--warn-line); }
.badge-baskida { background: var(--info-soft); color: #1e40af; border-color: var(--info-line); }
.badge-tamamlandi { background: var(--success-soft); color: #065f46; border-color: var(--success-line); }
.badge-baski_yapildi { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.status-opt.status-baski_yapildi.is-active { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.status-opt.status-baski_yapildi:not(.is-active):hover { color: #7c3aed; }
.seg-baski_yapildi:has(input:checked) { color: #5b21b6; }
.status-select.status-baski_yapildi { background-color: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .stats-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stats-4 { grid-template-columns: 1fr; } }
.badge-off { background: #f1f5f9; color: var(--muted); border-color: var(--border); }

/* ---------- Araç çubuğu & sekmeler ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 4px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.tab { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.tab:hover { text-decoration: none; background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--text); color: #fff; }
.tab .count { background: rgba(15, 23, 42, .06); padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.tab.active .count { background: rgba(255, 255, 255, .18); }
.search { display: flex; gap: 6px; }
.search input { width: 280px; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
@media (max-width: 700px) { .search { width: 100%; } .search input { width: 100%; } }

/* ---------- Tablolar ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow-x: auto; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafbfe; }
.orders-table { min-width: 1040px; }
.orders-table td { white-space: nowrap; }
.chip { white-space: nowrap; }
.cell-actions { flex-wrap: nowrap; }
.sizes-table .actions { white-space: nowrap; }
tr.row-late td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tr.row-soon td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

.customer { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font-weight: 600; font-size: 12.5px; color: #fff;
  background: var(--av, #6366f1); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.avatar-lg { width: 52px; height: 52px; font-size: 17px; border-radius: 14px; }
.order-id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.order-id:hover { color: var(--primary); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); }
.chip-yes { background: var(--success-soft); border-color: var(--success-line); color: #065f46; }
.deadline { display: flex; flex-direction: column; gap: 2px; }
.deadline-hint { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.deadline-late { color: var(--danger); }
.deadline-soon { color: var(--warn); }
.deadline-ok { color: var(--muted); font-weight: 500; }

.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.status-select { padding: 6px 30px 6px 10px; font-size: 12.5px; font-weight: 600; border-radius: 999px; width: auto; box-shadow: none; }
.status-select.status-beklemede { background-color: var(--warn-soft); color: #92400e; border-color: var(--warn-line); }
.status-select.status-baskida { background-color: var(--info-soft); color: #1e40af; border-color: var(--info-line); }
.status-select.status-tamamlandi { background-color: var(--success-soft); color: #065f46; border-color: var(--success-line); }
.tracking-form input { width: 165px; padding: 6px 10px; font-size: 12.5px; box-shadow: none; }

.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); display: block; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease); flex: none; }
.thumb-link { display: block; flex: none; cursor: zoom-in; border-radius: 9px; }
.thumb-link:hover .thumb { transform: scale(1.08); box-shadow: 0 0 0 3px var(--primary-ring), var(--shadow); }
.thumb-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 13px; line-height: 1; color: var(--text-2); background: var(--surface-2); text-decoration: none; }
.thumb-file span { font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.thumb-file:hover { text-decoration: none; border-color: var(--border-strong); }
.orders-table { min-width: 960px; }
.orders-table td { padding: 14px 16px; }
.orders-table th { padding: 12px 16px; }
.orders-table .col-id { width: 92px; }
.orders-table .col-thumb { width: 104px; }
.thumb-cell { display: flex; align-items: center; gap: 6px; }
.thumb-dl { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-2); box-shadow: var(--shadow-sm); flex: none; transition: color .15s, border-color .15s, background .15s; }
.thumb-dl svg { width: 14px; height: 14px; }
.thumb-dl:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.orders-table .col-actions { width: 130px; text-align: right; }
.orders-table .strong { display: block; font-size: 14px; line-height: 1.3; }
.orders-table .meta { margin-top: 3px; line-height: 1.3; }
.thumb-lg { width: 52px; height: 52px; border-radius: 10px; }
.thumb-empty { display: grid; place-items: center; border: 1.5px dashed var(--border-strong); background: var(--surface-2); color: #b3bac8; box-shadow: none; }
.thumb-empty svg { width: 18px; height: 18px; }
.thumb-empty:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.product-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pm-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pm-item svg { width: 14px; height: 14px; color: #b3bac8; }
.pm-item.pm-yes { color: var(--text-2); }
.pm-item.pm-yes svg { color: var(--success); }
.tracking-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.tracking-meta svg { width: 14px; height: 14px; color: #b3bac8; }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.btn-icon { padding: 6px 8px; color: var(--text-2); }
.btn-icon svg { width: 15px; height: 15px; }
.orders-table tbody tr:hover .btn-icon { color: var(--text); }

/* ---------- Modal / Lightbox ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity .18s var(--ease); }
.modal-overlay.show { opacity: 1; }
.modal-overlay.hide { opacity: 0; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px 24px; width: 100%; max-width: 440px; transform: translateY(8px) scale(.98); transition: transform .18s var(--ease); }
.modal-overlay.show .modal { transform: none; }
.modal-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 2px; }
.modal-sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.modal-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.modal-lightbox { max-width: min(1100px, 96vw); padding: 0; overflow: hidden; }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.lightbox-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-actions { display: flex; gap: 6px; flex: none; }
.lightbox-body { background: #0f172a; display: grid; place-items: center; min-height: 200px; }
.lightbox-body img { max-width: 100%; max-height: calc(100vh - 140px); display: block; object-fit: contain; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake { animation: shake .3s var(--ease); border-color: var(--danger) !important; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.actions { white-space: nowrap; text-align: right; }

.empty { text-align: center; padding: 64px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r); }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.empty-icon svg { width: 26px; height: 26px; }
.empty-title { font-weight: 600; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- Detay sayfası ---------- */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 11px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; }
.pre { white-space: pre-wrap; }
.preview-img { max-width: 100%; max-height: 440px; border-radius: 12px; border: 1px solid var(--border); display: block; box-shadow: var(--shadow); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.form-actions form { margin: 0; }
.meta { color: var(--muted); font-size: 12.5px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; color: var(--text); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }

/* ---------- Ölçüler tablosu & sürükle-bırak ---------- */
.sizes-table td form { margin: 0; }
.drag-handle { display: inline-block; cursor: grab; color: #b3bac8; font-size: 15px; letter-spacing: -2px; padding: 4px 6px; border-radius: 6px; user-select: none; line-height: 1; transition: color .15s, background .15s; }
.drag-handle:hover { color: var(--text-2); background: var(--surface-2); }
.drag-handle:active { cursor: grabbing; }
.drag-handle-inline { color: #b3bac8; letter-spacing: -2px; font-weight: 700; }
tr.dragging { opacity: .45; background: var(--primary-soft) !important; }
tr.dragging td { border-top: 2px dashed var(--primary); }
tr.editing { background: var(--primary-soft) !important; }
tr.editing td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.sort-no { font-variant-numeric: tabular-nums; }
.sizes-table td { white-space: nowrap; }
.cell-actions { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
