/* =========================================================
   Müşteri Takip Sistemi — Premium Blue Aurora Design System
   Theme: Electric Blue & Deep Space
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ─── Premium Color System ───────────────────────────────── */
:root {
  /* Vibrant Light Theme */
  --bg:          #f0f4ff;
  --bg-2:        #ffffff;
  --bg-3:        #e8eefb;
  --border:      rgba(99, 143, 255, 0.12);
  --border-2:    rgba(99, 143, 255, 0.22);
  --text:        #0a1628;
  --text-2:      #2d3a4e;
  --text-muted:  #6b7a90;

  /* Electric Blue Brand */
  --primary:     #2563eb;
  --primary-hover:#1d4ed8;
  --primary-fg:  #ffffff;
  --accent:      #3b82f6;
  --accent-2:    #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.08);
  --accent-glow: rgba(59, 130, 246, 0.35);

  /* Semantic Colors */
  --success:     #22c55e;
  --success-soft: rgba(34, 197, 94, 0.1);
  --warning:     #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --danger:      #ef4444;
  --danger-soft:  rgba(239, 68, 68, 0.08);
  --info:        #06b6d4;
  --info-soft:   rgba(6, 182, 212, 0.08);

  /* Layout */
  --sidebar-w:   268px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   20px;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(59, 130, 246, 0.04);
  --shadow-sm:   0 1px 3px rgba(59, 130, 246, 0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 6px -1px rgba(59, 130, 246, 0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md:   0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-lg:   0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 8px 16px -6px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);
  --shadow-card: 0 2px 8px rgba(59, 130, 246, 0.06), 0 0 1px rgba(0,0,0,0.08);

  /* Gradient Tokens */
  --gradient-brand: var(--primary);
  --gradient-card:  linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,244,255,0.6));
  --gradient-accent: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.dark {
  /* Deep Space Dark Theme */
  --bg:          #070b14;
  --bg-2:        #0d1320;
  --bg-3:        #131b2e;
  --border:      rgba(59, 130, 246, 0.1);
  --border-2:    rgba(59, 130, 246, 0.18);
  --text:        #f1f5f9;
  --text-2:      #cbd5e1;
  --text-muted:  #64748b;

  --primary:     #3b82f6;
  --primary-hover:#60a5fa;
  --primary-fg:  #ffffff;
  --accent:      #60a5fa;
  --accent-2:    #93c5fd;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-glow: rgba(59, 130, 246, 0.25);

  --success:     #34d399;
  --success-soft: rgba(52, 211, 153, 0.1);
  --warning:     #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.1);
  --danger:      #f87171;
  --danger-soft:  rgba(248, 113, 113, 0.08);
  --info:        #22d3ee;
  --info-soft:   rgba(34, 211, 238, 0.1);

  --shadow-xs:   0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.5);
  --shadow:      0 4px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 12px 24px rgba(0,0,0,0.5);
  --shadow-lg:   0 24px 48px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3), 0 0 1px rgba(59,130,246,0.1);

  --gradient-brand: var(--primary);
  --gradient-card:  linear-gradient(135deg, rgba(13,19,32,0.95), rgba(19,27,46,0.8));
  --gradient-accent: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s ease, color 0.3s ease;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
  animation: float-aurora 25s ease-in-out infinite alternate;
}
.dark body::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.07) 0%, transparent 75%);
}
@keyframes float-aurora {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, -5%) scale(1.15); }
}

h1, h2, h3, h4, h5, h6,
.topbar-title, .sidebar-logo-text, .modal-title, .card-title, .stat-value {
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: -0.025em;
}

a { color: var(--accent); text-decoration: none; }

/* ─── Custom Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Utility Classes ────────────────────────────────────── */
.text-sm    { font-size: 0.8125rem; }
.text-muted { color: var(--text-muted); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.fw-600 { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ─── Layout Shell ───────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg);
}

