/* ==========================================================================
   NOVA PANEL — Admin / AI Otomasyon paneli stilleri
   ========================================================================== */

:root {
  --bg: #eef1fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #dfe7ff 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 10%, #eae1ff 0%, transparent 55%),
             #eef1fb;
  --surface: #ffffff;
  --surface-2: #f4f6fc;
  --sidebar: #ffffff;
  --text: #131725;
  --text-soft: #6b7385;
  --border: #e7eaf3;
  --primary: #5b5bf5;
  --primary-dark: #4a45e0;
  --primary-soft: #ececff;
  --violet: #8b5cf6;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sky: #0ea5e9;
  --star: #f5a524;
  --shadow-sm: 0 1px 2px rgba(20, 25, 50, .05);
  --shadow: 0 8px 30px rgba(40, 50, 100, .08);
  --shadow-lg: 0 24px 60px rgba(40, 50, 100, .16);
  --radius: 16px;
  --radius-sm: 12px;
  --sidebar-w: 258px;
}

[data-theme="dark"] {
  --bg: #0b0e17;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #1a1e3a 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 10%, #241a3a 0%, transparent 55%),
             #0b0e17;
  --surface: #141824;
  --surface-2: #1b2030;
  --sidebar: #10131e;
  --text: #eef0f7;
  --text-soft: #98a1b6;
  --border: #232838;
  --primary: #7c7bff;
  --primary-soft: #20213a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg-grad); background-attachment: fixed;
  color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: .95rem; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120,130,160,.35); border-radius: 100px; border: 2px solid transparent; background-clip: content-box; }

/* ---------------- Layout ---------------- */
.layout { display: flex; min-height: 100vh; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--sidebar);
  border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; z-index: 40; transition: transform .3s;
}
.sidebar__logo { display: flex; align-items: center; gap: .6rem; padding: 1.3rem 1.5rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -.5px; }
.sidebar__mark { color: var(--primary); font-size: 1.4rem; }
.sidebar__name b { color: var(--primary); font-weight: 800; }
.sidebar__logo-image { display:block; width:190px; height:48px; object-fit:contain; object-position:left center; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: .5rem .8rem 1rem; }
.nav-group { display: block; font-size: .68rem; font-weight: 700; letter-spacing: 1.2px; color: var(--text-soft); padding: 1.1rem .8rem .4rem; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .68rem .8rem; border-radius: 11px; font-weight: 600; font-size: .92rem; color: var(--text-soft); margin-bottom: 2px; transition: all .16s; position: relative; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, var(--primary), var(--violet)); color: #fff; box-shadow: 0 8px 18px rgba(91,91,245,.32); }
.nav-ico { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; font-size: .66rem; font-weight: 700; background: var(--success); color: #fff; padding: .12rem .45rem; border-radius: 100px; }
.nav-item.active .nav-badge { background: rgba(255,255,255,.25); }
.sidebar__foot { padding: 1rem; border-top: 1px solid var(--border); }
.ai-status { display: flex; align-items: center; gap: .7rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; }
.ai-status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,.2); animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.ai-status strong { display: block; font-size: .82rem; }
.ai-status small { color: var(--text-soft); font-size: .72rem; }

/* ---------------- Main + Topbar ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
  padding: .8rem 1.6rem; background: rgba(255,255,255,.75); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .topbar { background: rgba(20,24,36,.75); }
.menu-toggle { display: none; font-size: 1.3rem; }
.topbar__search { flex: 1; max-width: 440px; display: flex; align-items: center; gap: .5rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 100px; padding: .55rem 1.1rem; color: var(--text-soft); }
.topbar__search input { flex: 1; border: none; background: transparent; outline: none; color: var(--text); }
.topbar__search input[readonly] { cursor: pointer; }
kbd { font-family: inherit; font-size: .68rem; font-weight: 700; color: var(--text-soft); background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: .15rem .38rem; white-space: nowrap; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.store-link { display: flex; align-items: center; gap: .4rem; background: var(--surface-2); border: 1px solid var(--border); padding: .5rem .9rem; border-radius: 100px; font-weight: 600; font-size: .85rem; transition: all .18s; }
.store-link:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem; transition: background .18s; }
.icon-btn:hover { background: var(--surface-2); }
.notif__badge { position: absolute; top: 5px; right: 5px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 100px; display: grid; place-items: center; }
.topbar__user { display: flex; align-items: center; gap: .6rem; padding-left: .6rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.topbar__user-info strong { display: block; font-size: .85rem; }
.topbar__user-info small { color: var(--text-soft); font-size: .74rem; }

/* ---------------- View / genel ---------------- */
.view { padding: 1.8rem 1.6rem 3rem; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.7rem; letter-spacing: -.6px; }
.page-head p { color: var(--text-soft); margin-top: .2rem; }
.page-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head__actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }

