/* NakliyeciPaneli - Main Design System (design-reference.png Exact Style) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #4338ca;
  --primary-hover: #3730a3;
  --primary-light: #e0e7ff;
  
  --accent-blue: #3b82f6;
  --accent-whatsapp: #25d366;
  --accent-green-bg: #dcfce7;
  --accent-green-text: #15803d;
  --accent-amber-bg: #fef3c7;
  --accent-amber-text: #d97706;
  --accent-purple-bg: #f3e8ff;
  --accent-purple-text: #9333ea;
  
  --bg-body: #f4f6fc;
  --bg-surface: #ffffff;
  --bg-sidebar: #060d24;
  --bg-sidebar-hover: #0f1738;
  --bg-sidebar-active: #4338ca;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-sidebar: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 14px;
  --border-radius-xl: 20px;
  
  --sidebar-width: 250px;
  --topbar-height: 64px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  color: var(--text-sidebar);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease-in-out;
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  background-color: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.sidebar-brand-icon img,
.sidebar-brand-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: #cbd5e1;
}

.sidebar-menu {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  list-style: none;
}

.nav-item {
  margin-bottom: 0.35rem;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  color: var(--text-sidebar);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.nav-link-custom i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--text-sidebar);
}

.nav-link-custom:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
}

.nav-link-custom:hover i {
  color: #ffffff;
}

.nav-link-custom.active {
  background-color: var(--bg-sidebar-active);
  color: #ffffff;
  font-weight: 600;
}

.nav-link-custom.active i {
  color: #ffffff;
}

/* Sidebar Bottom Package Widget */
.sidebar-footer {
  padding: 1rem;
}

.sidebar-package-card {
  background: linear-gradient(135deg, #3730a3 0%, #4338ca 100%);
  border-radius: var(--border-radius-lg);
  padding: 1.15rem 1rem;
  color: #ffffff;
  position: relative;
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.pkg-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e0e7ff;
  margin-bottom: 0.5rem;
}

.pkg-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  color: #ffffff;
}

.pkg-subtitle {
  font-size: 0.75rem;
  color: #c7d2fe;
  margin-bottom: 1rem;
}

