/* Webreta panel tasarım sistemi (gelirtakip ile aynı tokenlar) */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --brand-50: #f0f4fa; --brand-100: #dde6f4; --brand-200: #bfd0ea; --brand-300: #93b0db; --brand-400: #6589c6;
  --brand-500: #4a72b3; --brand-600: #3a63a3; --brand-700: #314f84; --brand-900: #283a5a; --brand-950: #1a253b;
  --radius: 14px;
  --bg: #eef2f3; --surface: #ffffff; --surface-2: #f7fafa;
  --ink: #13212a; --ink-2: #405663; --muted: #64808c; --line: #dde6e8; --line-strong: #c6d5d8;
  --ok: #157f45; --ok-bg: #e2f4e9; --warn: #93600f; --warn-bg: #fbf0d8; --urgent: #b4530c; --urgent-bg: #fdeada;
  --bad: #b12f28; --bad-bg: #fbe5e3; --info: #24559f; --info-bg: #e6edf9;
  --shadow-card: 0 1px 2px rgb(19 33 42 / 0.04), 0 1px 3px rgb(19 33 42 / 0.03);
  --shadow-pop: 0 10px 30px -8px rgb(19 33 42 / 0.2), 0 4px 10px -4px rgb(19 33 42 / 0.12);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root.dark {
  --bg: #0c1416; --surface: #121d20; --surface-2: #17252a;
  --ink: #e8f1f2; --ink-2: #b3c6cc; --muted: #7e969e; --line: #22343a; --line-strong: #2e4650;
  --ok: #56d48c; --ok-bg: #12301f; --warn: #e7b65a; --warn-bg: #33270e; --urgent: #f0a860; --urgent-bg: #3a2410;
  --bad: #f08d84; --bad-bg: #351917; --info: #86aaeb; --info-bg: #15233d;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3); --shadow-pop: 0 14px 40px -10px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--line); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--brand-200); color: var(--brand-950); }
.logo { height: 22px; width: auto; user-select: none; }
:root.dark .logo { filter: brightness(0) invert(1); opacity: 0.9; }
.logo-light { filter: brightness(0) invert(1); }

/* ---- Yerleşim ---- */
.shell { min-height: 100dvh; display: flex; }
.sidebar {
  display: none; width: 240px; flex-shrink: 0; flex-direction: column; border-right: 1px solid var(--line);
  padding: 16px; position: sticky; top: 0; height: 100dvh; background: var(--surface);
}
.sidebar-brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 8px; margin-bottom: 20px; }
.sidebar-brand small { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; margin-top: 6px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 500;
  color: var(--ink-2); min-height: 44px; transition: background-color 0.13s, color 0.13s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-600); color: #fff; }
.nav svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-badge { margin-left: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 7px; }
.nav a[aria-current="page"] .nav-badge { background: #fff; color: var(--brand-700); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
a.chip:hover, .chip[aria-current="page"] { border-color: var(--brand-400); color: var(--brand-600); }
.chip[aria-current="page"] { background: var(--brand-50); }
:root.dark .chip[aria-current="page"] { background: var(--brand-950); }
.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.sendbox { border-radius: 10px; padding: 10px 12px; font-size: 12.5px; border: 1px solid var(--line); }
.sendbox .dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 7px; vertical-align: middle; }
.sendbox-on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.sendbox-on .dot { background: var(--ok); }
.sendbox-off { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.sendbox-off .dot { background: var(--bad); }
.userbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.userbox .name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox .mail { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: 52px;
  padding: 0 12px; padding-top: var(--safe-top); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(160%) blur(14px);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand .logo { height: 18px; }
.topbar .brand small { font-size: 11px; font-weight: 600; color: var(--muted); }
main { padding: 16px; padding-bottom: calc(84px + var(--safe-bottom)); max-width: 1600px; margin: 0 auto; }
@media (min-width: 640px) { main { padding: 24px; padding-bottom: calc(84px + var(--safe-bottom)); } }
@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .topbar, .tabbar { display: none; }
  main { padding: 32px; }
}

/* Mobil alt sekme çubuğu */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(160%) blur(14px);
  padding-bottom: var(--safe-bottom);
}
.tabbar a {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 4px 7px; font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.1;
}
.tabbar a[aria-current="page"] { color: var(--brand-600); }
:root.dark .tabbar a[aria-current="page"] { color: var(--brand-300); }
.tabbar svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .tabbar { display: none; } }