/* ---------------- Akıllı operasyon merkezi ---------------- */
.smart-ops { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 1.1rem; margin-bottom: 1.4rem; }
.card__head small { display: block; color: var(--text-soft); font-size: .76rem; font-weight: 400; margin-top: .1rem; }
.live-pill { display: inline-flex; align-items: center; gap: .4rem; background: rgba(22,163,74,.1); color: var(--success); border: 1px solid rgba(22,163,74,.18); border-radius: 100px; padding: .3rem .65rem; font-size: .72rem; font-weight: 700; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.ops-list { padding: .25rem 1.2rem; }
.ops-item { display: flex; align-items: center; gap: .85rem; padding: .82rem 0; border-bottom: 1px solid var(--border); }
.ops-item:last-child { border-bottom: 0; }
.ops-item__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); flex-shrink: 0; }
.ops-item.danger .ops-item__icon { background: rgba(239,68,68,.1); }
.ops-item.warning .ops-item__icon { background: rgba(245,158,11,.12); }
.ops-item.primary .ops-item__icon { background: var(--primary-soft); }
.ops-item.success .ops-item__icon { background: rgba(22,163,74,.1); }
.ops-item__body { min-width: 0; flex: 1; }
.ops-item__body strong { display: block; font-size: .87rem; }
.ops-item__body span { display: block; color: var(--text-soft); font-size: .76rem; margin-top: .08rem; }
.quick-actions-card { min-width: 0; }
.shortcut-hint { font-size: .7rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: .24rem .5rem; border-radius: 7px; }
.quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: 1rem; }
.quick-action { min-height: 92px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: .85rem; text-align: left; transition: .18s; }
.quick-action:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.quick-action span { font-size: 1.25rem; }
.quick-action strong { font-size: .8rem; }

