/* ============================================================
   DYESYN PTS - Premium Design System
   ============================================================ */

:root {
  /* Core palette */
  --navy-900: #0a0f1e;
  --navy-800: #0d1526;
  --navy-700: #111d35;
  --navy-600: #162244;
  --navy-500: #1e3a5f;
  --navy-400: #2d5282;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;

  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-300: #6ee7b7;
  --emerald-100: #d1fae5;

  --white: #ffffff;
  --black: #000000;

  /* Semantic */
  --bg-primary:    var(--white);
  --bg-secondary:  var(--slate-50);
  --bg-card:       var(--white);
  --bg-sidebar:    var(--navy-900);
  --text-primary:  var(--slate-900);
  --text-secondary: var(--slate-600);
  --text-muted:    var(--slate-400);
  --border:        var(--slate-200);
  --border-hover:  var(--slate-300);

  /* Accent */
  --accent:        var(--emerald-500);
  --accent-dark:   var(--emerald-700);
  --accent-light:  var(--emerald-100);

  /* Status colors */
  --status-bekliyor:      #6366f1;
  --status-premix:        #f59e0b;
  --status-lab:           #8b5cf6;
  --status-final:         #3b82f6;
  --status-filtrasyonda:  #06b6d4;
  --status-dolum:         #f97316;
  --status-hazir:         #10b981;
  --status-sevk:          #059669;
  --status-iptal:         #ef4444;

  /* Spacing */
  --sidebar-width: 240px;
  --sidebar-collapsed: 68px;
  --header-h: 64px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl:  0 20px 50px rgba(0,0,0,.15);
  --shadow-glow: 0 0 0 3px rgba(16,185,129,.2);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;

  /* Font */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary:    var(--slate-900);
  --bg-secondary:  var(--slate-800);
  --bg-card:       var(--slate-800);
  --bg-sidebar:    #070b15;
  --text-primary:  var(--slate-100);
  --text-secondary: var(--slate-400);
  --text-muted:    var(--slate-500);
  --border:        var(--slate-700);
  --border-hover:  var(--slate-600);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-base), color var(--t-base);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, [type="button"], [type="submit"] { cursor: pointer; }
input, select, textarea, button { font-family: inherit; }

/* ============================================================
   Layout
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--t-base), transform var(--t-base);
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  min-height: var(--header-h);
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16,185,129,.4);
}

.sidebar-logo-icon svg { width: 20px; height: 20px; color: white; }

.sidebar-logo-text {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity var(--t-base), width var(--t-base);
}

.sidebar-logo-text .brand { 
  font-size: 15px; font-weight: 700; color: white; 
  letter-spacing: -0.3px;
}
.sidebar-logo-text .sub { 
  font-size: 10px; color: rgba(255,255,255,.4); 
  text-transform: uppercase; letter-spacing: 0.8px;
}

.sidebar.collapsed .sidebar-logo-text { opacity: 0; width: 0; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.nav-section { margin-bottom: 4px; }
.nav-section-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,.25);
  padding: 8px 10px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--t-base);
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}

.nav-item.active {
  background: rgba(16,185,129,.12);
  color: var(--emerald-400);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--emerald-500);
  border-radius: 0 4px 4px 0;
}

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item-text { overflow: hidden; transition: opacity var(--t-base), width var(--t-base); }
.sidebar.collapsed .nav-item-text { opacity: 0; width: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--emerald-500);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  flex-shrink: 0;
}
.sidebar.collapsed .nav-badge { display: none; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
}
.sidebar-user:hover { background: rgba(255,255,255,.06); }

.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--navy-500), var(--emerald-700));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  flex-shrink: 0;
}

.user-info { overflow: hidden; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: rgba(255,255,255,.35); }

.sidebar.collapsed .user-info { display: none; }

/* ============================================================
   Main Content
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--t-base);
}

.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

/* Top Header */
.top-header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.9);
}

[data-theme="dark"] .top-header {
  background: rgba(30,41,59,.9);
}

.header-title {
  font-size: 17px; font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.header-breadcrumb {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.header-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  cursor: pointer;
  position: relative;
}
.header-btn:hover { 
  background: var(--bg-secondary); 
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--emerald-500);
  border-radius: 50%;
  border: 2px solid white;
}

/* Page Content */
.page-content {
  padding: 24px;
  flex: 1;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 20px; }
.card-footer { 
  padding: 12px 20px; 
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.stat-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}

.stat-card-icon svg { width: 22px; height: 22px; }

.stat-card-value {
  font-size: 28px; font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card-label {
  font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary);
}

