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

:root {
  /* --- Brand (koyu gri + mavi) --- */
  --ink-900: #0B1220;       /* neredeyse siyah, başlıklar ve header arka plan */
  --ink-800: #111827;       /* koyu gri, body metin */
  --ink-700: #1F2937;       /* koyu yüzey (dark card, dark banner) */
  --ink-600: #374151;       /* ikincil metin */
  --ink-500: #6B7280;       /* disabled, placeholder */
  --ink-400: #9CA3AF;       /* çok soluk metin */
  --ink-300: #D1D5DB;       /* border, divider */
  --ink-200: #E5E7EB;       /* soft border */
  --ink-100: #F3F4F6;       /* arka plan */
  --ink-50:  #F9FAFB;       /* en açık yüzey */
  --white:   #FFFFFF;

  /* --- Accent (tek ve tutarlı mavi) --- */
  --blue-600: #1D4ED8;      /* primary action — koyu mavi, premium his */
  --blue-500: #2563EB;      /* hover, focus */
  --blue-400: #3B82F6;      /* link */
  --blue-100: #DBEAFE;      /* blue soft bg (info banner) */
  --blue-50:  #EFF6FF;      /* çok soluk mavi */

  /* --- Semantik --- */
  --success-600: #059669;   /* yeşil - doğrulama, başarı */
  --success-100: #D1FAE5;
  --warning-600: #D97706;   /* amber - uyarı */
  --warning-100: #FEF3C7;
  --danger-600:  #DC2626;   /* kırmızı - hata, silme */
  --danger-100:  #FEE2E2;

  /* --- Gölge (çok hafif, premium hissi) --- */
  --shadow-sm:  0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-md:  0 2px 8px rgba(11, 18, 32, 0.06), 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-lg:  0 8px 24px rgba(11, 18, 32, 0.08), 0 2px 6px rgba(11, 18, 32, 0.04);
  --shadow-xl:  0 16px 40px rgba(11, 18, 32, 0.12);

  /* --- Radius --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* --- Spacing --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
}

/* Reset / Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--ink-800);
  background-color: var(--blue-50);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  font-size: 15px;
  line-height: 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { color: var(--ink-900); margin-bottom: var(--space-4); }

h1 { font-size: 32px; line-height: 40px; font-weight: 700; }
h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
h4 { font-size: 16px; line-height: 24px; font-weight: 600; }

.text-small { font-size: 13px; line-height: 20px; color: var(--ink-600); }
.text-caption { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-500); }
.numeric { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

@media (min-width: 1024px) {
  h1 { font-size: 48px; line-height: 56px; }
  h2 { font-size: 32px; line-height: 40px; }
  h3 { font-size: 20px; line-height: 28px; }
}

a { color: var(--blue-400); text-decoration: none; cursor: pointer; }
a:hover { color: var(--blue-500); }

/* Layout & Views */
.view { display: none; opacity: 0; transition: opacity 300ms ease; }
.view.active { display: block; opacity: 1; min-height: 100vh; padding-bottom: 80px; }
@media (min-width: 1024px) { .view.active { padding-bottom: 0; } }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }
@media (min-width: 1024px) { .container { padding: 0 var(--space-6); } }

.section { padding: var(--space-16) 0; }
@media (min-width: 1024px) { .section { padding: var(--space-24) 0; } }

/* Header & Tabs */
header {
  background: var(--white);
  border-bottom: 1px solid var(--ink-200);
  padding: var(--space-2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 20px; color: var(--ink-900); cursor: pointer; user-select: none; }
.header-nav { display: none; }
@media (min-width: 1024px) {
  .header-nav { display: flex; gap: var(--space-6); align-items: center; }
  .mobile-menu-btn { display: none; }
}

.tab-bar {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white); border-top: 1px solid var(--ink-200);
  padding: var(--space-2) var(--space-4); justify-content: space-between;
  z-index: 99; padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) { .tab-bar { display: none; } }
.tab-item {
  display: flex; flex-direction: column; align-items: center;
  font-size: 12px; color: var(--ink-500); gap: var(--space-1);
  position: relative; cursor: pointer; flex: 1; text-align: center;
}
.tab-item.active { color: var(--ink-900); font-weight: 600; }
.tab-item i { font-size: 20px; }
.tab-badge {
  position: absolute; top: -2px; right: calc(50% - 15px);
  background: var(--danger-600); color: var(--white);
  font-size: 10px; font-weight: 700; border-radius: var(--radius-full);
  padding: 2px 6px; border: 2px solid var(--white);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 12px 20px; border-radius: var(--radius-md); font-weight: 500; font-size: 15px;
  border: none; cursor: pointer; transition: all 200ms ease; text-decoration: none;
  font-family: inherit; line-height: 1; text-align: center;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--ink-900); color: var(--white); }
