/*
 * KolayCV — assets/css/design-system.css
 * Ortak bileşen sistemi: kart, buton, rozet, input, modal, sidebar, empty-state, hero, section-header
 * Tüm sayfalarda include edilmeli (header.php içinde main.css'in ardından).
 */

/* ══════════════════════════════════════════════════════════════════
   CSS TOKENS (Light Tema)
   ══════════════════════════════════════════════════════════════════ */
:root {
  /* Renkler */
  --navy:        #1e293b;
  --navy-dark:   #0f172a;
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #dbeafe;
  --bg:          #f8fafc;
  --bg-card:     #ffffff;
  --border:      #e2e8f0;
  --border-soft: #f1f5f9;
  --text:        #1e293b;
  --text-sub:    #374151;
  --text-muted:  #64748b;
  --text-faint:  #94a3b8;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 3px rgba(30,41,59,.06);
  --shadow-sm: 0 2px 8px rgba(30,41,59,.08);
  --shadow-md: 0 4px 20px rgba(30,41,59,.10);
  --shadow-lg: 0 12px 40px rgba(30,41,59,.14);

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.22s ease;
  --t-slow: 0.35s ease;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE SHELL
   ══════════════════════════════════════════════════════════════════ */
.page-light {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-lg { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ══════════════════════════════════════════════════════════════════
   SECTION HEADER
   ══════════════════════════════════════════════════════════════════ */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border: 1px solid #bfdbfe;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.25;
}
.section-sub {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
}
.section-header-center {
  text-align: center;
  margin-bottom: 48px;
}
.section-header-center .section-sub { margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════════
   HERO (Light)
   ══════════════════════════════════════════════════════════════════ */
.ds-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 5rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ds-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(37,99,235,.18), transparent);
  pointer-events: none;
}
.ds-hero-inner { position: relative; z-index: 1; }
.ds-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,.2);
  border: 1px solid rgba(96,165,250,.35);
  color: #93c5fd;
  padding: 5px 16px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 20px;
}
.ds-hero-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.18;
  margin-bottom: 12px;
}
.ds-hero-sub {
  color: var(--text-faint);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.ds-hero-stats {
  display: inline-flex;
  gap: 32px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg);
  padding: 12px 32px;
  margin-top: 8px;
}
.ds-hero-stat .stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #a78bfa;
  display: block;
}
.ds-hero-stat .stat-lbl {
  font-size: .65rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   KART
   ══════════════════════════════════════════════════════════════════ */
.kart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  box-shadow: var(--shadow-xs);
}
.kart:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.kart--hover-blue:hover { border-color: var(--blue); }
.kart--hover-navy:hover { border-color: var(--navy); }
.kart--navy {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  border-color: #334155;
  color: #f1f5f9;
}
.kart--flat  { box-shadow: none; }
.kart--tight { padding: 16px; }
.kart--lg    { padding: 32px; border-radius: var(--r-xl); }

/* Kart içi yardımcılar */
.kart-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.kart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.kart-body {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.kart--navy .kart-title { color: #f1f5f9; }
.kart--navy .kart-body  { color: var(--text-faint); }

/* ══════════════════════════════════════════════════════════════════
   BUTON SİSTEMİ
   ══════════════════════════════════════════════════════════════════ */
.buton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all var(--t-base);
  white-space: nowrap;
  line-height: 1.2;
}
.buton:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* Boyut varyantları */
.buton--xs  { padding: 5px 12px;  font-size: 12px; border-radius: var(--r-sm); }
.buton--sm  { padding: 7px 16px;  font-size: 13px; }
.buton--lg  { padding: 13px 30px; font-size: 16px; border-radius: var(--r-lg); }
.buton--full { width: 100%; }

/* Renk varyantları */
.buton--navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,41,59,.25);
}
.buton--navy:hover { background: var(--navy-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,41,59,.35); }

.buton--blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.buton--blue:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,.35); }

.buton--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.buton--outline:hover { border-color: var(--navy); background: var(--bg); }

.buton--outline-blue {
  background: transparent;
  color: var(--blue);
  border-color: #bfdbfe;
}
.buton--outline-blue:hover { background: var(--blue-light); border-color: var(--blue); }

.buton--ghost {
  background: rgba(255,255,255,.1);
  color: #e2e8f0;
  border-color: rgba(255,255,255,.2);
}
.buton--ghost:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }

