/* ==========================================================================
   MD MEYSADESIGN WMS — PREMIUM PLUS LAYERED DEPTH & DYNAMIC AURA SYSTEM
   ========================================================================== */

:root {
  --bg-color: #f8fafc;
  --panel-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #f1f5f9;
  --secondary-hover: #e2e8f0;
  --accent-color: #10b981;
  --accent-hover: #059669;
  
  --color-normal: #10b981;
  --color-followup: #f59e0b;
  --color-urgent: #ef4444;
  --color-critical: #e11d48;
  
  /* PREMIUM PLUS LAYERED DEPTH SHADOWS (Katmanlı Derinlik) */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.22);
  
  /* RENKLİ AURA EFEKTLERİ (Color Aura Glows) */
  --aura-primary: 0 10px 25px -5px rgba(79, 70, 229, 0.35);
  --aura-accent: 0 10px 25px -5px rgba(16, 185, 129, 0.35);
  --aura-warning: 0 10px 25px -5px rgba(245, 158, 11, 0.35);
  --aura-danger: 0 10px 25px -5px rgba(239, 68, 68, 0.35);
  --aura-pink: 0 10px 25px -5px rgba(236, 72, 153, 0.35);
}

.hidden {
  display: none !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografi & Detaylar (Executive Airy Spacing) */
h1, h2, h3, h4, h5, .brand-text h1, .metric-info h2 {
  font-family: 'Outfit', 'Poppins', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

label, th, .badge, .metric-info h4 {
  letter-spacing: 0.03em;
}

/* Utility */
.hidden { display: none !important; }

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* RENKLİ AURA EFEKTİ SINAFLARI (Color Aura Container & Glows) */
.icon-aura-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  z-index: 1;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-aura-container::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 24px;
  background: inherit;
  filter: blur(18px);
  opacity: 0.35;
  z-index: -1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.metric-card:hover .icon-aura-container {
  transform: scale(1.1) rotate(4deg);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover .icon-aura-container::before {
  opacity: 0.75;
  transform: scale(1.2);
}

.aura-purple::before { background: linear-gradient(135deg, #4f46e5, #a855f7); }
.aura-green::before  { background: linear-gradient(135deg, #10b981, #059669); }
.aura-orange::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
.aura-red::before    { background: linear-gradient(135deg, #ef4444, #e11d48); }
.aura-blue::before   { background: linear-gradient(135deg, #0ea5e9, #3b82f6); }
.aura-pink::before   { background: linear-gradient(135deg, #ec4899, #8b5cf6); }

.dashboard-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Katmanlı Derinlik - Sidebar */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 0.5rem 1rem;
  z-index: 20;
  box-shadow: var(--shadow-lg);
  max-height: 100vh;
  overflow: hidden;
}

.sidebar-header {
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.4rem;
  margin-bottom: 0.5rem;
}

/* Şık & Premium Kaydırma Çubuğu (Scrollbar) */
.sidebar-nav::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.tab-pane::-webkit-scrollbar,
div::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.sidebar-nav::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track,
.tab-pane::-webkit-scrollbar-track,
div::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb,
.tab-pane::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover,
.tab-pane::-webkit-scrollbar-thumb:hover,
div::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.65);
}

.sidebar-nav .tab-btn {
  width: 100%;
  text-align: left;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-nav .tab-btn span.tab-emoji {
  display: inline-block;
  font-size: 1.15rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-nav .tab-btn:hover {
  background: rgba(241, 245, 249, 0.9);
  color: var(--text-main);
  transform: translateX(6px);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm);
}

.sidebar-nav .tab-btn:hover span.tab-emoji {
  transform: scale(1.3) rotate(12deg);
}

.sidebar-nav .tab-btn.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(168, 85, 247, 0.08));
  color: var(--primary-color);
  font-weight: 700;
  border: 1px solid rgba(79, 70, 229, 0.25);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

/* Katmanlı Derinlik & Ambient Aura - Ana İçerik */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--bg-color);
  position: relative;
  z-index: 10;
}

.main-content::before {
  content: '';
  position: fixed;
  top: -10%; left: 25%;
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.main-content::after {
  content: '';
  position: fixed;
  bottom: -10%; right: 5%;
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(70px);
  z-index: -1;
  pointer-events: none;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 2.25rem;
}

.brand-text h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #a855f7, #6366f1, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.control-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
}

.control-badge label {
  color: var(--text-muted);
}

.control-badge select {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  width: auto;
}

.simulation-badge {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.btn-mini {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mini:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* Tabs Menu */
.view-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  max-width: fit-content;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
  color: var(--primary-color);
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Tab panes toggler */
.tab-pane {
  display: none;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.tab-pane.active {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 0;
}

/* SLA Status Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-normal {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-normal);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-followup {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-followup);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-urgent {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-urgent);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-critical {
  background: rgba(236, 72, 153, 0.15);
  color: var(--color-critical);
  border: 1px solid rgba(236, 72, 153, 0.3);
  animation: pulse-border 1.5s infinite alternate;
}

/* Katmanlı Derinlik & Renkli Aura - Metrics Row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: visible;
}

.metric-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(79, 70, 229, 0.4);
}

.metric-card.border-critical {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: var(--aura-pink);
}

.metric-icon {
  font-size: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.metric-card:hover .metric-icon {
  transform: scale(1.15) rotate(6deg);
}

.metric-info h4 {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.metric-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.metric-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

.sla-mini-distribution {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

/* Grids */
.pane-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
}

.pane-grid-equal {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .pane-grid, .pane-grid-equal {
    grid-template-columns: 1fr;
  }
}

/* Katmanlı Derinlik & Buzlu Cam - Cards (Glassmorphism) */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(226, 232, 240, 0.9);
}

.card-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Forms - Executive Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group.col {
  flex: 1;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

input, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

input:focus, select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), var(--shadow-sm);
  background: #ffffff;
  transform: translateY(-1px);
}

.form-help {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 0.15rem;
}

/* Katmanlı Derinlik & Dinamik Hareket - Buttons */
.btn {
  width: 100%;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #ec4899);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  opacity: 0.98;
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--aura-primary), 0 8px 20px rgba(236, 72, 153, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.3);
}

/* Tables */
.scroll-panel-large {
  max-height: 480px;
  overflow-y: auto;
}

.scroll-panel-med {
  max-height: 250px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.data-table th, .data-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.data-table tr.critical-row {
  background: rgba(236, 72, 153, 0.04);
  border-left: 3px solid var(--color-critical);
}

.data-table tr.urgent-row {
  background: rgba(239, 68, 68, 0.02);
  border-left: 3px solid var(--color-urgent);
}

/* Barcode scan visualizer */
.barcode-visualizer {
  height: 120px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: laser-slide 2.5s infinite ease-in-out;
}

.scan-laser-icon {
  font-size: 3rem;
  opacity: 0.2;
}

/* Feedback panel */
.scan-feedback {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 6px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  text-align: center;
}

.scan-success-alert {
  color: var(--color-normal);
  font-weight: 500;
}

.scan-error-alert {
  color: var(--color-urgent);
  font-weight: 500;
}

/* Sync log area */
.sync-info-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 0.65rem;
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

.sync-logs {
  list-style: none;
  max-height: 80px;
  overflow-y: auto;
  margin-top: 0.25rem;
}

.sync-logs li {
  color: var(--text-muted);
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

/* Timeline Activity logs */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.timeline-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.72rem;
}

.timeline-icon {
  font-size: 1.15rem;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-grow: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.timeline-header span {
  color: var(--secondary-color);
}

.timeline-time {
  color: var(--text-muted);
  font-size: 0.6rem;
}

.timeline-detail {
  color: var(--text-muted);
}

/* Animations */
@keyframes laser-slide {
  0% { top: 10%; }
  50% { top: 90%; }
  100% { top: 10%; }
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 4px rgba(236, 72, 153, 0.2); }
  100% { box-shadow: 0 0 12px rgba(236, 72, 153, 0.6); }
}

@keyframes pulse-red {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.pulse-red {
  animation: pulse-red 1s infinite alternate;
}

@keyframes bounce-alert {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.15) translateY(-4px); filter: drop-shadow(0 4px 10px rgba(236, 72, 153, 0.5)); }
}

.text-critical {
  color: var(--color-critical);
}

/* Footer */
.main-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* HeloTalk Chat Widget Styles */
.helotalk-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.helotalk-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); /* Brand Accent */
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.helotalk-trigger:hover {
  transform: scale(1.1) rotate(5deg);
}

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff3b30;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-color);
  animation: pulse-red 1s infinite alternate;
}

/* Chat Window */
.helotalk-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 360px;
  height: 480px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: none; /* JS ile açılır */
  flex-direction: column;
  overflow: hidden;
  animation: slide-in-chat 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.helotalk-window.open {
  display: flex;
}

@keyframes slide-in-chat {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Chat Header */
.helotalk-header {
  background: linear-gradient(135deg, #1f2937, #111827);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: white;
  position: relative;
}

.helotalk-avatar {
  width: 38px;
  height: 38px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.helotalk-title-area h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.helotalk-title-area p {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 500;
}

.helotalk-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
}

.helotalk-close:hover {
  color: white;
}

/* Chat Messages Body */
.helotalk-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.message {
  max-width: 80%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.bot-message {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.user-message {
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 2px;
  align-self: flex-end;
}

/* Suggestions buttons */
.quick-suggests {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
  max-width: 90%;
}

.suggest-btn {
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggest-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: white;
  transform: translateX(3px);
}

/* Chat Footer */
.helotalk-footer {
  padding: 0.75rem;
  display: flex;
  gap: 0.5rem;
  background: #111827;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.helotalk-footer input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  outline: none;
}

.helotalk-footer button {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.helotalk-footer button:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* --- LIGHT & DARK MODE THEMES --- */
body.light-mode {
  --bg-color: #f3f4f6;
  --panel-bg: rgba(255, 255, 255, 0.7);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #1f2937;
  --text-muted: #6b7280;
  
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #0284c7;
  --secondary-hover: #0369a1;
  --accent-color: #d97706;
  --accent-hover: #b45309;
}

body.light-mode {
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.04) 0px, transparent 50%);
}

body.light-mode .card,
body.light-mode .metric-card,
body.light-mode .control-badge,
body.light-mode .sync-info-box {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-mode .data-table th {
  background: rgba(0, 0, 0, 0.03);
  color: #374151;
}

body.light-mode .data-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #4b5563;
}

body.light-mode .helotalk-window {
  background: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-mode .helotalk-header {
  background: #f3f4f6;
  color: #1f2937;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .helotalk-footer {
  background: #f9fafb;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .helotalk-footer input {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

body.light-mode .bot-message p {
  background: #e5e7eb;
  color: #1f2937;
}

/* Theme Toggle Button in Header */
.btn-theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.08);
}

body.light-mode .btn-theme-toggle {
  background: rgba(0, 0, 0, 0.05);
}

/* --- INTERACTIVE WAREHOUSE LAYOUT & HEATMAP --- */
.warehouse-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 5px;
}

.warehouse-slot-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  border-left: 4px solid #9ca3af;
}

body.light-mode .warehouse-slot-card {
  background: rgba(0, 0, 0, 0.02);
}

.warehouse-slot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.warehouse-slot-card.status-empty {
  border-left-color: var(--color-normal);
  background: rgba(16, 185, 129, 0.04);
}

.warehouse-slot-card.status-medium {
  border-left-color: var(--color-followup);
  background: rgba(245, 158, 11, 0.04);
}

.warehouse-slot-card.status-full {
  border-left-color: var(--color-urgent);
  background: rgba(239, 68, 68, 0.04);
}

.slot-code {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.slot-zone {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.slot-fill-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-top: 4px;
  overflow: hidden;
}

body.light-mode .slot-fill-bar-bg {
  background: rgba(0, 0, 0, 0.08);
}

.slot-fill-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.slot-fill-bar-fill.green { background: var(--color-normal); }
.slot-fill-bar-fill.yellow { background: var(--color-followup); }
.slot-fill-bar-fill.red { background: var(--color-urgent); }

.slot-fill-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

.slot-tooltip-panel {
  transition: all 0.2s ease;
}

.slot-tooltip-panel.hidden {
  display: none;
}

/* --- AI RECOMMENDATIONS PANEL --- */
.card-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.font-ai h3 {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ai-rec-item {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.ai-rec-item:last-child {
  border-bottom: none;
}

.ai-rec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.ai-rec-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.ai-rec-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-ai-action {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ai-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.table-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px !important;
}

/* Micro-animations */
.pulse-amber {
  animation: pulseAmber 2s infinite;
}

@keyframes pulseAmber {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* WMS Ultimate Suite Additions */
.hidden {
  display: none !important;
}

.view-mode-selector button.active {
  background: var(--primary-color) !important;
  color: white !important;
}

.picking-route-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.picking-route-item:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.picking-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Gantt Chart */
.gantt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.gantt-label {
  width: 90px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-track {
  flex: 1;
  height: 20px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.gantt-bar {
  height: 100%;
  border-radius: 4px;
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

.gantt-bar.pending {
  background: linear-gradient(90deg, #3B82F6, #1D4ED8);
}
.gantt-bar.production {
  background: linear-gradient(90deg, #F59E0B, #D97706);
}
.gantt-bar.completed {
  background: linear-gradient(90deg, #10B981, #059669);
}

/* Thermal Label */
.thermal-label-card {
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

@media print {
  body * {
    visibility: hidden;
  }
  #thermal-label-print-area, #thermal-label-print-area * {
    visibility: visible;
  }
  #thermal-label-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none !important;
  }
}

/* Secure Fullscreen Login Styles */
.login-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0f111a 0%, #060814 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: left;
  animation: loginSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 20px;
}

.login-header h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-main);
}

.btn-login {
  transition: all 0.25s ease;
}

.btn-login:hover {
  transform: scale(1.01);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Zebra PDA Simulator styles */
.pda-device select, .pda-device input {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pda-device select:focus, .pda-device input:focus {
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 5px rgba(99, 102, 241, 0.4);
  outline: none;
}

/* Pulse animation for Leaflet map markers */
@keyframes pulse-ring {
  0% {
    transform: scale(0.33);
    opacity: 1;
  }
  80%, 100% {
    opacity: 0;
  }
}

/* Custom MD Logo Styles */
.brand-custom-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.brand-logo-svg-wrapper {
  position: relative;
  width: 180px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.brand-bg-letters {
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -3px;
  font-weight: 400;
  display: flex;
}

.brand-fg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--text-main);
  background: var(--bg-color); /* Updated to match sidebar background instead of panel-bg */
  padding: 2px 4px;
  white-space: nowrap;
  font-weight: 400;
}

.brand-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
}


@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes loadBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* =============================================================
   MODÜL 3 & 4 ÖZEL GÖRSEL STİLLERİ (TIMELINE, E-INVOICE, LABELS)
   ============================================================= */

/* Audit Trail Timeline Stilleri */
.audit-timeline-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding: 8px 4px;
}

.audit-timeline-item:hover .glassmorphism {
  transform: translateX(4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border-color: rgba(99, 102, 241, 0.3) !important;
}

/* e-Fatura Modalı Buton ve Alan Güzelleştirmeleri */
#einvoice-modal .modal-content {
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Serbest Etiket Sentezleyici Tuval Hover */
#custom-label-canvas {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#custom-label-canvas:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.25);
}
