/* DaisyBusiness — YouTube koyu tema düzeni + zümrüt yeşili vurgu.
   Renkler yalnızca buradan değiştirilir (kesikli çerçeve SVG'leri hariç, aşağıda not var). */
:root {
  --bg: #0f0f0f;
  --surface: #212121;
  --surface-2: #272727;
  --surface-3: #3f3f3f;
  --border: #303030;
  --text: #f1f1f1;
  --muted: #aaaaaa;
  --faint: #717171;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-ink: #04130d; /* zümrüt üzerindeki yazı (beyaz yetersiz kontrast verir) */
  --accent-soft: rgba(16, 185, 129, .12);
  --danger: #ff4e45;
  --warn: #f5b945; /* kontrol edilmesi gereken (hata değil) — ör. belirsiz tarih */
  --radius: 12px;
  --masthead-h: 56px;
  --guide-w: 72px;
  color-scheme: dark;
}
body.guide-expanded { --guide-w: 240px; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--masthead-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

[hidden] { display: none !important; }

button {
  font: inherit;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: none;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* --- Düğmeler --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; margin-left: -4px; }
.btn.small { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--text); color: var(--bg); }
.btn.small:hover { background: #d9d9d9; }
.btn.small svg { width: 18px; height: 18px; }
.btn.small.ghost { background: var(--surface-2); color: var(--text); }
.btn.small.ghost:hover { background: var(--surface-3); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.outline:hover { background: var(--surface-2); }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; fill: var(--text); }
.file-item .icon-btn svg { width: 20px; height: 20px; fill: var(--muted); }
.file-item .icon-btn:hover svg { fill: var(--text); }

.link-btn { padding: 0; font-size: inherit; font-weight: 500; color: var(--accent); text-decoration: underline; }
.link-btn:hover { color: var(--accent-hover); }

/* --- Üst bar --- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--masthead-h);
  padding: 0 16px 0 12px;
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr minmax(0, 640px) 1fr;
  align-items: center;
  gap: 16px;
}
.masthead-start { display: flex; align-items: center; gap: 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.5px;
}
.masthead-end { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

.search { display: flex; height: 40px; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #121212;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 20px 0 0 20px;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.search-btn {
  width: 64px;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0 20px 20px 0;
}
.search-btn:hover { background: var(--surface-3); }
.search-btn svg { width: 22px; height: 22px; fill: var(--text); }

.google-btn svg { width: 18px; height: 18px; margin-left: -2px; }
.avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.account-menu {
  position: fixed;
  top: calc(var(--masthead-h) + 4px);
  right: 16px;
  z-index: 40;
  width: min(320px, calc(100vw - 32px));
  padding: 8px 0;
  border-radius: var(--radius);
  background: #282828;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .6);
}
.account-email { margin: 8px 16px 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.account-plan { margin: 2px 16px 8px; font-size: 13px; color: var(--muted); }
.menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  font-weight: 400;
  text-decoration: none;
  border-top: 1px solid var(--border);
}
.menu-item:hover { background: var(--surface-3); }

/* --- Sol menü (YouTube guide) --- */
.guide {
  position: fixed;
  top: var(--masthead-h);
  bottom: 0;
  left: 0;
  z-index: 20;
  width: var(--guide-w);
  padding: 4px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.guide-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 16px 0 14px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 400;
  text-decoration: none;
  color: var(--text);
}
.guide-item svg { width: 24px; height: 24px; fill: var(--text); flex-shrink: 0; }
.guide-item:hover { background: var(--surface-2); }
.guide-item[aria-current='page'] svg { fill: var(--accent); }
.guide-item[data-soon] { color: var(--muted); }
.guide-item[data-soon] svg { fill: var(--muted); }
.guide-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.guide-expanded .guide { padding: 12px; }
body.guide-expanded .guide-item {
  flex-direction: row;
  gap: 24px;
  padding: 0 12px;
  height: 40px;
  font-size: 14px;
}
body.guide-expanded .guide-item[aria-current='page'] { background: var(--surface-2); font-weight: 500; }

/* --- İçerik --- */
.content {
  margin-left: var(--guide-w);
  padding: 24px 24px 64px;
  transition: margin-left .2s;
}
.content > section { max-width: 1184px; margin: 0 auto; }
.content > section + section { margin-top: 48px; }

.section-title { margin: 0 0 16px; font-size: 20px; font-weight: 700; }
.section-sub { margin: -8px 0 24px; color: var(--muted); }

/* --- Ana araç: cam efektli sürükle-bırak --- */
.hero { position: relative; display: grid; gap: 12px; }
/* Camın arkasında görünen zümrüt ışık — cam etkisini görünür kılar */
.hero::before {
  content: "";
  position: absolute;
  inset: 10% 20% auto;
  height: 60%;
  background: radial-gradient(closest-side, rgba(16, 185, 129, .28), transparent);
  filter: blur(40px);
  pointer-events: none;
}

/* Kesikli çerçeve SVG ile çizilir (CSS değişkeni kullanamaz):
   varsayılan %234A4A4A, hover %236B6B6B, sürükleme %2310B981 */
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 24px 40px;
  border-radius: 24px;
  text-align: center;
  cursor: pointer;
  background-color: rgba(33, 33, 33, .55);
  background-image:
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e%3crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%234A4A4A' stroke-width='4' stroke-dasharray='12%2c 10' stroke-linecap='round'/%3e%3c/svg%3e"),
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 64px rgba(0, 0, 0, .35);
  transition: background-color .2s, box-shadow .2s, transform .2s;
}
.dropzone:hover {
  background-image:
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e%3crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%236B6B6B' stroke-width='4' stroke-dasharray='12%2c 10' stroke-linecap='round'/%3e%3c/svg%3e"),
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
}
.dropzone.dragover {
  background-color: rgba(16, 185, 129, .08);
  background-image:
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e%3crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%2310B981' stroke-width='4' stroke-dasharray='12%2c 10' stroke-linecap='round'/%3e%3c/svg%3e"),
    linear-gradient(180deg, rgba(16, 185, 129, .10), rgba(16, 185, 129, .02));
  box-shadow: 0 0 0 6px rgba(16, 185, 129, .08), 0 24px 64px rgba(16, 185, 129, .18);
  transform: scale(1.01);
}
.drop-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
}
.drop-icon svg { width: 36px; height: 36px; fill: var(--accent); }
.drop-title { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.8px; }
.drop-text { margin: 0 0 12px; max-width: 46ch; font-size: 16px; color: var(--muted); }
.drop-hint { margin: 8px 0 0; font-size: 12px; color: var(--faint); }

