/* tahomiplus panel — tasarım sistemi (Swiss/minimal, açık + koyu tema) */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --sidebar-w: 248px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --on-primary: #ffffff;
  --accent: #16a34a;
  --accent-strong: #15803d;
  --accent-soft: #f0fdf4;
  --accent-text: #15803d;
  --warn: #b45309;
  --warn-dot: #d97706;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --info-border: #bfdbfe;
  --focus: #2563eb;
  --chart: #16a34a;
  --chart-muted: #94a3b8;
  --grid: #eef2f6;
  --logo-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px -16px rgba(15, 23, 42, 0.28), 0 8px 18px -12px rgba(15, 23, 42, 0.16);
  --overlay: rgba(15, 23, 42, 0.45);
  --stage: #eceff4;
  --stage-dot: #d3d9e2;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #0f172a;
  --surface-3: #1e293b;
  --border: #1f2937;
  --border-strong: #334155;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;
  --primary: #f8fafc;
  --primary-hover: #e2e8f0;
  --on-primary: #0f172a;
  --accent: #22c55e;
  --accent-strong: #16a34a;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --accent-text: #4ade80;
  --warn: #fbbf24;
  --warn-dot: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.1);
  --warn-border: rgba(245, 158, 11, 0.3);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.35);
  --info: #60a5fa;
  --info-soft: rgba(59, 130, 246, 0.1);
  --info-border: rgba(59, 130, 246, 0.3);
  --focus: #60a5fa;
  --chart: #1fb456;
  --chart-muted: #64748b;
  --grid: #1f2937;
  --logo-ink: #0f172a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -6px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 56px -16px rgba(0, 0, 0, 0.7);
  --overlay: rgba(2, 6, 23, 0.72);
  --stage: #0a101d;
  --stage-dot: #1c2638;
}

/* ---------- Temel ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

code,
kbd,
.mono {
  font-family: var(--mono);
  font-variant-ligatures: none;
}

code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-3);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.i {
  flex: none;
}

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

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

.small {
  font-size: 12.5px;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.nowrap {
  white-space: nowrap;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.center {
  justify-content: center;
  text-align: center;
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.error-text {
  color: var(--danger);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.link:hover {
  text-decoration-color: currentColor;
}

.link.center {
  align-self: center;
}

.logo {
  color: var(--text);
  flex: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-lg {
  font-size: 20px;
}

/* ---------- Yükleniyor ---------- */

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--text);
  animation: spin 0.7s linear infinite;
  flex: none;
}

.spinner-sm {
  width: 14px;
  height: 14px;
}

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

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.boot-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.sk {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--border) 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.sk-line {
  height: 12px;
  margin-bottom: 10px;
}

.sk-value {
  height: 28px;
  width: 50%;
  margin: 10px 0 14px;
}

.sk-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.sk-title {
  height: 30px;
  width: 280px;
  max-width: 70%;
  margin: 14px 0 22px;
}

