/* STK-360 — Panel ve yönetim kabuğu */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #c7d2e1; display: flex; flex-direction: column; z-index: 50; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none !important; }
.sidebar .brand img { height: 30px; width: auto; }
.sidebar .org-switch { margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; transition: background .15s; }
.sidebar .org-switch:hover { background: rgba(255,255,255,.1); }
.sidebar .org-switch .org-logo { width: 34px; height: 34px; border-radius: 9px; background: #fff; object-fit: contain; padding: 2px; flex-shrink: 0; }
.sidebar .org-switch .org-initial { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #16a34a, #84cc16); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex-shrink: 0; }
.sidebar .org-switch .t { font-weight: 650; font-size: .9rem; line-height: 1.2; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .org-switch .s { font-size: .74rem; color: #8ea0b8; display: flex; align-items: center; gap: 4px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar .nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7d96; font-weight: 700; padding: 14px 10px 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #c7d2e1; font-size: .9rem; font-weight: 500; text-decoration: none !important; transition: background .12s, color .12s; position: relative; }
.sidebar .nav-link .bi { font-size: 1.05rem; width: 20px; text-align: center; color: #8ea0b8; transition: color .12s; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link:hover .bi { color: #fff; }
.sidebar .nav-link.active { background: rgba(34,197,94,.14); color: #fff; }
.sidebar .nav-link.active .bi { color: #4ade80; }
.sidebar .nav-link.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #4ade80; }
.sidebar .nav-link .pill { margin-left: auto; background: #22c55e; color: #052e16; font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; }
.sidebar .nav-link .pill.amber { background: #fbbf24; color: #451a03; }
.sidebar .nav-link.ai { background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(34,197,94,.18)); color: #fff; margin-bottom: 4px; }
.sidebar .nav-link.ai .bi { color: #c4b5fd; }
.sidebar .side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar .side-foot a { color: #8ea0b8; font-size: .82rem; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.sidebar .side-foot a:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.topbar .menu-btn { display: none; }
.search-trigger { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; transition: border-color .15s; }
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger .kbd { margin-left: auto; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar .icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); background: none; border: 0; cursor: pointer; font-size: 1.15rem; text-decoration: none !important; }
.topbar .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.topbar .icon-btn .dot { position: absolute; top: 8px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 99px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--text); }
.user-btn:hover { background: var(--surface-3); }
.user-btn .n { font-weight: 600; font-size: .88rem; line-height: 1.15; text-align: left; }
.user-btn .r { font-size: .74rem; color: var(--text-3); }
.content { padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.55rem; }
.page-head .lead { color: var(--text-3); margin: 4px 0 0; font-size: .93rem; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-3); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--text-3); } .crumbs a:hover { color: var(--brand-600); }
.crumbs .bi { font-size: .7rem; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input-icon { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar select.input, .toolbar .input { height: 38px; width: auto; }
.bulk-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); z-index: 70; transition: transform .25s cubic-bezier(.2,.8,.2,1); max-width: calc(100vw - 32px); flex-wrap: wrap; }
.bulk-bar.show { transform: translateX(-50%) translateY(0); }
.bulk-bar .btn-ghost { color: #c7d2e1; } .bulk-bar .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.mobile-nav { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 45; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .content { padding: 16px 14px 96px; }
  .user-btn .n, .user-btn .r { display: none; }
  .search-trigger .kbd { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--text-3); padding: 4px 0; font-weight: 600; text-decoration: none !important; }
  .mobile-nav a .bi { font-size: 1.25rem; }
  .mobile-nav a.active { color: var(--brand-600); }
  .mobile-nav a.plus .bi { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -18px; box-shadow: 0 4px 12px rgba(22,163,74,.4); }
  .page-head h1 { font-size: 1.3rem; }
  .bulk-bar { bottom: 84px; }
}

/* Komut paleti / genel arama */
.cmdk { position: fixed; inset: 0; z-index: 120; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.cmdk.open { display: flex; }
.cmdk .modal-backdrop { position: absolute; inset: 0; }
.cmdk-box { position: relative; width: 100%; max-width: 620px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .12s ease-out; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.cmdk-input .bi { color: var(--muted); font-size: 1.1rem; }
.cmdk-input input { flex: 1; height: 58px; border: 0; outline: none; font: inherit; font-size: 1.05rem; background: none; color: var(--text); }
.cmdk-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; cursor: pointer; }
.cmdk-item .bi { color: var(--text-3); font-size: 1.05rem; width: 22px; text-align: center; }
.cmdk-item .sub { font-size: .8rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.cmdk-item.sel, .cmdk-item:hover { background: var(--brand-50); }
.cmdk-item.sel .bi { color: var(--brand); }
.cmdk-empty { padding: 30px; text-align: center; color: var(--text-3); }

/* Panel özel bileşenler */
.welcome { background: linear-gradient(120deg, var(--navy) 0%, #13324a 55%, #14532d 100%); color: #fff; border-radius: var(--radius-lg); padding: 24px 26px; position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(132,204,22,.35), transparent 70%); }
.welcome h1 { color: #fff; font-size: 1.45rem; margin-bottom: 4px; }
.welcome p { color: #b8c6d8; margin: 0; }
.welcome .quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; position: relative; z-index: 1; }
.welcome .quick a { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.14); padding: 8px 13px; border-radius: 10px; font-size: .86rem; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; text-decoration: none; transition: background .15s; }
.welcome .quick a:hover { background: rgba(255,255,255,.18); }
.alert-list li { padding: 11px 20px; }
.setup-steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.setup-steps li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.setup-steps li:last-child { border: 0; }
.setup-steps .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .8rem; color: transparent; }
.setup-steps li.done .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.setup-steps li.done .t { text-decoration: line-through; color: var(--text-3); }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-3); border-radius: var(--radius-lg); padding: 10px; min-height: 200px; }
.kanban-col h3 { font-size: .88rem; display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; margin: 0; }
.kanban-col h3 .count { margin-left: auto; font-size: .75rem; background: var(--surface); padding: 1px 8px; border-radius: 99px; color: var(--text-3); }
.kanban-list { min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.kcard:hover { box-shadow: var(--shadow); }
.kcard .t { font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--text); display: block; }
.kcard .m { display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--text-3); flex-wrap: wrap; }
.kcard.sortable-ghost { opacity: .4; }
.kcard.overdue { border-left: 3px solid var(--red); }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(3, 85vw); scroll-snap-type: x mandatory; } .kanban-col { scroll-snap-align: start; } }
.member-card { width: 100%; max-width: 400px; aspect-ratio: 1.586; border-radius: 18px; padding: 20px; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, #14532d 100%); position: relative; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.member-card::before { content: ""; position: absolute; right: -40px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(132,204,22,.35), transparent 70%); }
.member-card .top { display: flex; align-items: center; gap: 10px; position: relative; }
.member-card .top img { height: 32px; width: 32px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.member-card .top .on { font-size: .78rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.member-card .top .ty { font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; opacity: .7; }
.member-card .body { display: flex; align-items: flex-end; gap: 14px; margin-top: auto; position: relative; }
.member-card .photo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; }
.member-card .nm { font-size: 1.1rem; font-weight: 750; line-height: 1.2; }
.member-card .no { font-size: .78rem; opacity: .8; margin-top: 3px; font-variant-numeric: tabular-nums; }
.member-card .qr { margin-left: auto; width: 74px; height: 74px; background: #fff; border-radius: 10px; padding: 5px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 18px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline .d { font-size: .8rem; color: var(--text-3); font-weight: 600; }
.timeline .t { font-weight: 650; margin: 2px 0; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 64px - 48px - 70px); min-height: 480px; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 820px; display: flex; gap: 12px; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { padding: 12px 16px; border-radius: 16px; background: var(--surface-3); line-height: 1.6; font-size: .95rem; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg .bubble p:last-child { margin: 0; }
.msg .bubble table { border-collapse: collapse; margin: 8px 0; font-size: .88rem; }
.msg .bubble th, .msg .bubble td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; }
.msg .bubble ul, .msg .bubble ol { padding-left: 1.3em; margin: .4em 0; }
.msg .ai-ico { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, #16a34a); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-input { border-top: 1px solid var(--border); padding: 14px; display: flex; gap: 10px; align-items: flex-end; background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.chat-input textarea { flex: 1; resize: none; min-height: 46px; max-height: 180px; }
.suggest { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.suggest button { text-align: left; padding: 14px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; cursor: pointer; font: inherit; font-size: .9rem; color: var(--text); transition: border-color .15s, background .15s; display: flex; gap: 10px; }
.suggest button:hover { border-color: var(--brand); background: var(--brand-50); }
.suggest button .bi { color: var(--violet); }
.map-box { height: 320px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; z-index: 0; }
.scanner-box { max-width: 520px; margin: 0 auto; }
#qr-reader { border-radius: 16px; overflow: hidden; border: 0 !important; }
.scan-result { padding: 18px; border-radius: 14px; text-align: center; font-weight: 700; font-size: 1.05rem; margin-top: 14px; }
.scan-result.ok { background: var(--green-bg); color: var(--green); }
.scan-result.err { background: var(--red-bg); color: var(--red); }
.scan-result.warn { background: var(--amber-bg); color: var(--amber); }
.big-count { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.file-row .icon-box { font-size: 1.2rem; }
.folder-tree a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-size: .9rem; text-decoration: none !important; }
.folder-tree a:hover { background: var(--surface-3); color: var(--text); }
.folder-tree a.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.folder-tree .bi { color: #eab308; }
.folder-tree .sub { padding-left: 18px; }
.preview-phone { border: 10px solid var(--navy); border-radius: 28px; overflow: hidden; height: 560px; background: #fff; }
.preview-phone iframe { width: 100%; height: 100%; border: 0; }
.channel-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.channel-pick label { position: relative; cursor: pointer; }
.channel-pick input { position: absolute; opacity: 0; }
.channel-pick .opt { border: 2px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; transition: all .15s; background: var(--surface); }
.channel-pick .opt .bi { font-size: 1.5rem; display: block; margin-bottom: 4px; color: var(--text-3); }
.channel-pick .opt b { display: block; font-size: .92rem; }
.channel-pick .opt small { color: var(--text-3); font-size: .76rem; }
.channel-pick input:checked + .opt { border-color: var(--brand); background: var(--brand-50); }
.channel-pick input:checked + .opt .bi { color: var(--brand); }
.sms-counter { font-size: .8rem; color: var(--text-3); text-align: right; margin-top: 4px; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vars button { font-size: .76rem; padding: 3px 9px; border-radius: 6px; border: 1px dashed var(--border-strong); background: var(--surface-2); cursor: pointer; color: var(--text-2); font-family: ui-monospace, monospace; }
.vars button:hover { border-color: var(--brand); color: var(--brand-600); }
.ql-toolbar.ql-snow { border-color: var(--border-strong) !important; border-radius: 10px 10px 0 0; background: var(--surface-2); font-family: var(--font) !important; }
.ql-container.ql-snow { border-color: var(--border-strong) !important; border-radius: 0 0 10px 10px; font-family: var(--font) !important; font-size: .95rem !important; min-height: 200px; background: var(--surface); color: var(--text); }
.ql-editor { min-height: 200px; line-height: 1.65; }
:root[data-theme="dark"] .ql-snow .ql-stroke { stroke: #b4c0d3; } :root[data-theme="dark"] .ql-snow .ql-fill { fill: #b4c0d3; } :root[data-theme="dark"] .ql-snow .ql-picker { color: #b4c0d3; }
.impersonate-bar { background: #7c2d12; color: #fff; padding: 8px 16px; font-size: .86rem; display: flex; gap: 12px; align-items: center; justify-content: center; }
.impersonate-bar a { color: #fde68a; font-weight: 700; }
.platform-banner { padding: 10px 24px; font-size: .88rem; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); }
.platform-banner.info { background: var(--blue-bg); color: var(--blue); } .platform-banner.warning { background: var(--amber-bg); color: var(--amber); } .platform-banner.success { background: var(--green-bg); color: var(--green); }
.chart-box { position: relative; height: 260px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.status-steps { display: flex; gap: 0; }
.funnel-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 600px) { .hide-sm { display: none; } }
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 30; padding: 6px; max-height: 340px; overflow-y: auto; }
.picker-list .cmdk-item { align-items: flex-start; }
.receipt-ok { width: 84px; height: 84px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; margin: 0 auto 16px; }
