/* Genel ek stiller.
 * Asıl tasarım TailwindCSS (CDN) ile geliyor; bu dosya sadece küçük dokunuşlar içindir.
 */

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f3f4f6;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
  height: 100vh;
  max-height: 100%;
}

body {
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

#root {
  height: 100vh;
  max-height: 100%;
  overflow: hidden;
}

/* Mobil-first optimizasyonlar */
@media (max-width: 640px) {
  /* Touch-friendly butonlar ve inputlar */
  button, 
  input[type="button"], 
  input[type="submit"],
  select,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  textarea {
    min-height: 44px !important;
    font-size: 16px !important; /* iOS zoom önleme */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
  }
  
  /* Touch manipulation */
  button, 
  a, 
  select,
  input {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* Input ve textarea için user-select aktif */
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  textarea {
    -webkit-user-select: text;
    user-select: text;
  }
  
  /* Daha büyük tıklanabilir alanlar */
  button {
    padding: 12px 16px !important;
  }
  
  /* Select dropdown'lar için özel stil */
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem !important;
  }
}

/* Light Teması - Kurumsal ERP Tasarımı (Varsayılan) */
/* Light tema için sidebar - Kurumsal ERP formatında belirgin */
aside {
  background-color: #1E293B !important; /* Koyu gri-mavi sidebar (daha belirgin) */
  border-color: #0F172A !important;
}

aside .text-base-content,
aside .text-slate-200,
aside .text-gray-500,
aside .text-gray-600,
aside .text-slate-300,
aside .text-slate-400 {
  color: #FFFFFF !important;
}

aside .bg-primary {
  background-color: #3B82F6 !important; /* Açık mavi vurgu */
}

/* Dark mode için sidebar */
.dark aside {
  background-color: #0F172A !important; /* Daha koyu sidebar */
  border-color: #1E293B !important;
}

.dark aside .text-base-content,
.dark aside .text-slate-200,
.dark aside .text-gray-500,
.dark aside .text-gray-600 {
  color: #FFFFFF !important;
}


/* Safe Area Desteği - iPhone X ve üzeri için */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  
  .fixed {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Scrollbar stilleri - Webkit tarayıcılar için */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.dark * {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom scrollbar for better readability */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.dark .custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Focus görünürlüğü - Erişilebilirlik */
*:focus-visible {
  outline: 2px solid #002D72;
  outline-offset: 2px;
}

.dark *:focus-visible {
  outline-color: #F59E0B;
}

/* ============================================
   UI İYİLEŞTİRMELERİ - STANDARTLAR
   ============================================ */

/* Kart Standartları */
.card,
.bg-neutral,
[class*="rounded-lg"] {
  border-radius: 12px !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Tipografi Hiyerarşisi */
h1 {
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

h2 {
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

h3 {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

body, p, span, div {
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

label, .label, .helper-text {
  font-size: 12px !important;
  font-weight: 400 !important;
}

/* Kart Başlıkları - Netlik */
.card-title,
.stat-card-title,
h2.card-title,
h3.card-title {
  font-weight: 700 !important;
  font-size: 18px !important;
}

/* Para Birimi Gösterimi */
.currency-value {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.currency-unit {
  font-size: 13px !important;
  opacity: 0.6 !important;
}

/* Grid Çizgileri - Opaklık */
.chart-grid-line,
.grid-line {
  opacity: 0.4 !important;
}

/* Badge Butonlar */
.badge-button {
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* Spacing Standartları */
.section-spacing {
  margin-bottom: 24px !important;
}

.card-spacing {
  margin-bottom: 24px !important;
}

.title-card-spacing {
  margin-bottom: 16px !important;
}

.card-inner-padding {
  padding: 20px 24px !important;
}

.company-group-title {
  margin-bottom: 10px !important;
}

/* Firma Renk Noktaları */
.company-dot {
  width: 10px !important;
  height: 10px !important;
  opacity: 0.7 !important;
}

/* Menu İkonları */
.menu-icon {
  width: 20px !important;
  height: 20px !important;
}

/* Bottom Nav Yüksekliği */
.bottom-nav {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
}


/* Print stilleri */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