.btn-sidebar-pkg {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.825rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sidebar-pkg:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Navbar */
.top-navbar {
  height: var(--topbar-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.toggle-sidebar-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--border-radius-sm);
}

.navbar-user-area {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-notification-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  position: relative;
}

.nav-user-dropdown {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-user-greeting {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.nav-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Content Body */
.content-body {
  padding: 1.5rem 1.75rem;
  flex: 1;
}

/* Hero Welcome Banner */
.hero-welcome-card {
  background: linear-gradient(135deg, #3730a3 0%, #2563eb 100%);
  border-radius: var(--border-radius-xl);
  padding: 2.2rem 2.5rem;
  color: #ffffff;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.hero-welcome-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-welcome-subtitle {
  font-size: 0.95rem;
  color: #e0e7ff;
  margin-bottom: 1.5rem;
}

.btn-hero-primary {
  background-color: #ffffff;
  color: var(--primary-color);
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-hero-primary:hover {
  background-color: #f8fafc;
  color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-hero-outlined {
  background-color: transparent;
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.btn-hero-outlined:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.hero-illustration-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.hero-truck-img {
  max-height: 100px;
  object-fit: contain;
}

.hero-phone-graphic {
  background: #ffffff;
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 90px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 4px solid #1e293b;
}

.hero-phone-graphic i {
  font-size: 2.5rem;
  color: var(--accent-whatsapp);
}

/* Metric Cards */
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.metric-card {
  background-color: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.metric-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.metric-icon-circle.blue {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.metric-icon-circle.green {
  background-color: var(--accent-green-bg);
  color: var(--accent-green-text);
}

.metric-icon-circle.amber {
  background-color: var(--accent-amber-bg);
  color: var(--accent-amber-text);
}

.metric-icon-circle.purple {
  background-color: var(--accent-purple-bg);
  color: var(--accent-purple-text);
}

.metric-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-lbl {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.metric-sublbl {
  font-size: 0.725rem;
  color: var(--text-light);
}

/* Content Cards & Table */
.dashboard-card {
  background-color: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
}

.dashboard-card-header {
  padding: 1.25rem 1.5rem 0.75rem 1.5rem;
}

.dashboard-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.dashboard-card-body {
  padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

/* Table Styling matching reference */
.table-reference {
  width: 100%;
  border-collapse: collapse;
}

.table-reference th {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table-reference td {
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: var(--text-main);
  border-bottom: 1px solid #f1f5f9;
}

.badge-sent {
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.table-footer-link {
  display: block;
  text-align: center;
  padding-top: 1rem;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.table-footer-link:hover {
  text-decoration: underline;
}

/* Package details list on right card */
.pkg-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
}

.pkg-detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.pkg-detail-value {
  color: var(--text-main);
  font-weight: 700;
}

.btn-purple-full {
  display: block;
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  text-decoration: none;
  border: none;
  margin-top: 1.25rem;
  transition: background-color 0.2s ease;
}

.btn-purple-full:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

/* WhatsApp Live Preview Box */
.whatsapp-preview-box {
  background: #efeae2 url('https://user-images.githubusercontent.com/15075759/28719144-86edd0db-a5b4-11e7-917e-be93870f1406.png');
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  min-height: 320px;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #d1d5db;
}

.whatsapp-bubble {
  background-color: #d9fdd3;
  border-radius: 8px 8px 8px 0;
  padding: 0.85rem 1rem;
  max-width: 90%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  font-size: 0.925rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #111b21;
  position: relative;
}

/* Footer */
.page-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scheduling UI */
.schedule-mode-selector {
  display: flex;
  gap: 0.5rem;
}
.schedule-mode-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center;
}
.schedule-mode-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}
.schedule-mode-btn.active {
  background: #ffffff;
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
.dispatch-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* 81 İl Seçici & Kategori Stilleri */
.custom-city-dropdown .dropdown-menu {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0 !important;
}
.city-checkbox-list::-webkit-scrollbar {
  width: 6px;
}
.city-checkbox-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.city-item:hover {
  background-color: #f1f5f9;
}
.category-filter-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.rounded-start-pill {
  border-top-left-radius: 50rem !important;
  border-bottom-left-radius: 50rem !important;
}
.rounded-end-pill {
  border-top-right-radius: 50rem !important;
  border-bottom-right-radius: 50rem !important;
}
.category-toggle-cb:checked + label {
  color: #4338ca;
}

/* FAZ 12 — WhatsApp Grup Seçim Modalı & İller Stilleri */
.candidate-group-item {
  transition: all 0.15s ease-in-out;
  border-left: 3px solid transparent !important;
}
.candidate-group-item:hover {
  background-color: #f8fafc !important;
}
.candidate-group-item.active-selection {
  border-left: 3px solid #6366f1 !important;
  background-color: #f5f3ff !important;
}
.candidate-group-item.active-selection .form-check-label {
  color: #4338ca !important;
}
.group-selection-list::-webkit-scrollbar {
  width: 6px;
}
.group-selection-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
/* FAZ 12.1 — Çoklu Varış İli Checkbox & Satır Stilleri */
.destination-city-option {
  display: flex !important;
  align-items: center !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
  background-color: transparent;
  user-select: none;
  min-height: 32px;
}
.destination-city-option:hover {
  background-color: #f1f5f9 !important;
}
.destination-city-option.selected {
  background-color: #eef2ff !important;
  color: #3730a3 !important;
  font-weight: 600 !important;
}
.destination-city-checkbox {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  float: none !important;
  margin: 0 !important;
  cursor: pointer !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  accent-color: #4f46e5 !important;
  vertical-align: middle !important;
}
.destination-city-label {
  cursor: pointer !important;
  margin-bottom: 0 !important;
  line-height: 1.3 !important;
}

.city-item {
  transition: background-color 0.1s ease;
}
.city-item:hover {
  background-color: #f1f5f9;
}

/* FAZ 13: Gönderim Zamanlama Seçicisi */
.schedule-mode-selector {
  display: flex;
  gap: 0.75rem;
}
.schedule-mode-btn {
  border: 2px solid #e2e8f0;
  background-color: #ffffff;
  color: #475569;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.schedule-mode-btn:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
  color: #1e293b;
}
.schedule-mode-btn.active {
  border-color: #4f46e5 !important;
  background-color: #eef2ff !important;
  color: #4338ca !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}
@media (max-width: 576px) {
  .schedule-mode-selector {
    flex-direction: column;
  }
}

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
}