/* --- Dosya listesi --- */
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.file-list:empty { display: none; }
.file-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.pdf-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
}
.file-item.done .pdf-icon { color: var(--accent); background: var(--accent-soft); font-size: 10px; }
.file-info { min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.file-meta .err { color: var(--danger); }
.file-meta .info { color: var(--accent); }
.file-actions { display: flex; align-items: center; gap: 4px; }
.no-results { margin: 0; text-align: center; color: var(--muted); }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Mod seçimi (YouTube çip düzeni) --- */
.mode-switch { position: relative; display: flex; justify-content: center; gap: 12px; }
.mode-switch button {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 14px;
}
.mode-switch button:hover { background: var(--surface-3); }
.mode-switch button[aria-checked='true'] { background: var(--text); color: var(--bg); }

/* --- Ekstre önizlemesi --- */
.statement { display: grid; gap: 12px; }
.statement-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.statement-heading { min-width: 0; }
.statement-heading .section-title { margin: 0; overflow-wrap: anywhere; }
.statement-summary { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--muted); }
.statement-summary .err { color: var(--danger); }
.statement-actions { display: flex; align-items: center; gap: 8px; }
.statement-notice {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.statement-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.statement-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.statement-table th {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  color: var(--muted);
}
.statement-table td { padding: 2px 4px; border-top: 1px solid var(--border); }
.statement-table td:first-child { width: 150px; }
.statement-table td.num, .statement-table th.num { width: 140px; text-align: right; }
.statement-table td:last-child { width: 44px; }
.statement-table input {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
}
.statement-table td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.statement-table input:hover { border-color: var(--border); }
.statement-table input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.date-field { display: flex; align-items: center; gap: 2px; }
.date-field input { flex: 1; min-width: 0; }
.date-flag {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.date-flag svg { width: 18px; height: 18px; fill: var(--warn); }
.date-flag:hover { background: rgba(245, 185, 69, .14); }
.statement-table input.invalid { border-color: var(--danger); }
.statement-notice .warn { color: var(--warn); font-weight: 500; }
.statement-table tr.mismatch td { background: rgba(255, 78, 69, .08); }
.statement-table tr.mismatch td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.statement-table .icon-btn { width: 32px; height: 32px; }
.statement-table .icon-btn svg { width: 18px; height: 18px; fill: var(--muted); }
.statement-empty { margin: 0; color: var(--muted); }

/* --- Araç kartları (YouTube öneri ızgarası) --- */
.tool-grid {
  display: grid;
  /* auto-fit: 3 kart tüm genişliği doldurur (boş sütun kalmaz) */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px 16px;
}
.tool-card { display: grid; gap: 12px; padding: 0; text-align: left; font-weight: 400; }
.tool-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: background .2s;
}
.tool-card:hover .tool-thumb { background: var(--surface-2); }
.tool-thumb svg { width: 100%; height: 100%; }
.tool-thumb .doc { fill: #2c2c2c; stroke: #4a4a4a; stroke-width: 1.2; }
.tool-thumb .doc-accent { fill: rgba(16, 185, 129, .12); stroke: var(--accent); }
.tool-thumb .line { stroke: #5c5c5c; stroke-width: 2; stroke-linecap: round; fill: none; }
.tool-thumb .arrow { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tool-thumb .glyph { stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.thumb-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .8);
  font-size: 12px;
  font-weight: 500;
}
.tool-meta { display: flex; gap: 12px; }
.tool-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-weight: 700;
  color: var(--muted);
}
.tool-title { display: block; font-size: 16px; font-weight: 500; line-height: 22px; }
.tool-sub { display: block; margin-top: 4px; color: var(--muted); }

/* --- Fiyatlandırma --- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 40px rgba(16, 185, 129, .22);
}
.plan-flag {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.plan-name { margin: 0; font-size: 18px; font-weight: 700; }
.plan-for { margin: 0; color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 20px 0 24px; }
.plan-price .amount { font-size: 40px; font-weight: 700; letter-spacing: -1.2px; }
.plan-price .per { color: var(--muted); }
.plan-btn { width: 100%; margin-top: auto; }

.plan-includes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.plan-includes li { display: flex; align-items: center; gap: 8px; }
.plan-includes li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3e%3c/svg%3e") center / contain no-repeat;
}

/* --- Bildirim (YouTube snackbar) --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: calc(var(--guide-w) + 24px);
  z-index: 50;
  padding: 12px 16px;
  border-radius: 8px;
  max-width: calc(100vw - 48px);
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.toast.err { background: var(--danger); color: #fff; }

/* --- Orta genişlik: plan kartları alt alta --- */
@media (max-width: 960px) {
  .plan-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

/* --- Mobil: sol menü alt çubuğa dönüşür (YouTube uygulaması gibi) --- */
@media (max-width: 700px) {
  :root, body.guide-expanded { --guide-w: 0px; }
  .masthead { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 12px; }
  .guide-toggle, .brand span, #upgrade-btn { display: none; }
  .google-btn span { display: none; }
  .google-btn { padding: 0 10px; }
  .search-btn { width: 48px; }

  .guide,
  body.guide-expanded .guide {
    top: auto;
    width: 100%;
    height: 60px;
    padding: 0;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--border);
  }
  .guide-item,
  body.guide-expanded .guide-item {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    padding: 8px 2px;
    border-radius: 0;
    font-size: 10px;
  }
  .content { padding: 16px 16px 96px; }
  .dropzone { padding: 40px 16px 32px; }
  .drop-title { font-size: 26px; }
  .drop-text { font-size: 15px; }
  .toast { left: 16px; bottom: 76px; max-width: calc(100vw - 32px); }
}
