/* ==========================================================
   SonBeyAff Backoffice
   ========================================================== */

:root {
    --bg: #090b14;
    --panel: #0e1122;
    --card: #12162d;
    --card-2: #171c38;
    --hover: rgba(255, 255, 255, .04);
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);
    --text: #e9ebf7;
    --text-2: #c3c7de;
    --muted: #868cae;
    --primary: #7c5cff;
    --primary-2: #6a48ff;
    --primary-soft: rgba(124, 92, 255, .14);
    --accent: #ffc83d;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
    --blue: #3b82f6;
    --purple: #a78bfa;
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-w: 264px;
    --topbar-h: 64px;
    --shadow: 0 16px 40px rgba(0, 0, 0, .45);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
    --ease: cubic-bezier(.22, .8, .2, 1);
}

*, *::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; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
[hidden] { display: none !important; }
::selection { background: rgba(124, 92, 255, .35); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.text-accent { color: var(--accent); }
.text-link { color: var(--purple); }
.text-link:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-w);
    display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); padding: 0 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--bg); font-weight: 800; font-size: 18px; box-shadow: 0 6px 18px rgba(124, 92, 255, .35); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-text em { font-style: normal; color: var(--accent); }
.brand-text small { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-close { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-title { display: block; padding: 0 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5f6588; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav-link .icon { color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link:hover .icon { color: var(--text-2); }
.nav-link.is-active { background: var(--primary-soft); color: #fff; font-weight: 600; }
.nav-link.is-active .icon { color: var(--purple); }
.nav-link.is-active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: rgba(245, 158, 11, .16); color: var(--amber); }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.sidebar-foot .nav-link { flex: 1; }
.version { color: #5f6588; font-size: 11px; padding-right: 8px; }
.sidebar-backdrop { display: none; }

/* overflow-x: clip → hiçbir içerik sayfayı yana kaydıramaz (sticky topbar'ı bozmaz) */
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; overflow-x: clip; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; gap: 14px; padding: 0 28px;
    background: rgba(9, 11, 20, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; }
.breadcrumbs a { display: inline-flex; align-items: center; transition: color .15s; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs .icon { width: 16px; height: 16px; }
.breadcrumbs .sep { width: 14px; height: 14px; opacity: .5; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2a2f5e, #1a1e3f); border: 1px solid var(--line-2); color: var(--text-2); }
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 28px 60px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 600; font-size: 13.5px; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .1s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-primary:hover { background: var(--primary-2); box-shadow: 0 8px 24px rgba(124, 92, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-danger-ghost { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }
.btn-danger-ghost:hover { background: rgba(239, 68, 68, .16); color: #fecaca; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.icon-btn-sm { width: 32px; height: 32px; border-color: transparent; background: transparent; }
.icon-btn-sm .icon { width: 16px; height: 16px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--purple); font-weight: 600; font-size: 13px; }
.link-more .icon { width: 15px; height: 15px; transition: transform .15s; }
.link-more:hover .icon { transform: translateX(2px); }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; min-width: 200px; padding: 6px;
    background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s var(--ease);
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--hover); color: var(--text); }
.dropdown-menu .icon { width: 16px; height: 16px; color: var(--muted); }
.dropdown-menu form { margin: 0; }
.dropdown-menu .is-danger { color: #fca5a5; }
.dropdown-menu .is-danger .icon { color: #f87171; }
.dropdown-menu .is-danger:hover { background: rgba(239, 68, 68, .1); }

/* ---------- Alerts / pills / tags ---------- */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid; margin-bottom: 20px; font-size: 13.5px; }
.alert .icon { margin-top: 1px; }
.alert-danger { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); color: #fecaca; }
.alert-danger .icon { color: #f87171; }
.alert-info { background: rgba(59, 130, 246, .07); border-color: rgba(59, 130, 246, .25); color: #bfdbfe; }
.alert-info .icon { color: #60a5fa; }
.alert-bar { margin: 0; border-radius: 0; border-width: 0 0 1px; padding: 10px 28px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.pill.has-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: rgba(34, 197, 94, .12); color: #4ade80; }
.pill-red { background: rgba(239, 68, 68, .12); color: #f87171; }
.pill-amber { background: rgba(245, 158, 11, .13); color: #fbbf24; }
.pill-blue { background: rgba(59, 130, 246, .13); color: #60a5fa; }
.pill-purple { background: rgba(167, 139, 250, .13); color: var(--purple); }
.pill-gray { background: rgba(255, 255, 255, .06); color: var(--muted); }
h1 .pill { margin-left: 10px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.count-badge { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 9px; margin-left: 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 13px; font-weight: 600; vertical-align: middle; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 26px; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 8px; transition: color .15s; }
.back-link:hover { color: var(--text); }
.back-link .icon { width: 15px; height: 15px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card + .card, .card-table + .card, .kpi-grid + .card, .card + .dash-grid, .dash-grid + .card { margin-top: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-head p { font-size: 12.5px; margin-top: 2px; }
.card-head-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--purple); }
.card-head-icon .icon { width: 16px; height: 16px; }
.card-table { padding: 0; overflow: hidden; }
.card-table > .card-head { padding: 18px 20px 0; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 92, 255, .14), transparent 70%); pointer-events: none; }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .05); color: var(--text-2); }
.kpi-icon .icon { width: 17px; height: 17px; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-value { display: block; margin: 14px 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trend { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.trend .icon { width: 13px; height: 13px; }
.trend-up { background: rgba(34, 197, 94, .12); color: #4ade80; }
.trend-down { background: rgba(239, 68, 68, .12); color: #f87171; }
.trend-flat { background: rgba(255, 255, 255, .06); color: var(--muted); }
.trend-warn { background: rgba(245, 158, 11, .13); color: #fbbf24; }

.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.mini-stat { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; transition: border-color .15s, background .15s; }
.mini-stat:hover { border-color: var(--line-2); background: var(--card-2); }
.mini-stat .icon { width: 16px; height: 16px; color: var(--muted); }
.mini-stat b { color: var(--text); }

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dash-grid .card + .card { margin-top: 0; }
.dash-grid > .card-chart { grid-column: 1 / -1; }
.dash-grid-2 > .card-table { grid-column: auto; }

/* rank / source / item lists */
.bar { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.rank-list, .source-list, .item-list, .timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank-list li, .source-list li, .item-list li { display: flex; align-items: center; gap: 12px; }
.rank-no { width: 18px; color: var(--muted); font-weight: 700; font-size: 12px; text-align: center; }
.rank-body, .source-body { flex: 1; min-width: 0; display: grid; gap: 7px; }
.rank-name, .source-name { display: flex; justify-content: space-between; gap: 10px; font-weight: 500; }
.rank-name b { font-variant-numeric: tabular-nums; }
.source-name > span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.source-name b { color: var(--text); }
.source-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .05); color: var(--text-2); }
.source-icon .icon { width: 16px; height: 16px; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-body b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-body small { color: var(--muted); font-size: 12px; }
.item-body:hover b { color: var(--purple); }
.timeline { gap: 0; }
.timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 16px; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline p { font-size: 13px; color: var(--text-2); }
.timeline p b { color: var(--text); font-weight: 600; }
.dot { width: 9px; height: 9px; flex: none; margin-top: 5px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--card); position: relative; z-index: 1; }
.dot-green { background: var(--green); } .dot-blue { background: var(--blue); } .dot-red { background: var(--red); }
.dot-amber { background: var(--amber); } .dot-purple { background: var(--purple); }
.empty-sm { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 28px 12px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; font-size: 13px; }

/* ---------- Chart ---------- */
.chart { position: relative; min-width: 0; overflow: hidden; }
.chart-plot { position: relative; height: 240px; padding-left: 40px; }
.chart-grid { position: absolute; inset: 0 0 26px 40px; }
.chart-gridline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.chart-gridline span { position: absolute; right: calc(100% + 10px); top: -8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-bars { position: absolute; inset: 0 0 0 40px; display: flex; align-items: stretch; gap: 2px; }
.chart-col { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 12% 26px; cursor: default; border-radius: 6px; }
.chart-col:hover, .chart-col:focus-visible { background: rgba(255, 255, 255, .03); }
.chart-bar { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--primary); transition: filter .15s; }
.chart-col:hover .chart-bar { filter: brightness(1.25); }
.chart-col.is-today .chart-bar { background: repeating-linear-gradient(45deg, var(--primary) 0 6px, #6a4ce0 6px 9px); }
.chart-x { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-x.is-hidden { visibility: hidden; }
/* uçtaki etiketler grafiğin dışına taşmasın */
.chart-col:first-child .chart-x { left: 0; transform: none; }
.chart-col:last-child .chart-x { left: auto; right: 0; transform: none; }
.chart-empty { position: absolute; inset: 0 0 26px 40px; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.chart-table { margin-top: 14px; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 12.5px; width: fit-content; }
.chart-table summary:hover { color: var(--text); }
.chart-table .table { margin-top: 10px; max-width: 360px; }
.chart-tooltip { position: fixed; z-index: 120; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: #0b0e1d; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12.5px; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }
.chart-tooltip b { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.chart-tooltip span { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Toolbar / inputs ---------- */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar-card { padding: 12px 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.input {
    width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
    background: #0c0f20; color: var(--text); font: inherit; font-size: 13.5px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 44px; line-height: 1.55; }
.input::placeholder { color: #5b6185; }
.input:hover { border-color: rgba(255, 255, 255, .18); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); background: #0e1226; }
.input.is-invalid { border-color: rgba(239, 68, 68, .6); box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
input[type="datetime-local"].input { color-scheme: dark; }
input[type="number"].input { font-variant-numeric: tabular-nums; }
.search-box { position: relative; flex: 1 1 240px; max-width: 340px; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 36px; height: 36px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; }
.select-wrap > .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.select-sm select { height: 36px; width: auto; min-width: 140px; }
.select-wrap.is-set select { border-color: rgba(124, 92, 255, .55); background: rgba(124, 92, 255, .08); }
.check-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.check-inline input { accent-color: var(--primary); width: 15px; height: 15px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: #0c0f20; border: 1px solid var(--line-2); }
.segmented label { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: .15s; white-space: nowrap; }
.segmented label:hover { color: var(--text); }
.segmented label.is-active { background: var(--primary); color: #fff; }
.segmented input { display: none; }

/* ---------- Table ---------- */
/* Tablolarda iç kaydırma yok: tablo sayfayla birlikte akar, dar ekranda kolonlar gizlenir/sarılır */
.table-wrap { overflow: visible; }
.table { width: 100%; border-collapse: collapse; }
.table th { position: static; text-align: left; padding: 11px 14px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: rgba(255, 255, 255, .015); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-muted td:not(.cell-actions):not(.cell-check) { opacity: .55; }
.table tr.is-selected { background: rgba(124, 92, 255, .06) !important; }
.table-compact td, .table-compact th { padding: 7px 10px; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; }
.th-sort .icon { width: 13px; height: 13px; opacity: 0; transition: .15s; }
.th-sort:hover { color: var(--text); }
.th-sort:hover .icon { opacity: .6; }
.th-sort.is-sorted { color: var(--text); }
.th-sort.is-sorted .icon { opacity: 1; }
.th-sort.is-asc .icon { transform: rotate(180deg); }
.cell-check { width: 44px; padding-right: 0 !important; }
.cell-actions { width: 90px; text-align: right; }
.row-actions { display: inline-flex; align-items: center; gap: 2px; }
.cell-stack { display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-stack b { font-weight: 600; }
.cell-stack small { color: var(--muted); font-size: 12px; }
td.cell-stack { display: table-cell; }
td.cell-stack b, td.cell-stack small { display: block; }
.cell-firm { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.cell-firm:hover span, .cell-firm:hover b { color: var(--purple); }
.cell-rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell-rating .icon { width: 15px; height: 15px; color: var(--accent); fill: var(--accent); }
.cell-date { white-space: nowrap; color: var(--text-2); }
.cell-progress { display: grid; gap: 5px; min-width: 110px; }
.cell-progress small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cell-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.cell-link .icon { width: 14px; height: 14px; color: var(--muted); }
.cell-thumb { width: 96px; }
.banner-thumb { display: grid; place-items: center; width: 84px; height: 44px; border-radius: 8px; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, var(--c1), transparent 60%), linear-gradient(135deg, var(--c2), #090b14); border: 1px solid var(--line-2); }
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; }
.banner-thumb b { font-size: 9px; font-weight: 700; line-height: 1.15; padding: 4px; text-align: center; }
td.cell-media { white-space: nowrap; }
td.cell-media .cell-stack { vertical-align: middle; margin-left: 10px; }
.cell-emoji { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 18px; vertical-align: middle; background: linear-gradient(135deg, var(--c1), var(--c2)); }
td.cell-inline { white-space: nowrap; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 10px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }

.logo { --c1: #7c5cff; --c2: #1e1b4b; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-weight: 800; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.logo.has-img { background: #fff; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo-xs { width: 24px; height: 24px; border-radius: 7px; font-size: 9px; }
.logo-sm { width: 34px; height: 34px; border-radius: 9px; font-size: 11px; }
.logo-md { width: 48px; height: 48px; border-radius: 13px; font-size: 15px; }

/* checkbox */
.checkbox { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; cursor: pointer; }
.checkbox input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.checkbox i { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(255, 255, 255, .25); background: #0c0f20; transition: .15s; }
.checkbox input:checked + i, .checkbox input:indeterminate + i { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked + i::after { content: ''; display: block; width: 5px; height: 9px; margin: 2px auto 0; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox input:indeterminate + i::after { content: ''; display: block; width: 8px; height: 2px; margin: 7px auto 0; background: #fff; }
.checkbox input:focus-visible + i { box-shadow: 0 0 0 3px rgba(124, 92, 255, .35); }

/* inline switch (liste) */
.toggle-form { margin: 0; display: inline-block; }
.switch-btn { position: relative; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .2s; }
.switch-btn i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform .2s var(--ease); }
.switch-btn.is-on { background: var(--green); }
.switch-btn.is-on i { transform: translateX(16px); }
.switch-btn.is-busy { opacity: .6; pointer-events: none; }

/* bulk bar */
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: rgba(124, 92, 255, .1); border-bottom: 1px solid rgba(124, 92, 255, .25); font-size: 13px; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* pagination */
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.pagination { display: flex; gap: 4px; }
.page-btn { min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; transition: .15s; }
.page-btn:hover { background: var(--hover); color: var(--text); }
.page-btn.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.is-disabled { opacity: .35; pointer-events: none; }
.page-btn .icon { width: 16px; height: 16px; }
.page-gap { display: grid; place-items: center; width: 22px; color: var(--muted); }

/* empty state */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; background: var(--primary-soft); color: var(--purple); }
.empty-icon .icon { width: 28px; height: 28px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { margin-bottom: 20px; }

/* ---------- Forms ---------- */
.form-page { padding-bottom: 80px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.form-main, .form-side { display: grid; gap: 20px; min-width: 0; }
.form-side { position: sticky; top: calc(var(--topbar-h) + 20px); }
.form-card { padding: 20px 22px 22px; }
.fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 16px; }
.field { grid-column: span 6; min-width: 0; }
.field-half { grid-column: span 3; }
.field-third { grid-column: span 2; }
.form-side .field, .form-side .field-half, .form-side .field-third { grid-column: span 6; }
.field-label { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.req { color: #f87171; }
.field-help { margin-top: 6px; font-size: 12px; color: var(--muted); }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: #f87171; font-weight: 500; }
.field-error .icon { width: 14px; height: 14px; }
.char-counter { float: right; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-counter.is-over { color: #f87171; }
.input-group { display: flex; align-items: stretch; }
.input-addon { display: grid; place-items: center; min-width: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px; background: rgba(255, 255, 255, .03); color: var(--muted); }
.input-addon .icon { width: 16px; height: 16px; }
.input-group .input { border-radius: 0 10px 10px 0; }
.emoji-input { font-size: 18px; }

.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { cursor: pointer; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #0c0f20; color: var(--text-2); font-weight: 500; transition: .15s; }
.check-pill span .icon { width: 0; height: 15px; opacity: 0; transition: .15s; }
.check-pill:hover span { border-color: rgba(255, 255, 255, .2); }
.check-pill input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: #fff; }
.check-pill input:checked + span .icon { width: 15px; opacity: 1; color: var(--purple); }
.check-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(124, 92, 255, .3); }

.tag-input.is-enhanced { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; padding: 5px 8px; border-radius: 10px; border: 1px solid var(--line-2); background: #0c0f20; cursor: text; transition: border-color .15s, box-shadow .15s; }
.tag-input.is-enhanced:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
.tag-input .chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 10px; border-radius: 7px; background: var(--primary-soft); color: #ddd6fe; font-size: 13px; font-weight: 500; }
.tag-input .chip button { width: 18px; height: 18px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: inherit; opacity: .7; padding: 0; }
.tag-input .chip button:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.tag-input .tag-entry { flex: 1; min-width: 120px; height: 28px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; outline: none; }

.color-field { display: flex; gap: 8px; }
.color-field input[type="color"] { width: 44px; height: 40px; flex: none; padding: 4px; border-radius: 10px; border: 1px solid var(--line-2); background: #0c0f20; cursor: pointer; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: 6px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.switch-row:hover { border-color: var(--line-2); }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text b { font-weight: 600; font-size: 13.5px; }
.switch-text small { color: var(--muted); font-size: 12px; }
.switch { position: relative; flex: none; width: 42px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(124, 92, 255, .35); }

.image-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.image-preview { position: relative; width: 160px; height: 100px; flex: none; border-radius: 12px; overflow: hidden; border: 1px dashed var(--line-2); background: repeating-conic-gradient(rgba(255, 255, 255, .03) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-preview.has-image { border-style: solid; }
.image-preview.has-image .image-empty { display: none; }
.image-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.image-empty .icon { width: 24px; height: 24px; }
.image-empty small { font-size: 11.5px; }
.image-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.image-actions label.btn { cursor: pointer; }

/* previews */
.preview-card .field-help { margin-top: 10px; }
.pv-banner {
    --c1: #7c5cff; --c2: #1e1b4b;
    position: relative; overflow: hidden; aspect-ratio: 16 / 8; border-radius: 12px; border: 1px solid var(--line-2);
    background: radial-gradient(90% 130% at 100% 0%, var(--c1), transparent 60%), linear-gradient(135deg, var(--c2), #090b14 85%);
    display: flex; align-items: flex-end;
}
.pv-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-banner img:not([hidden]) + .pv-ad + .pv-body { background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); }
.pv-ad { position: absolute; top: 8px; right: 8px; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .7); }
.pv-body { position: relative; width: 100%; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.pv-eyebrow { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .3); }
.pv-eyebrow:empty { display: none; }
.pv-title { font-size: 18px; font-weight: 800; line-height: 1.1; }
.pv-sub { font-size: 11px; color: rgba(255, 255, 255, .8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-sub:empty { display: none; }
.pv-cta { margin-top: 4px; font-size: 10.5px; font-weight: 700; padding: 5px 10px; border-radius: 7px; background: #fff; color: #111; }
.pv-firm { --c1: #7c5cff; --c2: #1e1b4b; position: relative; overflow: hidden; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 12%, var(--card-2)), var(--card-2) 50%); display: grid; gap: 10px; }
.pv-firm::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--c1), transparent); }
.pv-firm-top { display: flex; align-items: center; gap: 12px; }
.pv-firm-top b { display: block; font-size: 15px; }
.pv-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.pv-rating .icon { width: 13px; height: 13px; color: var(--accent); fill: var(--accent); }
.pv-headline { font-weight: 700; font-size: 13px; color: var(--accent); background: rgba(255, 200, 61, .07); border: 1px dashed rgba(255, 200, 61, .3); border-radius: 10px; padding: 9px 11px; }
.pv-short { font-size: 12.5px; color: var(--muted); }

.meta-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0 0 16px; font-size: 13px; }
.meta-card dt { color: var(--muted); }
.meta-card dd { margin: 0; text-align: right; }
.meta-actions { display: grid; gap: 8px; }

.form-bar {
    position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; z-index: 25;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px;
    background: rgba(14, 17, 34, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-2);
}
.form-bar-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.form-bar-status .icon { width: 16px; height: 16px; }
.form-bar-status.is-dirty { color: #fbbf24; }
.form-bar-actions { display: flex; gap: 10px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.sys-info { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 13px; }
.sys-info dt { color: var(--muted); }
.sys-info dd { margin: 0; text-align: right; }

/* ---------- Toast / modal ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
    background: var(--card-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 500;
    animation: toast-in .35s var(--ease);
}
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
.toast-success .icon { color: var(--green); }
.toast-error { border-color: rgba(239, 68, 68, .35); }
.toast-error .icon { color: #f87171; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
.form-page ~ .toasts, body:has(.form-bar) .toasts { bottom: 84px; }

.modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 16px; background: rgba(4, 5, 12, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .15s; }
.modal-box { width: 100%; max-width: 420px; padding: 26px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); text-align: center; animation: pop .25s cubic-bezier(.2, 1.3, .4, 1); }
.modal-icon { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; background: rgba(239, 68, 68, .12); color: #f87171; }
.modal-icon .icon { width: 26px; height: 26px; }
.modal-box h3 { font-size: 18px; margin-bottom: 8px; }
.modal-box p { color: var(--muted); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 96px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { color: var(--muted); margin: 12px 0 24px; }

/* ---------- User menu ---------- */
.user-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); transition: background .15s; }
.user-btn:hover { background: rgba(255, 255, 255, .07); }
.user-btn .avatar { width: 30px; height: 30px; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--primary), #4c33c9); border: 0; }
.user-name { font-weight: 600; font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn > .icon { width: 15px; height: 15px; color: var(--muted); }
.dropdown-head { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.dropdown-head small { color: var(--muted); font-size: 12px; }
.alert-success { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .3); color: #bbf7d0; }
.alert-success .icon { color: #4ade80; }

/* ---------- Auth (login) ---------- */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(900px 600px at 15% -10%, rgba(124, 92, 255, .28), transparent 60%),
        radial-gradient(700px 500px at 110% 110%, rgba(255, 200, 61, .12), transparent 60%),
        var(--bg);
}
.auth-body::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .4; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .08) 1px, transparent 0); background-size: 28px 28px; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); }
.auth-wrap { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px 32px; border-radius: 22px; background: rgba(18, 22, 45, .85); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: pop .4s var(--ease); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-brand .brand-mark { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--muted); margin-bottom: 24px; }
.auth-form { display: grid; gap: 18px; }
.auth-form .btn-lg { height: 48px; font-size: 15px; margin-top: 4px; }
.auth-card .alert { margin-bottom: 18px; }
.auth-foot { margin-top: 20px; color: #5f6588; font-size: 12px; text-align: center; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.input-icon .input { height: 46px; padding-left: 42px; }
.input-icon .input:focus + .pw-toggle, .input-icon:focus-within > .icon { color: var(--purple); }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.pw-toggle:hover, .pw-toggle.is-on { color: var(--text); background: rgba(255, 255, 255, .06); }
.pw-toggle .icon { width: 17px; height: 17px; }
.input-icon .input[type="password"], .input-icon .input:has(+ .pw-toggle) { padding-right: 46px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hide-md { display: none; }
}

@media (max-width: 1100px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-side { position: static; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow); }
    .sidebar-close { display: grid; }
    body.sidebar-open .sidebar { transform: none; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(4, 5, 12, .6); opacity: 0; visibility: hidden; transition: .25s; }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    body.sidebar-open { overflow: hidden; }
    .main { margin-left: 0; }
    .menu-btn { display: grid; }
    .topbar { padding: 0 16px; }
    .content { padding: 20px 16px 60px; }
    .alert-bar { padding: 10px 16px; }
    .form-bar { left: 0; padding: 10px 16px; }
    .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .hide-sm { display: none; }
    .kpi-grid { gap: 10px; }
    .kpi { padding: 14px; }
    .kpi-value { font-size: 24px; margin-top: 10px; }
    .page-head h1 { font-size: 21px; }
    .field-half, .field-third { grid-column: span 6; }
    .search-box { max-width: none; flex-basis: 100%; }
    .chart-plot { height: 200px; }
    .table th, .table td { padding: 10px 8px; }
    .table th:first-child, .table td:first-child { padding-left: 14px; }
    .table th:last-child, .table td:last-child { padding-right: 14px; }
    .cell-progress { min-width: 70px; }
    .cell-thumb, .banner-thumb { width: 60px; }
    .banner-thumb { height: 34px; }
    /* dar ekranda gün etiketleri üst üste binmesin: bir atlayarak göster (son gün hep görünür) */
    .chart-col:nth-last-child(even) .chart-x { visibility: hidden; }
    .chart-x { font-size: 10px; }
    .form-bar-status { display: none; }
    .form-bar-actions { width: 100%; }
    .form-bar-actions .btn { flex: 1; }
}

@media (max-width: 420px) {
    .hide-xs { display: none; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .kpi-label { font-size: 12px; }
}