.stat-card-change {
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.stat-card-change.up { color: var(--emerald-600); }
.stat-card-change.down { color: #ef4444; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600;
  border: none;
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--emerald-600);
  color: white;
}
.btn-primary:hover { background: var(--emerald-700); box-shadow: var(--shadow-glow); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--slate-200); }

.btn-danger {
  background: #ef4444;
  color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-warning {
  background: #f59e0b;
  color: white;
}
.btn-warning:hover { background: #d97706; }

.btn-info {
  background: #3b82f6;
  color: white;
}
.btn-info:hover { background: #2563eb; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 8px; }

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  background: var(--bg-secondary);
  padding: 11px 14px;
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: var(--bg-secondary); }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .4px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-glow);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.input-group {
  display: flex;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.input-group .form-control {
  border: none;
  border-radius: 0;
  flex: 1;
}
.input-group .form-control:focus { box-shadow: none; }
.input-group-text {
  padding: 9px 12px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

/* ============================================================
   Badges / Status
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-bekliyor    { background: rgba(99,102,241,.12); color: #6366f1; }
.badge-premix      { background: rgba(245,158,11,.12); color: #d97706; }
.badge-lab         { background: rgba(139,92,246,.12); color: #8b5cf6; }
.badge-final       { background: rgba(59,130,246,.12); color: #3b82f6; }
.badge-filtrasyonda{ background: rgba(6,182,212,.12); color: #06b6d4; }
.badge-dolum       { background: rgba(249,115,22,.12); color: #f97316; }
.badge-hazir       { background: rgba(16,185,129,.12); color: #059669; }
.badge-sevk        { background: rgba(5,150,105,.15); color: #059669; }
.badge-tamamlandi  { background: rgba(16,185,129,.12); color: #10b981; }
.badge-iptal       { background: rgba(239,68,68,.12); color: #ef4444; }
.badge-onaylandi   { background: rgba(16,185,129,.12); color: #059669; }
.badge-revizyon    { background: rgba(245,158,11,.12); color: #d97706; }
.badge-red         { background: rgba(239,68,68,.12); color: #ef4444; }
.badge-aktif       { background: rgba(16,185,129,.12); color: #059669; }
.badge-pasif       { background: rgba(100,116,139,.12); color: #64748b; }

/* Priority */
.badge-acil   { background: rgba(239,68,68,.12); color: #ef4444; }
.badge-yuksek { background: rgba(245,158,11,.12); color: #d97706; }
.badge-normal { background: rgba(100,116,139,.1); color: #64748b; }

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(.95) translateY(10px);
  transition: transform var(--t-base);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-end;
  background: var(--bg-secondary);
}

/* ============================================================
   Kanban
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-column {
  min-width: 240px; width: 240px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 180px);
}

.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

.kanban-col-title {
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}

.kanban-col-count {
  margin-left: auto;
  background: var(--border);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}

.kanban-card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 12px;
  cursor: grab;
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}
.kanban-card.dragging {
  opacity: .5;
  cursor: grabbing;
}

.kanban-card-batch {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.kanban-card-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.kanban-card-meta {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

.kanban-card-operator {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-muted);
}

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: 13.5px;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: var(--emerald-100); border-color: #a7f3d0; color: var(--emerald-900); }
.alert-danger   { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }
.alert-warning  { background: #fef3c7; border-color: #fde68a; color: #78350f; }
.alert-info     { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ============================================================
   Progress
   ============================================================ */
.progress {
  height: 6px;
  background: var(--slate-200);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--emerald-500);
  border-radius: 99px;
  transition: width var(--t-slow);
}

/* ============================================================
   Utilities
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Grid */
.grid { display: grid; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   Stock Critical Indicator
   ============================================================ */
.stock-critical { color: #ef4444 !important; font-weight: 700; }
.stock-low      { color: #f59e0b !important; font-weight: 600; }
.stock-ok       { color: var(--emerald-600) !important; }

/* ============================================================
   Loading & Skeleton
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--emerald-500);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Toast Notifications
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  background: var(--slate-900);
  color: white;
  padding: 12px 16px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  min-width: 280px; max-width: 380px;
  animation: toast-in .3s ease;
  border-left: 4px solid var(--emerald-500);
}
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #3b82f6; }

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   Drag over state for Kanban
   ============================================================ */
.kanban-cards.drag-over {
  background: rgba(16,185,129,.06);
  border: 2px dashed var(--emerald-400);
  border-radius: var(--r-md);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .kanban-board { flex-direction: column; }
  .kanban-column { width: 100%; min-width: unset; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .sidebar, .top-header, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .page-content { padding: 0; }
}
