/* =====================================================================
 * EminEvim Finansman - Custom CSS
 * Tailwind tema renkleri / gradientler / animasyonlar.
 * Tailwind CDN ile birlikte kullanılır.
 * ===================================================================*/

/* CSS Custom Properties (orijinal globals.css'den birebir aktarıldı) */
:root {
  --background: 0 0% 100%;
  --foreground: 160 40% 8%;
  --card: 0 0% 100%;
  --card-foreground: 160 40% 8%;
  --popover: 0 0% 100%;
  --popover-foreground: 160 40% 8%;
  --primary: 157 88% 21%;
  --primary-foreground: 0 0% 100%;
  --secondary: 150 20% 96%;
  --secondary-foreground: 160 40% 12%;
  --muted: 150 15% 96%;
  --muted-foreground: 160 10% 40%;
  --accent: 41 72% 62%;
  --accent-foreground: 160 40% 12%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 150 20% 90%;
  --input: 150 20% 90%;
  --ring: 157 88% 21%;
  --radius: 0.75rem;
}

* { border-color: hsl(var(--border)); }
html, body { overflow-x: hidden; max-width: 100vw; }
body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #066648; border-radius: 4px; opacity: 0.5; }
::-webkit-scrollbar-thumb:hover { background: #e4b558; }

/* Gradients */
.bg-primary-gradient { background: linear-gradient(135deg, #066648 0%, #044d36 100%); }
.bg-accent-gradient  { background: linear-gradient(135deg, #e4b558 0%, #d9a42f 100%); }

/* Hover lift kartları */
.hover-lift { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.hover-lift:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(6,102,72,0.2); }

/* Text helpers */
.text-primary-50  { color: #E8F3EE; } .bg-primary-50  { background-color: #E8F3EE; }
.text-primary-100 { color: #CDE5D8; } .bg-primary-100 { background-color: #CDE5D8; }
.text-primary-200 { color: #9BCBAF; } .bg-primary-200 { background-color: #9BCBAF; }
.text-primary-700 { color: #04402C; } .bg-primary-700 { background-color: #04402C; }
.text-primary-900 { color: #021A12; } .bg-primary-900 { background-color: #021A12; }
.text-accent-50   { color: #FBF4E4; } .bg-accent-50   { background-color: #FBF4E4; }
.text-accent-100  { color: #F7E8C7; } .bg-accent-100  { background-color: #F7E8C7; }
.text-accent-200  { color: #EFD28F; } .bg-accent-200  { background-color: #EFD28F; }
.text-accent-500  { color: #D9A42F; } .bg-accent-500  { background-color: #D9A42F; }
.text-accent-700  { color: #7F5E19; } .bg-accent-700  { background-color: #7F5E19; }
.border-accent-500\/40 { border-color: rgba(217, 164, 47, 0.4); }
.border-primary-100 { border-color: #CDE5D8; }
.border-primary-200 { border-color: #9BCBAF; }
.border-accent-500\/40 { border-color: rgba(217, 164, 47, 0.4); }

/* Animasyonlar */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.4s ease-out; }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.animate-slide-in { animation: slide-in 0.3s ease-out; }

/* Marquee duyuru bandı */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee linear infinite;
  animation-duration: 40s;
}
@media (hover: hover) {
  .animate-marquee:hover { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .animate-marquee { animation: none; }
}

/* Pulse ve spin (lucide loader için) */
@keyframes pulse { 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* Toast sistemi */
.ee-toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 360px; pointer-events: none;
}
.ee-toast {
  pointer-events: auto;
  background: white;
  border-left: 4px solid #066648;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
  font-size: 0.875rem;
  color: #1f2937;
  animation: ee-toast-in 0.25s ease-out;
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.ee-toast.success { border-left-color: #066648; }
.ee-toast.error   { border-left-color: #dc2626; }
.ee-toast.info    { border-left-color: #2563eb; }
@keyframes ee-toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.ee-toast.fade-out { animation: ee-toast-out 0.2s ease-in forwards; }
@keyframes ee-toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

/* Modal sistem */
.ee-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 1rem;
  animation: ee-modal-fade 0.15s ease-out;
}
@keyframes ee-modal-fade {
  from { opacity: 0; } to { opacity: 1; }
}
.ee-modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ee-modal-slide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes ee-modal-slide {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobil: modal alttan kayar (bottom-sheet) */
@media (max-width: 640px) {
  .ee-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .ee-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 95vh;
    animation: ee-bottom-sheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}
@keyframes ee-bottom-sheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Form elemanları */
.ee-input {
  display: block; width: 100%; height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  transition: all 0.15s;
}
.ee-input:focus {
  outline: none;
  border-color: #066648;
  box-shadow: 0 0 0 3px rgba(6, 102, 72, 0.1);
}
.ee-textarea { min-height: 5rem; padding: 0.5rem 0.875rem; }

.ee-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0 1rem; height: 2.5rem;
  border-radius: 0.5rem; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all 0.15s; border: 0;
  white-space: nowrap;
}
.ee-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ee-btn-primary { background: #066648; color: white; }
.ee-btn-primary:hover:not(:disabled) { background: #04402C; }
.ee-btn-accent { background: #e4b558; color: #04402C; }
.ee-btn-accent:hover:not(:disabled) { background: #D9A42F; }
.ee-btn-outline { background: white; border: 1px solid hsl(var(--border)); color: #1f2937; }
.ee-btn-outline:hover:not(:disabled) { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.ee-btn-ghost { background: transparent; color: white; }
.ee-btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.ee-btn-danger { background: #dc2626; color: white; }
.ee-btn-danger:hover:not(:disabled) { background: #b91c1c; }
.ee-btn-sm { height: 2rem; padding: 0 0.625rem; font-size: 0.75rem; }
.ee-btn-lg { height: 3rem; padding: 0 1.25rem; font-size: 1rem; }

/* Kart bileşeni */
.ee-card {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

/* Badge */
.ee-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.6875rem; font-weight: 700;
}

/* Progress bar */
.ee-progress {
  background: hsl(var(--muted));
  border-radius: 9999px;
  overflow: hidden;
  height: 0.5rem;
}
.ee-progress > div {
  background: #066648;
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease-out;
}

/* Tabs */
.ee-tabs-list {
  display: grid; gap: 0.25rem;
  background: hsl(var(--muted));
  padding: 0.25rem;
  border-radius: 0.5rem;
}
.ee-tabs-trigger {
  padding: 0.5rem 0.75rem;
  border: 0; background: transparent;
  font-size: 0.875rem; font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer; color: #6b7280;
  transition: all 0.15s;
}
.ee-tabs-trigger.active {
  background: #066648; color: white;
}

/* Slider */
input[type="range"].ee-slider {
  width: 100%; height: 6px; border-radius: 9999px;
  background: hsl(var(--muted));
  -webkit-appearance: none; appearance: none;
  outline: none;
}
input[type="range"].ee-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #066648;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type="range"].ee-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #066648; cursor: pointer; border: 3px solid white;
}

/* Sidebar nav item */
.ee-nav-item {
  width: 100%;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  text-align: left;
  background: transparent; border: 0; cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  transition: all 0.15s;
}
.ee-nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.ee-nav-item.active {
  background: #e4b558; color: #04402C; font-weight: 700;
  box-shadow: 0 8px 12px -4px rgba(0,0,0,0.15);
}

/* Helper utilities Tailwind eksiklerine yedek */
.line-through { text-decoration: line-through; }
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-muted\/30 { background-color: hsl(var(--muted) / 0.3); }
.bg-muted\/40 { background-color: hsl(var(--muted) / 0.4); }
.border-border { border-color: hsl(var(--border)); }
.border-accent { border-color: #e4b558; }
.border-accent\/30 { border-color: rgba(228, 181, 88, 0.3); }
.border-accent\/40 { border-color: rgba(228, 181, 88, 0.4); }
.bg-accent-50\/30 { background-color: rgba(251, 244, 228, 0.3); }
.bg-primary-50\/50 { background-color: rgba(232, 243, 238, 0.5); }
.bg-primary-50\/30 { background-color: rgba(232, 243, 238, 0.3); }

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