/* ==========================================================================
   Yamaç Satış Yönetimi — Shadcn Admin Referanslı Tasarım Sistemi
   İlham Kaynakları: satnaing/shadcn-admin, Kiranism Shadcn Dashboard, Tabler
   Karakter: Radikal sadelik, kurumsal derin lacivert ve safir mavi, sıfır emoji
   ========================================================================== */

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;

  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;

  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;

  /* Yamaç Kurumsal Safir Mavisi (Shadcn Primary) */
  --primary: 221.2 83.2% 53.3%; /* #2563eb */
  --primary-foreground: 210 40% 98%;

  --secondary: 210 40% 96.1%; /* #f1f5f9 */
  --secondary-foreground: 222.2 47.4% 11.2%;

  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%; /* #64748b */

  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;

  --destructive: 0 84.2% 60.2%; /* #ef4444 */
  --destructive-foreground: 210 40% 98%;

  --success: 142.1 76.2% 36.3%; /* #16a34a */
  --success-foreground: 355.7 100% 97.3%;

  --warning: 38 92% 50%; /* #f59e0b */
  --warning-foreground: 48 96% 89%;

  --border: 214.3 31.8% 91.4%; /* #e2e8f0 */
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;

  --radius: 0.5rem; /* 8px */

  /* Font Ailesi */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Erişilebilir Odak (Focus Ring) */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Shadcn Kart (Card Component) */
.shadcn-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

/* Shadcn Rozet (Badge Component) */
.shadcn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
  line-height: 1.25;
}

.shadcn-badge-default {
  background-color: #0f172a;
  color: #ffffff;
}

.shadcn-badge-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.shadcn-badge-outline {
  background-color: transparent;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.shadcn-badge-primary {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.shadcn-badge-success {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.shadcn-badge-warning {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.shadcn-badge-destructive {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Shadcn Butonlar (Button Component) */
.shadcn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  white-space: nowrap;
}

.shadcn-btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.shadcn-btn-md {
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.shadcn-btn-lg {
  height: 44px;
  padding: 0 18px;
  font-size: 13px;
}

.shadcn-btn-primary {
  background-color: #0f172a;
  color: #ffffff;
}
.shadcn-btn-primary:hover {
  background-color: #1e293b;
}

.shadcn-btn-accent {
  background-color: #2563eb;
  color: #ffffff;
}
.shadcn-btn-accent:hover {
  background-color: #1d4ed8;
}

.shadcn-btn-secondary {
  background-color: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}
.shadcn-btn-secondary:hover {
  background-color: #e2e8f0;
}

.shadcn-btn-outline {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}
.shadcn-btn-outline:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.shadcn-btn-ghost {
  background-color: transparent;
  color: #64748b;
}
.shadcn-btn-ghost:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.shadcn-btn-destructive {
  background-color: #ef4444;
  color: #ffffff;
}
.shadcn-btn-destructive:hover {
  background-color: #dc2626;
}

/* Shadcn Veri Tablosu (Data Table Component) */
.shadcn-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.shadcn-table th {
  padding: 10px 14px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shadcn-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  vertical-align: middle;
}

.shadcn-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Shadcn Form Elemanları (Form Controls) */
.shadcn-input, .shadcn-select, .shadcn-textarea {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 12px;
  color: #0f172a;
  transition: all 0.15s ease;
  font-family: inherit;
}

.shadcn-input, .shadcn-select {
  height: 38px;
  padding: 0 12px;
}

.shadcn-textarea {
  padding: 10px 12px;
  line-height: 1.5;
}

.shadcn-input:focus, .shadcn-select:focus, .shadcn-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

/* Shadcn Sekmeler (Tabs Component) */
.shadcn-tabs {
  display: inline-flex;
  align-items: center;
  background-color: #f1f5f9;
  padding: 3px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid #e2e8f0;
}

.shadcn-tab-trigger {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.shadcn-tab-trigger.active {
  background-color: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Mobil Telefon Simülatör Kabuğu (390px iPhone Bezel) */
.mobile-device-shell {
  width: 390px;
  max-width: 100%;
  height: 820px;
  max-height: 94vh;
  background-color: #ffffff;
  border: 10px solid #0f172a;
  border-radius: 44px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.mobile-device-notch {
  width: 120px;
  height: 22px;
  background: #0f172a;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 100;
}

.mobile-device-home-bar {
  width: 128px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 9999px;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}

/* Mobil Tam Ekran Sayfa (Workflow Sheet) */
.mobile-flow-page {
  position: absolute;
  inset: 0;
  z-index: 40;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Güvenli Alt Alan */
.pb-safe {
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
}

/* Tabler Tarzı Durum Noktası (Status Dot) */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot-green { background-color: #16a34a; }
.status-dot-blue { background-color: #2563eb; }
.status-dot-amber { background-color: #f59e0b; }
.status-dot-red { background-color: #ef4444; }
.status-dot-slate { background-color: #94a3b8; }

/* Modal Animasyonları ve Yüksek Kontrastlı Form Elemanları (Task 11 Hotfix) */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.animate-fadeIn {
  animation: modalFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scaleIn {
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Windows Chrome Native Select ve Option Yüksek Kontrast Kuralları */
select#staff-role-select,
select#staff-role-select option {
  color: #0f172a !important;
  background-color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
}

select#staff-role-select option {
  padding: 8px 12px;
}

select#staff-role-select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Paylaşımlı Masaüstü Modal ve Viewport Sabitleme Kuralları (Task 12) */
body.modal-open {
  overflow: hidden !important;
}

.yamac-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.yamac-modal-card {
  position: relative !important;
  background-color: #ffffff !important;
  border-radius: 1.25rem !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
  width: 100% !important;
  margin: auto !important;
  overflow: hidden !important;
}

.yamac-modal-header {
  padding: 1.25rem 1.5rem;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yamac-modal-body {
  padding: 1.5rem;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

.yamac-modal-footer {
  padding: 1rem 1.5rem;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

