/* TrendxFix Admin — Stripe Dashboard tarzı (nötr yüzey, ince border, mor aksan) */
:root {
  --stripe-bg: #f6f9fc;
  --stripe-surface: #ffffff;
  --stripe-sidebar: #ffffff;
  --stripe-text: #425466;
  --stripe-heading: #0a2540;
  --stripe-muted: #697386;
  --stripe-border: #e3e8ee;
  --stripe-border-strong: #cbd5e1;
  --stripe-accent: #635bff;
  --stripe-accent-hover: #5851e6;
  --stripe-accent-soft: rgba(99, 91, 255, 0.08);
  --stripe-success: #057a55;
  --stripe-warning: #b98900;
  --stripe-danger: #df1c41;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-pill: 9999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --sidebar-w: 244px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--stripe-bg);
  color: var(--stripe-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--stripe-accent);
  text-decoration: none;
}

a:hover {
  color: var(--stripe-accent-hover);
  text-decoration: underline;
}

a.btn,
a.btn:hover {
  text-decoration: none;
}

/* —— Auth —— */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--stripe-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--stripe-surface);
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px 28px;
}

.auth-card .logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--stripe-heading);
}

.auth-error {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* —— Shell —— */
.layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  background: var(--stripe-sidebar);
  border-right: 1px solid var(--stripe-border);
  padding: 20px 0 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
  overflow: hidden;
}

.sidebar-brand {
  padding: 0 16px 20px;
  margin: 0 12px 8px;
  border-bottom: 1px solid var(--stripe-border);
}

.logo {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--stripe-heading);
}

.logo-badge {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--stripe-muted);
  letter-spacing: 0.02em;
}

.nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 0;
}

.nav-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stripe-muted);
  margin: 20px 12px 8px;
  padding: 0 8px;
}

.nav-title:first-child {
  margin-top: 4px;
}

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

.nav a {
  display: block;
  padding: 8px 12px;
  margin: 0 4px;
  border-radius: var(--radius-sm);
  color: var(--stripe-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.nav a:hover {
  background: var(--stripe-bg);
  color: var(--stripe-heading);
  text-decoration: none;
}

.nav a.active {
  background: var(--stripe-accent-soft);
  color: var(--stripe-accent);
  border-left-color: var(--stripe-accent);
  font-weight: 600;
}

.nav-text {
  display: block;
}

.sidebar-foot {
  font-size: 12px;
  color: var(--stripe-muted);
  line-height: 1.5;
  padding: 16px 20px 0;
  margin: 12px 12px 0;
  border-top: 1px solid var(--stripe-border);
}

.sidebar-foot strong {
  color: var(--stripe-heading);
  font-weight: 600;
}

.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--stripe-bg);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  background: var(--stripe-surface);
  border-bottom: 1px solid var(--stripe-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-meta {
  flex: 1;
  min-width: 140px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--stripe-muted);
  font-weight: 500;
}

.breadcrumb strong {
  color: var(--stripe-heading);
  font-weight: 600;
}

.page-title-bar {
  display: none;
}

.search {
  flex-shrink: 1;
  min-width: 0;
}

.search input {
  width: 220px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  background: var(--stripe-bg);
  color: var(--stripe-heading);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search input::placeholder {
  color: var(--stripe-muted);
}

.search input:focus {
  outline: none;
  border-color: var(--stripe-accent);
  box-shadow: 0 0 0 3px var(--stripe-accent-soft);
  background: var(--stripe-surface);
}

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

.top-actions select,
#langSwitcher {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stripe-border);
  font-size: 13px;
  font-family: inherit;
  background: var(--stripe-surface);
  color: var(--stripe-heading);
  cursor: pointer;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--stripe-muted);
  background: var(--stripe-bg);
  border: 1px solid var(--stripe-border);
}

.chip--on {
  color: var(--stripe-heading);
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.chip--off {
  opacity: 0.85;
}

.container {
  padding: 28px 32px 40px;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  margin-bottom: 28px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--stripe-heading);
  line-height: 1.2;
}

.page-head .sub {
  margin: 0;
  color: var(--stripe-muted);
  font-size: 15px;
  max-width: 640px;
  line-height: 1.55;
  font-weight: 400;
}

/* —— Kartlar —— */
.card {
  background: var(--stripe-surface);
  border-radius: var(--radius);
  border: 1px solid var(--stripe-border);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
}

.card--glass {
  background: var(--stripe-surface);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--stripe-heading);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.panel-title small {
  font-weight: 400;
  color: var(--stripe-muted);
  margin-left: 6px;
  font-size: 13px;
}

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

/* Dashboard üst özet (Stripe Today benzeri) */
.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--stripe-border);
}

.page-intro__copy h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--stripe-heading);
  letter-spacing: -0.02em;
}

.page-intro__copy p {
  margin: 0;
  font-size: 14px;
  color: var(--stripe-muted);
  max-width: 520px;
  line-height: 1.55;
}

.page-intro__stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stripe-muted);
  margin-bottom: 4px;
}

.page-intro__stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--stripe-heading);
  font-variant-numeric: tabular-nums;
}

/* KPI grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--stripe-surface);
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s;
}

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

.kpi-ico {
  display: none;
}

.metric-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stripe-muted);
  margin-bottom: 6px;
}

.metric-val {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--stripe-heading);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-foot {
  font-size: 12px;
  color: var(--stripe-muted);
  margin-top: 8px;
  font-weight: 400;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stripe-muted);
  margin: 0 0 12px;
}

.section-label:not(:first-of-type) {
  margin-top: 28px;
}

/* Uygulama modül kartları — dashboard */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.module-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--stripe-surface);
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover {
  border-color: rgba(99, 91, 255, 0.35);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.06);
  text-decoration: none;
}

