/* ─── KOYU TEMA (varsayılan) ────────────────────── */
:root {
  --bg:          #0d1e1c;
  --bg2:         #0a1714;
  --sidebar-bg:  #091412;
  --card:        #132825;
  --card2:       #1a3430;
  --surface2:    #1a3430;
  --border:      #1e3530;
  --border2:     #2a4a44;
  --accent:      #00c9a7;
  --accent-dark: #00a884;
  --text:        #e2f0ee;
  --text2:       #8ab5ae;
  --text3:       #4d7870;
  --teal:        #00c9a7;
  --green:       #2ecc71;
  --orange:      #f0a500;
  --red:         #e05555;
  --blue:        #4fc3f7;
  --purple:      #ce93d8;
  --pink:        #f48fb1;
  --yellow:      #fff176;
  --sidebar-w:   190px;
  --header-h:    56px;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 2px 12px rgba(0,0,0,.35);
}

/* ─── AÇIK TEMA ─────────────────────────────────── */
body.theme-light {
  --bg:          #f0faf8;
  --bg2:         #ffffff;
  --sidebar-bg:  #0d2b27;
  --card:        #ffffff;
  --card2:       #e8f5f2;
  --surface2:    #e8f5f2;
  --border:      #c8e6e0;
  --border2:     #9dd3c8;
  --accent:      #00a884;
  --accent-dark: #008f70;
  --text:        #0d2b27;
  --text2:       #2d6b60;
  --text3:       #6aaba0;
  --teal:        #00a884;
  --green:       #27ae60;
  --orange:      #e08a00;
  --red:         #c0392b;
  --blue:        #1976d2;
  --purple:      #8e24aa;
  --pink:        #e91e8c;
  --yellow:      #f9a825;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
}

