/* ============ Reset & Base ============ */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Noto Sans",
    "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  zoom: 0.8;
}

@supports not (zoom: 1) {
  body {
    transform: scale(0.8);
    transform-origin: top left;
    width: 125%;
  }
}

:root {
  --bg: #0b0f17;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.14);
  --accent: #7c5cff; /* burayÄ± marka renginle deÄŸiÅŸtir */
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --header-height: 64px;
  --footer-height: 56px;
  --sidebar-width: 200px;
}

[data-theme="light"] {
  --bg: #f7f8fb;
  --panel: rgba(0, 0, 0, 0.05);
  --panel-2: rgba(0, 0, 0, 0.07);
  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.62);
  --border: rgba(0, 0, 0, 0.14);
  --accent: #5a42ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
}

a {
  color: inherit;
}
.container {
  width: min(1800px, calc(100% - 24px));
  margin: 0 auto;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--accent);
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
}
.skip-link:focus {
  left: 12px;
  z-index: 9999;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
}
.brand-name {
  font-size: 18px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-menu a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.nav-menu a:hover {
  background: var(--panel);
  color: var(--text);
}

.nav-cta {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user {
  color: var(--muted);
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ Layout ============ */
.page {
  min-height: 100vh;
  padding-bottom: var(--footer-height);
}

.app-shell {
  width: calc(100% - 12px);
  margin: 0 auto;
  padding: 14px 0 24px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  align-self: start;
  height: calc(100vh - var(--header-height) - var(--footer-height) - 24px);
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-title {
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: color-mix(in srgb, #9aa0a6 35%, transparent);
  color: var(--text);
}

.sidebar-card {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.main-content {
  min-width: 0;
}

.main-content .container {
  width: 100%;
}

/* ============ Login ============ */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(
      700px 320px at 20% 10%,
      color-mix(in srgb, var(--accent) 25%, transparent) 0%,
      transparent 60%
    ),
    radial-gradient(
      700px 320px at 80% 20%,
      rgba(0, 204, 255, 0.14) 0%,
      transparent 60%
    );
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
}

.login-card h1 {
  margin: 0 0 6px;
}

.login-error {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ============ Hero ============ */
.hero {
  padding: 56px 0 28px;
  background:
    radial-gradient(
      900px 400px at 15% 10%,
      color-mix(in srgb, var(--accent) 25%, transparent) 0%,
      transparent 60%
    ),
    radial-gradient(
      800px 350px at 85% 20%,
      rgba(0, 204, 255, 0.14) 0%,
      transparent 60%
    );
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.15;
  margin: 14px 0 12px;
}
.accent {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  background: var(--panel);
  color: var(--text);
  transition: transform 0.06s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, black);
  color: white;
}
.btn.ghost {
  background: transparent;
}

.hero-stats {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.stat {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 10px 12px;
  border-radius: 16px;
  min-width: 160px;
}
.stat-num {
  font-weight: 800;
  font-size: 18px;
}
.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.hero-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 14%, transparent);
}
.card-title {
  color: var(--muted);
  font-size: 13px;
}

.card-body {
  padding: 14px;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.kpi {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border-radius: 14px;
  padding: 10px;
}
.kpi-label {
  color: var(--muted);
  font-size: 12px;
}
.kpi-value {
  font-size: 18px;
  font-weight: 800;
}

.mini-chart {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 120px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  margin-bottom: 12px;
}
.bar {
  flex: 1;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 70%, white);
  opacity: 0.8;
}

.checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.checklist li {
  margin: 6px 0;
}

/* ============ Sections ============ */
.section {
  padding: 46px 0;
}
.section.alt {
  background: color-mix(in srgb, var(--panel) 30%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid-3 {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
}
.feature h3 {
  margin: 0 0 8px;
}
.feature p {
  margin: 0;
  color: var(--muted);
}

.callout {
  margin-top: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 18%, transparent),
    var(--panel)
  );
  border-radius: 18px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

/* ============ Demo Table ============ */
.demo-controls {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}
.field span {
  font-size: 12px;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.table-wrap {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-date {
  min-width: 150px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}
.table td {
  color: var(--text);
}
.table .right {
  text-align: right;
}
.badge-status {
  display: inline-block;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

/* ============ Charts ============ */
.chart-wrap {
  margin-top: 16px;
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
}
.chart-bar {
  flex: 1;
  height: max(6px, var(--h));
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, white));
  border-radius: 10px;
  opacity: 0.85;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 4px 0;
}

.ratio-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
}

.ratio-ring {
  --size: 110px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(#3ddc84 var(--p), #ff5f5f 0);
  display: grid;
  place-items: center;
}

.ratio-center {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.ratio-label {
  font-weight: 700;
}
.ratio-sub {
  color: var(--muted);
  font-size: 13px;
}

.top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

.chart-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
}

.chart-row {
  display: grid;
  grid-template-columns: 1.2fr 3fr 0.8fr;
  gap: 12px;
  align-items: center;
}

.chart-label {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-wrap {
  height: 10px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar-horizontal {
  height: 100%;
  width: max(6px, var(--w));
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, white));
}

.chart-value {
  text-align: right;
  font-weight: 700;
}

.sort-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-indicator {
  font-size: 12px;
  color: var(--muted);
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}
.state-true {
  background: #3ddc84;
}
.state-false {
  background: #ff5f5f;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-toggle {
  color: var(--muted);
}
.notes-toggle summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}
.notes-body {
  margin-top: 8px;
  color: var(--muted);
  white-space: pre-wrap;
}

.notes-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.notes-list li {
  margin: 4px 0;
}
.notes-cell {
  white-space: normal;
  min-width: 220px;
}

.notes-trigger {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.notes-trigger:hover {
  background: var(--panel);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-backdrop.open {
  display: flex;
}
.modal-card {
  width: min(900px, calc(100% - 32px));
  max-height: 85vh;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, black);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 700;
}
.modal-close {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.modal-body {
  max-height: 70vh;
  overflow: auto;
  padding-right: 6px;
}
.modal-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.6;
}
.modal-list li {
  margin: 6px 0;
}

.code-block {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  border: 1px solid var(--border);
  color: var(--text);
}
.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 13px;
}

.copyable {
  cursor: pointer;
  color: var(--text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.copyable.copied {
  color: #3ddc84;
}

/* ============ Pricing ============ */
.price {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
  position: relative;
}
.price h3 {
  margin: 0 0 8px;
}
.price-tag {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 900;
}
.price-tag span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.price ul {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
}
.price.featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow);
}
.ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

/* ============ FAQ & Form ============ */
.faq details {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
}
.faq p {
  color: var(--muted);
  margin: 10px 0 0;
}

.form {
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline-block;
  margin-left: 6px;
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 12px;
  color: var(--muted);
}
.footer-links a {
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .top-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .kpi-row {
    grid-template-columns: 1fr;
  }
  .callout {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    right: 16px;
    top: 60px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg);
    width: min(260px, calc(100% - 32px));
    box-shadow: var(--shadow);
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu a {
    color: var(--text);
  }
}
