/* ==========================================================================
   AYBENİZ GRAFİK TASARIM & BASKI AJANSI
   Modern Design System & Component Library (Clean Light Theme)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Clean White & Soft Grey */
  --bg-app: #f8fafc; /* Yumuşak açık gri zemin */
  --bg-surface: #ffffff; /* Saf beyaz kartlar */
  --bg-surface-elevated: #f1f5f9; /* Kart içi açık gri bölümler */
  --bg-surface-hover: #e2e8f0;
  
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #2563eb;

  --text-primary: #0f172a; /* Derin okunabilir koyu gri */
  --text-secondary: #475569; /* Açıklayıcı ara metinler */
  --text-muted: #94a3b8; /* Hafif metinler */
  --text-inverse: #ffffff;

  /* Accent Colors */
  --brand-primary: #2563eb; /* Modern Royal Blue */
  --brand-primary-hover: #1d4ed8;
  --brand-secondary: #0891b2; /* Cyan */
  --accent-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --brand-glow: rgba(37, 99, 235, 0.15);

  /* Status Colors (Pastel & Net Okunabilir) */
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-bg: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-bg: #fee2e2;
  --color-info: #0284c7;
  --color-info-bg: #e0f2fe;
  --color-purple: #7c3aed;
  --color-purple-bg: #f5f3ff;

  /* Spacing & Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Elevation (Soft Shadows) */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px var(--brand-glow);

  /* Sidebar */
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 72px;
  --topbar-height: 64px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  height: var(--topbar-height);
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-header:hover {
  background: var(--bg-hover);
}

.brand-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: transform var(--transition-fast);
}

.sidebar-header:hover .brand-logo-badge {
  transform: scale(1.05);
}

.brand-details {
  overflow: hidden;
  white-space: nowrap;
}

.brand-details h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-details p {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px 12px 6px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: #eff6ff;
  color: var(--brand-primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--brand-primary);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.75;
}

.nav-item.active .icon {
  opacity: 1;
  color: var(--brand-primary);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: var(--text-secondary);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  white-space: nowrap;
  overflow: hidden;
}

.storage-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   SIDEBAR DARALTILMIŞ (COLLAPSED / SOLA YANAŞIK) DURUMU
   ========================================================================== */
.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar-header {
  padding: 0;
  justify-content: center;
}

.sidebar-collapsed .brand-details,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .nav-badge,
.sidebar-collapsed .sidebar-footer {
  display: none !important;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}

.sidebar-collapsed .nav-item.active::before {
  left: 2px;
}

.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-collapsed-width);
}

/* Main Area */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Topbar */
.app-topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

/* Sidebar Toggle Butonu */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Page Content */
.content-body {
  padding: 24px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: #94a3b8;
}

