/* SiteVitrin Panel — modern SaaS admin tasarımı */
:root {
  --bg: #f1f5f9; --card: #ffffff; --border: #e2e8f0; --border-2: #cbd5e1;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --muted-2: #94a3b8;
  --primary: #2563eb; --primary-2: #1d4ed8; --primary-soft: #dbeafe; --primary-text: #1e40af;
  --green: #16a34a; --green-soft: #dcfce7; --green-text: #166534;
  --red: #dc2626; --red-soft: #fee2e2; --red-text: #991b1b;
  --amber: #d97706; --amber-soft: #fef3c7; --amber-text: #92400e;
  --purple: #7c3aed; --purple-soft: #ede9fe; --purple-text: #5b21b6;
  --cyan: #0891b2; --cyan-soft: #cffafe; --cyan-text: #155e75;
  --slate-soft: #f1f5f9; --slate-text: #475569;
  --sidebar: #0f172a; --sidebar-2: #1e293b; --sidebar-text: #94a3b8; --sidebar-active: #ffffff;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 50px -12px rgba(15,23,42,.25);
  --sb-w: 260px; --sb-wc: 76px; --tb-h: 64px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-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; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
.ic { flex: 0 0 auto; }
::selection { background: var(--primary-soft); }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
body.panel { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; z-index: 60; transition: width .25s ease, transform .3s ease; }
.wrap { flex: 1; min-width: 0; margin-left: var(--sb-w); display: flex; flex-direction: column; min-height: 100vh; transition: margin .25s ease; }
.content { flex: 1; padding: 24px 28px 32px; max-width: 1600px; width: 100%; }
.content-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.content-foot .link { display: inline-flex; align-items: center; gap: 4px; }

/* Sidebar */
.sb-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px 20px; }
.sb-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.sb-logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #06b6d4); display: grid; place-items: center; color: #fff; flex: 0 0 auto; box-shadow: 0 6px 18px rgba(59,130,246,.35); }
.sb-logo-text { font-weight: 800; font-size: 16px; line-height: 1.1; letter-spacing: -.02em; display: flex; flex-direction: column; white-space: nowrap; }
.sb-logo-text small { font-weight: 500; font-size: 11px; color: var(--sidebar-text); letter-spacing: 0; }
.sb-collapse { background: none; border: 0; color: var(--sidebar-text); padding: 6px; border-radius: 8px; transition: .2s; }
.sb-collapse:hover { background: var(--sidebar-2); color: #fff; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.sb-group { margin-bottom: 8px; }
.sb-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 12px 10px 6px; white-space: nowrap; overflow: hidden; }
.sb-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--sidebar-text); text-decoration: none !important; font-weight: 500; font-size: 14px; position: relative; transition: .18s; white-space: nowrap; margin-bottom: 2px; }
.sb-item:hover { background: var(--sidebar-2); color: #fff; }
.sb-item.is-active { background: linear-gradient(90deg, rgba(37,99,235,.9), rgba(37,99,235,.6)); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.3); }
.sb-item.is-active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.sb-item-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sb-badge { background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; min-width: 20px; text-align: center; }
.sb-badge:empty { display: none; }
.sb-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.sb-plan { background: var(--sidebar-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.sb-plan-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #e2e8f0; }
.sb-plan-tag { margin-left: auto; font-size: 10px; background: rgba(34,197,94,.2); color: #4ade80; padding: 1px 7px; border-radius: 999px; }
.sb-plan-bar { height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; margin: 8px 0 6px; overflow: hidden; }
.sb-plan-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #22d3ee); border-radius: 3px; }
.sb-plan-text { font-size: 11px; color: var(--sidebar-text); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--sidebar-text); text-decoration: none !important; transition: .2s; }
.sb-user:hover { background: var(--sidebar-2); }
.sb-user-text { flex: 1; display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; }
.sb-user-text strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { font-size: 11px; }
.sb-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 55; backdrop-filter: blur(2px); }

/* Sidebar collapsed */
html.sb-collapsed .sidebar { width: var(--sb-wc); }
html.sb-collapsed .wrap { margin-left: var(--sb-wc); }
html.sb-collapsed .sb-logo-text, html.sb-collapsed .sb-item-text, html.sb-collapsed .sb-plan, html.sb-collapsed .sb-user-text, html.sb-collapsed .sb-user > .ic, html.sb-collapsed .sb-badge { display: none; }
html.sb-collapsed .sb-brand { flex-direction: column; gap: 10px; padding: 16px 0 10px; }
html.sb-collapsed .sb-collapse { transform: rotate(180deg); }
html.sb-collapsed .sb-group-title { text-align: center; padding: 10px 0 6px; }
html.sb-collapsed .sb-group-title span { display: none; }
html.sb-collapsed .sb-group-title::after { content: ''; display: block; width: 24px; height: 1px; background: #334155; margin: 0 auto; }
html.sb-collapsed .sb-item { justify-content: center; padding: 10px; }
html.sb-collapsed .sb-item.is-active::before { display: none; }
html.sb-collapsed .sb-user { justify-content: center; }
html.sb-collapsed .sb-item:hover::after { content: attr(title); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); background: #0f172a; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow-lg); z-index: 100; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--tb-h); background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 28px; }
.tb-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); display: grid; place-items: center; position: relative; transition: .18s; }
.tb-btn:hover { background: var(--bg); border-color: var(--border); color: var(--text); }
.tb-menu { display: none; }
.tb-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.breadcrumb a { color: var(--muted); display: inline-flex; }
.breadcrumb a:hover { color: var(--text); text-decoration: none; }
.bc-sep { color: var(--border-2); }
.bc-current { color: var(--text); font-weight: 600; }
.tb-search { flex: 1; max-width: 460px; margin-left: auto; position: relative; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; height: 40px; color: var(--muted); transition: .2s; }
.tb-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tb-search input { flex: 1; border: 0; background: none; outline: none; height: 100%; min-width: 0; color: var(--text); }
.tb-search input::placeholder { color: var(--muted-2); }
.tb-search kbd { font-family: var(--font); font-size: 11px; background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.tb-right { display: flex; align-items: center; gap: 6px; }
.tb-site-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 10px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); transition: .18s; margin-left: 6px; }
.tb-site-btn:hover { border-color: var(--border-2); background: var(--bg); }
.tb-site-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.tb-site-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.tb-site-text small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.tb-site-text strong { font-size: 13px; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-profile { border: 0; background: none; padding: 0; margin-left: 6px; border-radius: 50%; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-weight: 700; font-size: 12px; display: inline-grid; place-items: center; flex: 0 0 auto; letter-spacing: .02em; overflow: hidden; }
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }
.avatar.c1 { background: linear-gradient(135deg,#f59e0b,#ef4444); } .avatar.c2 { background: linear-gradient(135deg,#10b981,#06b6d4); } .avatar.c3 { background: linear-gradient(135deg,#8b5cf6,#ec4899); } .avatar.c4 { background: linear-gradient(135deg,#3b82f6,#6366f1); } .avatar.c5 { background: linear-gradient(135deg,#14b8a6,#84cc16); }

/* Dropdown */
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 80; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; }
.dd.is-open .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-right { left: auto; right: 0; }
.dd-wide { min-width: 340px; }
.dd-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 8px 10px 6px; }
.dd-flex { display: flex; justify-content: space-between; align-items: center; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none; text-align: left; color: var(--text-2); font-size: 13.5px; font-weight: 500; text-decoration: none !important; transition: .15s; }
.dd-item:hover { background: var(--bg); color: var(--text); }
.dd-item .ic { color: var(--muted); }
.dd-danger { color: var(--red); } .dd-danger .ic { color: var(--red); }
.dd-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.dd-user { padding: 10px 10px 8px; display: flex; flex-direction: column; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dd-user small { color: var(--muted); font-size: 12px; }
.dd-foot { display: block; text-align: center; padding: 9px; font-size: 12.5px; font-weight: 600; border-top: 1px solid var(--border); margin-top: 4px; }
.dd-scroll { max-height: 360px; overflow-y: auto; }
.dd-site { align-items: center; }
.dd-site-color { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.dd-site-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.dd-site-text strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-site-text small { font-size: 11px; color: var(--muted); }
.dd-site-check { color: var(--primary); opacity: 0; }
.dd-site.is-active .dd-site-check { opacity: 1; }
.dd-site.is-active { background: var(--primary-soft); }
.dd-search { width: 100%; max-height: 420px; overflow-y: auto; padding: 8px; }
.dd-search .dd-item small { margin-left: auto; color: var(--muted); font-weight: 400; }
.dd-notif { display: flex; gap: 10px; padding: 10px; border-radius: 8px; align-items: flex-start; cursor: pointer; }
.dd-notif:hover { background: var(--bg); }
.dd-notif.is-unread { background: #eff6ff; }
.dd-notif .dn-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.dd-notif .dn-body { flex: 1; min-width: 0; }
.dd-notif .dn-body strong { display: block; font-size: 13px; }
.dd-notif .dn-body p { margin: 1px 0 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-notif time { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: .18s; text-decoration: none !important; }
.btn:hover { background: var(--bg); border-color: var(--border-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-dark { background: var(--text); border-color: var(--text); color: #fff; } .btn-dark:hover { background: #1e293b; color: #fff; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; } .btn-success:hover { background: #15803d; color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; } .btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-outline-danger { color: var(--red); border-color: #fecaca; } .btn-outline-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; } .btn-ghost:hover { background: var(--bg); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); } .btn-soft:hover { background: #bfdbfe; color: var(--primary-text); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; color: var(--muted); }
.btn-icon:hover { color: var(--text); }
.btn-icon.danger:hover { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; font-size: inherit; }
.link:hover { text-decoration: underline; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 9px 9px 0; }
.btn-group .btn.is-active { background: var(--text); color: #fff; border-color: var(--text); z-index: 1; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-h p { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.card-h .actions { display: flex; gap: 6px; align-items: center; }
.card-b { padding: 20px; }
.card-b.p0 { padding: 0; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.card.p { padding: 20px; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(3, 1fr); } .g-4 { grid-template-columns: repeat(4, 1fr); } .g-6 { grid-template-columns: repeat(6, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; } .g-1-2 { grid-template-columns: 1fr 2fr; } .g-3-2 { grid-template-columns: 3fr 2fr; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
.mb { margin-bottom: 20px; } .mb-s { margin-bottom: 12px; } .mt { margin-top: 20px; } .mt-s { margin-top: 12px; }
.flex { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap-f { flex-wrap: wrap; } .col { flex-direction: column; align-items: stretch; } .gap-s { gap: 6px; } .gap-l { gap: 16px; }
.ml-auto { margin-left: auto; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; } .bold { font-weight: 700; } .semi { font-weight: 600; } .right { text-align: right; } .center { text-align: center; } .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; }
.c-green { color: var(--green); } .c-red { color: var(--red); } .c-amber { color: var(--amber); } .c-primary { color: var(--primary); } .c-purple { color: var(--purple); }
.nowrap { white-space: nowrap; } .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* KPI */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; padding: 2px 7px; border-radius: 999px; font-size: 12px; }
.trend.up { color: var(--green-text); background: var(--green-soft); } .trend.down { color: var(--red-text); background: var(--red-soft); } .trend.flat { color: var(--slate-text); background: var(--slate-soft); }
.kpi .spark { position: absolute; right: 0; bottom: 0; width: 45%; height: 48px; opacity: .55; }
.bg-blue { background: var(--primary-soft); color: var(--primary); } .bg-green { background: var(--green-soft); color: var(--green); } .bg-amber { background: var(--amber-soft); color: var(--amber); } .bg-red { background: var(--red-soft); color: var(--red); } .bg-purple { background: var(--purple-soft); color: var(--purple); } .bg-cyan { background: var(--cyan-soft); color: var(--cyan); } .bg-slate { background: var(--slate-soft); color: var(--slate-text); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.4; background: var(--slate-soft); color: var(--slate-text); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.nodot::before { display: none; }
.badge.b-green { background: var(--green-soft); color: var(--green-text); } .badge.b-red { background: var(--red-soft); color: var(--red-text); } .badge.b-amber { background: var(--amber-soft); color: var(--amber-text); } .badge.b-blue { background: var(--primary-soft); color: var(--primary-text); } .badge.b-purple { background: var(--purple-soft); color: var(--purple-text); } .badge.b-cyan { background: var(--cyan-soft); color: var(--cyan-text); } .badge.b-dark { background: var(--text); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--slate-soft); font-size: 12px; font-weight: 500; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f8fafc; white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .sort-ic { display: inline-block; width: 12px; margin-left: 4px; opacity: .35; vertical-align: -1px; }
.tbl th.sorted .sort-ic { opacity: 1; color: var(--primary); }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl tbody tr.is-selected { background: #eff6ff; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .cell-main { font-weight: 600; color: var(--text); }
.tbl .cell-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.tbl .row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: .6; transition: .15s; }
.tbl tr:hover .row-actions { opacity: 1; }
.tbl .prod { display: flex; align-items: center; gap: 12px; }
.tbl .prod img, .thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--bg); flex: 0 0 auto; }
.tbl .chk { width: 40px; padding-right: 0; }
.tbl-compact th, .tbl-compact td { padding: 9px 12px; }
.tbl-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tbl-toolbar .search { flex: 1; min-width: 200px; max-width: 320px; }
.tbl-toolbar .bulk { display: none; align-items: center; gap: 8px; background: var(--primary-soft); color: var(--primary-text); padding: 4px 6px 4px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; }
.tbl-toolbar .bulk.is-visible { display: flex; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination button { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-weight: 600; font-size: 12.5px; color: var(--text-2); display: grid; place-items: center; padding: 0 6px; }
.pagination button:hover { background: var(--bg); }
.pagination button.is-active { background: var(--text); color: #fff; border-color: var(--text); }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .dots { padding: 0 4px; color: var(--muted); }
input[type=checkbox].cb, .cb { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; margin: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--red); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; outline: none; transition: .18s; font-size: 14px; color: var(--text); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: var(--muted-2); }
.input:disabled, .input[readonly] { background: var(--bg); color: var(--muted); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { 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; padding-right: 34px; cursor: pointer; }
.input.sm, .select.sm { height: 34px; font-size: 13px; border-radius: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.hint { font-size: 12px; color: var(--muted); }
.input-group { display: flex; align-items: center; position: relative; }
.input-group .input { padding-left: 38px; }
.input-group > .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.input-group .suffix { position: absolute; right: 12px; color: var(--muted); font-size: 13px; pointer-events: none; }
.input-group.right .input { padding-left: 12px; padding-right: 44px; }
.search { position: relative; }
.search .input { padding-left: 36px; }
.search > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .sw { width: 40px; height: 22px; border-radius: 999px; background: var(--border-2); position: relative; transition: .2s; flex: 0 0 auto; }
.switch .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .sw { background: var(--primary); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch.sm .sw { width: 32px; height: 18px; } .switch.sm .sw::after { width: 12px; height: 12px; } .switch.sm input:checked + .sw::after { transform: translateX(14px); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.radio-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: .15s; position: relative; }
.radio-card:hover { border-color: var(--border-2); }
.radio-card input { position: absolute; opacity: 0; }
.radio-card.is-active, .radio-card:has(input:checked) { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 3px var(--primary-soft); }
.radio-card strong { font-size: 13.5px; }
.radio-card small { color: var(--muted); font-size: 12px; }
.chk-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.img-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px; }
.img-picker button { border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; background: var(--bg); aspect-ratio: 1; }
.img-picker button img { width: 100%; height: 100%; object-fit: cover; }
.img-picker button.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.upload-zone { border: 2px dashed var(--border-2); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); cursor: pointer; transition: .18s; }
.upload-zone:hover { border-color: var(--primary); background: #f8fafc; color: var(--primary); }
.upload-zone .ic { margin: 0 auto 8px; }
.editor-toolbar { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; border: 1px solid var(--border); border-bottom: 0; border-radius: 9px 9px 0 0; background: #f8fafc; }
.editor-toolbar button { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; color: var(--text-2); display: grid; place-items: center; }
.editor-toolbar button:hover { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.editor-toolbar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
.editor-toolbar + .textarea { border-radius: 0 0 9px 9px; min-height: 220px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; transition: .15s; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs button.is-active, .tabs a.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { background: var(--slate-soft); color: var(--slate-text); font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.tabs button.is-active .count { background: var(--primary-soft); color: var(--primary-text); }
[data-tabs] [data-panel] { display: none; }
[data-tabs] [data-panel].is-active { display: block; }
.tabs-pill { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.tabs-pill button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tabs-pill button.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.side-tabs { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.side-tabs .side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--tb-h) + 20px); }
.side-tabs .side-nav button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
.side-tabs .side-nav button .ic { color: var(--muted); }
.side-tabs .side-nav button:hover { background: #fff; }
.side-tabs .side-nav button.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.side-tabs .side-nav button.is-active .ic { color: var(--primary); }

/* ---------- Modal / Drawer ---------- */
.modal-bd { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: .2s; }
.modal-bd.is-open { opacity: 1; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateY(16px) scale(.98); transition: .22s cubic-bezier(.2,.8,.2,1); }
.modal-bd.is-open .modal { transform: none; }
.modal.md { max-width: 720px; } .modal.lg { max-width: 920px; } .modal.xl { max-width: 1140px; } .modal.sm { max-width: 420px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); gap: 12px; }
.modal-h h3 { font-size: 17px; font-weight: 700; }
.modal-h p { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.modal-x { width: 34px; height: 34px; border-radius: 8px; border: 0; background: var(--bg); color: var(--muted); display: grid; place-items: center; flex: 0 0 auto; }
.modal-x:hover { background: var(--border); color: var(--text); }
.modal-b { padding: 22px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; align-items: center; background: #f8fafc; border-radius: 0 0 16px 16px; }
.modal-f .left { margin-right: auto; }
.drawer-bd { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 200; opacity: 0; transition: .25s; }
.drawer-bd.is-open { opacity: 1; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 560px; background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.lg { max-width: 760px; } .drawer.xl { max-width: 960px; }
.drawer-bd.is-open .drawer { transform: none; }
.drawer .modal-h { padding: 18px 24px; } .drawer .modal-b { padding: 24px; flex: 1; } .drawer .modal-f { border-radius: 0; }
.confirm-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .empty-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--bg); display: grid; place-items: center; margin: 0 auto 14px; color: var(--muted-2); }
.empty h4 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 13px; margin: 0 0 14px; }

/* ---------- Lists / misc ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-body strong { display: block; font-size: 13.5px; }
.list-item .li-body small { color: var(--muted); font-size: 12px; }
.list-item.clickable { cursor: pointer; } .list-item.clickable:hover { background: #f8fafc; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-shadow: 0 0 0 3px #fff; }
.tl-item.done::before { background: var(--green); border-color: var(--green); }
.tl-item.red::before { border-color: var(--red); } .tl-item.amber::before { border-color: var(--amber); } .tl-item.green::before { border-color: var(--green); } .tl-item.purple::before { border-color: var(--purple); }
.tl-item strong { font-size: 13.5px; display: block; }
.tl-item p { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.tl-item time { font-size: 11.5px; color: var(--muted-2); }
.progress { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s; }
.progress.sm { height: 5px; }
.progress .g { background: var(--green); } .progress .r { background: var(--red); } .progress .a { background: var(--amber); }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.stat-row:last-child { border-bottom: 0; }
.stat-row strong { font-variant-numeric: tabular-nums; }
.stat-row.total { font-weight: 700; font-size: 15px; border-top: 2px solid var(--text); border-bottom: 0; margin-top: 4px; padding-top: 12px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); margin: 0; } .kv dd { margin: 0; font-weight: 500; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; align-items: flex-start; border: 1px solid transparent; }
.alert .ic { flex: 0 0 auto; margin-top: 1px; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: var(--primary-text); }
.alert-warn { background: var(--amber-soft); border-color: #fde68a; color: var(--amber-text); }
.alert-ok { background: var(--green-soft); border-color: #bbf7d0; color: var(--green-text); }
.alert-err { background: var(--red-soft); border-color: #fecaca; color: var(--red-text); }
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 220px; } .chart-box.xs { height: 160px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qa { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; text-decoration: none !important; color: var(--text); font-weight: 600; font-size: 13px; transition: .15s; text-align: left; }
.qa:hover { border-color: var(--primary); background: #f8fafc; transform: translateY(-1px); box-shadow: var(--shadow); }
.qa .qa-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.rank { width: 24px; height: 24px; border-radius: 6px; background: var(--bg); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.rank.r1 { background: #fef3c7; color: #b45309; } .rank.r2 { background: #e2e8f0; color: #475569; } .rank.r3 { background: #ffedd5; color: #c2410c; }
.stars { color: #f59e0b; letter-spacing: 1px; font-size: 13px; }
.kbd { font-family: var(--font); font-size: 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.masked { font-family: ui-monospace, monospace; letter-spacing: 1px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted-2); }
.status-dot.on { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; } .status-dot.off { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; } .status-dot.idle { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: .15s; }
.chip:hover { border-color: var(--border-2); background: var(--bg); }
.chip.is-active { background: var(--text); color: #fff; border-color: var(--text); }
.chip .count { background: rgba(0,0,0,.08); padding: 0 6px; border-radius: 999px; font-size: 11px; }
.chip.is-active .count { background: rgba(255,255,255,.2); }

/* Tree */
.tree ul { list-style: none; margin: 0; padding-left: 0; }
.tree ul ul { padding-left: 28px; border-left: 1px dashed var(--border); margin-left: 16px; }
.tree-node { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid transparent; margin: 2px 0; transition: .15s; }
.tree-node:hover { background: #f8fafc; border-color: var(--border); }
.tree-node.is-dragging { opacity: .4; }
.tree-node.drop-over { border-color: var(--primary); background: #eff6ff; }
.tree-node .grip { color: var(--muted-2); cursor: grab; }
.tree-node .tn-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.tree-node .tn-name { font-weight: 600; flex: 1; }
.tree-node .tn-meta { color: var(--muted); font-size: 12px; }
.tree-node .row-actions { display: flex; gap: 2px; opacity: 0; }
.tree-node:hover .row-actions { opacity: 1; }
.tree-toggle { width: 22px; height: 22px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 5px; }
.tree-toggle:hover { background: var(--border); }
.tree li.is-collapsed > ul { display: none; }
.tree li.is-collapsed .tree-toggle .ic { transform: rotate(-90deg); }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cal-head h3 { font-size: 16px; }
.cal-grid { display: grid; grid-template-columns: 64px repeat(7, 1fr); min-width: 900px; }
.cal-grid .cal-day-h { padding: 10px 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); text-transform: uppercase; letter-spacing: .05em; }
.cal-grid .cal-day-h strong { display: block; font-size: 18px; color: var(--text); font-weight: 700; margin-top: 2px; }
.cal-grid .cal-day-h.today strong { color: #fff; background: var(--primary); width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 15px; }
.cal-grid .cal-time { font-size: 11.5px; color: var(--muted); padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--border); height: 64px; }
.cal-grid .cal-cell { border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); height: 64px; position: relative; padding: 3px; cursor: pointer; transition: .12s; }
.cal-grid .cal-cell:hover { background: #f8fafc; }
.cal-grid .cal-cell.today { background: #eff6ff40; }
.cal-ev { border-radius: 6px; padding: 4px 7px; font-size: 11.5px; font-weight: 600; line-height: 1.25; overflow: hidden; cursor: pointer; border-left: 3px solid; margin-bottom: 2px; }
.cal-ev small { display: block; font-weight: 500; opacity: .8; font-size: 10.5px; }
.cal-ev.s-bekliyor { background: var(--amber-soft); color: var(--amber-text); border-color: var(--amber); }
.cal-ev.s-onayli { background: var(--primary-soft); color: var(--primary-text); border-color: var(--primary); }
.cal-ev.s-geldi { background: var(--green-soft); color: var(--green-text); border-color: var(--green); }
.cal-ev.s-gelmedi { background: var(--slate-soft); color: var(--slate-text); border-color: var(--muted); }
.cal-ev.s-iptal { background: var(--red-soft); color: var(--red-text); border-color: var(--red); text-decoration: line-through; }
.cal-ev:hover { filter: brightness(.96); }

/* Theme cards */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.theme-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; transition: .18s; position: relative; }
.theme-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.theme-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-preview { height: 130px; position: relative; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.theme-preview .tp-bar { height: 6px; border-radius: 3px; width: 60%; background: rgba(255,255,255,.85); }
.theme-preview .tp-bar.s { width: 35%; opacity: .6; }
.theme-preview .tp-btn { width: 44px; height: 14px; border-radius: 4px; margin-top: 4px; }
.theme-preview .tp-active { position: absolute; top: 10px; right: 10px; }
.theme-body { padding: 12px 14px 14px; }
.theme-body strong { display: block; font-size: 14px; }
.theme-body small { color: var(--muted); font-size: 12px; display: block; margin-bottom: 10px; }
.theme-body .swatches { display: flex; gap: 4px; margin-bottom: 10px; }
.theme-body .swatches i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
.theme-body .flex .btn { flex: 1; }

/* Gallery grid */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gal-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--bg); border: 1px solid var(--border); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item .gal-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.8), transparent 60%); opacity: 0; transition: .2s; display: flex; align-items: flex-end; justify-content: space-between; padding: 8px; color: #fff; font-size: 12px; }
.gal-item:hover .gal-ov { opacity: 1; }
.gal-item .gal-ov .btn-icon { background: rgba(255,255,255,.15); border-color: transparent; color: #fff; }
.slide-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; align-items: center; background: #fff; }
.slide-card img { width: 120px; height: 70px; object-fit: cover; border-radius: 8px; }
.slide-card .sc-body { flex: 1; min-width: 0; } .slide-card .sc-body strong { display: block; } .slide-card .sc-body small { color: var(--muted); }
.slide-card .sc-ord { display: flex; flex-direction: column; gap: 2px; }

/* Invoice print */
.inv { font-size: 13px; color: #111; }
.inv-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid #111; margin-bottom: 18px; }
.inv-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.inv-meta { text-align: right; } .inv-meta div { margin-bottom: 2px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.inv-parties h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #666; margin-bottom: 6px; }
.inv table { width: 100%; border-collapse: collapse; }
.inv th, .inv td { padding: 9px 10px; border-bottom: 1px solid #ddd; text-align: left; }
.inv th { background: #f3f4f6; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.inv .num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-totals { margin: 16px 0 0 auto; width: 320px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #ddd; }
.inv-totals div.total { font-weight: 800; font-size: 16px; border-bottom: 0; border-top: 2px solid #111; margin-top: 4px; padding-top: 10px; }
.inv-foot { margin-top: 26px; font-size: 11.5px; color: #666; border-top: 1px solid #ddd; padding-top: 12px; }

/* Toast */
.sv-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.sv-toast { background: #0f172a; color: #fff; padding: 12px 16px 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); transition: .3s; border-left: 4px solid #22c55e; display: flex; align-items: center; gap: 10px; max-width: 380px; }
.sv-toast.is-in { opacity: 1; transform: none; }
.sv-toast.err { border-left-color: #ef4444; } .sv-toast.info { border-left-color: #3b82f6; } .sv-toast.warn { border-left-color: #f59e0b; }

/* Login page */
body.bos { background: #fff; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { position: relative; background: var(--sidebar); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; }
.login-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.login-side::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(37,99,235,.55), rgba(15,23,42,.9) 70%); }
.login-side > * { position: relative; z-index: 1; }
.login-side h2 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 14px; }
.login-side p { color: #cbd5e1; font-size: 15px; max-width: 460px; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.login-feat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px; backdrop-filter: blur(6px); }
.login-feat strong { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.login-feat small { color: #cbd5e1; font-size: 12.5px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 400px; }
.login-box h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.login-box > p { color: var(--muted); margin-bottom: 26px; }
.login-box .field { margin-bottom: 16px; }
.login-demo { margin-top: 18px; background: #f8fafc; border: 1px dashed var(--border-2); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--muted); }
.login-demo code { background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text); font-family: ui-monospace, monospace; }
.login-logos { display: flex; gap: 20px; align-items: center; color: #94a3b8; font-size: 12px; }

/* Skeleton/anim */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card, .kpi { animation: fadeUp .35s ease both; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pulse { animation: pulse 1.4s ease infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Print */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; padding: 20px; background: #fff; }
  .modal-f, .modal-h, .no-print { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .tb-site-text { display: none; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); width: var(--sb-w) !important; }
  html.sb-collapsed .sidebar { width: var(--sb-w); }
  html.sb-collapsed .sb-logo-text, html.sb-collapsed .sb-item-text, html.sb-collapsed .sb-plan, html.sb-collapsed .sb-user-text, html.sb-collapsed .sb-badge { display: initial; }
  html.sb-collapsed .sb-item-text { display: block; } html.sb-collapsed .sb-plan { display: block; } html.sb-collapsed .sb-user-text { display: flex; }
  html.sb-collapsed .sb-item { justify-content: flex-start; } html.sb-collapsed .sb-group-title span { display: inline; } html.sb-collapsed .sb-group-title::after { display: none; } html.sb-collapsed .sb-brand { flex-direction: row; padding: 18px 16px 14px 20px; }
  html.sb-collapsed .sb-item:hover::after { display: none; }
  .sb-collapse { display: none; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; }
  .wrap, html.sb-collapsed .wrap { margin-left: 0; }
  .tb-menu { display: grid; }
  .breadcrumb { display: none; }
  .content, .topbar, .content-foot { padding-left: 20px; padding-right: 20px; }
  .g-3, .g-2-1, .g-1-2, .g-3-2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .side-tabs { grid-template-columns: 1fr; } .side-tabs .side-nav { position: static; flex-direction: row; overflow-x: auto; }
  .login { grid-template-columns: 1fr; } .login-side { display: none; }
}
@media (max-width: 768px) {
  .content { padding: 16px; }
  .g-6, .g-4, .g-2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid.g3 { grid-template-columns: 1fr; }
  .tb-search { display: none; }
  .tb-site-btn { padding: 0 8px; }
  .page-head h1 { font-size: 20px; }
  .kpi-value { font-size: 22px; }
  .modal-b, .drawer .modal-b { padding: 16px; }
  .quick-actions { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; }
  .inv-parties { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .g-6, .g-4, .g-2 { grid-template-columns: 1fr; }
  .dd-wide { min-width: calc(100vw - 32px); }
  .tb-right .dd { position: static; }
  .tb-right .dd-menu { right: 16px; left: 16px; min-width: 0; }
}

/* ---------- Panel modu değiştirici (Klinik / E-Ticaret) ---------- */
.tb-mod { flex: 0 0 auto; }
.tb-mod a { border: 0; background: none; padding: 6px 11px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; transition: .15s; }
.tb-mod a:hover { color: var(--text); }
.tb-mod a.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
@media (max-width: 1180px) { .tb-mod span { display: none; } }
@media (max-width: 720px) { .tb-mod { display: none; } }
.mod-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.mod-sec button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; transition: .18s; }
.mod-sec button:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mod-sec button strong { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mod-sec button small { color: var(--muted); font-size: 12px; line-height: 1.4; }
@media (max-width: 520px) { .mod-sec { grid-template-columns: 1fr; } }

/* ---------- İçerik yönetimi ek stiller ---------- */
.slide-card { margin-bottom: 10px; }
.slide-card.is-pasif { opacity: .55; }
.slide-card .sc-ord { flex-direction: row; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.gal-item .gal-ov strong { display: block; line-height: 1.2; }
.gal-item .gal-ov small { display: block; opacity: .8; font-size: 11px; }

/* ---------- Tema kartı önizleme metni ---------- */
.theme-preview > span { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.theme-body { padding: 14px; }
.theme-body strong { display: block; font-size: 14px; }
.theme-body small { color: var(--muted); font-size: 12px; }