/* ---------------- Global komut merkezi ---------------- */
.command-palette { position: fixed; inset: 0; z-index: 110; display: grid; place-items: start center; padding: 12vh 1rem 1rem; background: rgba(7,10,22,.55); backdrop-filter: blur(7px); opacity: 0; visibility: hidden; transition: .18s; }
.command-palette.show { opacity: 1; visibility: visible; }
.command-box { width: min(680px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(-12px) scale(.98); transition: .2s; }
.command-palette.show .command-box { transform: none; }
.command-search { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.command-search > span { font-size: 1.15rem; }
.command-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 1.05rem; }
.command-results { padding: .55rem; max-height: 430px; overflow-y: auto; }
.command-item { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: .75rem; padding: .72rem .8rem; border-radius: 11px; text-align: left; }
.command-item.active, .command-item:hover { background: var(--primary-soft); color: var(--primary); }
.command-item__icon { width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; font-size: 1.05rem; }
.command-item strong { display: block; color: var(--text); font-size: .9rem; }
.command-item small { display: block; color: var(--text-soft); font-size: .76rem; margin-top: .05rem; }
.command-item kbd { opacity: 0; }
.command-item.active kbd { opacity: 1; }
.command-empty { padding: 2rem; text-align: center; color: var(--text-soft); }
.command-foot { display: flex; gap: 1rem; padding: .65rem 1rem; border-top: 1px solid var(--border); color: var(--text-soft); font-size: .7rem; }

/* ---------------- Bildirim merkezi ---------------- */
.notification-drawer { width: min(430px, 100%); }
.notification-drawer .drawer__head small { display: block; color: var(--text-soft); font-size: .75rem; margin-top: .12rem; }
.notif-tabs { display: flex; gap: .5rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.notif-tabs button { padding: .42rem .72rem; border-radius: 100px; color: var(--text-soft); font-size: .8rem; font-weight: 700; }
.notif-tabs button.active { background: var(--primary-soft); color: var(--primary); }
.notif-tabs span { margin-left: .2rem; opacity: .75; }
.notification-drawer .drawer__body { padding: .4rem 1rem; }
.notification-item { position: relative; width: 100%; display: grid; grid-template-columns: 44px 1fr; gap: .75rem; padding: 1rem .3rem; border-bottom: 1px solid var(--border); text-align: left; }
.notification-item__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.notification-item strong { display: block; font-size: .88rem; }
.notification-item small { display: block; color: var(--text-soft); font-size: .77rem; line-height: 1.45; margin-top: .12rem; }
.notification-item em { display: block; color: var(--primary); font-size: .7rem; font-style: normal; margin-top: .3rem; }
.notification-item > i { position: absolute; right: .3rem; top: 1.15rem; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.notification-item.read { opacity: .62; }
.notification-item:hover { background: var(--surface-2); }
.btn--block { width: 100%; }

/* ---------------- Dashboard kişiselleştirme ---------------- */
.dashboard-customizer { width: min(640px, 100%); }
.dashboard-customizer .drawer__head small { color: var(--text-soft); font-size: .76rem; }
.dashboard-customizer__body { padding: .75rem 1.2rem; }
.dashboard-pref { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: .8rem; padding: .9rem .2rem; border-bottom: 1px solid var(--border); }
.dashboard-pref__drag { color: var(--text-soft); font-weight: 900; letter-spacing: -3px; }
.dashboard-pref strong { display: block; font-size: .9rem; }
.dashboard-pref small { display: block; color: var(--text-soft); font-size: .75rem; margin-top: .08rem; }
.dashboard-pref__actions { display: flex; align-items: center; gap: .35rem; }
.dashboard-pref__actions > button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.dashboard-pref__actions > button:disabled { opacity: .35; cursor: default; }
[data-dashboard-section][hidden] { display: none !important; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card__head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border); }
.card__head h3 { font-size: 1.05rem; }
.card__body { padding: 1.3rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.2rem; border-radius: 11px; font-weight: 600; font-size: .9rem; transition: all .18s; white-space: nowrap; }
.btn--primary { background: linear-gradient(90deg, var(--primary), var(--violet)); color: #fff; box-shadow: 0 8px 18px rgba(91,91,245,.28); }
.btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn--ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { padding: .42rem .8rem; font-size: .82rem; border-radius: 9px; }
.btn:active { transform: scale(.97); }

.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700; padding: .22rem .6rem; border-radius: 100px; }

/* ---------------- KPI kartları ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.1rem; margin-bottom: 1.4rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi__top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }
.kpi__label { color: var(--text-soft); font-size: .84rem; font-weight: 600; margin-top: 1rem; }
.kpi__value { font-size: 1.85rem; font-weight: 800; letter-spacing: -1px; margin-top: .15rem; }
.kpi__trend { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 700; margin-top: .5rem; padding: .15rem .5rem; border-radius: 100px; }
.kpi__trend.up { color: var(--success); background: rgba(22,163,74,.1); }
.kpi__trend.down { color: var(--danger); background: rgba(239,68,68,.1); }
.kpi__spark { position: absolute; right: 0; bottom: 0; width: 100px; height: 42px; opacity: .5; }

/* ---------------- Dashboard grid ---------------- */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.4rem; margin-bottom: 1.4rem; }
.dash-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) { .dash-grid, .dash-grid--3 { grid-template-columns: 1fr; } }

