:root{
  /* Tema değişkenleri: default = koyu */
  --bg: #06080f;
  --bg2: #0a0f1e;
  --card: #0d1326;
  --card2: #111a35;
  --text: #eef2ff;
  --muted: #8b9cc7;

  /* marka rengi – canlı indigo-mor gradyan */
  --brand: #6366f1;
  --brand-light: #818cf8;
  --brand-soft: rgba(99,102,241,0.14);
  --brand-border: rgba(99,102,241,0.30);
  --brand-glow: rgba(99,102,241,0.08);

  /* durum renkleri – daha canlı */
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --border: rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);
  --shadow: 0 8px 32px rgba(0,0,0,0.40);
  --radius: 16px;

  /* arka plan / yüzeyler */
  --page-bg:
    radial-gradient(ellipse 900px 500px at 10% -8%, rgba(99,102,241,0.20) 0%, transparent 60%),
    radial-gradient(ellipse 700px 400px at 90% -5%, rgba(52,211,153,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 500px 500px at 50% 100%, rgba(99,102,241,0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);

  --surface: rgba(13, 19, 42, 0.60);
  --surface-2: rgba(255,255,255,0.035);
  --item-bg: rgba(255,255,255,0.02);

  /* inputlar */
  --input-bg: rgba(0,0,0,0.30);
  --input-text: var(--text);
  --input-focus: rgba(99,102,241,0.35);

  /* top bar */
  --nav-bg: rgba(10,15,30,0.75);
  --nav-border: rgba(255,255,255,0.06);

  /* geçişler */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="light"]{
  --bg: #f0f1f8;
  --bg2: #e4e7f5;
  --card: #ffffff;
  --card2: #f6f7fc;
  --text: #0f172a;
  --muted: #546484;

  --border: rgba(99,102,241,0.15);
  --border-soft: rgba(99,102,241,0.08);
  --shadow: 0 4px 24px rgba(99,102,241,0.07), 0 1px 3px rgba(15,23,42,0.06);

  --brand-soft: rgba(99,102,241,0.08);
  --brand-border: rgba(99,102,241,0.22);
  --brand-glow: rgba(99,102,241,0.06);

  --page-bg:
    radial-gradient(ellipse 1000px 600px at 10% -12%, rgba(99,102,241,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 800px 500px at 90% -8%, rgba(52,211,153,0.10) 0%, transparent 50%),
    radial-gradient(ellipse 600px 400px at 50% 100%, rgba(99,102,241,0.05) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);

  --surface: rgba(255,255,255,0.92);
  --surface-2: rgba(99,102,241,0.04);
  --item-bg: #ffffff;

  --input-bg: #ffffff;
  --input-text: #0f172a;
  --input-focus: rgba(99,102,241,0.25);

  --nav-bg: rgba(255,255,255,0.85);
  --nav-border: rgba(99,102,241,0.08);
}

/* ========================================
   GLOBAL
   ======================================== */
*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection{ background: rgba(99,102,241,0.30); }

.container{ max-width: 1140px; margin: 0 auto; padding: 24px 28px; }

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1{ margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.025em; }
h2{ margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
h3{ margin: 18px 0 10px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
a{ color: var(--brand-light); text-decoration: none; transition: color var(--transition-fast); }
a:hover{ color: var(--brand); text-decoration: none; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.mono{ font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.pagehead{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 20px;
}
.pagehead .muted{ font-size: 13px; }

/* ========================================
   TOP NAVBAR
   ======================================== */
.topnav{
  position: sticky;
  top: 0;
  z-index: 9990;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.topnav-inner{
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topnav-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.topnav-icon{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 7px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.topnav-brand:hover .topnav-icon{
  transform: scale(1.05);
  box-shadow: 0 0 16px var(--brand-glow);
}

.topnav-name{
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.topnav-links{
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.topnav-links a{
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.topnav-links a:hover{
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-soft);
}

.topnav-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Kredi göstergesi */
.credits-pill{
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: all var(--transition-fast);
}

.credits-pill:hover{
  background: rgba(99,102,241,0.20);
  border-color: rgba(99,102,241,0.40);
}

.credits-pill span{ font-variant-numeric: tabular-nums; }

.iconbtn{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.iconbtn:hover{
  background: var(--brand-soft);
  border-color: var(--brand-border);
  transform: translateY(-1px);
}
.iconbtn:active{ transform: translateY(0px); }

/* ========================================
   CARDS & SURFACES
   ======================================== */
.card{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  transition: border-color var(--transition-fast);
}

.card:hover{
  border-color: var(--border);
}

.header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}

.brandbar{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.brandlink{ display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.brandicon{
  height: 38px;
  width: 38px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  padding: 8px;
}
.header-actions{ display: flex; gap: 10px; flex-wrap: wrap; }

/* ========================================
   HERO & LANDING
   ======================================== */
.hero{ padding: 24px; }
.brand-row{ display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.brand-logo{ height: 34px; width: auto; display: block; }
.hero-grid{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.hero-item{
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}
.hero-item:hover{
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}
.hero-title{ font-weight: 800; margin-bottom: 6px; }
.hero-actions{ margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.footer-links{ margin-top: 12px; }

/* ========================================
   TAGS & PILLS
   ======================================== */
.tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.tag-free{ background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.25); }
.tag-info{ background: var(--surface-2); border-color: var(--border); }

/* ========================================
   PRICING
   ======================================== */
.pricing-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.pricing-card{
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-medium);
}
.pricing-card:hover{
  border-color: var(--brand-border);
  box-shadow: 0 0 24px var(--brand-glow);
}
.pricing-title{ font-weight: 800; }
.pricing-big{ font-size: 28px; font-weight: 900; margin-top: 8px; letter-spacing: -0.02em; }
.pricing-pack{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  margin-bottom: 8px;
  transition: border-color var(--transition-fast);
}
.pricing-pack:hover{ border-color: var(--border); }

/* ========================================
   FAQ
   ======================================== */
details.faq{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: border-color var(--transition-fast);
}
details.faq:hover{ border-color: var(--border); }
details.faq > summary{
  cursor: pointer;
  font-weight: 700;
}
details.faq > div{ margin-top: 10px; line-height: 1.5; }

/* ========================================
   WARNING BOX
   ======================================== */
.warnbox{
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.20);
  margin-bottom: 16px;
  font-size: 13px;
}

/* ========================================
   GRIDS & LAYOUTS
   ======================================== */
.grid2{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
}

.grid3{
  display: grid;
  grid-template-columns: 280px 280px 1fr;
  gap: 12px;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.label{ display: block; font-size: 13px; font-weight: 600; }

.select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--input-text);
  margin-top: 8px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
}
.select:focus{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--input-focus);
}

.select option{
  color: #0f172a;
  background: #f0f2ff;
}

.input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--input-text);
  margin-top: 8px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input:focus{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--input-focus);
}

input[type="file"]{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--input-text);
  margin-top: 8px;
  transition: border-color var(--transition-fast);
}
input[type="file"]:focus{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--input-focus);
}

.textarea{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--input-text);
  margin-top: 10px;
  resize: vertical;
  line-height: 1.45;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.textarea:focus{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--input-focus);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}
.btn:hover{
  background: var(--brand-soft);
  border-color: var(--brand-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.btn:active{
  transform: translateY(0px);
  box-shadow: none;
}
.btn:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.btn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary{
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.primary:hover{
  background: var(--brand-light);
  border-color: var(--brand-light);
  box-shadow: 0 4px 20px rgba(99,102,241,0.25);
}

.btn.tiny{
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.row{ display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.spacer{ flex: 1; }
.hidden{ display: none; }

/* ========================================
   RESULTS
   ======================================== */
.result-top{ display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.result-actions{ display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ========================================
   SCORES
   ======================================== */
.score-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.score-box{
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}
.score-box:hover{
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.score{
  font-size: 32px;
  font-weight: 900;
  margin: 8px 0;
  letter-spacing: -0.03em;
}

.pill{
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pill-low{ background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.22); color: var(--ok); }
.pill-medium{ background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.22); color: var(--warn); }
.pill-high{ background: rgba(251,113,133,0.10); border-color: rgba(251,113,133,0.22); color: var(--bad); }
.pill-critical{ background: rgba(251,113,133,0.16); border-color: rgba(251,113,133,0.30); color: var(--bad); }

/* Skor açıklaması */
.score-explain{
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.score-explain-head{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Correctness box */
.correctness-box{
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.correctness-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.correctness-list{
  margin: 10px 0 0 18px;
  padding: 0;
}
.correctness-list li{ margin: 0 0 8px 0; }

/* Driver items */
.driver-list{
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.driver-item{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  transition: all var(--transition-fast);
}
.driver-item:hover{
  border-color: var(--border);
  transform: translateX(2px);
}
.driver-title{ font-weight: 800; line-height: 1.3; }
.driver-meta{ color: var(--muted); font-size: 12px; margin-top: 2px; }
.driver-right{ display: flex; align-items: center; gap: 8px; }
.driver-points{ color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.top3{ margin-top: 14px; }

/* ========================================
   PLAN GRIDS
   ======================================== */
.plan-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 10px;
}
.plan-title{ font-weight: 700; margin-bottom: 4px; }
/* ========================================
   FILTERS & CHIPS
   ======================================== */
.filters{ margin-top: 14px; display: grid; grid-template-columns: 1fr; gap: 12px; }
.filter-group{ display: flex; flex-direction: column; gap: 8px; }
.chips{ display: flex; gap: 6px; flex-wrap: wrap; }
.chip{
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.chip:hover{
  background: var(--brand-soft);
  border-color: var(--brand-border);
  transform: translateY(-1px);
}
.chip-on{
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand-light);
}

/* ========================================
   ISSUE CARDS
   ======================================== */
.split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  margin-top: 16px;
}
.split.no-history{
  grid-template-columns: 1fr;
}

.list{ display: flex; flex-direction: column; gap: 16px; }

.item{
  position: relative;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  background: var(--item-bg);
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
  transition: all var(--transition-medium);
}
.item:hover{
  border-color: var(--border);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* Sol şerit */
.item::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-soft);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.item[data-sev="LOW"]::before{ background: var(--ok); }
.item[data-sev="MEDIUM"]::before{ background: var(--warn); }
.item[data-sev="HIGH"]::before{ background: var(--bad); }
.item[data-sev="CRITICAL"]::before{ background: var(--bad); box-shadow: 0 0 12px rgba(251,113,133,0.30); }

.item-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.item-title{ font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }

.item-meta{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-pill{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1;
  font-weight: 600;
}

.section{ margin-top: 12px; }
.section-title{
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bullets{
  margin: 8px 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bullets li{ line-height: 1.4; }

.b-label{
  color: var(--muted);
  font-weight: 800;
  margin-right: 6px;
}

.risk-sentences{
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.risk-sentences p{ margin: 0; line-height: 1.4; }
.k{ color: var(--muted); font-weight: 700; }
.kv{ margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.why, .sug{
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}

/* ========================================
   BADGES
   ======================================== */
.badge{
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-CRITICAL{ background: rgba(251,113,133,0.16); border-color: rgba(251,113,133,0.30); color: var(--bad); }
.badge-HIGH{ background: rgba(251,113,133,0.10); border-color: rgba(251,113,133,0.22); color: var(--bad); }
.badge-MEDIUM{ background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.22); color: var(--warn); }
.badge-LOW{ background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.22); color: var(--ok); }

mark{
  background: rgba(251, 191, 36, 0.20);
  color: var(--text);
  padding: 1px 4px;
  border-radius: 4px;
}

/* ========================================
   HISTORY SIDEBAR
   ======================================== */
.history{
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.history-item{
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}
.history-item:hover{
  border-color: var(--border);
  background: var(--brand-soft);
}
.history-top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.history-file{
  font-size: 12px;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.footer-note{ margin-top: 10px; }
.footer{ margin-top: 10px; text-align: center; }

/* ========================================
   TOP 3 TITLE
   ======================================== */
.top3-title{
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-weight: 800;
  line-height: 1.3;
}

/* ========================================
   BILLING
   ======================================== */
.billing-box{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.billing-right{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.packs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
.packs .btn{ padding: 10px 12px; }

/* ========================================
   SIMULATOR
   ======================================== */
.appver{ margin-left: 10px; font-weight: 400; color: var(--muted); }

.simulator{
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.sim-controls{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
#cancelDays{ width: 100%; margin-top: 6px; }

.sim-boxes{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.sim-box{
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: border-color var(--transition-fast);
}
.sim-box:hover{ border-color: var(--border); }
.sim-title{ font-weight: 700; margin-bottom: 8px; }
.sim-body{ line-height: 1.5; }

/* ========================================
   NEGOTIATION
   ======================================== */
.negotiation{
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.neg-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.quote-text{ white-space: pre-wrap; }

/* Kişi sayısı slider */
input[type="range"]{
  width: 100%;
  margin-top: 10px;
  accent-color: var(--brand);
}

.item-actions{
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================
   ISSUE TOGGLE PANELS
   ======================================== */
.issue-actions{
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.issue-toggle{
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition-fast);
}
.issue-toggle:hover{
  background: var(--brand-soft);
  border-color: var(--brand-border);
}
.issue-toggle.on{
  background: rgba(52,211,153,0.10);
  border-color: rgba(52,211,153,0.25);
  color: var(--ok);
}

.issue-panels{ margin-top: 10px; }
.issue-panel{
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
}
.issue-panel.hidden{ display: none; }
.issue-panel .kv{ margin-top: 0; }
.issue-panel .textarea{ margin-top: 8px; }

/* ========================================
   DETAILS PANELS
   ======================================== */
.item-details{
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.item-details summary{
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  outline: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition-fast);
}
.item-details summary:hover{ color: var(--brand-light); }
.item-details summary::-webkit-details-marker{ display: none; }
.item-details summary::before{
  content: "+";
  display: inline-block;
  opacity: 0.7;
  font-size: 16px;
  transition: transform var(--transition-fast);
}
.item-details[open] summary::before{
  content: "−";
}
.item-details .details-body{ margin-top: 10px; }

/* History details */
.history-details{
  margin-top: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.history-details summary{
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  outline: none;
}
.history-details summary::-webkit-details-marker{ display: none; }
.history-details summary::before{
  content: "+";
  display: inline-block;
  margin-right: 8px;
  opacity: 0.7;
}
.history-details[open] summary::before{ content: "−"; }

/* ========================================
   PAYMENT MODAL
   ======================================== */
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden{ display: none; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-panel{
  position: relative;
  width: min(820px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 24px 64px rgba(0,0,0,0.30);
}
.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h3{ margin: 0; }

.iyzico-box{
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
}
.iyzico-box iframe{
  width: 100%;
  border: 0;
  min-height: 560px;
}

/* ========================================
   CODE
   ======================================== */
code{
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast{
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  max-width: min(760px, calc(100% - 24px));
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px rgba(0,0,0,0.30);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.toast.ok{ border-color: rgba(52,211,153,0.30); }
.toast.err{ border-color: rgba(251,113,133,0.30); }
.toast .toast-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.toast .toast-title{ font-weight: 800; }
.toast .toast-actions{ margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.last-restore{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  width: 100%;
}

/* ========================================
   PAYMENT PAGE
   ======================================== */
.divider{
  height: 1px;
  width: 100%;
  background: var(--border);
  border: 0;
  margin: 16px 0;
}
.restorebox{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.restorebox-title{ font-weight: 800; margin-bottom: 6px; }
.restorebox-row{ display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.restorebox-token{
  flex: 1;
  min-width: 240px;
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  overflow: auto;
}
.checkout{ width: 100%; min-height: 40px; }

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */
:root[data-theme="light"] .btn:hover{
  background: rgba(99,102,241,0.06);
}
:root[data-theme="light"] .iconbtn:hover{
  background: rgba(99,102,241,0.06);
}
:root[data-theme="light"] .card{
  background: rgba(255,255,255,0.95);
  border-color: rgba(99,102,241,0.10);
  box-shadow: 0 4px 24px rgba(99,102,241,0.06), 0 1px 2px rgba(15,23,42,0.04);
  backdrop-filter: blur(12px);
}
:root[data-theme="light"] .item{
  background: #ffffff;
  border-color: rgba(99,102,241,0.10);
  box-shadow: 0 2px 12px rgba(99,102,241,0.05), 0 1px 2px rgba(15,23,42,0.03);
}
:root[data-theme="light"] .item:hover{
  border-color: rgba(99,102,241,0.18);
  box-shadow: 0 8px 28px rgba(99,102,241,0.10), 0 2px 4px rgba(15,23,42,0.04);
}
:root[data-theme="light"] .score-box,
:root[data-theme="light"] .subscore-card,
:root[data-theme="light"] .redline-card,
:root[data-theme="light"] .driver-item,
:root[data-theme="light"] .hero-item,
:root[data-theme="light"] .history-item{
  background: #ffffff;
  border-color: rgba(99,102,241,0.08);
  box-shadow: 0 2px 8px rgba(99,102,241,0.04);
}
:root[data-theme="light"] .score-box:hover,
:root[data-theme="light"] .subscore-card:hover,
:root[data-theme="light"] .redline-card:hover,
:root[data-theme="light"] .hero-item:hover,
:root[data-theme="light"] .history-item:hover{
  border-color: rgba(99,102,241,0.18);
  box-shadow: 0 8px 24px rgba(99,102,241,0.08);
}
:root[data-theme="light"] .select,
:root[data-theme="light"] .input,
:root[data-theme="light"] input[type="file"]{
  background: #ffffff;
  border-color: rgba(99,102,241,0.14);
}
:root[data-theme="light"] .select:focus,
:root[data-theme="light"] .input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
:root[data-theme="light"] .warnbox{
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.25);
}
:root[data-theme="light"] .topnav{
  background: rgba(255,255,255,0.90);
  border-bottom-color: rgba(99,102,241,0.08);
}
:root[data-theme="light"] .billing-box{
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.16);
}
:root[data-theme="light"] .modal-panel{
  box-shadow: 0 24px 64px rgba(15,23,42,0.15);
}
:root[data-theme="light"] .modal-backdrop{
  background: rgba(15,23,42,0.25);
}
:root[data-theme="light"] .toast{
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15,23,42,0.12);
}
:root[data-theme="light"] .issue-panel,
:root[data-theme="light"] .item-details{
  background: rgba(99,102,241,0.03);
  border-color: rgba(99,102,241,0.08);
}
:root[data-theme="light"] .chip:hover{
  background: rgba(99,102,241,0.06);
}
:root[data-theme="light"] .primary{
  box-shadow: 0 4px 14px rgba(99,102,241,0.25);
}
:root[data-theme="light"] .primary:hover{
  box-shadow: 0 6px 20px rgba(99,102,241,0.30);
}
:root[data-theme="light"] .credits-pill{
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.18);
}

.fieldhint{ margin-top: 8px; max-width: 62ch; line-height: 1.45; }
#packExamples{ opacity: .85; }

.negotiation textarea#negText,
.neg-one-text{
  line-height: 1.65;
  font-size: 14px;
}

/* ========================================
   SUBSCORES
   ======================================== */
.subscore-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 10px;
}
.subscore-card{
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}
.subscore-card:hover{
  border-color: var(--border);
  transform: translateY(-1px);
}
.subscore-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.subscore-title{ font-weight: 800; }
.subscore-meter{
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  margin: 8px 0 10px;
}
.subscore-fill{
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscore-low{ background: linear-gradient(90deg, #22c55e, #34d399); }
.subscore-medium{ background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.subscore-high{ background: linear-gradient(90deg, #ef4444, #fb7185); }

/* ========================================
   PAYMENT LOGOS
   ======================================== */
.payment-logos{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}

.pay-logo{
  flex-shrink: 0;
  display: block;
}

.pay-logo-iyzico{
  font-size: 13px;
  font-weight: 800;
  color: #1E64FF;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pay-logo-visa{
  width: 36px;
  height: 12px;
}

.pay-logo-mc{
  width: 26px;
  height: 16px;
}

.pay-logo-sep{
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.pay-logo-divider{
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

:root[data-theme="light"] .payment-logos{
  background: rgba(99,102,241,0.03);
  border-color: rgba(99,102,241,0.10);
}

/* ========================================
   REDLINE / CONTENT ENHANCEMENT CARDS
   ======================================== */
.redline-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
.redline-card{
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}
.redline-card:hover{
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card, .item, .score-box, .redline-card, .subscore-card {
  animation: fadeIn 0.3s ease-out;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar{ width: 6px; height: 6px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{
  background: rgba(99,102,241,0.20);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover{
  background: rgba(99,102,241,0.35);
}

/* ========================================
   MOBILE MENU
   ======================================== */
.mobile-menu-btn{ display: none; }

.mobile-menu{
  padding: 12px 28px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.mobile-menu-links{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-links a{
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition-fast);
}
.mobile-menu-links a:hover{
  background: var(--surface-2);
  text-decoration: none;
}

.mobile-menu-actions{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.mobile-menu-actions .btn{
  flex: 1;
  justify-content: center;
  padding: 12px;
}

.hide-mobile{ display: inline-flex; }

/* ========================================
   RESPONSIVE – TABLET (max-width: 900px)
   ======================================== */
@media (max-width: 900px){
  .topnav-links{ display: none; }
  .hide-mobile{ display: none !important; }
  .mobile-menu-btn{ display: inline-flex; }

  .topnav-inner{ padding: 10px 16px; }
  .mobile-menu{ padding: 12px 16px 16px; }

  .container{ padding: 16px; }

  h1{ font-size: 22px; }

  .pagehead{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 16px;
  }

  .grid2{ grid-template-columns: 1fr; }
  .grid3{ grid-template-columns: 1fr; }
  .score-grid{ grid-template-columns: 1fr 1fr; gap: 10px; }
  .plan-grid{ grid-template-columns: 1fr; }
  .hero-grid{ grid-template-columns: 1fr; }
  .pricing-grid{ grid-template-columns: 1fr; }
  .subscore-grid{ grid-template-columns: 1fr; }
  .sim-controls{ grid-template-columns: 1fr; }
  .sim-boxes{ grid-template-columns: 1fr; }

  .split{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card{ padding: 16px; }
  .item{ padding: 14px; }
  .redline-card{ padding: 14px; }

  .billing-box{
    flex-direction: column;
    align-items: stretch;
  }
  .billing-right{
    flex-direction: column;
    width: 100%;
  }

  .packs{
    flex-wrap: wrap;
    gap: 6px;
  }

  .result-top{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .result-actions{
    flex-wrap: wrap;
    gap: 8px;
  }

  .history{ max-height: none; }
  .history-file{ -webkit-line-clamp: 2; }

  .modal-panel{
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    padding: 16px;
  }

  .credits-pill{ font-size: 11px; padding: 5px 8px; }
}

/* ========================================
   RESPONSIVE – PHONE (max-width: 480px)
   ======================================== */
@media (max-width: 480px){
  body{ font-size: 13px; }

  .container{ padding: 12px; }
  .topnav-inner{ padding: 8px 12px; }
  .mobile-menu{ padding: 10px 12px 14px; }

  h1{ font-size: 20px; }
  h2{ font-size: 16px; }

  .topnav-name{ font-size: 14px; }
  .topnav-icon{ width: 32px; height: 32px; padding: 6px; }

  .card{
    padding: 14px;
    border-radius: 14px;
  }

  .score-grid{ grid-template-columns: 1fr; }
  .score{ font-size: 28px; }

  .item{
    padding: 12px 12px 10px;
    border-radius: 14px;
  }
  .item-title{ font-size: 14px; }
  .item-head{ flex-wrap: wrap; gap: 6px; }

  .badge{ font-size: 9px; padding: 3px 6px; }
  .meta-pill{ font-size: 10px; padding: 3px 6px; }
  .pill{ font-size: 10px; padding: 4px 8px; }

  .btn{
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
    min-height: 44px;
  }
  .btn.tiny{
    padding: 8px 10px;
    min-height: 40px;
  }

  .iconbtn{
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .select, .input, input[type="file"]{
    padding: 12px;
    font-size: 14px;
    border-radius: 12px;
    min-height: 44px;
  }

  .textarea{
    padding: 12px;
    font-size: 14px;
    min-height: 80px;
  }

  .redline-card{
    padding: 12px;
    border-radius: 12px;
  }

  .warnbox{ padding: 10px 12px; font-size: 12px; }

  .chips{ gap: 4px; }
  .chip{
    padding: 8px 10px;
    font-size: 11px;
    min-height: 36px;
  }

  .issue-actions{ gap: 6px; }
  .issue-toggle{
    padding: 8px 10px;
    font-size: 11px;
    min-height: 36px;
  }

  .driver-item{
    flex-direction: column;
    gap: 6px;
    padding: 10px;
  }
  .driver-right{ align-self: flex-start; }

  .billing-box{ padding: 12px; gap: 10px; }

  .row{
    flex-wrap: wrap;
    gap: 8px;
  }

  .neg-head{ flex-direction: column; }

  .modal-panel{
    width: calc(100% - 12px);
    padding: 14px;
    border-radius: 14px;
  }

  .toast{
    top: 8px;
    max-width: calc(100% - 16px);
    padding: 12px;
    border-radius: 12px;
  }

  /* Dosya yükleme alanı */
  .fieldhint{ font-size: 11px; }
  .small{ font-size: 11px; }

  /* Tablo benzeri grid'ler sığdır */
  .correctness-list{ margin-left: 12px; }
  .bullets{ margin-left: 14px; }

  /* Ödeme logoları küçült */
  .payment-logos{
    gap: 6px;
    padding: 5px 8px;
  }
  .pay-logo-iyzico{ font-size: 11px; }
  .pay-logo-visa{ width: 30px; height: 10px; }
  .pay-logo-mc{ width: 22px; height: 14px; }
  .pay-logo-sep{ font-size: 10px; }
  .pay-logo-divider{ height: 12px; }
}

/* ========================================
   TOUCH – dokunmatik hedef minimum boyut
   ======================================== */
@media (pointer: coarse){
  .btn{ min-height: 44px; }
  .btn.tiny{ min-height: 40px; }
  .iconbtn{ min-width: 44px; min-height: 44px; }
  .chip{ min-height: 40px; }
  .issue-toggle{ min-height: 40px; }
  .select, .input, input[type="file"]{ min-height: 48px; }

  /* Hover animasyonları dokunmatikta kaldır */
  .item:hover,
  .score-box:hover,
  .redline-card:hover,
  .subscore-card:hover,
  .hero-item:hover,
  .driver-item:hover,
  .history-item:hover{
    transform: none;
  }
}