.module-card__mark {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--stripe-accent-soft);
  color: var(--stripe-accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.module-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.module-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--stripe-heading);
  letter-spacing: -0.02em;
}

.module-card__desc {
  font-size: 12px;
  color: var(--stripe-muted);
  line-height: 1.4;
}

.module-card__stats {
  font-size: 12px;
  color: var(--stripe-text);
  margin-top: 4px;
  line-height: 1.45;
}

.module-card__stats strong {
  color: var(--stripe-heading);
  font-weight: 600;
}

.module-card__dot {
  color: var(--stripe-border-strong);
  margin: 0 4px;
}

.module-card__cta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--stripe-accent);
}

.kpi-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.kpi-card--link:hover {
  border-color: rgba(99, 91, 255, 0.3);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Grafik ızgarası */
.dash-charts {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.chart-card {
  grid-column: span 4;
  min-width: 0;
}

.chart-card--wide {
  grid-column: span 8;
}

.chart-wrap--line {
  height: 280px;
}

.chart-wrap--bar {
  height: 260px;
}

.chart-wrap--doughnut {
  height: 240px;
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .chart-card,
  .chart-card--wide {
    grid-column: span 12;
  }

  .chart-wrap--doughnut {
    max-width: 320px;
  }
}

.content-grid {
  display: grid;
  gap: 16px;
}

.content-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.content-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* Form */
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius-sm);
  background: var(--stripe-surface);
  color: var(--stripe-heading);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--stripe-accent);
  box-shadow: 0 0 0 3px var(--stripe-accent-soft);
}

.mono-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
}

/* Butonlar — Stripe primary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--stripe-accent);
  color: #fff;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn:hover {
  background: var(--stripe-accent-hover);
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

.btn.secondary {
  background: var(--stripe-surface);
  color: var(--stripe-heading);
  border: 1px solid var(--stripe-border);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--stripe-bg);
  border-color: var(--stripe-border-strong);
}

.btn.success {
  background: var(--stripe-success);
  color: #fff;
}

.btn.success:hover {
  filter: brightness(1.05);
}

.btn.danger {
  background: var(--stripe-danger);
  color: #fff;
}

.btn.danger:hover {
  filter: brightness(1.05);
}

.btn.ghost {
  background: transparent;
  color: var(--stripe-accent);
  border: 1px solid var(--stripe-border);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--stripe-accent-soft);
  border-color: transparent;
}

.btn.sm {
  padding: 6px 11px;
  font-size: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Tablolar */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
}

.card.table-wrap {
  padding: 0;
  overflow: hidden;
}

.card.table-wrap > .toolbar {
  padding: 16px 20px 0;
}

.card.table-wrap > table {
  margin: 0;
}

.card.table-wrap thead th:first-child,
.card.table-wrap tbody td:first-child {
  padding-left: 22px;
}

.card.table-wrap thead th:last-child,
.card.table-wrap tbody td:last-child {
  padding-right: 22px;
}

.card .table-wrap {
  margin: 0 -22px -20px;
  border-top: 1px solid var(--stripe-border);
}

.card .panel-title + .table-wrap {
  margin-top: -6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: var(--stripe-bg);
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stripe-border);
  vertical-align: middle;
}

th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--stripe-muted);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(246, 249, 252, 0.8);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--stripe-bg);
  color: var(--stripe-muted);
  border: 1px solid var(--stripe-border);
}

.status.success,
.status.active,
.status.approved,
.status.paid {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: var(--stripe-success);
}

.status.pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: var(--stripe-warning);
}

.status.failed,
.status.banned,
.status.rejected,
.status.cancelled {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--stripe-danger);
}

.status.completed {
  background: var(--stripe-accent-soft);
  border-color: rgba(99, 91, 255, 0.25);
  color: var(--stripe-accent);
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 40px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--stripe-text);
}

.bar-track {
  height: 6px;
  background: var(--stripe-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--stripe-accent);
  border-radius: var(--radius-pill);
}

.url-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.checklist {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--stripe-muted);
  font-size: 13px;
  line-height: 1.55;
}

.empty-hint {
  padding: 24px 16px;
  text-align: center;
  color: var(--stripe-muted);
  font-size: 14px;
}

.mobile-connect {
  font-size: 13px;
}

/* Mobil menü */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--stripe-accent);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 91, 255, 0.35);
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.35);
  z-index: 15;
}

body:has(#appLayout.layout--nav-open) .sidebar-overlay {
  display: block;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--stripe-bg);
  border-radius: var(--radius-sm);
  width: fit-content;
  max-width: 100%;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--stripe-muted);
  transition: background 0.12s, color 0.12s;
}

.tab-btn:hover {
  color: var(--stripe-heading);
}

.tab-btn.active {
  background: var(--stripe-surface);
  color: var(--stripe-heading);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--stripe-surface);
  border-radius: var(--radius);
  border: 1px solid var(--stripe-border);
  box-shadow: 0 24px 48px rgba(10, 37, 64, 0.12);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
}

.modal h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--stripe-heading);
}

.chart-wrap {
  position: relative;
  height: 260px;
  margin-top: 4px;
  width: 100%;
}

.chart-wrap canvas {
  max-width: 100%;
}

/* Eski hero sınıfı — geriye uyum */
.hero-banner {
  display: none;
}

@media (max-width: 768px) {
  .layout {
    display: block;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    flex: none;
    width: min(280px, 88vw);
    min-width: unset;
    max-width: min(280px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 25;
    box-shadow: none;
  }

  .layout--nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(10, 37, 64, 0.08);
  }

  .main {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .container {
    padding: 20px 16px 32px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .search input {
    width: 100%;
  }
}