/* Satış grafiği */
.chart-wrap { position: relative; }
.chart-legend { display: flex; gap: 1.2rem; font-size: .82rem; color: var(--text-soft); }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.linechart { width: 100%; height: 260px; overflow: visible; }
.chart-tip { position: absolute; background: var(--text); color: var(--surface); padding: .4rem .7rem; border-radius: 8px; font-size: .78rem; font-weight: 600; pointer-events: none; opacity: 0; transform: translate(-50%, -130%); transition: opacity .15s; white-space: nowrap; z-index: 5; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 1.4rem; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: .7rem; }
.donut-legend__row { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.donut-legend__row b { margin-left: auto; }

/* Mini liste satırları */
.mini-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.mini-row:last-child { border-bottom: none; }
.mini-row img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.mini-row__info { flex: 1; min-width: 0; }
.mini-row__name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row__sub { color: var(--text-soft); font-size: .78rem; }
.mini-row__val { font-weight: 700; text-align: right; }

/* ---------------- Tablo ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th { text-align: left; padding: .8rem 1rem; color: var(--text-soft); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
.cell-prod { display: flex; align-items: center; gap: .7rem; }
.cell-prod img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--surface-2); }
.cell-prod strong { font-size: .88rem; display: block; }
.cell-prod small { color: var(--text-soft); }
.stock-pill { font-weight: 700; }
.stock-pill.low { color: var(--danger); }
.stock-pill.ok { color: var(--success); }

/* ---------------- Toggle switch ---------------- */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border); border-radius: 100px; transition: .25s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: linear-gradient(90deg, var(--primary), var(--violet)); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------------- AI Studio ---------------- */
.studio { display: grid; grid-template-columns: 260px 1fr; gap: 1.4rem; }
.studio__tools { display: flex; flex-direction: column; gap: .7rem; }
.tool-card { display: flex; gap: .8rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .18s; text-align: left; align-items: flex-start; }
.tool-card:hover { border-color: var(--primary); transform: translateX(3px); }
.tool-card.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 6px 16px rgba(91,91,245,.15); }
.tool-card__ico { font-size: 1.4rem; }
.tool-card strong { display: block; font-size: .92rem; }
.tool-card small { color: var(--text-soft); font-size: .78rem; }

.studio__main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.studio__bar { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.studio__bar h3 { font-size: 1.05rem; margin-right: auto; }
.studio-select { display: flex; align-items: center; gap: .4rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 100px; padding: .4rem .9rem; font-size: .84rem; font-weight: 600; }
.studio-select select { border: none; background: transparent; outline: none; color: var(--text); font-weight: 600; }
.studio__work { padding: 1.3rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.studio__prompt { width: 100%; min-height: 90px; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); outline: none; resize: vertical; }
.studio__prompt:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.studio__output { flex: 1; min-height: 200px; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 1.3rem; background: var(--surface-2); font-size: .95rem; line-height: 1.7; white-space: pre-wrap; overflow-y: auto; }
.studio__output.empty { display: grid; place-items: center; text-align: center; color: var(--text-soft); }
.studio__output h4 { color: var(--primary); margin: .8rem 0 .3rem; font-size: 1rem; }
.typing-cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--primary); margin-left: 2px; vertical-align: text-bottom; animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chip-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { background: var(--surface-2); border: 1px solid var(--border); padding: .4rem .8rem; border-radius: 100px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .16s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------- AI İşçileri ---------------- */
.workers-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 1100px) { .workers-grid { grid-template-columns: 1fr; } }
.worker-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 700px) { .worker-list { grid-template-columns: 1fr; } }
.worker { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.worker:hover { box-shadow: var(--shadow); }
.worker__head { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .8rem; }
.worker__ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.worker__title { flex: 1; }
.worker__title strong { font-size: 1rem; display: block; }
.worker__title small { color: var(--text-soft); font-size: .78rem; }
.worker__engine { font-size: .68rem; font-weight: 700; padding: .12rem .5rem; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); }
.worker__desc { color: var(--text-soft); font-size: .84rem; line-height: 1.55; margin-bottom: 1rem; min-height: 3.3em; }
.worker__foot { display: flex; align-items: center; justify-content: space-between; padding-top: .9rem; border-top: 1px solid var(--border); }
.worker__metric { font-size: .82rem; }
.worker__metric b { color: var(--primary); }
.worker__stats { display: flex; gap: 1.2rem; margin-bottom: .9rem; }
.worker__stat { font-size: .78rem; color: var(--text-soft); }
.worker__stat b { display: block; font-size: 1.15rem; color: var(--text); font-weight: 800; }
.worker.off { opacity: .68; }