.page-body {
  flex: 1;
  padding: 2rem 2.25rem;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.dark .sidebar {
  background: var(--bg-2);
  border-right-color: var(--border);
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.375rem 1.375rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-icon {
  width: 42px; height: 42px;
  background: var(--gradient-brand);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.sidebar-logo-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent 60%);
  border-radius: inherit;
}

.sidebar-logo-text {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.sidebar-logo-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.875rem 0.75rem 0.375rem;
  opacity: 0.7;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateX(3px);
}

.nav-item.active {
  background: var(--gradient-brand);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--accent-glow);
  border-color: transparent;
}

.nav-item.active .nav-item-icon {
  opacity: 1;
  color: #fff;
}

.nav-item-icon {
  width: 18px; height: 18px;
  opacity: 0.6;
  flex-shrink: 0;
  transition: all 0.2s;
}

.nav-item:hover .nav-item-icon {
  opacity: 1;
  color: var(--accent);
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.45rem;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
  line-height: 1.3;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-3);
}

.sidebar-user {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Top Bar ────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dark .topbar {
  background: rgba(13, 19, 32, 0.85);
}

.topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: none;
}

.card:hover {
  box-shadow: var(--shadow-lg), 0 0 25px rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.25);
}
.dark .card:hover {
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

.card:hover::before {
  opacity: 1;
}

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

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
  font-weight: 400;
}

.card-body {
  padding: 1.5rem;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 260px;
}

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.375rem;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-icon-wrapper {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-icon-wrapper svg {
  width: 16px;
  height: 16px;
}

.stat-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  opacity: 0.85;
}