.buton--white { background: #fff; color: var(--navy); }
.buton--white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.buton--danger { background: #dc2626; color: #fff; }
.buton--danger:hover { background: #b91c1c; transform: translateY(-2px); }

.buton--success { background: #059669; color: #fff; }
.buton--success:hover { background: #047857; transform: translateY(-2px); }

/* Yükleme durumu */
.buton--loading { position: relative; color: transparent !important; pointer-events: none; }
.buton--loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ds-spin .7s linear infinite;
}

/* ══════════════════════════════════════════════════════════════════
   ROZET
   ══════════════════════════════════════════════════════════════════ */
.rozet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.4;
}
.rozet--blue    { background: var(--blue-light);  color: var(--blue-dark);  border: 1px solid #bfdbfe; }
.rozet--green   { background: #dcfce7; color: #166534;  border: 1px solid #bbf7d0; }
.rozet--amber   { background: #fef3c7; color: #92400e;  border: 1px solid #fde68a; }
.rozet--red     { background: #fee2e2; color: #991b1b;  border: 1px solid #fecaca; }
.rozet--purple  { background: #ede9fe; color: #6d28d9;  border: 1px solid #ddd6fe; }
.rozet--gray    { background: #f1f5f9; color: #475569;  border: 1px solid var(--border); }
.rozet--navy    { background: var(--navy); color: #fff; }
.rozet--dark    { background: #1e293b; color: #94a3b8; border: 1px solid #334155; }

.rozet--lg { padding: 5px 14px; font-size: 13px; }
.rozet--sm { padding: 2px 7px;  font-size: 10px; }

/* ══════════════════════════════════════════════════════════════════
   INPUT / FORM
   ══════════════════════════════════════════════════════════════════ */
.ds-input, .ds-select, .ds-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: .875rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-sizing: border-box;
}
.ds-input:focus, .ds-select:focus, .ds-textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30,41,59,.06);
}
.ds-input::placeholder, .ds-textarea::placeholder { color: var(--text-faint); }
.ds-textarea { resize: vertical; min-height: 120px; }
.ds-select { cursor: pointer; }

.ds-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.ds-form-group { margin-bottom: 16px; }

/* Input wrapper ile ikon */
.ds-input-wrap { position: relative; }
.ds-input-wrap .ds-input { padding-left: 40px; }
.ds-input-wrap .ds-input-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 14px;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════ */
.ds-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ds-modal-overlay.open { display: flex; }
.ds-modal {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(30,41,59,.2);
  animation: ds-modal-in .2s ease;
}
@keyframes ds-modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ds-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ds-modal-title { font-size: 1rem; font-weight: 800; color: var(--navy); }
.ds-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 20px; line-height: 1;
  padding: 4px 6px; border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.ds-modal-close:hover { background: var(--bg); color: var(--navy); }

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════ */
.ds-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: sticky;
  top: 88px;
}
.ds-sidebar-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ds-sidebar-section { margin-bottom: 20px; }
.ds-sidebar-divider { height: 1px; background: var(--border-soft); margin: 16px 0; }

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.ds-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-lg);
}
.ds-empty-icon {
  width: 56px; height: 56px;
  background: var(--blue-light);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--blue);
  margin: 0 auto 16px;
}
.ds-empty h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.ds-empty p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 360px;
  margin: 0 auto 20px;
}

/* ══════════════════════════════════════════════════════════════════
   ALERT / BANNER BANTLARI
   ══════════════════════════════════════════════════════════════════ */
.ds-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: .875rem;
  line-height: 1.6;
  border: 1px solid transparent;
}
.ds-alert i { margin-top: 2px; flex-shrink: 0; }
.ds-alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.ds-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.ds-alert--warn    { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.ds-alert--error   { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* ══════════════════════════════════════════════════════════════════
   KREDI ROZET (siteye özel)
   ══════════════════════════════════════════════════════════════════ */
.kredi-rozet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   TAB SİSTEMİ
   ══════════════════════════════════════════════════════════════════ */
.ds-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 20px;
}
.ds-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ds-tab.active { background: var(--navy); color: #fff; }
.ds-tab:not(.active):hover { background: var(--bg-card); color: var(--navy); }

/* ══════════════════════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════════════════════ */
.ds-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: ds-spin .8s linear infinite;
  margin: 0 auto;
}
.ds-spinner--sm { width: 20px; height: 20px; border-width: 2px; }
.ds-spinner--blue { border-top-color: var(--blue); }

@keyframes ds-spin { to { transform: rotate(360deg); } }

.ds-loading-box {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
}
.ds-loading-box .step-txt { font-size: .9rem; font-weight: 700; color: var(--navy); margin-top: 16px; }
.ds-loading-box .step-sub { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════════ */
/* Flex */
.d-flex      { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.align-center { align-items: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.ms-auto { margin-left: auto; }

/* Text */
.text-navy   { color: var(--navy); }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--text-muted); }
.text-faint  { color: var(--text-faint); }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-xs  { font-size: 11px; }
.fs-sm  { font-size: 13px; }
.fs-md  { font-size: 15px; }

/* Margin / Padding */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Section spacing */
.section-pad { padding: 64px 0; }
.section-pad-sm { padding: 40px 0; }

/* Divider */
.ds-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* ══════════════════════════════════════════════════════════════════
   TRUST / GÜVENCE BANDI
   ══════════════════════════════════════════════════════════════════ */
.ds-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.ds-trust-bar .trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ds-trust-bar .trust-item i { color: var(--blue); font-size: 12px; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ds-hero { padding: 4rem 1.25rem 2.5rem; }
  .ds-hero-stats { gap: 20px; padding: 10px 20px; }
  .section-pad { padding: 48px 0; }
  .container, .container-sm, .container-lg { padding: 0 16px; }
  .ds-modal { padding: 20px; }
}
@media (max-width: 480px) {
  .ds-hero-title { font-size: 1.7rem; }
  .ds-hero-stats { flex-direction: column; gap: 8px; }
}

/* ══════════════════════════════════════════════════════════════════
   COOKIE BANNER
   ══════════════════════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  border-top: 1px solid #334155;
  padding: 14px 24px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.cookie-text {
  color: #94a3b8;
  font-size: .82rem;
  line-height: 1.5;
  flex: 1;
  min-width: 280px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-text a { color: #3b82f6; text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn {
  padding: 7px 18px;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all var(--t-fast);
}
.cookie-btn--accept { background: var(--blue); color: #fff; }
.cookie-btn--accept:hover { background: var(--blue-dark); }
.cookie-btn--reject { background: transparent; color: #64748b; border: 1px solid #334155; }
.cookie-btn--reject:hover { color: #94a3b8; }

/* ══════════════════════════════════════════════════════════════════
   SECTION-TITLE ÇAKIŞMA ÖNLEMİ
   main.css'deki .section-title (dark bg için beyaz metin) ile
   design-system.css'deki .section-title (light bg için navy metin)
   arasındaki çakışmayı önlemek için sayfa bağlamına göre override.
   ══════════════════════════════════════════════════════════════════ */
.page-light .section-title,
body .section-title { color: var(--navy); }

