/* ==========================================================================
   PREMIUM MODERN AI-SUPPORTED ACCOUNTING & E-INVOICE CSS SYSTEM
   ========================================================================== */

:root {
  --bg-app: #ffffff;             /* Beyaz Arka Plan */
  --bg-card: #f8fafc;            /* Açık Gri/Beyaz Kart Rengi */
  --bg-sidebar: #f1f5f9;         /* Açık Gri Sol Sidebar */
  --border: #e2e8f0;             /* Net İnce Kenarlık */
  --border-focus: #10b981;       /* Yeşil Odaklanma */
  
  --text-primary: #0f172a;       /* Koyu Siyah Metin */
  --text-secondary: #475569;     /* Gri Alt Metin */
  --text-muted: #64748b;         
  
  --primary: #10b981;            /* Yeşil Marka Rengi */
  --primary-hover: #059669;      
  --success: #10b981;            
  --danger: #ef4444;             
  --warning: #f59e0b;            
  --info: #3b82f6;               
 
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --radius: 6px;
  --font: 'Outfit', 'Inter', system-ui, sans-serif;
}

/* Genel Sıfırlamalar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
}

#appKapsayici {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* Sidebar - Premium Minimalist */
#sidebar {
  width: 240px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.sidebar-ust {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-ust .app-logo {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-ust small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
  overflow-y: auto;
  flex-grow: 1;
}

.nav-grup-baslik {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px 12px 6px 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
}

.nav-link i,
.nav-link svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--primary) !important;
  stroke: var(--primary) !important;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--primary);
}

.nav-link.aktif {
  background-color: var(--primary);
  color: #ffffff !important;
}

.nav-link.aktif i {
  transform: scale(1.1);
  color: #ffffff !important;
}

.sidebar-alt {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* Ana İçerik */
.main-kapsayici {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-app);
}

#appHeader {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: var(--bg-card);
}

#appHeader #firmaAdi {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

#pageContent {
  flex-grow: 1;
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Premium Kartlar & Paneller */
.modern-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Sayfa Başlıkları */
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Premium Butonlar */
.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

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

.btn-premium-sec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-premium-sec:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-premium-danger {
  background-color: var(--danger);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-premium-danger:hover {
  background-color: #dc2626;
}

/* Premium Form Elemanları */
.form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 10px 14px;
  outline: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.form-group select option {
  background-color: #0b132b !important;
  color: #f3f4f6 !important;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border-focus);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Premium Tablolar */
.modern-tablo {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.modern-tablo th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.02);
}

.modern-tablo td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.modern-tablo tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Giriş Ekranı (Login Screen) Tasarımı */
#loginKapsayici {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 99999;
}

#loginKapsayici::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

#loginKapsayici .login-box {
  width: 400px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  animation: loginFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.login-logo i,
.login-logo svg {
  color: var(--primary) !important;
  stroke: var(--primary) !important;
}

.login-header p {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 500;
}

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

/* AI Asistan Bileşenleri */
.ai-asistan-kart {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ai-ikon {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99,102,241,0.5);
  flex-shrink: 0;
}

.ai-cevap-alanı {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* e-Fatura Fiş Görünümü */
.e-fatura-onizleme {
  background: #ffffff;
  color: #000000;
  font-family: 'Courier New', Courier, monospace;
  padding: 30px;
  border-radius: 4px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-width: 800px;
  margin: 0 auto;
}

.e-fatura-header {
  border-bottom: 2px solid #000;
  padding-bottom: 15px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

/* Döviz Kuru Parlama Animasyonları */
.kur-yukselis {
  animation: kurYukselisFlash 1.2s ease-out;
}

.kur-dusus {
  animation: kurDususFlash 1.2s ease-out;
}

@keyframes kurYukselisFlash {
  0% {
    background-color: rgba(16, 185, 129, 0.35);
    color: #10b981;
    transform: scale(1.02);
  }
  100% {
    background-color: transparent;
    color: #fff;
    transform: scale(1);
  }
}

/* Lisans Kilit Ekranı (License Lock Screen) Tasarımı */
#lisansKapsayici {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #1e112c 0%, #0c0714 60%);
  z-index: 999999;
}

#lisansKapsayici::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(239, 68, 68, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 68, 68, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

@keyframes kurDususFlash {
  0% {
    background-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
    transform: scale(0.98);
  }
  100% {
    background-color: transparent;
    color: #fff;
    transform: scale(1);
  }
}

/* Timeline / Üretim Rotası Çizgisi */
.mrp-timeline {
  position: relative;
  padding-left: 32px;
  margin-top: 14px;
}
.mrp-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.mrp-timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.mrp-timeline-badge {
  position: absolute;
  left: -32px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.mrp-timeline-item.active .mrp-timeline-badge {
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}
.mrp-timeline-item.completed .mrp-timeline-badge {
  border-color: #34d399;
  background: #34d399;
  color: #000;
}
.mrp-timeline-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}
.mrp-timeline-item.active .mrp-timeline-content {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.02);
}

/* Akinsoft & Wolvox Tarzı Raporlama Modülü CSS */
.akinsoft-baslik-bandi {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.band-sol {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.band-sol i {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

.band-sag .band-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.band-sag .band-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.wolvox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.wolvox-buton {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #cbd5e1;
  text-align: center;
}

.wolvox-buton i {
  color: var(--primary);
  transition: transform 0.3s;
}

.wolvox-buton:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.wolvox-buton:hover i {
  transform: scale(1.1);
}

/* Mobil Chrome ve Küçük Ekran Uyumluluğu */
@media (max-width: 768px) {
  #appKapsayici {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }

  #sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
    gap: 8px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .nav-grup-baslik {
    display: none; /* Mobilde grupları gizle */
  }

  .nav-link {
    display: inline-flex;
    padding: 8px 12px;
    font-size: 12px;
  }

  .main-kapsayici {
    height: auto;
    overflow: visible;
  }

  #pageContent {
    padding: 16px;
    gap: 16px;
  }

  .wolvox-grid {
    grid-template-columns: 1fr !important;
  }

  .modern-panel {
    padding: 16px;
  }

  /* Raporlar ve AI Asistan Kartları Mobilde Alt Alta Gelsin */
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1.5fr"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}