.btn-primary:not(:disabled):hover { background: var(--ink-800); }
.btn-accent { background: var(--blue-600); color: var(--white); }
.btn-accent:not(:disabled):hover { background: var(--blue-500); }
.btn-ghost { background: transparent; border: 1px solid var(--ink-300); color: var(--ink-800); }
.btn-ghost:not(:disabled):hover { background: var(--ink-50); }
.btn-danger-ghost { background: transparent; color: var(--danger-600); }
.btn-danger-ghost:not(:disabled):hover { background: var(--danger-100); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); }

/* Forms & Inputs */
.input {
  width: 100%; min-height: 48px; border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  padding: 0 var(--space-3); font-size: 15px; background: var(--white);
  color: var(--ink-800); transition: all 200ms ease; font-family: inherit;
}
@media (max-width: 768px) { .input { font-size: 16px; } }
.input:focus { border-color: var(--blue-500); outline: 3px solid var(--blue-100); }
textarea.input { padding: var(--space-3); resize: vertical; min-height: 96px; }
select.input { appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231F2937%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 12px top 50%; background-size: 10px auto; }

.label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-700); margin-bottom: 6px; }
.helper { display: block; font-size: 12px; color: var(--ink-500); margin-top: 4px; }
.error { display: block; font-size: 12px; color: var(--danger-600); margin-top: 4px; }

/* Radio Card / Custom Selectors */
.radio-card {
  display: block; position: relative; border: 1px solid var(--ink-200);
  border-radius: var(--radius-md); padding: var(--space-4); cursor: pointer;
  background: var(--white); transition: all 200ms ease;
}
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card:hover { border-color: var(--ink-300); background: var(--ink-50); }
.radio-card input:checked ~ .radio-content { color: var(--blue-600); }
.radio-card:has(input:checked) { border-color: var(--blue-600); box-shadow: 0 0 0 1px var(--blue-600); background: var(--blue-50); }
.radio-card-icon { font-size: 24px; margin-bottom: var(--space-2); color: var(--ink-500); }
.radio-card:has(input:checked) .radio-card-icon { color: var(--blue-600); }
.radio-card-title { font-weight: 600; font-size: 15px; margin-bottom: var(--space-1); color: var(--ink-900); }
.radio-card-desc { font-size: 13px; color: var(--ink-600); }

/* Range Slider */
input[type=range] {
  -webkit-appearance: none; width: 100%; background: transparent; margin: 12px 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow-sm); border: 2px solid var(--blue-600);
  cursor: pointer; margin-top: -10px;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%; height: 6px; cursor: pointer; background: var(--ink-200); border-radius: var(--radius-full);
}

/* Checkbox default style */
input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--ink-900); cursor: pointer; vertical-align: middle;
}

/* Cards & Layout Items */
.card {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: var(--space-6); transition: all 200ms ease;
}
a.card:hover, .card.hoverable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-flat { background: var(--ink-50); border-radius: var(--radius-lg); padding: var(--space-6); }
.card-dark { background: var(--ink-900); color: var(--white); border-radius: var(--radius-lg); padding: var(--space-6); }
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: var(--white); }

/* Badges & Chips */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; }
.badge-verified { background: var(--success-100); color: var(--success-600); }
.badge-new { background: var(--blue-100); color: var(--blue-600); }
.badge-warning { background: var(--warning-100); color: var(--warning-600); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--ink-200); border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500; color: var(--ink-700); cursor: pointer;
  transition: all 200ms ease; background: var(--white); user-select: none;
}
.chip:hover { background: var(--ink-50); border-color: var(--ink-300); }
.chip.active { background: var(--ink-900); color: var(--white); border-color: var(--ink-900); }
.chip-close { opacity: 0.5; transition: opacity 200ms; }
.chip:hover .chip-close { opacity: 1; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-ring { border: 2px solid var(--white); outline: 2px solid var(--ink-200); }

/* Status Dot & Progress */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-online { background: var(--success-600); }
.dot-away { background: var(--warning-600); }

.progress { width: 100%; height: 6px; background: var(--ink-100); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; background: var(--ink-900); width: 0%; transition: width 400ms ease-out; }

/* Grid Helpers */
.grid { display: grid; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Toasts */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 768px) { .toast-container { right: 16px; left: 16px; top: auto; bottom: 80px; } }
.toast {
  max-width: 380px; width: 100%; padding: var(--space-4); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); transform: translateX(120%); opacity: 0;
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; gap: var(--space-3); align-items: center;
}
.toast-enter { transform: translateX(0); opacity: 1; }
.toast-ink { background: var(--ink-900); color: var(--white); }
.toast-success { background: var(--success-600); color: var(--white); }
.toast-yellow { background: var(--warning-100); color: var(--warning-600); border: 1px solid var(--warning-600); }

/* Animation Utils */
.bounce-in { animation: bounceIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.pulse { animation: counterPulse 0.4s ease forwards; }
@keyframes counterPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); color: var(--blue-600); }
  100% { transform: scale(1); }
}

/* Modals / Drawers */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11, 18, 32, 0.5); backdrop-filter: blur(2px);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 200ms ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  background: var(--white); border-radius: var(--radius-xl); padding: var(--space-6);
  width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: all 300ms ease;
  box-shadow: var(--shadow-xl);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
