/* =======================================================
   ServisFlow Pro - Yeni Nesil Dual-Theme Tasarım Sistemi
   Light & Dark Mod Hibrit Mimari (Stripe & Linear Kalitesi)
   ======================================================= */

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

/* ---- 1. Tema Değişkenleri (CSS Custom Properties) ---- */
:root {
  /* Açık Tema (Light Mode) Varsayılanları */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.25);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --sidebar-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.85);
  --dropdown-bg: #ffffff;
}

/* Koyu Tema (Dark Mode) */
html.dark {
  --bg-body: #090a12;
  --bg-surface: #111322;
  --bg-card: rgba(19, 23, 42, 0.7);
  --bg-card-hover: rgba(26, 31, 56, 0.85);
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --card-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 24px 50px -12px rgba(0, 0, 0, 0.7);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --sidebar-bg: rgba(14, 16, 34, 0.95);
  --header-bg: rgba(14, 17, 34, 0.8);
  --dropdown-bg: #14172a;
}

/* Temel Gövde */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- 2. Dinamik Ambient Işık Efekti ---- */
.mesh-glow-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

html.dark .mesh-glow-bg {
  background: 
    radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.09) 0%, transparent 55%),
    #080911;
}

html:not(.dark) .mesh-glow-bg {
  background: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(244, 63, 94, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.07) 0%, transparent 60%),
    #f8fafc;
}

/* ---- 3. Glassmorphism & Bento Kartlar ---- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.bento-card {
  border-radius: 24px;
}

/* ---- 4. Tema Duyarlı Metin ve Arka Plan Yardımcıları ---- */
.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.bg-theme-card { background: var(--bg-card); }
.border-theme { border-color: var(--border-subtle); }

/* Açık modda input alanları */
html:not(.dark) input,
html:not(.dark) select,
html:not(.dark) textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important;
}

/* Koyu modda inputlar */
html.dark input,
html.dark select,
html.dark textarea {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ---- 5. FundFlow Tarzı Organik Kapsüller ---- */
.capsule-group {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  backdrop-filter: blur(10px);
}

.capsule-item {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.capsule-item.active {
  background: var(--accent-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* ---- 6. Hızlı Çipler (Quick Chips) ---- */
.quick-chip {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  transition: all 0.15s ease;
  user-select: none;
}
.quick-chip:hover {
  border-color: rgba(99, 102, 241, 0.5);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* ---- 7. Desen Kilidi Tuvali ---- */
.pattern-lock-container {
  touch-action: none;
  user-select: none;
}
.pattern-lock-canvas {
  cursor: crosshair;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  display: block;
  margin: 0 auto;
}

/* ---- 8. Scrollbar Tasarımı ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Monospace Kod */
.font-mono-code {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

/* ---- 9. Yazdırma Stilleri ---- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .no-print, nav, aside, .fab-hub, .mesh-glow-bg, header, footer { display: none !important; }
}