.stat-action-arrow {
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

.dark .stat-card:hover {
  box-shadow: var(--shadow-lg), 0 0 35px rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

.stat-card:hover .stat-action-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.stat-card:hover .stat-icon-wrapper {
  transform: scale(1.05);
}

.stat-icon-blue  { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
.stat-icon-green { background: rgba(34, 197, 94, 0.08); color: #22c55e; }
.stat-icon-amber { background: rgba(245, 158, 11, 0.08); color: #f59e0b; }
.stat-icon-red   { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

.stat-card-blue:hover .stat-icon-wrapper  { background: #3b82f6; color: #fff; }
.stat-card-green:hover .stat-icon-wrapper { background: #22c55e; color: #fff; }
.stat-card-amber:hover .stat-icon-wrapper { background: #f59e0b; color: #fff; }
.stat-card-red:hover .stat-icon-wrapper   { background: #ef4444; color: #fff; }


/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5625rem 1.125rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-2);
  color: var(--text-2);
  border-color: var(--border-2);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--danger-soft);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 0.75rem 1.625rem;
  font-size: 0.9375rem;
}

.btn-icon {
  padding: 0;
  width: 34px; height: 34px;
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--bg);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: var(--accent);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 0 15px rgba(37, 99, 235, 0.06);
  background: var(--bg-2);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

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

.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%236b7a90' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
}

.form-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.775rem;
  color: var(--danger);
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ─── Data Tables ────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead tr {
  background: var(--bg-3);
}

.data-table th {
  padding: 0.875rem 1.125rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
  transition: all 0.15s;
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: var(--accent-soft);
}

.data-table tbody tr:hover td {
  color: var(--text);
}

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

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-default  { background: var(--bg-3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-default::before { background: var(--text-muted); }

.badge-success  { background: var(--success-soft); color: var(--success); border: 1px solid rgba(34,197,94,0.15); }
.badge-success::before { background: var(--success); box-shadow: 0 0 6px var(--success); }

.badge-warning  { background: var(--warning-soft); color: #b45309; border: 1px solid rgba(245,158,11,0.15); }
.badge-warning::before { background: var(--warning); box-shadow: 0 0 6px var(--warning); }

.badge-danger   { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239,68,68,0.15); }
.badge-danger::before {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: badge-status-pulse 1.4s ease-in-out infinite alternate;
}

.badge-info     { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border-2); }
.badge-info::before { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.badge-primary  { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.25); }
.badge-primary::before { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }

.dark .badge-warning { color: var(--warning); }
.dark .badge-primary { color: #a78bfa; }
.badge-no-dot::before { display: none !important; }

@keyframes badge-status-pulse {
  0% { opacity: 0.35; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* ─── Modals ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, 0.08);
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: none;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.modal-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 1rem;
}

.modal-close:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.modal-body { padding: 1.5rem 1.75rem; }

.modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.confirm-dialog { max-width: 440px; }

/* ─── Search Box ─────────────────────────────────────────── */
.search-box {
  position: relative;
}

.search-box-icon,
.search-box svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px; height: 16px;
  transition: color 0.2s;
}

.search-box .form-input {
  padding-left: 2.5rem;
}

.search-box .form-input:focus ~ .search-box-icon,
.search-box .form-input:focus + .search-box-icon,
.search-box .form-input:focus ~ svg,
.search-box .form-input:focus + svg {
  color: var(--accent);
}

/* ─── Timeline ───────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 0.65rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-2);
  box-shadow: 0 0 0 2px var(--accent), 0 0 10px var(--accent-glow);
  transform: translateX(-5px);
  z-index: 5;
}

.timeline-dot.danger  { background: var(--danger); box-shadow: 0 0 0 2px var(--danger), 0 0 10px rgba(239,68,68,0.3); }
.timeline-dot.warning { background: var(--warning); box-shadow: 0 0 0 2px var(--warning), 0 0 10px rgba(245,158,11,0.3); }
.timeline-dot.success { background: var(--success); box-shadow: 0 0 0 2px var(--success), 0 0 10px rgba(34,197,94,0.3); }

/* ─── Photo Grid ─────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.625rem;
  margin-top: 0.625rem;
}

.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all 0.25s ease;
  position: relative;
}

.photo-thumb:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Drop Zone ──────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.drop-zone:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: scale(1.02);
  box-shadow: 0 0 30px var(--accent-soft);
}

.drop-zone-icon { font-size: 2.25rem; margin-bottom: 0.5rem; }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.page-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ─── Empty States ───────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
  color: var(--accent) !important;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

/* ─── Toast / Notifications ──────────────────────────────── */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(16px);
}

.toast.toast-out {
  animation: toast-out 0.3s ease-in forwards;
}

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

@keyframes toast-out {
  to { opacity: 0; transform: translateX(60px) scale(0.95); }
}

.toast-icon { font-size: 1.125rem; flex-shrink: 0; line-height: 1.4; }
.toast-content { flex: 1; }
.toast-title { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.toast-message { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; line-height: 1.4; }

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--accent); }

/* ─── Lightbox ───────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.95);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  transform: scale(0.93);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-overlay.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: 2rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 50px;
  height: 50px;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90%;
}

.lightbox-counter {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-sans);
}


/* ─── Login Page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(139,92,246,0.06) 0%, transparent 50%);
  animation: aurora-drift 15s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, -3%) rotate(3deg); }
}

.login-card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(59,130,246,0.06);
  position: relative;
  z-index: 1;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: none;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.login-logo-icon {
  width: 48px; height: 48px;
  background: var(--gradient-brand);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ─── Animations ─────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Responsive Grids ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; }

.grid-5 .stat-card {
  padding: 0.875rem 1rem;
  gap: 0.5rem;
}
.grid-5 .stat-value {
  font-size: 1.375rem;
}
.grid-5 .stat-label {
  font-size: 0.775rem;
}
.grid-5 .stat-meta {
  font-size: 0.7rem;
}

@media (max-width: 1200px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

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

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); width: 270px; box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .page-body { padding: 1.25rem 1rem; }
  .topbar { padding: 0 1rem; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; gap: 1rem; }
}

/* ─── Tab styles ─────────────────────────────────────────── */
.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab-trigger {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-trigger:hover {
  color: var(--accent);
}

.tab-trigger.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ─── Searchable Combobox ────────────────────────────────── */
.combobox {
  position: relative;
  width: 100%;
}
.combobox-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.375rem;
  background: var(--bg-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow-lg), 0 10px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.combobox-item {
  padding: 0.65rem 0.875rem;
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s ease;
}
.combobox-item:last-child {
  border-bottom: none;
}
.combobox-item:hover, .combobox-item.highlighted {
  background: var(--accent-soft);
  color: var(--accent);
}
.combobox-item-name {
  font-weight: 600;
  color: var(--text);
}
.combobox-item-details {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.combobox-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── Spotlight Global Search ──────────────────────────────── */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 21, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  z-index: 9999;
}

.spotlight-modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: calc(var(--radius) * 1.5);
  width: 90%;
  max-width: 620px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.1), 0 0 20px rgba(59, 130, 246, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: spotlightSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spotlightSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spotlight-search-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.spotlight-icon {
  color: var(--text-muted);
}

#spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--text);
  padding: 0;
}

#spotlight-input::placeholder {
  color: var(--text-muted);
}

.spotlight-badge {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  user-select: none;
}

.spotlight-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spotlight-placeholder {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spotlight-group-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.625rem 0.75rem 0.375rem;
}

.spotlight-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.spotlight-result-item:hover {
  background: var(--accent-soft);
}

.spotlight-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spotlight-icon-cust {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.spotlight-icon-job {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.spotlight-result-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.spotlight-result-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.spotlight-footer {
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  padding: 0.625rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.725rem;
  color: var(--text-muted);
}

/* ─── Hızlı Eylemler (Quick Actions) ────────────────────────── */
.quick-actions-card {
  padding: 1.25rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.625rem;
  margin-top: 0.25rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  text-align: left;
}

.quick-action-btn:hover {
  background: var(--bg-2);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.06);
  transform: translateX(2px);
  color: var(--accent);
}

.quick-action-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.quick-action-btn:hover .quick-action-icon {
  transform: scale(1.06);
}

/* ─── Premium Global Tooltip (Shadcn/UI Style) ────────────── */
.global-tooltip-box {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.775rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 1px rgba(255, 255, 255, 0.2);
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(4px) scale(0.95);
  backdrop-filter: blur(4px);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.4;
}

.global-tooltip-box.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.global-tooltip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}

.global-tooltip-box.position-bottom::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent rgba(15, 23, 42, 0.95) transparent;
}

/* ─── Topbar Quick Add Dropdown ───────────────────────────── */
.topbar-quick-add-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.topbar-quick-add-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

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

@media (max-width: 640px) {
  .topbar-quick-add-btn .btn-text {
    display: none; /* Mobilde yazıyı gizle */
  }
  .topbar-quick-add-btn {
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    justify-content: center !important;
    border-radius: 50% !important; /* Mobilde daire şeklinde artı butonu */
  }
  .topbar-quick-add-menu {
    right: -50px !important; /* Mobilde taşmayı önle */
  }
}

/* ─── Global Mobile Responsiveness Optimizations ─────────────────── */

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .topbar {
    padding: 0 1.25rem !important;
    gap: 0.75rem !important;
  }
  
  .topbar-title {
    font-size: 0.95rem !important;
  }
  
  /* Collapse form grids to single column on mobile */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  
  /* Modals: prevent overflow, adjust padding */
  .modal {
    width: 94% !important;
    max-width: 94% !important;
    margin: 3vh auto !important;
    padding: 1.25rem !important;
    border-radius: var(--radius-lg) !important;
  }
  
  .modal-body {
    padding: 0.5rem 0 !important;
    gap: 0.85rem !important;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .search-box {
    width: 100% !important;
  }
  
  .hide-on-mobile {
    display: none !important;
  }
  
  .data-table th, 
  .data-table td {
    padding: 0.75rem 0.625rem !important;
    font-size: 0.8rem !important;
  }
}

/* Stat Cards Mobile Grid Optimization (2-columns instead of 1-column stack) */
@media (max-width: 768px) {
  .grid-5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  
  .grid-5 .stat-card {
    padding: 0.875rem !important;
    gap: 0.4rem !important;
  }
  
  .grid-5 .stat-value {
    font-size: 1.25rem !important;
  }
  
  .grid-5 .stat-label {
    font-size: 0.75rem !important;
  }
  
  .grid-5 .stat-meta {
    font-size: 0.65rem !important;
  }
}

@media (max-width: 400px) {
  .grid-5 {
    grid-template-columns: 1fr !important;
  }
}

/* Scroll indicator glow for tables */
.table-wrapper {
  position: relative;
}
.table-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 15px;
  background: linear-gradient(to right, transparent, rgba(8, 12, 21, 0.1));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.table-wrapper:hover::after {
  opacity: 1;
}
.dark .table-wrapper::after {
  background: linear-gradient(to right, transparent, rgba(7, 11, 20, 0.3));
}

/* Responsive payment summary grid for details pages */
@media (max-width: 480px) {
  .payment-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* Make communication buttons larger and touch-friendly on mobile */
@media (max-width: 768px) {
  .task-contact-buttons .btn,
  .card-body .flex a.btn-whatsapp,
  .card-body .flex a[href^="tel:"],
  .card-body .flex button.btn-secondary {
    padding: 0.65rem 1.25rem !important;
    font-size: 0.875rem !important;
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}


/* ─── Skeleton Loading ───────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-3) 0%,
    rgba(148, 163, 184, 0.08) 40%,
    var(--bg-3) 80%
  );
  background-size: 800px 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius);
  pointer-events: none;
  user-select: none;
}

.dark .skeleton {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.5) 0%,
    rgba(71, 85, 105, 0.18) 40%,
    rgba(30, 41, 59, 0.5) 80%
  );
  background-size: 800px 100%;
}

/* Skeleton shape modifiers */
.skeleton-text {
  height: 0.85rem;
  width: 60%;
  border-radius: 4px;
}

.skeleton-text-sm {
  height: 0.65rem;
  width: 45%;
  border-radius: 3px;
}

.skeleton-text-lg {
  height: 1.75rem;
  width: 40%;
  border-radius: 6px;
}

.skeleton-circle {
  border-radius: 50%;
}

/* ── Skeleton Stat Card ─── */
.skeleton-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.skeleton-stat-card .skeleton-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skeleton-stat-card .skeleton-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.skeleton-stat-card .skeleton-label {
  height: 0.7rem;
  width: 65%;
  border-radius: 3px;
}

.skeleton-stat-card .skeleton-value {
  height: 1.5rem;
  width: 50%;
  border-radius: 6px;
  margin-top: 0.25rem;
}

.skeleton-stat-card .skeleton-meta {
  height: 0.6rem;
  width: 80%;
  border-radius: 3px;
}

/* ── Skeleton Table Row ─── */
.skeleton-table-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.skeleton-table-row:last-child {
  border-bottom: none;
}

.skeleton-table-cell {
  height: 0.8rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Skeleton Revenue Card ─── */
.skeleton-revenue-card {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Skeleton Task Card ─── */
.skeleton-task-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.skeleton-task-card .skeleton-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-task-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* ── Skeleton Chart ─── */
.skeleton-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem 1rem;
  height: 200px;
}

.skeleton-bar {
  flex: 1;
  max-width: 40px;
  border-radius: 6px 6px 0 0;
}

/* ─── Sidebar Dropdown & Submenu ────────────────────────── */
.nav-dropdown {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-btn {
  background: transparent;
  width: 100%;
  text-align: left;
  border: none;
}

.nav-dropdown-btn:focus {
  outline: none;
}

.nav-dropdown-btn .chevron-icon {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown.open .nav-dropdown-btn .chevron-icon {
  transform: rotate(180deg);
}

.nav-dropdown.open .nav-dropdown-btn {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 0.5rem;
  border-left: 1px dashed var(--border-2);
  padding-left: 0.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-submenu-item {
  transition: all 0.2s ease;
}

.nav-submenu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-submenu-item.active {
  background: var(--gradient-brand);
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--accent-glow);
}

