/* İndirip Muhasebe — shared styles */

:root {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-soft: #eef2ff;
  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

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

/* ─── Header / nav ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border-radius: 8px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.brand-sub { color: var(--text-muted); font-weight: 500; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.nav-link:hover { color: var(--text); background: var(--bg); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--bg-elevated); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg); color: var(--text); border-color: var(--primary); }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ─── Landing ─── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at top, #eef2ff 0%, transparent 60%);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--text) 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.status-bar {
  max-width: 520px;
  margin: 48px auto 0;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--danger); }
.status-dot.loading { background: var(--warning); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ─── Feature cards ─── */
.features { padding: 60px 0 100px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all .2s;
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  font-size: 22px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.feature-card p { color: var(--text-muted); font-size: 14px; }
.feature-card .btn { margin-top: 18px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 56px;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-item { text-align: center; }
.stat-value {
  font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  display: block;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ─── Login ─── */
.auth-wrap {
  min-height: calc(100vh - 64px - 80px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-card .sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-elevated);
  color: var(--text);
  transition: all .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.auth-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.notice-info { background: var(--primary-soft); color: var(--primary-hover); border: 1px solid rgba(99, 102, 241, 0.2); }
.notice-warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.auth-foot { margin-top: 24px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ─── Docs ─── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 32px 0 80px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 12px;
}
.docs-sidebar h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin: 20px 0 8px;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; }
.docs-sidebar a {
  display: block;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all .1s;
}
.docs-sidebar a:hover { background: var(--bg); color: var(--text); }

.docs-main { max-width: 780px; min-width: 0; }
.docs-main h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.docs-main h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.docs-main h2:first-of-type { border-top: none; padding-top: 0; margin-top: 40px; }
.docs-main h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
}
.docs-main p { color: var(--text); margin-bottom: 14px; }
.docs-main p.lead { font-size: 17px; color: var(--text-muted); margin-bottom: 28px; }
.docs-main ul, .docs-main ol { margin: 0 0 14px 24px; color: var(--text); }
.docs-main li { margin-bottom: 4px; }

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 13px;
}
.method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.method-post { background: #dcfce7; color: #166534; }
.method-get  { background: #dbeafe; color: #1e40af; }

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: #be185d;
}
pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { background: var(--bg); font-weight: 600; font-size: 13px; color: var(--text-muted); }
td code { font-size: 13px; }
td.field-name { font-family: var(--mono); font-size: 13px; color: #be185d; white-space: nowrap; }
td.field-type { font-family: var(--mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.req-yes   { color: var(--danger);  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.req-no    { color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.req-maybe { color: var(--warning); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }

.note-box {
  padding: 12px 16px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
  font-size: 14px;
  color: #3730a3;
}
.note-box.warn { border-left-color: var(--warning); background: #fffbeb; color: #92400e; }
.note-box.danger { border-left-color: var(--danger); background: var(--danger-soft); color: #991b1b; }
.note-box strong { color: inherit; }

.sub-head {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 20px 0 8px;
}

.enum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.enum-item {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.enum-item code { background: transparent; padding: 0; color: var(--primary-hover); font-weight: 600; }

/* ─── Footer ─── */
.site-foot {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-elevated);
}
.site-foot a { color: var(--text-muted); }
.site-foot a:hover { color: var(--primary); }

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; max-height: none; order: 2; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 40px; }
  .nav-links .hide-sm { display: none; }
}