.activity { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.activity__item { display: flex; gap: .8rem; padding: .9rem 1.3rem; border-bottom: 1px solid var(--border); }
.activity__item:last-child { border-bottom: none; }
.activity__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; color: #fff; flex-shrink: 0; }
.activity__text { font-size: .85rem; }
.activity__time { color: var(--text-soft); font-size: .74rem; margin-top: .1rem; }

/* ---------------- Pazaryeri ---------------- */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.mp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.mp-card:hover { box-shadow: var(--shadow); }
.mp-card__head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.mp-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; }
.mp-card__name { font-weight: 700; font-size: 1.05rem; }
.mp-conn { font-size: .74rem; font-weight: 700; }
.mp-conn.on { color: var(--success); }
.mp-conn.off { color: var(--text-soft); }
.mp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0; }
.mp-stat { background: var(--surface-2); border-radius: 10px; padding: .7rem .8rem; }
.mp-stat small { color: var(--text-soft); font-size: .74rem; }
.mp-stat b { display: block; font-size: 1.05rem; margin-top: .1rem; }

/* ---------------- Kampanya ---------------- */
.camp-templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.camp-tpl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.2rem; cursor: pointer; transition: all .18s; }
.camp-tpl:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.camp-tpl__ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: .8rem; }
.camp-tpl strong { display: block; margin-bottom: .3rem; }
.camp-tpl small { color: var(--text-soft); font-size: .82rem; }

/* ---------------- Excel dropzone ---------------- */
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 3rem 2rem; text-align: center; transition: all .2s; background: var(--surface); cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone__ico { width: 70px; height: 70px; border-radius: 18px; background: linear-gradient(135deg, #1f8f4e, #16a34a); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1.1rem; color: #fff; }
.dropzone h3 { margin-bottom: .4rem; }
.dropzone p { color: var(--text-soft); }
.file-types { display: flex; justify-content: center; gap: .6rem; margin-top: 1.2rem; }
.file-types span { background: var(--surface-2); border: 1px solid var(--border); padding: .35rem .8rem; border-radius: 8px; font-size: .78rem; font-weight: 700; }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 100px; overflow: hidden; margin-top: 1rem; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--violet)); transition: width .3s; }

/* ---------------- Entegrasyonlar ---------------- */
.integ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.integ-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.integ-card__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.integ-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem; }
.integ-card__name { font-weight: 700; }
.integ-card__cat { font-size: .74rem; color: var(--text-soft); }
.integ-card p { color: var(--text-soft); font-size: .85rem; line-height: 1.55; flex: 1; margin-bottom: 1rem; }
.integ-card__foot { display: flex; align-items: center; justify-content: space-between; }

