/* ---------- yerleşim ---------- */
.panel-body {
  background-color: #f7f8fa;
  background-image: linear-gradient(rgba(16,24,40,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(16,24,40,.035) 1px, transparent 1px);
  background-size: 28px 28px;
}
.side { position: fixed; inset: 0 auto 0 0; width: 104px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 30; }
.side-logo { display: grid; place-items: center; height: 72px; }
.side-logo img { width: 36px; height: 36px; }
.side-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; color: var(--text); font-size: 12px; font-weight: 600; text-align: center; border: 0; background: none; font-family: inherit; cursor: pointer; border-left: 3px solid transparent; line-height: 1.2; text-decoration: none !important; width: 100%; }
.side-item:hover { background: var(--surface-2); }
.side-item.active { border-left-color: var(--ink); background: var(--surface-2); }
.side-item .ic svg { width: 22px; height: 22px; stroke: currentColor; }
.side-item .lock { font-size: 9px; color: var(--accent); font-weight: 800; }
.side-foot { border-top: 1px solid var(--border); padding: 6px 0; }
.main { margin-left: 104px; min-height: 100vh; display: flex; flex-direction: column; }
.main-top { display: flex; align-items: center; gap: 12px; padding: 14px 28px 0; }
.org-chip { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.trial { padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; }
.trial a { color: inherit; text-decoration: underline; }
.page { padding: 18px 28px 64px; max-width: 1640px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; margin: 0; }
.page-head p { margin: 4px 0 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs b { color: var(--indigo); font-weight: 600; }
@media (max-width: 760px) {
  .side { width: 100%; height: 64px; inset: auto 0 0 0; flex-direction: row; border-right: 0; border-top: 1px solid var(--border); }
  .side-logo, .side-foot { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .side-item { min-width: 76px; border-left: 0; border-top: 3px solid transparent; padding: 8px 4px; }
  .side-item.active { border-top-color: var(--ink); }
  .main { margin-left: 0; padding-bottom: 70px; }
  .page, .main-top { padding-left: 16px; padding-right: 16px; }
}

/* ---------- KPI ve kartlar ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .l { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
.meter { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; background: var(--brand-grad); border-radius: 99px; }
.meter.hot > div { background: var(--danger); }
.cols-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.ev-thumb { width: 54px; height: 40px; border-radius: 6px; object-fit: cover; background: #111; flex: none; }
.sev-high { color: var(--danger); font-weight: 700; } .sev-med { color: var(--warn); font-weight: 700; } .sev-low { color: var(--muted); }

/* ---------- canlı izleme ---------- */
.live-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.live-tools select { width: auto; min-width: 220px; }
.tile-count { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 6px; box-shadow: var(--shadow); }
.tile-count button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 15px; padding: 5px 9px; border-radius: 8px; cursor: pointer; color: var(--text); }
.tile-count button + button::before { content: "•"; color: var(--muted); margin-right: 9px; margin-left: -4px; }
.tile-count button.active { background: var(--surface-2); font-weight: 800; }
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; background: #0d0f13; border-radius: 16px; overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; border: 4px solid #fff; box-shadow: 0 2px 10px rgba(16,24,40,.12); outline: 3px solid var(--tile-color, #22a35a); outline-offset: -3px; }
.tile.risk-mid { --tile-color: #f2c200; }
.tile.risk-high { --tile-color: #e5322b; }
.tile.offline { --tile-color: #98a2b3; filter: grayscale(.6); }
.tile.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 6px rgba(229,50,43,.55); } 100% { box-shadow: 0 2px 10px rgba(16,24,40,.12); } }
.tile .live-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.cam .live-img { transform: scaleX(-1); }
.tile.scr .live-img { object-fit: contain; background: #fff; }
.live-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #98a2b3; font-size: 12px; }
.tile .who { position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 7px; background: rgba(40,44,52,.72); color: #fff; padding: 4px 10px 4px 4px; border-radius: 999px; font-weight: 600; font-size: 13px; max-width: calc(100% - 56px); backdrop-filter: blur(4px); }
.tile .who .avatar { width: 22px; height: 22px; font-size: 10px; }
.tile .who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .cnt { position: absolute; right: 10px; top: 10px; min-width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); color: var(--danger); font-size: 11px; font-weight: 800; }
.tile .flag { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; background: rgba(30,32,38,.82); color: #fff; border: 1.5px solid var(--tile-color, #22a35a); }
.tile .flag b { color: #ff8a80; font-weight: 700; }
.tile .flag.safe { background: rgba(19,138,67,.92); border-color: transparent; }
.tile .foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles.dense .tile .flag { font-size: 11px; bottom: 30px; }
.tiles.dense .tile .who { font-size: 11px; }
.dock { position: sticky; bottom: 18px; margin: 22px auto 0; width: max-content; display: flex; gap: 6px; padding: 8px 12px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 10; }
.dock button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.dock button:hover, .dock button.on { background: var(--surface-2); }
.dock button.on { color: var(--accent); }
.dock .sep { width: 1px; background: var(--border); margin: 6px 4px; }
.dock svg { width: 21px; height: 21px; stroke: currentColor; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 14px; }

/* ---------- aday müdahale ---------- */
.cand { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cand { grid-template-columns: 1fr; } }
.cand-name { font-size: 22px; font-weight: 800; color: var(--muted); }
.feeds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feed { position: relative; background: #0d0f13; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.feed.wide { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.feed .live-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed.cam .live-img { transform: scaleX(-1); }
.feed.wide .live-img { object-fit: contain; background: #fff; }
.feed .tag { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(30,32,38,.78); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.feed .tag b { color: #4ade80; font-weight: 600; }
.feed .tag b.off { color: #fca5a5; }
.gauge { display: block; margin: 0 auto; }
.gauge-v { text-align: center; margin-top: -54px; font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.gauge-l { text-align: center; color: var(--muted); font-weight: 600; margin-top: 4px; }
.flags { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.flagrow { padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.flagrow.high { background: var(--danger-soft); color: var(--danger); }
.flagrow.med { background: var(--warn-soft); color: var(--warn); }
.flagrow small { font-weight: 500; color: var(--muted); }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .actions { grid-template-columns: 1fr; } }
.notes { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.notes div { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.notes div:last-child { border-bottom: 0; }
.timer-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--indigo-soft); color: var(--indigo); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- sınav ayarları (editör) ---------- */
.editor { display: grid; grid-template-columns: 236px 1fr; gap: 20px; align-items: start; }
.ed-menu { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.ed-menu a { display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none; }
.ed-menu a:hover { background: var(--surface-2); }
.ed-menu a.active { background: var(--accent-soft); color: var(--accent); }
.ed-menu .mn { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); }
.ed-menu a.active .mn { background: var(--accent); color: #fff; }
.ed-menu .mt { font-weight: 700; font-size: 13px; }
.ed-menu .ms { font-size: 11px; color: var(--muted); }
.ed-menu .ms:empty { display: none; }
.ed-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ed-section { scroll-margin-top: 16px; }
.ed-section h2 { margin-bottom: 14px; }
.ed-field + .ed-field { margin-top: 14px; }
.ed-field.disabled { opacity: .45; }
.ed-label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ed-hint { margin-top: 4px; }
.ed-link { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius); background: var(--ok-soft); margin-bottom: 12px; flex-wrap: wrap; }
textarea.invalid { outline: 2px solid var(--danger); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; font-weight: 400; margin: 0; padding: 3px 0; }
.switch-row .ed-label { margin: 0; }
.plan-lock { display: inline-flex; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; margin: 0; position: relative; }
.choice:hover { border-color: var(--accent); }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ch-title { font-weight: 800; }
.ch-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.segmented button { padding: 8px 16px; border: 0; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button.active { background: var(--accent); color: #fff; }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.lti-test { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .ed-menu { position: static; flex-direction: row; overflow-x: auto; }
  .ed-menu a { grid-template-columns: 24px auto; white-space: nowrap; }
  .ed-menu .ms { display: none; }
}

/* ---------- abonelik ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.plan.popular { border-color: var(--accent); box-shadow: 0 10px 30px rgba(226,84,12,.15); }
.plan.current { border-color: var(--ok); }
.plan .ribbon { position: absolute; top: -12px; left: 24px; padding: 3px 10px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 11px; font-weight: 800; }
.plan h3 { font-size: 20px; margin: 0; }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.plan li { display: flex; gap: 8px; font-size: 13px; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.cycle { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.cycle button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.cycle button.active { background: var(--ink); color: #fff; }
.save-tag { color: var(--ok); font-weight: 700; font-size: 12px; }
.upsell { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px dashed var(--accent); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(16,24,40,.5); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-card { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }

/* ızgara içindeki kartlarda dikey yığın boşluğunu kaldır */
.cols-2 > .card, .cols-3 > .card, .feat > .card, .kpis > *, .plans > *, .cand > .card { margin-top: 0; }