.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-success:hover {
  background: #059669;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1eb857;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

/* Cards & Containers */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

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

.card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.stat-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.stat-icon.indigo {
  background: #eff6ff;
  color: #2563eb;
}
.stat-icon.emerald {
  background: #ecfdf5;
  color: #059669;
}
.stat-icon.amber {
  background: #fffbeb;
  color: #d97706;
}
.stat-icon.cyan {
  background: #ecfeff;
  color: #0891b2;
}
.stat-icon.rose {
  background: #fef2f2;
  color: #dc2626;
}

/* Alert Banner */
.alert-banner {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.alert-banner .icon {
  font-size: 20px;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

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

.status-new {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.status-design {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-approval {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.status-revision {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
}
.status-print {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.status-ready {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-delivered {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.status-archived {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.priority-normal {
  color: var(--text-muted);
}
.priority-urgent {
  color: #d97706;
  font-weight: 700;
}
.priority-critical {
  color: #dc2626;
  font-weight: 800;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.badge-warning {
  background: #fef3c7;
  color: #b45309;
}
.badge-info {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.table tr:hover td {
  background: #f8fafc;
  color: var(--text-primary);
}

.cell-bold {
  font-weight: 600;
  color: var(--text-primary);
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: calc(100vh - 220px);
}

.kanban-col {
  width: 310px;
  min-width: 310px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  box-shadow: var(--shadow-sm);
}

.kanban-col-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.kanban-col-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: var(--text-secondary);
}

.kanban-cards {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
}

.kanban-order-no {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--brand-primary);
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.35;
}

.kanban-card-customer {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-12 { grid-column: span 12; }
.col-11 { grid-column: span 11; }
.col-10 { grid-column: span 10; }
.col-9 { grid-column: span 9; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-1 { grid-column: span 1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

/* Native Modal / Dialog */
dialog.modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  width: 580px;
  margin: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

dialog.modal::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.close-btn:hover {
  color: var(--text-primary);
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #10b981;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Flash Messages */
.flash-msg {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flash-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.flash-error {
  background: #fef2f2;
  border: 1px solid #fecdd3;
  color: #b91c1c;
}

/* Responsive */
@media (max-width: 1024px) {
  .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0 !important;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .sidebar-toggle-btn {
    display: none;
  }

  /* Mobil Üst Bar: Çentik / Saat Çakışmasını Kesin Olarak Engelleyen Yapı */
  .app-topbar {
    height: auto !important;
    min-height: 56px !important;
    padding-top: max(44px, env(safe-area-inset-top, 44px)) !important;
    padding-bottom: 10px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    gap: 10px !important;
  }
  .topbar-title {
    flex: 1;
    min-width: 0;
    gap: 10px;
  }
  .topbar-title h2 {
    font-size: 15px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 150px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
  }
  .topbar-actions {
    gap: 6px !important;
    flex-shrink: 0;
  }
  .topbar-desktop-only {
    display: none !important;
  }
  #theme-toggle-btn .theme-text {
    display: none !important;
  }
  #theme-toggle-btn {
    padding: 5px 8px !important;
  }
  .topbar-user-name {
    display: none !important;
  }
  .topbar-user-section {
    margin-left: 2px !important;
    padding-left: 6px !important;
  }

  /* Mobil Gövde ve Alt Boşluk (Alttaki Barın Üstünü Örtmesini Önler) */
  .content-body {
    padding: 14px 12px !important;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 20px)) !important;
  }

  /* Form Kolonları Mobilde Dikey Oturur */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
  .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    grid-column: span 1 / span 1 !important;
    width: 100% !important;
  }

  /* İstatistik Kartları */
  .stat-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }
  .stat-card {
    padding: 16px 14px !important;
  }
  .stat-value {
    font-size: 22px !important;
  }

  /* Sipariş Detayı Butonları: Mobilde 2 Kolon Grid */
  .order-detail-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    margin-top: 10px;
  }
  .order-detail-actions .btn {
    justify-content: center;
    font-size: 11.5px !important;
    padding: 8px 6px !important;
    text-align: center;
  }

  /* Teknik Özellikler: 3 Kolon Yerine 2 Kolon */
  .specs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .spec-card {
    padding: 9px 10px !important;
  }
  .spec-value {
    font-size: 13px !important;
  }
  .spec-value-primary {
    font-size: 15px !important;
  }

  /* Kanban: Mobilde Rahat Kaydırılabilir Kartlar */
  .kanban-board {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 24px;
  }
  .kanban-col {
    width: 82vw !important;
    min-width: 82vw !important;
    scroll-snap-align: center;
    max-height: 72vh;
  }
}

/* Specs & Detail Actions Desktop Defaults */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.spec-card {
  background: var(--bg-surface-elevated);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.spec-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.spec-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}
.spec-value-primary {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-primary);
}
.order-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   DARK THEME (SİYAH / KOYU MOD) SEÇENEĞİ
   ========================================================================== */
[data-theme="dark"] {
  --bg-app: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #26334d;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0b0f19;

  --brand-primary: #3b82f6;
  --brand-primary-hover: #2563eb;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .app-sidebar {
  background: var(--bg-surface);
  border-right-color: var(--border-subtle);
  box-shadow: 1px 0 5px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .brand-logo-badge {
  background: var(--brand-primary);
}

[data-theme="dark"] .nav-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

[data-theme="dark"] .nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--brand-primary);
}

[data-theme="dark"] .nav-badge {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
}

[data-theme="dark"] .app-topbar {
  background: var(--bg-surface);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .card {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .stat-card {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .table th {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .table td {
  border-bottom-color: var(--border-subtle);
  color: var(--text-secondary);
}

[data-theme="dark"] .table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

[data-theme="dark"] .kanban-col {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .kanban-col-header {
  background: var(--bg-surface-elevated);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .kanban-cards {
  background: var(--bg-app);
}

[data-theme="dark"] .kanban-card {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .form-control {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

[data-theme="dark"] .modal-content {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

[data-theme="dark"] .btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

[data-theme="dark"] .sidebar-toggle-btn {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

[data-theme="dark"] .sidebar-toggle-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

[data-theme="dark"] .badge-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .alert-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .alert-banner a {
  color: #fca5a5 !important;
}

[data-theme="dark"] .stat-icon.indigo {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
[data-theme="dark"] .stat-icon.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
[data-theme="dark"] .stat-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
[data-theme="dark"] .stat-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}
[data-theme="dark"] .stat-icon.rose {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

[data-theme="dark"] .status-new {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}
[data-theme="dark"] .status-design {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .status-approval {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.35);
}
[data-theme="dark"] .status-revision {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.35);
}
[data-theme="dark"] .status-print {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border-color: rgba(2, 132, 199, 0.35);
}
[data-theme="dark"] .status-ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .status-delivered {
  background: rgba(5, 150, 105, 0.25);
  color: #10b981;
  border-color: rgba(5, 150, 105, 0.4);
}
[data-theme="dark"] .status-archived {
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.4);
}
[data-theme="dark"] .status-cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }

/* ==========================================================================
   Evrensel Modern Onay Penceresi (Custom Confirmation Modal)
   ========================================================================== */
dialog.app-confirm-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: min(440px, calc(100vw - 32px));
  width: 100%;
  max-height: calc(100vh - 40px);
  margin: auto;
  border-radius: var(--radius-xl);
  overflow: visible;
  outline: none;
  box-sizing: border-box;
}

dialog.app-confirm-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: confirmBackdropFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes confirmBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirmModalPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-modal-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 24px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  box-sizing: border-box;
  animation: confirmModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .confirm-modal-box {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.confirm-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.confirm-icon-wrapper svg {
  width: 26px;
  height: 26px;
}

.confirm-icon-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.05);
}

.confirm-icon-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.05);
}

.confirm-icon-info {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.05);
}

.confirm-icon-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.05);
}

.confirm-content {
  margin-bottom: 20px;
  width: 100%;
  max-height: 45vh;
  overflow-y: auto;
  padding: 0 4px;
  box-sizing: border-box;
}

.confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.confirm-message {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-actions .btn {
  flex: 1;
  min-width: 110px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  justify-content: center;
  transition: all 0.15s ease;
}

.confirm-actions .btn:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   PWA & MOBİL UYGULAMA DENEYİMİ (NATIVE APP FEEL)
   ========================================================================== */

/* Masaüstünde gizle */
.mobile-bottom-nav {
  display: none;
}
.pwa-install-banner {
  display: none;
}

@media (max-width: 768px) {
  /* Alttaki navigasyon için ana gövdeye güvenli boşluk */
  .content-body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 12px)) !important;
  }

  /* Mobil Alt Bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 990;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
  }

  [data-theme="dark"] .mobile-bottom-nav {
    background: rgba(17, 24, 39, 0.95);
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    height: 100%;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item:active {
    color: var(--brand-primary);
  }

  .mobile-nav-item.active {
    color: var(--brand-primary);
  }

  .mobile-nav-item.active .mobile-nav-icon {
    stroke: var(--brand-primary);
    stroke-width: 2.3;
    transform: translateY(-1px);
  }

  .mobile-nav-icon {
    width: 21px;
    height: 21px;
    transition: transform 0.15s ease;
  }

  /* Ortadaki Vurgulu + Yeni Sipariş Butonu */
  .mobile-nav-item-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
    height: 100%;
    margin-top: -16px;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-center-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-nav-center-btn:active {
    transform: scale(0.92);
  }

  .mobile-nav-item-center.active .mobile-nav-center-btn {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3), 0 4px 14px rgba(37, 99, 235, 0.5);
  }

  /* PWA Kurulum Bildirim Barı */
  .pwa-install-banner {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: 14px;
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 995;
    animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes pwaSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.pwa-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.pwa-banner-desc {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pwa-close-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
}

.pwa-close-btn:hover {
  color: var(--text-primary);
}