.sk-stage {
  height: 520px;
  padding: 12px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ---------- Düğmeler ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.btn-success {
  background: #15803d;
  color: #ffffff;
}

.btn-success:hover:not(:disabled) {
  background: #166534;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  gap: 6px;
}

.btn-lg {
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-icon:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.btn-icon:disabled {
  opacity: 0.4;
}

.btn-icon.btn-xs {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
}

.btn-icon.btn-bordered {
  width: 36px;
  height: 36px;
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

@media (pointer: coarse) {
  .btn {
    min-height: 44px;
  }
  .btn-icon,
  .btn-icon.btn-bordered {
    width: 44px;
    height: 44px;
  }
  .btn-icon.btn-xs {
    width: 36px;
    height: 36px;
  }
}

/* ---------- Form öğeleri ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.hint-ok {
  color: var(--accent-text);
}

.hint-bad {
  color: var(--danger);
}

.input,
.select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea.input {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.input::placeholder {
  color: var(--faint);
}

.input:hover,
.select:hover {
  border-color: var(--faint);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.select {
  width: auto;
  height: 36px;
  padding-right: 32px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 44px;
}

.input-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.input-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.input-affix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-affix:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.input-affix .input {
  border: 0;
  box-shadow: none;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding-left: 4px;
}

.input-affix .input:first-child {
  padding-left: 12px;
}

.input-affix .input:not(:last-child) {
  padding-right: 4px;
}

.input-affix .input:focus {
  box-shadow: none;
}

.affix {
  display: block;
  align-self: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 60%;
  padding: 0 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.affix:last-child {
  padding: 0 12px 0 0;
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  font-size: 13.5px;
}

.form-error .i {
  margin-top: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-strong);
  margin: 0;
}

/* Anahtar (switch) */

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color 0.18s var(--ease);
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s var(--ease);
}

.switch.is-on,
.switch-input:checked + .switch {
  background: var(--accent-strong);
}

.switch.is-on .switch-thumb,
.switch-input:checked + .switch .switch-thumb {
  transform: translateX(16px);
}

.switch:disabled {
  opacity: 0.45;
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-input:focus-visible + .switch {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.switch-row:hover {
  border-color: var(--border-strong);
}

.switch-row > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.switch-row b {
  font-weight: 550;
  font-size: 13.5px;
}

.switch-row small {
  font-size: 12.5px;
  color: var(--muted);
}

.switches {
  display: grid;
  gap: 8px;
}

/* Şifre gücü */

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

.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  flex: 1;
}

.strength-bars i {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background-color 0.2s;
}

.strength[data-score="0"] .is-on,
.strength[data-score="1"] .is-on {
  background: var(--danger);
}

.strength[data-score="2"] .is-on {
  background: var(--warn-dot);
}

.strength[data-score="3"] .is-on,
.strength[data-score="4"] .is-on {
  background: var(--accent);
}

.strength-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 120px;
  text-align: right;
}

/* Tek kullanımlık kod */

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-cell {
  width: 100%;
  height: 54px;
  text-align: center;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-cell:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* Uyarı kutusu */

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.notice > .i {
  margin-top: 2px;
}

.notice-warn {
  background: var(--warn-soft);
  border-color: var(--warn-border);
}

.notice-warn > .i {
  color: var(--warn);
}

.notice-error {
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.notice-error > .i {
  color: var(--danger);
}

.notice-info {
  background: var(--info-soft);
  border-color: var(--info-border);
}

.notice-info > .i {
  color: var(--info);
}

/* Karekod, kurtarma kodları */

.qr {
  flex: none;
  width: 176px;
  height: 176px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border);
}

.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-sm {
  width: 104px;
  height: 104px;
  padding: 6px;
  border-radius: 10px;
}

.enroll {
  display: flex;
  gap: 20px;
  align-items: center;
}

.enroll-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}

.enroll-compact .qr {
  width: 150px;
  height: 150px;
}

.manual {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--surface-2);
}

.manual summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
}

.manual[open] {
  display: grid;
  gap: 10px;
}

.manual[open] summary {
  margin-bottom: 2px;
}

.manual .btn {
  justify-self: start;
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.secret {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--border);
}

.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.codes code {
  padding: 9px 10px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}

.stepper span {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

.stepper .is-done,
.stepper .is-current {
  background: var(--accent);
}

/* ---------- Giriş / kurulum ---------- */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  color: #e2e8f0;
  background:
    radial-gradient(1200px 500px at -10% 110%, rgba(34, 197, 94, 0.16), transparent 60%),
    radial-gradient(800px 400px at 110% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    #0b1120;
  --logo-ink: #0b1120;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.auth-aside .logo {
  color: #f8fafc;
}

.auth-aside .brand {
  color: #f8fafc;
}

.auth-aside-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 44px 52px;
  max-width: 620px;
}

.auth-pitch h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.auth-pitch > p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 440px;
}

.auth-points {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.auth-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.auth-points b {
  display: block;
  color: #f1f5f9;
  font-weight: 600;
  margin-bottom: 2px;
}

.auth-points li > span:last-child {
  color: #94a3b8;
  font-size: 14px;
}

.auth-point-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-foot {
  font-size: 13px;
  color: #64748b;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.auth-head h2 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.auth-head > p:last-child {
  color: var(--muted);
  font-size: 15px;
}

.auth-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}