/* ---------------- Toast + overlay ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(6,8,15,.5); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 35; }
.overlay.show { opacity: 1; visibility: visible; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: var(--surface); padding: .9rem 1.3rem; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 90; display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .9rem; transform: translateX(140%); transition: transform .35s cubic-bezier(.2,1.2,.4,1); }
.toast.show { transform: translateX(0); }
.toast .tcheck { color: #4ade80; font-size: 1.1rem; }

/* ---------------- Drawer (ürün formu) ---------------- */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(460px, 100%); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 60; transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--border); }
.drawer__head h3 { font-size: 1.15rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.4rem; }
.drawer__foot { border-top: 1px solid var(--border); padding: 1.1rem 1.4rem; display: flex; gap: .7rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; color: var(--text-soft); }
.field input, .field select, .field textarea { width: 100%; padding: .68rem .85rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); outline: none; transition: border .18s, box-shadow .18s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: flex; gap: .8rem; }
.field-row .field { flex: 1; }

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; background: rgba(6,8,15,.55); backdrop-filter: blur(3px); z-index: 70; display: none; place-items: center; padding: 1rem; }
.modal.show { display: grid; }
.modal__box { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .24s ease; }
@keyframes pop { from { transform: scale(.95) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.close-x { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-size: 1rem; }
.close-x:hover { background: var(--border); }

/* ---------------- Sipariş detayı ---------------- */
.order-detail { padding: 1.5rem 1.7rem; }
.order-detail__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; }
.order-detail__head h3 { font-size: 1.25rem; }
.order-timeline { display: flex; margin: 1.4rem 0; }
.otl-step { flex: 1; text-align: center; position: relative; font-size: .74rem; color: var(--text-soft); }
.otl-step::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.otl-step:first-child::before { display: none; }
.otl-step .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); display: grid; place-items: center; margin: 0 auto .4rem; position: relative; z-index: 1; font-size: .7rem; }
.otl-step.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.otl-step.done::before { background: var(--success); }
.otl-step.active .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.order-box { background: var(--surface-2); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.order-box h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-soft); margin-bottom: .6rem; }
.order-line { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .9rem; }
.order-line--total { font-weight: 800; font-size: 1.05rem; border-top: 1px dashed var(--border); margin-top: .4rem; padding-top: .6rem; }

/* ---------------- Müşteriler / CRM ---------------- */
.cust-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.seg-pill { font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 100px; }
.segment-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.seg-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.seg-card .n { font-size: 1.6rem; font-weight: 800; }
.seg-card .l { color: var(--text-soft); font-size: .84rem; }
.seg-card .bar { height: 5px; border-radius: 100px; margin-top: .6rem; }

/* ---------------- Finans ---------------- */
.fin-legend { display: flex; flex-direction: column; gap: .55rem; }
.fin-legend__row { display: flex; align-items: center; gap: .5rem; font-size: .86rem; }
.fin-legend__row .lbl { flex: 1; }
.fin-legend__row b { font-variant-numeric: tabular-nums; }
.fin-bars { display: flex; align-items: flex-end; gap: .5rem; height: 200px; padding-top: 1rem; }
.fin-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; }
.fin-bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.fin-bar { width: 40%; max-width: 16px; border-radius: 4px 4px 0 0; transition: height .5s; }
.fin-bar.rev { background: linear-gradient(var(--primary), var(--violet)); }
.fin-bar.exp { background: var(--surface-2); border: 1px solid var(--border); }
.fin-bar-lbl { font-size: .7rem; color: var(--text-soft); }
.profit-tag { font-weight: 700; }
.profit-tag.pos { color: var(--success); }
.profit-tag.neg { color: var(--danger); }

/* ---------------- AI Studio görsel üretici ---------------- */
.imggen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.imggen__cell { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.imggen__cell img { width: 100%; height: 100%; object-fit: cover; }
.imggen__cell.gen { display: grid; place-items: center; }
.imggen__wm { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .68rem; padding: .2rem .5rem; border-radius: 6px; backdrop-filter: blur(4px); }
.imggen__loader { width: 100%; height: 100%; background: linear-gradient(110deg, var(--surface-2) 30%, var(--primary-soft) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.2s infinite; display: grid; place-items: center; color: var(--text-soft); font-size: .82rem; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .sidebar { position: fixed; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: grid; }
  .studio { grid-template-columns: 1fr; }
  .topbar__user-info { display: none; }
  .smart-ops { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .view { padding: 1.2rem 1rem 3rem; }
  .topbar { padding: .7rem 1rem; }
  .topbar__search { display: none; }
  .worker-list { grid-template-columns: 1fr; }
  .store-link span { display: none; }
  .ops-item { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: start; }
  .ops-item__icon { grid-column: 1; grid-row: 1 / span 2; }
  .ops-item__body { grid-column: 2; }
  .ops-item .btn { grid-column: 2; width: max-content; margin-top: .35rem; }
  .quick-actions-grid { grid-template-columns: 1fr 1fr; }
  .command-palette { padding-top: 5vh; }
  .command-foot { display: none; }
}