@media (max-width: 768px) {
  .modal-content { max-width: 100%; width: 100%; height: 100%; max-height: 100%; border-radius: 0; transform: translateY(100px); }
  .drawer .modal-content { position: absolute; bottom: 0; height: 85vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}

/* Mobile Side Drawer Menu */
.mobile-drawer-overlay, .mobile-drawer {
  display: none; /* Varsayılan olarak kapalı */
}

/* Masaüstünde kesin olarak yok et */
@media (min-width: 769px) {
  .mobile-drawer-overlay, .mobile-drawer { display: none !important; }
}

/* Mobilde sadece aktfken göster */
@media (max-width: 768px) {
  .mobile-drawer-overlay {
    position: fixed; inset: 0; background: rgba(11, 18, 32, 0.5); backdrop-filter: blur(4px);
    z-index: 1000; opacity: 0; visibility: hidden; transition: all 300ms ease;
  }
  .mobile-drawer-overlay.active { display: block; opacity: 1; visibility: visible; }

  .mobile-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 85%; max-width: 320px;
    background: var(--white); z-index: 1001; transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column; box-shadow: var(--shadow-xl);
  }
  .mobile-drawer.active { display: flex; transform: translateX(0); }
}

.mobile-drawer-header {
  padding: var(--space-4) var(--space-6); display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--ink-100);
}
.mobile-drawer-body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; gap: var(--space-4); }
.mobile-drawer-footer { padding: var(--space-6); border-top: 1px solid var(--ink-100); display: flex; flex-direction: column; gap: var(--space-3); }

.mobile-drawer-nav-item {
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) 0;
  font-size: 16px; font-weight: 600; color: var(--ink-900); cursor: pointer; transition: color 200ms ease;
}
.mobile-drawer-nav-item:hover { color: var(--blue-600); }
.mobile-drawer-nav-item i { width: 24px; color: var(--ink-400); font-size: 18px; }

.divider { border: 0; border-top: 1px solid var(--ink-200); margin: var(--space-6) 0; }

/* Özel Card Sınıfları */
.offer-card, .demand-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.offer-card { padding: 0; }
.offer-card-body, .demand-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.demand-card { padding: 16px; }

/* === HIDDEN CLASS FIX === */
.hidden { display: none !important; }

/* === EKSİK CSS VARIABLES === */
:root {
  --warning-500: #F59E0B;
  --warning-400: #FBBF24;
  --blue-300: #93C5FD;
  --blue-200: #BFDBFE;
}

/* === UTILITY CLASSES === */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.p-0 { padding: 0 !important; }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.gap-3 { gap: var(--space-3); }
.gap-8 { gap: var(--space-8); }

/* === OFFER CARD FLEX === */
.offer-card { display: flex; flex-direction: column; }
.offer-card-body { display: flex; flex-direction: column; flex: 1; }
.offer-card-body > .flex:last-child { margin-top: auto; }
.offer-card .flex.gap-2.mt-auto { align-items: stretch; }

/* === DEMAND CARD HOVER === */
.demand-card { transition: all 200ms ease; cursor: default; }
.demand-card:hover { box-shadow: var(--shadow-md); border-color: var(--ink-300); }

/* === TAB BUTTON === */
.tab-btn {
  padding: 10px 16px; border: none; background: transparent;
  color: var(--ink-500); font-weight: 500; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 200ms ease;
  font-family: inherit; font-size: 14px;
}
.tab-btn:hover { color: var(--ink-700); }
.tab-btn.active { color: var(--ink-900); border-bottom-color: var(--ink-900); font-weight: 600; }

/* === MOBILE FIXES === */
@media (max-width: 768px) {
  .view.active { padding-bottom: 100px; }
  .grid.md\:grid-cols-3 { grid-template-columns: 1fr !important; }
  .grid.md\:grid-cols-2 { grid-template-columns: 1fr !important; }
  h1 { font-size: 28px; line-height: 36px; }
}

/* === Mobile hero mockup küçültme === */
@media (max-width: 768px) {
  [style*="width: 320px"][style*="height: 580px"] {
    transform: scale(0.75);
    transform-origin: center top;
    margin-bottom: -120px;
  }
}

/* === Agent Pool kredi göstergesi responsive === */
.credit-display-desktop { display: none; }
@media (min-width: 768px) {
  .credit-display-desktop { display: block; }
}

/* === Input consistency === */
input[type="number"], input[type="text"], input[type="email"], input[type="tel"], input[type="date"] {
  color: var(--ink-800);
  background: var(--white);
}
input::placeholder, textarea::placeholder { color: var(--ink-400); }
select.input:not([class*="input-sm"]) { min-height: 48px; }

/* === Details/Summary marker gizle === */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }
details[open] summary i.fa-plus::before { content: "\f068"; /* fa-minus */ }

/* === Focus outline consistency === */
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* === Print friendly (jüri yazdırırsa) === */
@media print {
  header, .tab-bar, #demo-banner, .btn, footer { display: none !important; }
  .view { display: block !important; }
}

@keyframes mockupSlideDown {
  0% { transform: translateY(-200%); }
  90% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