/* ---- Sayfa başlığı ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.page-head h1::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--brand-600); flex-shrink: 0; }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 640px) { .page-head h1 { font-size: 20px; } }

/* ---- Bileşenler ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card-body { padding: 16px; }
.card-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head h2 { font-size: 14px; font-weight: 700; }
.card-hero { background: var(--brand-600); border-color: transparent; color: #fff; }
.card-hero .label-xs { color: rgb(255 255 255 / 0.72); }
.card-hero .stat-sub { color: rgb(255 255 255 / 0.68); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.label-xs { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--font-mono); font-size: 21px; font-weight: 600; margin-top: 6px; line-height: 1.2; }
.stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.stat-ok { color: var(--ok); } .stat-warn { color: var(--warn); } .stat-bad { color: var(--bad); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; font-size: 13px; font-weight: 600;
  padding: 9px 14px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; background: transparent;
  transition: background-color 0.13s, border-color 0.13s, color 0.13s, opacity 0.13s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand-400); color: var(--brand-600); }
.btn-danger { color: var(--bad); border-color: var(--line); }
.btn-danger:hover:not(:disabled) { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover:not(:disabled) { opacity: 0.9; color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-start { justify-content: flex-start; }

.input, .select, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px;
  color: var(--ink); outline: none; transition: border-color 0.13s, box-shadow 0.13s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.textarea.mono { font-family: var(--font-mono); font-size: 12.5px; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-400) 22%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.inline-form { display: inline; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  line-height: 1.5; white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-urgent { background: var(--urgent-bg); color: var(--urgent); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-card); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl thead th {
  position: sticky; top: 0; z-index: 5; background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; }
.tbl a.strong { font-weight: 600; }
.tbl .sub { font-size: 11.5px; color: var(--muted); }

.steps { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step { padding: 16px; position: relative; }
.step-no { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-attention { border-color: var(--brand-400); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-400) 18%, transparent); }
.step-attention .step-no { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2 > .wide { grid-column: span 2; } }
.stack > * + * { margin-top: 16px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.tabs a .n { font-family: var(--font-mono); margin-left: 4px; opacity: 0.75; }

.flash { padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: 10px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: 12.5px; }
.note-warn { background: var(--warn-bg); color: var(--warn); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty b { color: var(--ink); display: block; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; word-break: break-word; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list li:last-child { border-bottom: none; }
.list .when { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.55; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pre.mono { font-family: var(--font-mono); font-size: 12px; }
.iframe { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kbd { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ---- Kullanım rehberi ---- */
.guide { font-size: 13.5px; line-height: 1.65; }
.guide ol, .guide ul { margin: 0; padding-left: 20px; }
.guide li + li { margin-top: 8px; }
.guide p + p { margin-top: 8px; }
.guide .dl { row-gap: 8px; }

/* ---- Giriş ---- */
.login { min-height: 100dvh; display: grid; }
@media (min-width: 1024px) { .login { grid-template-columns: 1fr 1fr; } }
.login-brand { display: none; position: relative; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 48px; background: var(--brand-600); color: #fff; }
@media (min-width: 1024px) { .login-brand { display: flex; } }
.login-brand::before { content: ""; position: absolute; inset: 0; opacity: 0.2; background-image: radial-gradient(circle at 20% 20%, #fff 0, transparent 45%), radial-gradient(circle at 80% 70%, #fff 0, transparent 40%); }
.login-brand > * { position: relative; }
.login-brand h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.login-brand p { color: var(--brand-100); font-size: 14px; max-width: 24rem; margin-top: 14px; line-height: 1.6; }
.login-brand .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.login-brand .pill { background: rgb(255 255 255 / 0.15); border: 1px solid rgb(255 255 255 / 0.3); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.login-brand .copy { font-size: 12px; color: var(--brand-200); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-form > div { width: 100%; max-width: 24rem; }
.login-form h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.login-form .lead { font-size: 14px; color: var(--muted); margin-top: 6px; }
.login-form form { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1024px) { .login-form .mobile-logo { display: none; } }

/* ---- Herkese açık sayfalar ---- */
.pub { max-width: 760px; margin: 0 auto; padding: 40px 20px 56px; }
.pub-head { text-align: center; margin-bottom: 22px; }
.pub-head .logo { height: 26px; margin: 0 auto 14px; }
.pub-head .kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pub .card-body { padding: 36px 40px; }
.pub h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 18px; text-align: center; }
.pub h2 { font-size: 15px; font-weight: 700; margin: 26px 0 8px; color: var(--ink); }
.pub p, .pub li { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.pub p + p { margin-top: 10px; }
.pub ul { margin: 6px 0 0; padding-left: 20px; }
.pub ul li + li { margin-top: 4px; }
.pub .card-body > p:first-of-type { font-size: 15px; }
.pub .actions-center { display: flex; justify-content: center; margin-top: 22px; }
.pub .foot { margin-top: 26px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 2; }
.pub .foot a { text-decoration: underline; text-underline-offset: 3px; }
.pub .foot .sep { margin: 0 8px; opacity: 0.6; }
@media (max-width: 640px) { .pub { padding: 24px 14px 40px; } .pub .card-body { padding: 24px 18px; } .pub h1 { font-size: 20px; } }
