:root {
  --bg-top: #f6f1e8;
  --bg-bottom: #eef3f6;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.78);
  --text: #1d2c33;
  --muted: #67757d;
  --line: #d8e1e7;
  --shadow: 0 18px 42px rgba(29, 44, 51, 0.1);
  --shadow-soft: 0 10px 24px rgba(29, 44, 51, 0.07);
  --accent: #1f5e86;
  --accent-strong: #14425e;
  --accent-soft: #e8f2fa;
  --success: #21683d;
  --success-soft: #eaf7ee;
  --warning: #7a5a00;
  --warning-soft: #fff7dc;
  --danger: #9b2d2d;
  --danger-soft: #fdeaea;
}

body.theme-home {
  --accent: #254f72;
  --accent-strong: #19394f;
  --accent-soft: #e7eef7;
}

body.theme-pdf-excel {
  --accent: #1f5e86;
  --accent-strong: #14425e;
  --accent-soft: #e8f2fa;
}

body.theme-excel-pdf {
  --accent: #2d7444;
  --accent-strong: #1f5230;
  --accent-soft: #eaf6ee;
}

body.theme-sign {
  --accent: #b15b22;
  --accent-strong: #7e3e14;
  --accent-soft: #fbefe6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

a,
button,
input {
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
.drop:focus-visible {
  outline: 4px solid rgba(31, 94, 134, 0.18);
  outline-offset: 3px;
}

.site-header {
  padding: 20px 16px 0;
}

.site-header-inner {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.brand-copy strong {
  display: block;
  font-size: 15px;
}

.brand-copy span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.page-shell {
  max-width: 940px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.tab-nav {
  max-width: 940px;
  margin: 14px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tab-link {
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--accent-strong);
  font-weight: 700;
  text-align: center;
}

.tab-link span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.tab-link strong {
  display: block;
  font-size: 15px;
}

.tab-link.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #fff;
}

.tab-link.active span {
  color: rgba(255, 255, 255, 0.82);
}

.intro-card,
.page-card,
.choice-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.intro-card,
.page-card {
  padding: 28px;
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.quick-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

.home-grid,
.upload-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.home-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.upload-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(29, 44, 51, 0.13);
}

.card-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.choice-card h2 {
  margin: 14px 0 8px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.card-meta {
  margin-top: 14px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

.field-card,
.mini-card,
.sonuc {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.field-card {
  padding: 18px;
}

.field-card h2,
.field-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.field-card p,
.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.drop {
  margin-top: 12px;
  padding: 18px;
  border: 2px dashed rgba(31, 94, 134, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, var(--accent-soft) 100%);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.drop:hover,
.drop.uzerinde,
.drop.secildi {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.drop input {
  display: none;
}

.drop-visual {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ikon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.drop-copy strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.drop-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.dosya-adi {
  min-height: 22px;
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

.helper-strip {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.btn {
  border: 0;
  border-radius: 16px;
  min-height: 56px;
  padding: 0 22px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-ana {
  width: 100%;
  margin-top: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 16px 32px rgba(31, 94, 134, 0.16);
}

.btn-indir {
  color: #fff;
  background: linear-gradient(135deg, #1f7ea0 0%, #11526b 100%);
  box-shadow: 0 16px 32px rgba(17, 82, 107, 0.16);
}

.btn-link {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  font-weight: 700;
}

.durum {
  display: none;
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-size: 15px;
  line-height: 1.6;
}

.yukleniyor {
  display: flex !important;
  align-items: center;
  gap: 10px;
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #ecdca6;
}

.basarili {
  background: var(--success-soft);
  color: var(--success);
  border-color: #cae7d2;
}

.hatali {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f4c8c8;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid rgba(122, 90, 0, 0.24);
  border-top-color: var(--warning);
  animation: spin 0.8s linear infinite;
}

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

.sonuc {
  display: none;
  margin-top: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, var(--success-soft) 100%);
}

.result-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.result-actions {
  margin-top: 16px;
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

.optional-panel {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.input-inline {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.muted-note {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .tab-nav,
  .home-grid,
  .upload-grid.two {
    grid-template-columns: 1fr;
  }

  .intro-card,
  .page-card,
  .choice-card {
    padding: 20px;
  }

  .drop-visual {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