/* ---------- Uygulama iskeleti ---------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 40;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 14px;
}

.sidebar-close {
  display: none;
}

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

.nav-label {
  padding: 14px 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.15s, color 0.15s;
}

.nav-item .i {
  color: var(--muted);
  transition: color 0.15s;
}

.nav-item:hover {
  background: var(--surface-3);
  color: var(--text);
}

.nav-item.is-active {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
}

.nav-item.is-active .i,
.nav-item:hover .i {
  color: var(--text);
}

.nav-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav-ext {
  margin-left: auto;
  opacity: 0.7;
}

.dev-note {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
}

.dev-note .i {
  color: var(--warn);
  margin-top: 1px;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.nav-backdrop {
  display: none;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobilebar {
  display: none;
}

.content {
  flex: 1;
  outline: none;
}

.page {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 36px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14.5px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.card-head h2 {
  font-size: 16px;
  font-weight: 650;
}

.card-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* ---------- Özet kutuları ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.tile-wide {
  grid-column: span 2;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-2);
}

.tile-label {
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
}

.tile-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.tile-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.tile-split {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.tile-split span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.dot.is-live {
  background: var(--accent);
}

.dot.is-closed {
  background: var(--warn-dot);
}

.tile-chart-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}

.tile-figures {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart {
  position: relative;
  min-width: 0;
}

.chart-tile {
  flex: 1;
}

.meter {
  height: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
  margin-top: 4px;
}

[data-theme="dark"] .meter {
  background: rgba(34, 197, 94, 0.14);
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

/* ---------- Grafikler ---------- */

.chart-svg {
  display: block;
  overflow: visible;
}

.c-grid {
  stroke: var(--grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.c-base {
  stroke: var(--border-strong);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.c-tick {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.c-bar {
  fill: var(--chart);
  transition: opacity 0.15s;
}

.chart:hover .c-bar:not(.is-active) {
  opacity: 0.55;
}

.c-col {
  fill: var(--surface-3);
}

.c-hit {
  fill: transparent;
  cursor: crosshair;
}

.c-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.c-tip b {
  font-size: 13px;
  font-weight: 650;
}

.c-tip span {
  opacity: 0.75;
}

.chart-empty {
  position: absolute;
  inset: 0 0 22px 34px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: var(--muted);
  pointer-events: none;
}

.spark {
  display: block;
  flex: none;
}

.spark-line {
  fill: none;
  stroke: var(--chart-muted);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.spark-dot {
  fill: var(--chart);
  stroke: var(--surface);
  stroke-width: 2;
}

/* ---------- Araç çubuğu ---------- */

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

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  width: 300px;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

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

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search kbd {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-2);
}

.search:focus-within kbd {
  display: none;
}

.search-sm {
  width: 100%;
  height: 34px;
  box-shadow: none;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

.seg-count {
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.seg-btn.is-active .seg-count {
  color: var(--muted);
}

.seg-icons .seg-btn {
  width: 32px;
  padding: 0;
}

.toolbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Proje kartları ---------- */

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s var(--ease);
}

.pcard:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.pcard-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
}

.thumb-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.thumb-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 800px;
  border: 0;
  background: #ffffff;
  transform: scale(var(--s, 0.25));
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.thumb-frame.is-loaded iframe {
  opacity: 1;
}

.thumb-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.3s;
}

.thumb-frame.is-loaded .thumb-loading {
  opacity: 0;
}

.thumb-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  background-image: radial-gradient(var(--stage-dot) 1px, transparent 1px);
  background-size: 16px 16px;
}

.pcard-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 12px;
  flex: 1;
}

.pcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pcard-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcard-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pcard-url {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -4px;
  font-size: 12.5px;
  color: var(--muted);
}

.pcard-url a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pcard-desc {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pcard-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Durum rozeti */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  flex: none;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.badge.is-live {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.badge.is-live .badge-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.badge.is-closed {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-border);
}

.badge.is-closed .badge-dot {
  background: var(--warn-dot);
}

/* ---------- Tablo ---------- */

.table-wrap {
  overflow-x: auto;
}

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

.table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th.num {
  text-align: right;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--surface-2);
}

.cell-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 380px;
}

.cell-title {
  font-weight: 600;
}

.cell-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
}

.cell-actions {
  white-space: nowrap;
  text-align: right;
}

.cell-actions > * {
  vertical-align: middle;
}

.cell-actions .switch {
  margin: 0 6px;
}

.event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.event i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.event-good i {
  background: var(--accent);
}

.event-bad i {
  background: var(--danger);
}

