/* Petademy panel: warm neutral surfaces, dark sidebar, orange accent (matches the app). */
:root {
  --bg: #F5F3F0;
  --card: #FFFFFF;
  --ink: #1C1917;
  --ink-2: #44403C;
  --muted: #78716C;
  --faint: #A8A29E;
  --line: #ECE7E1;
  --line-2: #F4F0EB;
  --orange: #F97316;
  --orange-dark: #EA580C;
  --orange-soft: #FFF1E6;
  --peach: #FFF1E6;
  --red: #DC2626;
  --red-soft: #FDECEC;
  --green: #16A34A;
  --green-soft: #E8F7EE;
  --blue: #2563EB;
  --blue-soft: #EAF0FF;
  --violet: #7C3AED;
  --violet-soft: #F1EAFE;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px rgba(28, 25, 23, .05);
  --shadow-lg: 0 18px 50px rgba(28, 25, 23, .14);
  --sidebar: 264px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.app { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
  background: radial-gradient(120% 60% at 0% 0%, rgba(249, 115, 22, .18), transparent 60%), linear-gradient(180deg, #1C1917, #0C0A09);
  color: #E7E5E4;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 24px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: #fff; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.brand small { display: block; font-size: 11.5px; font-weight: 600; color: #A8A29E; letter-spacing: 0; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #78716C; padding: 14px 12px 6px; }
.sidebar a {
  display: flex; align-items: center; gap: 12px; color: #D6D3D1; padding: 10px 12px; border-radius: 12px; font-weight: 600;
  transition: background .15s, color .15s;
}
.sidebar a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.sidebar a.active { background: linear-gradient(135deg, #FB923C, #EA580C); color: #fff; box-shadow: 0 8px 22px rgba(234, 88, 12, .35); }
.sidebar .ico { width: 22px; text-align: center; font-size: 16px; }
.sidebar .count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 800; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: #DC2626; color: #fff; text-align: center; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.backdrop { display: none; }

/* ---------- main ---------- */
.main { flex: 1; min-width: 0; padding: 0 32px 64px; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  margin: 0 -32px 22px; padding: 18px 32px; background: rgba(245, 243, 240, .82); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 0; flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 12px; width: 42px; height: 42px; font-size: 18px; cursor: pointer; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: linear-gradient(135deg, #FDBA74, #F97316); color: #fff; font-weight: 800; font-size: 14px;
}
.avatar.guest { background: var(--line); color: var(--muted); }
i.avatar { font-style: normal; }
.who:hover { text-decoration: none; }
a.user-cell:hover { text-decoration: none; }
a.user-cell:hover b { color: var(--orange-dark); }

/* ---------- cards & grid ---------- */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
.card h3 { font-size: 14.5px; font-weight: 800; margin: 20px 0 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.span-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------- KPI tiles ---------- */
.stat {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat .ico { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--orange-soft); margin-bottom: 14px; }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 2px; }
.stat .delta { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.stat .delta.flat { background: var(--line-2); color: var(--muted); }
.stat.accent { background: linear-gradient(135deg, #FB923C, #EA580C); border-color: transparent; color: #fff; box-shadow: 0 14px 34px rgba(234, 88, 12, .3); }
.stat.accent .ico { background: rgba(255, 255, 255, .2); }
.stat.accent .l { color: rgba(255, 255, 255, .85); }
.stat.accent .delta { background: rgba(255, 255, 255, .22); color: #fff; }
.stat.dark { background: linear-gradient(135deg, #292524, #1C1917); border-color: transparent; color: #fff; }
.stat.dark .ico { background: rgba(255, 255, 255, .1); }
.stat.dark .l { color: #A8A29E; }
.tone-blue .ico { background: var(--blue-soft); }
.tone-green .ico { background: var(--green-soft); }
.tone-violet .ico { background: var(--violet-soft); }

/* ---------- charts ---------- */
.chart { position: relative; height: 260px; }
.chart.sm { height: 200px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 12px; font-weight: 600; }
.bar-row .track { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FDBA74, #F97316); width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.bar-row .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; font-size: 13px; margin: 0 0 6px; color: var(--ink-2); }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=url], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #FCFBFA; border-radius: 12px; padding: 11px 13px; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { min-height: 84px; resize: vertical; }
textarea.code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
input[type=color] { width: 56px; height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: #fff; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: 18px; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; padding: 10px 17px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: linear-gradient(135deg, #FB923C, #EA580C); color: #fff;
  box-shadow: 0 6px 16px rgba(234, 88, 12, .25); transition: transform .1s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; box-shadow: 0 8px 22px rgba(234, 88, 12, .32); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--orange-soft); color: var(--orange-dark); box-shadow: none; }
.btn.danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.dark { background: var(--ink); box-shadow: none; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; white-space: nowrap; }
tbody tr, table tr { transition: background .12s; }
tr:hover td { background: #FCFAF8; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.user-cell { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.user-cell b { display: block; font-weight: 700; color: var(--ink); }
.user-cell small { color: var(--muted); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.b-ready, .b-done, .b-on, .b-free { background: var(--green-soft); color: #15803D; }
.b-queued, .b-premium { background: #FFF4DB; color: #A16207; }
.b-processing { background: var(--blue-soft); color: var(--blue); }
.b-failed { background: var(--red-soft); color: var(--red); }
.b-none, .b-off, .b-canceled { background: var(--line-2); color: var(--muted); }
.plat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.plat.ios { background: #111; color: #fff; }
.plat.android { background: #E8F7EE; color: #15803D; }
.plat.other { background: var(--line-2); color: var(--muted); }
.method { display: inline-flex; gap: 4px; }

/* ---------- segmented filter ---------- */
.segmented { display: inline-flex; background: var(--line-2); border-radius: 14px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.segmented a { padding: 7px 14px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 13px; }
.segmented a:hover { text-decoration: none; color: var(--ink); }
.segmented a.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(28, 25, 23, .08); }
.segmented a em { font-style: normal; color: var(--faint); margin-left: 4px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }

/* ---------- misc ---------- */
.flash { padding: 13px 16px; border-radius: 14px; margin-bottom: 16px; font-weight: 600; border: 1px solid transparent; }
.flash.success { background: var(--green-soft); color: #15803D; border-color: #CDEFD9; }
.flash.error { background: var(--red-soft); color: var(--red); border-color: #F8D4D4; }
.flash.info { background: #FFF4DB; color: #A16207; border-color: #F8E5B5; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.icon-tile { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.scene { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; background: #FCFBFA; }
.scene-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.scene-num { font-weight: 800; }
details.help { background: #FCFBFA; border: 1px dashed var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
details.help summary { cursor: pointer; font-weight: 700; }
details.help code, code { background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
pre.log { background: #1C1917; color: #FDE7D6; padding: 14px; border-radius: 14px; overflow-x: auto; font-size: 12px; white-space: pre-wrap; }
.muted { color: var(--muted); }
.video-cell { min-width: 120px; }
video.preview { width: 180px; border-radius: 12px; background: #000; }
.fade-in { animation: fadeUp .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(60% 50% at 20% 10%, rgba(249, 115, 22, .22), transparent 60%), radial-gradient(50% 50% at 90% 90%, rgba(124, 58, 237, .12), transparent 60%), var(--bg);
}
.login { width: 100%; max-width: 400px; background: #fff; border-radius: 28px; padding: 36px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); }
.login h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.login .btn { width: 100%; padding: 14px; font-size: 15px; margin-top: 8px; }
.login .logo { width: 64px; height: 64px; border-radius: 18px; display: block; margin-bottom: 22px; box-shadow: 0 10px 26px rgba(28, 25, 23, .25); }
.stripes { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.span-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: calc(-1 * var(--sidebar) - 20px); z-index: 40; transition: left .25s cubic-bezier(.2, .8, .2, 1); }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(12, 10, 9, .45); backdrop-filter: blur(2px); z-index: 30; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .main { padding: 0 16px 48px; }
  .topbar { margin: 0 -16px 16px; padding: 14px 16px; }
  .topbar h1 { font-size: 20px; }
  .topbar .who span { display: none; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 18px; border-radius: 18px; }
  .stat { padding: 16px; }
  .stat .n { font-size: 25px; }
  .stat .ico { width: 36px; height: 36px; font-size: 17px; margin-bottom: 10px; }
  .hide-sm { display: none; }
  .bar-row { grid-template-columns: 84px 1fr 36px; }
}

/* SMTP test (Ayarlar → E-posta) */
.smtp-test { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #EEE7DE); }
.smtp-test > label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.smtp-result { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.smtp-result.ok { background: #ECFDF5; color: #065F46; }
.smtp-result.fail { background: #FEF2F2; color: #991B1B; }
.smtp-result details { margin-top: 8px; }
.smtp-result summary { cursor: pointer; font-weight: 700; }
.smtp-result pre { margin: 8px 0 0; padding: 10px 12px; background: #1C1917; color: #E7E5E4; border-radius: 10px; font-size: 12px; white-space: pre-wrap; word-break: break-all; max-height: 280px; overflow: auto; }