/* Açık temada sidebar metin rengi (sidebar koyu kalıyor) */
body.theme-light .sb-item { color: #a8d5cc; }
body.theme-light .sb-item:hover { background: rgba(255,255,255,.08); color: #fff; }
body.theme-light .sb-item.active { background: rgba(0,201,167,.2); color: #00c9a7; }
body.theme-light .sb-username { color: #d0ece8; }
body.theme-light .sb-role { color: #7ab5ad; }
body.theme-light .sb-logout { color: #7ab5ad; }
body.theme-light .sb-logout:hover { color: #ff6b6b; }
body.theme-light .sb-divider { background: rgba(255,255,255,.1); }

/* Açık temada input / textarea */
body.theme-light input,
body.theme-light textarea,
body.theme-light select {
  background: #f0faf8;
  border-color: var(--border);
  color: var(--text);
}
body.theme-light input:focus,
body.theme-light textarea:focus { border-color: var(--accent); outline: none; }

/* Açık temada tablo */
body.theme-light .data-table th,
body.theme-light .preview-table th,
body.theme-light .items-table th { background: #e0f2ee; color: var(--text2); }
body.theme-light .data-table tbody tr:hover,
body.theme-light .items-table tbody tr:hover { background: #e8f5f2; }

/* Açık temada badge ve pill renk düzeltmeleri */
body.theme-light .badge-success { background: #d4f5eb; color: #1a7a5e; }
body.theme-light .badge-warning { background: #fff3cd; color: #856404; }
body.theme-light .badge-danger  { background: #fde8e8; color: #922b21; }

/* Açık temada alert banner */
body.theme-light .alert-critical { background: #fde8e8; border-color: #f5a9a9; color: #7b241c; }
body.theme-light .alert-warning  { background: #fff8e1; border-color: #ffe08a; color: #7d5a00; }

/* Açık temada flash */
body.theme-light .flash-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }
body.theme-light .flash-error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }

/* ─── RESET ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ─── LOGIN ─────────────────────────────────────── */
.login-body { display: flex; align-items: stretch; min-height: 100vh; background: #081412; }
.login-wrap { display: flex; width: 100%; min-height: 100vh; }

.login-left {
  flex: 0 0 55%;
  background: linear-gradient(145deg, #081412 0%, #0d2520 50%, #091c1a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative; overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(0,201,167,.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(244,143,177,.05) 0%, transparent 50%);
}
.login-left-inner { position: relative; z-index: 1; max-width: 420px; }
.ll-brand { text-align: center; margin-bottom: 48px; }
.ll-logo-ring { margin-bottom: 20px; }
.ll-title { font-size: 36px; font-weight: 800; letter-spacing: 4px; color: var(--accent); }
.ll-sub { font-size: 13px; color: var(--text2); margin-top: 6px; letter-spacing: 1px; }

.ll-features { display: flex; flex-direction: column; gap: 14px; }
.ll-features li {
  display: flex; align-items: center; gap: 12px;
  color: var(--text2); font-size: 13px;
  background: rgba(255,255,255,.03);
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.05);
}
.feat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ll-footer { margin-top: 48px; text-align: center; color: var(--text3); font-size: 11px; }

.login-right {
  flex: 1;
  background: #f0f4f3;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.login-form-box { width: 100%; max-width: 380px; }

.lf-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.lf-logo-text { font-size: 18px; font-weight: 800; letter-spacing: 2px; color: #0d1e1c; }
.lf-title { font-size: 26px; font-weight: 700; color: #0d1e1c; margin-bottom: 6px; }
.lf-desc { font-size: 13px; color: #6b9e96; margin-bottom: 28px; }

.lf-error {
  background: #ffeaea; border: 1px solid #f5c6c6;
  color: #c0392b; padding: 10px 14px;
  border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px;
}

.lf-group { margin-bottom: 18px; }
.lf-label { display: block; font-size: 11px; font-weight: 600; color: #7aa8a0; letter-spacing: .8px; margin-bottom: 6px; }
.lf-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #d0e8e4; border-radius: var(--radius-sm);
  background: #fff; color: #0d1e1c; font-size: 14px; font-family: inherit;
  transition: border-color .2s;
}
.lf-input:focus { outline: none; border-color: var(--accent); }

.lf-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: 1px;
  border-radius: var(--radius-sm);
  transition: background .2s, transform .1s;
  margin-top: 4px;
}
.lf-btn:hover { background: var(--accent-dark); }
.lf-btn:active { transform: scale(.98); }
.lf-bottom { margin-top: 32px; text-align: center; font-size: 11px; color: #a0bdb8; }

/* ─── APP LAYOUT ─────────────────────────────────── */
.app-body { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width .25s ease, min-width .25s ease;
  overflow: hidden;
  z-index: 100;
}
.sidebar.collapsed { width: 56px; min-width: 56px; }
.sidebar.collapsed .sb-logo-text,
.sidebar.collapsed .sb-item span,
.sidebar.collapsed .sb-username,
.sidebar.collapsed .sb-role { display: none; }
.sidebar.collapsed .sb-logo { justify-content: center; }
.sidebar.collapsed .sb-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .sb-footer { padding: 12px 8px; }
.sidebar.collapsed .sb-user-info { display: none; }

.sb-header { padding: 18px 14px 14px; border-bottom: 1px solid var(--border); }
.sb-logo { display: flex; align-items: center; gap: 10px; }
.sb-logo-text { font-size: 16px; font-weight: 800; letter-spacing: 2px; color: var(--accent); white-space: nowrap; }

.sb-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.sb-item i { font-size: 14px; flex-shrink: 0; width: 16px; text-align: center; }
.sb-item:hover { background: rgba(0,201,167,.08); color: var(--text); }
.sb-item.active { background: rgba(0,201,167,.15); color: var(--accent); font-weight: 600; }
.sb-divider { height: 1px; background: var(--border); margin: 8px 4px; }

.sb-footer {
  padding: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.sb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.sb-user-info { flex: 1; overflow: hidden; }
.sb-username { display: block; font-weight: 600; font-size: 12px; white-space: nowrap; }
.sb-role { display: block; font-size: 10px; color: var(--text2); }
.sb-logout {
  color: var(--text3); padding: 4px;
  border-radius: 4px; transition: color .15s;
  flex-shrink: 0;
}
.sb-logout:hover { color: var(--red); }

/* App Main */
.app-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Header */
.app-header {
  height: 62px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
  gap: 10px;
}
.header-left  { display: flex; align-items: center; gap: 14px; }
.header-center { display: flex; justify-content: center; align-items: center; }
.header-right  { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.header-brand  { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 4px; border-right: 1px solid var(--border); margin-right: 2px; }

/* Logo kartı (header orta) */
.header-logo-card {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--card) 0%, var(--bg2) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 16px 6px 10px;
  box-shadow: 0 1px 8px rgba(0,0,0,.25);
}
.header-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.hlt-title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: 3px; }
.hlt-sub   { font-size: 9px;  font-weight: 600; color: var(--teal); letter-spacing: 2px; }
.hlt-tiny  { font-size: 7.5px; color: var(--text3); letter-spacing: 1px; }

.sb-toggle {
  color: var(--text2); font-size: 15px; padding: 6px 8px;
  border-radius: 6px; transition: background .15s, color .15s;
}
.sb-toggle:hover { background: var(--card); color: var(--text); }
.header-page-title { font-size: 13px; font-weight: 600; color: var(--text3); }
.header-live { display: flex; align-items: center; gap: 6px; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.live-text { font-size: 11px; font-weight: 600; color: var(--green); letter-spacing: .5px; }
.header-clock { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* Page Content */
.page-content { flex: 1; overflow-y: auto; padding: 20px; }

/* ─── STATS ROW ─────────────────────────────────── */
.stats-row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 140px;
  background: var(--card); border-radius: var(--radius);
  padding: 16px 18px; border: 1px solid var(--border);
  border-top: 3px solid transparent;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-card .stat-icon {
  position: absolute; right: 14px; top: 14px;
  font-size: 20px; opacity: .12;
}
.border-teal  { border-top-color: var(--teal); }
.border-green { border-top-color: var(--green); }
.border-orange{ border-top-color: var(--orange); }
.border-blue  { border-top-color: var(--blue); }
.border-purple{ border-top-color: var(--purple); }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text2); font-weight: 500; letter-spacing: .5px; }

/* ─── ALERT BANNERS ─────────────────────────────── */
.alert-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: var(--radius-sm);
  margin-bottom: 10px; font-size: 12px;
}
.alert-critical { background: rgba(224,85,85,.12); border: 1px solid rgba(224,85,85,.3); color: #e88; }
.alert-warning  { background: rgba(240,165,0,.10); border: 1px solid rgba(240,165,0,.3); color: #f4c46a; }
.alert-tag {
  background: rgba(255,255,255,.08); padding: 2px 8px;
  border-radius: 4px; font-weight: 600; font-size: 11px;
}

/* ─── DASHBOARD BODY ─────────────────────────────── */
.dashboard-body { display: flex; gap: 16px; align-items: flex-start; }
.orders-section { flex: 1; min-width: 0; }
.right-panel { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }

/* Section Header */
.section-header {
  display: flex; align-items: center; gap: 8px;
  color: var(--text2); font-size: 12px; font-weight: 600; letter-spacing: .5px;
  margin-bottom: 10px;
}
.section-count { margin-left: auto; color: var(--text3); }

/* ─── ORDER CARDS ─────────────────────────────────── */
.order-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  overflow: hidden; transition: border-color .2s;
}
.order-card:hover { border-color: var(--border2); }
.order-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; flex-wrap: wrap;
}
.oc-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.oc-no { font-size: 15px; font-weight: 700; color: var(--text); }
.oc-customer { font-size: 12px; color: var(--text2); }

.oc-center { flex: 1; min-width: 120px; }
.progress-bar-wrap {
  height: 6px; background: var(--bg2);
  border-radius: 3px; overflow: hidden;
}
.progress-bar-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.fill-green  { background: var(--green); }
.fill-teal   { background: var(--teal); }
.fill-orange { background: var(--orange); }
.fill-red    { background: rgba(224,85,85,.4); }

.oc-liste-badge {
  background: rgba(0,201,167,.15); color: var(--accent);
  border: 1px solid rgba(0,201,167,.35);
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
}
.oc-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.oc-pct { font-size: 15px; font-weight: 700; }
.oc-tasks { font-size: 11px; color: var(--text3); }
.oc-date { font-size: 11px; color: var(--text2); }
.oc-toggle { color: var(--text3); font-size: 12px; transition: transform .2s; }
.oc-toggle.open { transform: rotate(180deg); }

.btn-load {
  background: rgba(0,201,167,.12); color: var(--accent);
  border: 1px solid rgba(0,201,167,.25);
  padding: 5px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  transition: background .15s;
}
.btn-load:hover { background: rgba(0,201,167,.22); }

/* Order Card Body */
.order-card-body { border-top: 1px solid var(--border); padding: 0; overflow-x: auto; }
.items-table-wrap { padding: 12px 16px; overflow-x: auto; }
.items-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.items-table th {
  padding: 7px 10px; text-align: left;
  color: var(--text3); font-weight: 600; font-size: 11px; letter-spacing: .4px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.items-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  color: var(--text); white-space: nowrap;
}
.items-table tr:last-child td { border-bottom: none; }
.items-table tbody tr:hover { background: rgba(255,255,255,.02); }
.atelier-th { text-align: center; font-size: 10px; }
.atelier-cell { text-align: center; }
.atelier-done { color: var(--green); font-size: 15px; }
.atelier-pending { color: var(--text3); font-size: 15px; }
.code-tag {
  background: rgba(0,201,167,.1); color: var(--accent);
  padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600;
}
.empty-msg { color: var(--text3); padding: 16px; font-size: 12px; }

/* ─── BADGES ─────────────────────────────────────── */
.badge {
  padding: 3px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px; white-space: nowrap;
}
.badge-success { background: rgba(46,204,113,.15); color: var(--green); border: 1px solid rgba(46,204,113,.3); }
.badge-info    { background: rgba(79,195,247,.12); color: var(--blue);  border: 1px solid rgba(79,195,247,.25); }
.badge-warning { background: rgba(240,165,0,.12);  color: var(--orange);border: 1px solid rgba(240,165,0,.3); }
.badge-danger  { background: rgba(224,85,85,.12);  color: var(--red);   border: 1px solid rgba(224,85,85,.3); }

/* ─── TEXT COLORS ─────────────────────────────────── */
.text-green { color: var(--green); }
.text-teal  { color: var(--teal); }
.text-orange{ color: var(--orange); }
.text-muted { color: var(--text3); }

/* ─── RIGHT PANEL CARDS ──────────────────────────── */
.panel-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.panel-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--text2);
}
.panel-badge {
  margin-left: auto; font-size: 10px; color: var(--text3);
  background: var(--bg2); padding: 2px 7px; border-radius: 4px;
}
.panel-badge.badge-red { color: var(--red); background: rgba(224,85,85,.1); }

/* Atelier Load */
.atelier-load-list { padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.atelier-load-item {}
.al-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.al-name { font-size: 11px; font-weight: 600; }
.al-count { font-size: 13px; font-weight: 700; }
.al-high  { color: var(--red); }
.al-mid   { color: var(--orange); }
.al-low   { color: var(--text2); }
.al-bar {
  height: 4px; background: var(--bg2); border-radius: 2px; overflow: hidden;
}
.al-bar-fill { height: 100%; border-radius: 2px; transition: width .4s ease; }

/* Attention list */
.attention-list { padding: 8px 14px; display: flex; flex-direction: column; gap: 6px; }
.attention-list li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.attention-list li:last-child { border-bottom: none; }
.att-no { font-weight: 600; }
.att-late { color: var(--red); font-weight: 700; font-size: 11px; }

/* ─── EMPTY STATE ─────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 24px;
  color: var(--text3); text-align: center; gap: 12px;
}
.empty-state i { font-size: 48px; }
.empty-state h3 { font-size: 16px; color: var(--text2); }
.empty-state p { font-size: 13px; }
.empty-state a { color: var(--accent); }

/* ─── SCROLLBAR ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ─── FLASH MESSAGES ─────────────────────────────── */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: var(--radius-sm);
  margin-bottom: 12px; font-size: 13px;
}
.flash-success { background: rgba(46,204,113,.12); border: 1px solid rgba(46,204,113,.3); color: var(--green); }
.flash-error   { background: rgba(224,85,85,.12);  border: 1px solid rgba(224,85,85,.3);  color: var(--red); }
.flash-warning { background: rgba(240,165,0,.12);  border: 1px solid rgba(240,165,0,.3);  color: var(--orange); }
.flash-close { margin-left: auto; background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; opacity: .7; }
.flash-close:hover { opacity: 1; }

/* ─── PAGE TOOLBAR ───────────────────────────────── */
.page-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.toolbar-count { font-size: 13px; color: var(--text2); }
.toolbar-left { display: flex; align-items: center; gap: 12px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── BUTTONS ────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: #fff;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-primary.btn-lg { padding: 12px 28px; font-size: 14px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.05); color: var(--text2);
  border: 1px solid var(--border2);
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text); }

.btn-sm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 5px; font-size: 11px; font-weight: 600;
  transition: background .15s;
}
.btn-sm.btn-ghost {
  background: rgba(255,255,255,.04); color: var(--text2);
  border: 1px solid var(--border);
}
.btn-sm.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text); }
.btn-sm.btn-danger-ghost {
  background: rgba(224,85,85,.08); color: var(--red);
  border: 1px solid rgba(224,85,85,.2);
}
.btn-sm.btn-danger-ghost:hover { background: rgba(224,85,85,.16); }

/* ─── MODAL ──────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: var(--radius); width: 100%; max-width: 560px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.modal-close {
  font-size: 20px; color: var(--text3);
  padding: 2px 6px; border-radius: 4px;
  transition: color .15s;
}
.modal-close:hover { color: var(--red); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-desc { font-size: 12px; color: var(--text2); margin-bottom: 16px; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* File Drop */
.file-drop {
  border: 2px dashed var(--border2); border-radius: var(--radius-sm);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.file-drop:hover { border-color: var(--accent); background: rgba(0,201,167,.04); }
.file-drop i { font-size: 32px; color: var(--text3); margin-bottom: 10px; display: block; }
.file-drop p { color: var(--text2); font-size: 13px; margin-bottom: 6px; }
.file-name { font-size: 11px; color: var(--accent); }
.file-drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

/* ─── ORDERS LIST ────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: 8px; }
.order-row-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  transition: border-color .2s;
}
.order-row-card:hover { border-color: var(--border2); }
.orc-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; }
.orc-no { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.orc-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.orc-meta span { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 4px; }
.orc-meta strong { color: var(--text); }
.orc-meta .text-danger { color: var(--red) !important; }
.orc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── DATA TABLE ─────────────────────────────────── */
.products-table-wrap, .items-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  background: var(--card); border-radius: var(--radius);
  overflow: hidden;
}
.data-table th {
  padding: 10px 14px; text-align: left;
  color: var(--text3); font-weight: 600; font-size: 11px;
  background: var(--card2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,.02); }

/* ─── ATELIER PILLS ──────────────────────────────── */
.atelier-pill {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 10px; font-weight: 600;
  margin: 2px; border: 1px solid var(--border);
}
.pill-active {}
.pill-inactive { color: var(--text3); border-color: var(--border); opacity: .5; }

/* Atelier checkboxes (preview + modal) */
.atelier-check-label { display: inline-flex; align-items: center; margin: 4px; cursor: pointer; }
.atelier-check-label input { display: none; }
.atelier-check-tag {
  padding: 4px 10px; border-radius: 5px; font-size: 11px; font-weight: 600;
  border: 1.5px solid; transition: background .15s, opacity .15s;
  background: transparent;
}
.atelier-check-label input:not(:checked) + .atelier-check-tag { opacity: .35; }
.atelier-check-label input:checked + .atelier-check-tag { background: currentColor; color: #fff !important; opacity: 1; }

.atelier-check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.atelier-check-label-lg { cursor: pointer; }
.atelier-check-label-lg input { display: none; }
.atelier-check-tag-lg {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  border: 1.5px solid; transition: background .15s, opacity .15s;
}
.act-num {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.atelier-check-label-lg input:not(:checked) + .atelier-check-tag-lg { opacity: .4; }
.atelier-check-label-lg input:checked + .atelier-check-tag-lg {
  background: rgba(var(--acolor), .15); opacity: 1;
}

/* ─── PREVIEW PAGE ───────────────────────────────── */
.preview-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
}
.preview-section-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.preview-file { margin-left: auto; font-size: 11px; color: var(--text3); font-weight: 400; }
.preview-desc { font-size: 12px; color: var(--text2); padding: 12px 18px 4px; }
.preview-header-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px; background: var(--border); padding: 1px;
}
.phg-item { background: var(--card); padding: 12px 18px; }
.phg-label { display: block; font-size: 10px; color: var(--text3); font-weight: 600; letter-spacing: .5px; margin-bottom: 4px; }
.phg-value { display: block; font-size: 14px; font-weight: 600; color: var(--text); }

.preview-new-products { border-color: rgba(240,165,0,.4); }
.preview-new-products .preview-section-title { background: rgba(240,165,0,.06); }

.new-product-card {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.new-product-card:last-child { border-bottom: none; }
.npc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.npc-name { font-size: 13px; font-weight: 500; }
.npc-label { font-size: 11px; color: var(--text3); font-weight: 600; margin-right: 4px; }
.npc-ateliers { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }

.preview-table-wrap { overflow-x: auto; }
.preview-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.preview-table th {
  padding: 8px 12px; text-align: left;
  color: var(--text3); font-size: 11px; font-weight: 600;
  background: var(--card2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.preview-table td {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.preview-table .row-new { background: rgba(240,165,0,.04); }
.preview-table tr:last-child td { border-bottom: none; }
.variant-count { font-size: 10px; color: var(--text3); background: var(--bg2); padding: 1px 6px; border-radius: 3px; margin-left: 6px; }
.variant-list { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.variant-item { font-size: 10px; color: var(--text2); }
.notes-cell { max-width: 180px; white-space: normal; font-size: 11px; color: var(--text2); }
.mini-atelier-tag { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; margin: 1px; }

.preview-actions {
  display: flex; justify-content: flex-end; gap: 12px; padding: 8px 0 16px;
}
.text-danger { color: var(--red) !important; }


/* ─── ATÖLYE BUTONLARI (dashboard) ─────────────── */
.atelier-btn { cursor: pointer; transition: transform .15s, color .15s; display: inline-block; }
.atelier-btn:hover { transform: scale(1.3); }
.atelier-done  { color: var(--green); font-size: 16px; }
.atelier-pending { color: var(--text3); font-size: 16px; }
.atelier-pending:hover { color: var(--accent); }

/* ─── İŞ EMİRLERİ ──────────────────────────────── */
.wo-atelier-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 4px; }
@media (max-width: 1100px) { .wo-atelier-grid { grid-template-columns: repeat(3, 1fr); } }
.wo-atelier-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s, transform .15s; cursor: pointer; text-decoration: none;
}
.wo-atelier-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.woa-top { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.woa-name { font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.woa-count { font-size: 22px; font-weight: 800; color: var(--text3); }
.woa-count.woa-has { color: var(--orange); }
.woa-bottom { display: flex; justify-content: space-between; align-items: center; }
.woa-sub { font-size: 10px; color: var(--text3); }
.woa-action { font-size: 11px; color: var(--accent); font-weight: 600; opacity: 0; transition: opacity .2s; }
.wo-atelier-card:hover .woa-action { opacity: 1; }

.wo-list { display: flex; flex-direction: column; gap: 6px; }
.wo-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  transition: border-color .2s;
}
.wo-row:hover { border-color: var(--border2); }
.wo-row.wo-completed { opacity: .7; }
.wo-row-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.wo-number { font-size: 14px; font-weight: 700; }
.wo-atelier-tag { padding: 3px 10px; border-radius: 5px; font-size: 11px; font-weight: 700; border: 1px solid; }
.wo-row-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.wo-row-meta span { font-size: 11px; color: var(--text2); display: flex; align-items: center; gap: 5px; }
.wo-row-actions { display: flex; gap: 8px; flex-shrink: 0; }

.wo-form-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.wofh-left { display: flex; align-items: center; gap: 10px; }
.wofh-atelier { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.wofh-title { font-size: 14px; color: var(--text2); }
.wofh-actions { display: flex; gap: 10px; align-items: center; }
.selected-count { font-size: 11px; opacity: .8; }
.wo-notes-row { margin-bottom: 14px; }
.wo-table-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; padding: 8px 12px;
  background: var(--card2); border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.check-all-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.wo-items-table .batch-config { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.batch-label { font-size: 10px; color: var(--text3); font-weight: 600; }
.batch-input {
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text); border-radius: 4px; padding: 3px 6px;
  font-size: 12px; font-family: inherit;
}
.batch-input:focus { outline: none; border-color: var(--accent); }

.wo-detail-header { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.wodh-number { font-size: 20px; font-weight: 800; }
.wodh-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wodh-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.wodh-meta span { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.wodh-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wo-select-atelier h3 { color: var(--text2); margin-bottom: 16px; font-size: 16px; }

.atelier-na { color: var(--border2); font-size: 13px; }

/* ─── YÜKLEME PLANI ─────────────────────────────── */
.ready-item-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 6px; padding: 5px 10px;
}
.chip-qty { font-size: 12px; font-weight: 700; color: var(--accent); }

/* ─── LOG GÖRÜNTÜLEYİCİ ────────────────────────── */
.log-line { font-size: 11px; font-family: 'Courier New', monospace; padding: 2px 4px; border-radius: 3px; margin-bottom: 1px; white-space: pre-wrap; word-break: break-all; }
.log-info  { color: var(--text2); }
.log-warn  { color: var(--orange); background: rgba(240,165,0,.06); }
.log-error { color: var(--red);    background: rgba(224,85,85,.08); }
.header-backup { display: flex; align-items: center; gap: 5px; }

/* -- REVİZE EKRANI ---------------------------------------- */
.revize-badge { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.badge-green  { background:rgba(0,201,100,.15); color:#00c964; }
.badge-red    { background:rgba(224,85,85,.15);  color:var(--red); }
.badge-yellow { background:rgba(240,165,0,.15);  color:var(--orange); }
.badge-gray   { background:rgba(255,255,255,.07); color:var(--text3); }
.revize-uyari { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; background:rgba(240,165,0,.12); color:var(--orange); border-radius:6px; font-size:12px; }
.revize-section-green { border-left:3px solid #00c964; }
.revize-section-red   { border-left:3px solid var(--red); }
.revize-section-yellow{ border-left:3px solid var(--orange); }
.revize-table { width:100%; border-collapse:collapse; font-size:12px; }
.revize-table th { padding:6px 10px; text-align:left; color:var(--text3); font-weight:600; font-size:11px; text-transform:uppercase; border-bottom:1px solid var(--border2); }
.revize-table td { padding:6px 10px; border-bottom:1px solid var(--border); color:var(--text2); }
.row-green td { background:rgba(0,201,100,.05); }
.row-red   td { background:rgba(224,85,85,.06); }
.row-yellow td{ background:rgba(240,165,0,.06); }
.qty-old { color:var(--red); text-decoration:line-through; font-size:12px; }
.qty-new { color:#00c964; font-weight:700; font-size:13px; }
.badge-new-product { background:rgba(0,201,167,.2); color:var(--teal); border-radius:4px; font-size:10px; font-weight:700; padding:1px 5px; margin-left:4px; }
.revize-field-change { display:flex; align-items:center; gap:6px; background:rgba(240,165,0,.08); padding:4px 10px; border-radius:6px; font-size:12px; }
.rfc-label { color:var(--text3); font-size:10px; text-transform:uppercase; margin-right:4px; }
.rfc-old   { color:var(--red); text-decoration:line-through; }
.rfc-new   { color:#00c964; font-weight:700; }
.revize-unchanged-summary { cursor:pointer; padding:10px 14px; color:var(--text3); font-size:12px; background:var(--card); border-radius:8px; list-style:none; display:flex; align-items:center; gap:8px; }
.revize-unchanged-summary::-webkit-details-marker { display:none; }

/* ─── PARÇA BOYA SIRASI ─────────────────────────────── */
.part-seq-card { display:flex; flex-direction:column; align-items:center; gap:4px; background:var(--card2); border:1px solid var(--border2); border-radius:8px; padding:8px 12px; min-width:110px; }
.psc-name { font-size:12px; font-weight:600; color:var(--text); text-align:center; }
.psc-qty  { font-size:11px; color:var(--text3); }
.psc-seq-wrap { display:flex; align-items:center; gap:5px; margin-top:2px; }
.psc-seq-label { font-size:10px; color:var(--text3); text-transform:uppercase; }
.psc-seq-input { width:48px; padding:4px 6px; text-align:center; background:var(--card); color:var(--text); border:1px solid var(--teal); border-radius:6px; font-size:13px; font-weight:700; }
.psc-seq-input:focus { outline:none; box-shadow:0 0 0 2px rgba(0,201,167,.3); }
.parts-row:last-child { border-bottom:none !important; }

/* ─── ATÖLYE 3. DURUM: İş emrinde (açık) ─────────── */
.atelier-inprogress { color: var(--orange); font-size: 15px; cursor: pointer; transition: transform .15s, color .15s; display:inline-flex; }
.atelier-inprogress:hover { color: var(--teal); transform: scale(1.25); }

/* ─── TITAN LOGO & BANNER ──────────────────────────── */
.titan-banner { background:linear-gradient(135deg,var(--card) 0%,var(--bg2) 100%); border:1px solid var(--border); border-radius:var(--radius); padding:12px 20px; margin-bottom:16px; overflow:hidden; position:relative; }
.titan-banner::before { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at 20% 50%,rgba(0,201,167,.06) 0%,transparent 60%); pointer-events:none; }
.titan-banner-inner { display:flex; align-items:center; }
.titan-logo-svg { height:80px; width:auto; max-width:340px; }

/* Dönen dişli animasyonlar */
@keyframes gearCW  { from{transform:rotate(0deg)}  to{transform:rotate(360deg)} }
@keyframes gearCCW { from{transform:rotate(0deg)}  to{transform:rotate(-360deg)} }
@keyframes glow { 0%,100%{opacity:.85} 50%{opacity:1;filter:drop-shadow(0 0 6px #00c9a7)} }
.gear-outer { animation:gearCW  40s linear infinite; }
.gear-inner { animation:gearCCW 20s linear infinite; }
.titan-T    { animation:glow 3s ease-in-out infinite; }
.titan-gear-mini { animation:gearCW 40s linear infinite; }

/* ─── SIDEBAR TOOLTIP (collapsed) ─────────────────── */
.sidebar.collapsed .sb-item { position:relative; }
.sidebar.collapsed .sb-item::after {
  content: attr(data-tip);
  position:absolute; left:calc(100% + 10px); top:50%; transform:translateY(-50%);
  background:var(--card2); color:var(--text); font-size:12px; font-weight:500;
  padding:5px 10px; border-radius:6px; white-space:nowrap;
  border:1px solid var(--border2); box-shadow:var(--shadow);
  opacity:0; pointer-events:none; transition:opacity .15s;
  z-index:1000;
}
.sidebar.collapsed .sb-item:hover::after { opacity:1; }

/* ─── HEADER KULLANICI ALANI ───────────────────────── */
.header-user { display:flex; flex-direction:column; align-items:flex-end; margin-right:8px; line-height:1.3; }

/* ─── OC CONTACT (İlgili kişi) ─────────────────────── */
.oc-contact { font-size:11px; color:var(--text3); }

/* ═══════════════════════════════════════════════════════
   MOBİL UYUM  ≤ 768px
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Sidebar: off-canvas overlay ── */
  .sidebar {
    position: fixed;
    top: 0; left: -220px;
    height: 100vh;
    width: 220px !important;
    min-width: 220px !important;
    z-index: 300;
    transition: left .25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,.5);
  }
  .sidebar.mobile-open { left: 0; }
  /* Collapsed class masaüstünde geçerli, mobilde görmezden gel */
  .sidebar.collapsed { width: 220px !important; min-width: 220px !important; }
  .sidebar.collapsed .sb-item span,
  .sidebar.collapsed .sb-username,
  .sidebar.collapsed .sb-role { display: block; }
  .sidebar.collapsed .sb-item { justify-content: flex-start; padding: 10px 12px; }
  .sidebar.collapsed .sb-footer { padding: 12px; }
  .sidebar.collapsed .sb-user-info { display: block; }

  /* Sidebar backdrop */
  .sb-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 299;
  }
  .sb-backdrop.visible { display: block; }

  /* ── App main: full width ── */
  .app-body { overflow: auto; }
  .app-main {
    width: 100%;
    min-width: 0;
    overflow-y: auto;
    overflow-x: clip;   /* clip: layout kesmez, görsel taşmayı keser */
  }
  .page-content { overflow-x: visible; min-width: 0; }

  /* ── Header ── */
  .app-header {
    grid-template-columns: auto 1fr auto;
    padding: 0 10px;
    height: 54px;
  }
  .header-brand { display: none; }
  .header-center { display: none; }
  .header-backup { display: none; }
  .header-page-title { font-size: 12px; }
  .header-clock { font-size: 15px; }

  /* ── Page content ── */
  .page-content { padding: 10px; }

  /* ── Stats kartları: 2 sütun ── */
  .stats-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 22px; }

  /* ── Dashboard ── */
  .dashboard-body {
    flex-direction: column;
    gap: 10px;
  }
  .dashboard-main { min-width: 0; }
  .dashboard-sidebar {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── Order card header ── */
  .order-card-header {
    flex-wrap: wrap;
    padding: 10px 12px !important;
    gap: 6px;
  }
  .oc-left { flex-wrap: wrap; gap: 4px; }
  .oc-center { width: 100%; order: 10; }
  .oc-right { gap: 6px; flex-wrap: wrap; }
  .progress-bar-wrap { min-width: 80px; }

  /* ── Order card: overflow hidden'ı kaldır, içteki scroll çalışsın ── */
  .order-card { overflow: visible; }

  /* ── Order card body: gerçek scroll container ── */
  .order-card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Sayfanın genişliğini aşmasın */
    max-width: calc(100vw - 20px);
  }
  .items-table-wrap { overflow-x: visible; padding: 8px 10px; }
  .items-table { font-size: 11px; }
  .items-table th, .items-table td { padding: 5px 7px; white-space: nowrap; }
  .items-table .atelier-btn { width: 22px; height: 22px; font-size: 12px; }

  /* ── Yükleme butonu ── */
  .oc-btn-load { padding: 6px 10px; font-size: 11px; }

  /* ── Alert banner ── */
  .alert-banner { flex-wrap: wrap; font-size: 11px; gap: 4px; padding: 8px 12px; }

  /* ── Siparişler listesi ── */
  .order-row-card { padding: 10px 12px; }
  .orc-main { flex-direction: column; align-items: flex-start; gap: 6px; }
  .orc-meta { flex-wrap: wrap; gap: 6px; }
  .orc-actions { flex-wrap: wrap; gap: 6px; }
  .orc-actions a, .orc-actions button { font-size: 11px; padding: 5px 8px; }

  /* ── Önizleme tablosu ── */
  .preview-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .preview-table th, .preview-table td { padding: 6px 8px; font-size: 11px; white-space: nowrap; }

  /* ── Ürün kütüphanesi ── */
  .products-table-wrap { overflow-x: auto; }
  .data-table th, .data-table td { padding: 6px 8px; font-size: 11px; }

  /* ── İş emirleri ── */
  .wo-atelier-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  /* ── Modals: tam genişlik ── */
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
    margin: 0;
  }

  /* ── Buton grupları ── */
  .preview-actions {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .preview-actions button, .preview-actions a { width: 100%; text-align: center; }

  /* ── Yeni iş emri sayfası ── */
  .wo-new-wrap { padding: 10px; }
  .pending-items-table th,
  .pending-items-table td { padding: 6px 8px; font-size: 11px; }

  /* ── Flash mesajları ── */
  .flash { font-size: 12px; padding: 8px 12px; }

  /* ── Page toolbar ── */
  .page-toolbar { flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
  .toolbar-right { flex-wrap: wrap; gap: 6px; }

  /* ── Yükleme planı ── */
  .truck-card { padding: 10px; }
  .truck-items-table { overflow-x: auto; display: block; }

  /* ── Atölye check etiketleri ── */
  .atelier-check-tag { font-size: 10px; padding: 3px 6px; }
}

/* ── Sidebar kapalıyken ana içerik tam genişlik (masaüstü) ── */
.app-main.sidebar-collapsed { margin-left: 0; }