.event-warn i {
  background: var(--warn-dot);
}

/* ---------- Boş durumlar ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 56px 24px;
}

.empty h2 {
  font-size: 18px;
  font-weight: 650;
}

.empty p {
  max-width: 420px;
  color: var(--muted);
}

.empty .btn {
  margin-top: 8px;
}

.empty-art {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.empty-art.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.empty-inline {
  padding: 32px 16px;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-inline .btn {
  margin-top: 0;
}

/* ---------- Proje detayı ---------- */

.page-detail {
  max-width: 1600px;
  gap: 18px;
}

.detail-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}

.back:hover {
  color: var(--text);
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.detail-title h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-url {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}

.detail-url a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.viewer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.viewer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.viewer-dims {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.viewer-tools {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

.stage {
  position: relative;
  display: flex;
  height: calc(100vh - 236px);
  min-height: 520px;
  padding: 28px;
  overflow: hidden;
  background-color: var(--stage);
  background-image: radial-gradient(var(--stage-dot) 1px, transparent 1px);
  background-size: 18px 18px;
}

.stage.is-actual {
  overflow: auto;
}

.stage:fullscreen {
  height: 100vh;
  padding: 24px;
}

.stage-inner {
  position: relative;
  flex: none;
  margin: auto;
}

.frame {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.frame.is-browser {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35), 0 12px 24px -12px rgba(15, 23, 42, 0.2);
}

.frame-chrome {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.frame-dots {
  display: flex;
  gap: 7px;
}

.frame-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}

.frame-dots i:nth-child(1) {
  background: #f87171;
}

.frame-dots i:nth-child(2) {
  background: #fbbf24;
}

.frame-dots i:nth-child(3) {
  background: #4ade80;
}

.frame-address {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  min-width: 0;
}

.frame-screen {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.frame-screen iframe {
  display: block;
  border: 0;
  background: #ffffff;
}

.frame.is-device {
  padding: 12px;
  border-radius: 34px;
  background: #0b0f19;
  box-shadow: 0 0 0 1px #2a3242, 0 30px 70px -20px rgba(2, 6, 23, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.frame.is-device .frame-chrome {
  display: none;
}

.frame.is-device .frame-screen {
  border-radius: 22px;
}

.frame.is-phone {
  border-radius: 46px;
}

.frame.is-phone .frame-screen {
  border-radius: 34px;
}

.frame-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: opacity 0.25s;
}

.frame-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.stage-empty {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: 380px;
}

.stage-empty h2 {
  font-size: 18px;
  font-weight: 650;
}

.stage-empty p {
  color: var(--muted);
}

.stage-empty .btn {
  margin-top: 8px;
}

/* Yan panel */

.side {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  transition: color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: var(--text);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.tab-count {
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.side-section {
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-section + .side-section {
  border-top: 1px solid var(--border);
}

.side-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.side-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

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

.share-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.share-link {
  font-size: 13px;
  word-break: break-all;
}

.share-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stat-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-value {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-value-sm {
  font-size: 14px;
  padding-top: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.props {
  margin: 0;
  display: grid;
  gap: 0;
}

.props > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}

.props > div:last-child {
  border-bottom: 0;
}

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

.props dd {
  margin: 0;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.files li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  min-width: 0;
}

.files li:last-child {
  border-bottom: 0;
}

.files li:hover {
  background: var(--surface-2);
}

.file-icon {
  color: var(--muted);
  display: grid;
}

.file-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-path:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-size {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.danger-zone .side-title {
  color: var(--danger);
}

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
}

.danger-row b {
  font-size: 13.5px;
  font-weight: 600;
}

.danger-row p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Güvenlik ---------- */

.sec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.sec-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sec-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sec-head h2 {
  font-size: 16px;
  font-weight: 650;
}

.sec-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.sec-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text-2);
}

.sec-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.sec-status > .i {
  color: var(--accent-text);
}

.sec-status b {
  display: block;
  color: var(--accent-text);
  font-weight: 600;
}

.sec-status span {
  font-size: 12.5px;
  color: var(--text-2);
}

.sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sec-row h3 {
  font-size: 14px;
  font-weight: 600;
}

.sec-row p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Dosya bırakma alanı ve yükleme ---------- */

.drop {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: border-color 0.15s, background-color 0.15s;
}

.drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop.has-files {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--surface);
}

.drop.has-error {
  border-style: solid;
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 20px;
  text-align: center;
}

.drop-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
}

.drop-title {
  font-weight: 600;
}

.drop-sub {
  color: var(--muted);
  font-size: 13.5px;
}

.drop-limit {
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
}

.drop-state {
  padding: 14px 16px;
}

.drop-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.drop-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drop-badge {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.drop-badge.is-ok {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.drop-badge.is-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.up-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.up-text {
  flex: 1;
  min-width: 0;
}

.up-title {
  font-weight: 600;
}

.up-pct {
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.upload-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0 4px;
}

.upload-done h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.upload-done .row {
  margin-top: 8px;
}

.done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: #ffffff;
  background: #15803d;
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.done-icon.is-error {
  background: #dc2626;
  box-shadow: 0 0 0 8px var(--danger-soft);
}

.link-box {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.link-box a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Modal ---------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 0.2s;
}

.modal {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.modal-sm {
  width: min(440px, 100%);
}

.modal-lg {
  width: min(700px, 100%);
}

.modal-layer.is-open .modal-backdrop {
  opacity: 1;
}

.modal-layer.is-open .modal {
  opacity: 1;
  transform: none;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.modal-head h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
}

.modal-head .btn-icon {
  margin: -4px -6px 0 0;
}

.modal-body {
  padding: 18px 22px 22px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

/* ---------- Menü ---------- */

.menu {
  position: fixed;
  z-index: 150;
  min-width: 230px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: menu-in 0.14s var(--ease);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  text-align: left;
}

.menu-item .i {
  color: var(--muted);
}

.menu-item:hover:not(:disabled),
.menu-item:focus-visible {
  background: var(--surface-3);
  color: var(--text);
  outline: none;
}

.menu-item:disabled {
  opacity: 0.45;
}

.menu-item.is-danger,
.menu-item.is-danger .i {
  color: var(--danger);
}

.menu-item.is-danger:hover {
  background: var(--danger-soft);
}

.menu-sep {
  height: 1px;
  margin: 5px 4px;
  background: var(--border);
}

/* ---------- Bildirimler ---------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(420px, calc(100vw - 40px));
  padding: 12px 12px 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast p {
  flex: 1;
  padding-top: 1px;
}

.toast-icon {
  display: grid;
  padding-top: 1px;
}

.toast-success .toast-icon {
  color: var(--accent-text);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-info .toast-icon {
  color: var(--info);
}

.toast-warn .toast-icon {
  color: var(--warn);
}

.toast-action {
  border: 0;
  background: transparent;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.toast-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* ---------- Duyarlı yerleşim ---------- */

@media (max-width: 1280px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .hide-md {
    display: none;
  }
}

@media (max-width: 1100px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row dense;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: static;
    max-height: none;
  }
  .stage {
    height: 68vh;
  }
}

@media (max-width: 960px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-aside {
    display: none;
  }
  .sec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .sidebar-close {
    display: inline-grid;
  }
  body.nav-open .sidebar {
    transform: none;
    visibility: visible;
    box-shadow: var(--shadow-lg);
    transition: transform 0.22s var(--ease), visibility 0s;
  }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: var(--overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    display: block;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .mobilebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 12px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .page {
    padding: 22px 18px 48px;
  }
}

@media (max-width: 640px) {
  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile-wide {
    grid-column: auto;
  }
  .tile-chart-row {
    flex-direction: column;
    align-items: stretch;
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .toolbar-end {
    margin-left: 0;
  }
  .search {
    width: 100%;
  }
  .seg {
    max-width: 100%;
    overflow-x: auto;
  }
  .pgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hide-sm {
    display: none;
  }
  .enroll {
    flex-direction: column;
    align-items: stretch;
  }
  .enroll .qr {
    align-self: center;
  }
  .otp-cell {
    height: 48px;
    font-size: 20px;
  }
  .stage {
    height: 60vh;
    min-height: 420px;
    padding: 16px;
  }
  .viewer-dims {
    display: none;
  }
  .page-head h1,
  .detail-title h1 {
    font-size: 22px;
  }
  .modal-head {
    padding: 18px 18px 0;
  }
  .modal-body {
    padding: 16px 18px 18px;
  }
  .toasts {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }
  .toast {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
