/* ==========================================================================
   Lisa Admin — design system (dark, purple/orange/green)
   ========================================================================== */
:root {
  --bg: #000000;
  --bg-2: #0A0A0B;
  --surface: #131315;
  --surface-2: #1C1C1E;
  --surface-3: #2C2C2E;
  --surface-solid: #131315;
  --border: #2C2C2C;
  --border-strong: #3A3A3C;
  --text: #FFFFFF;
  --text-2: rgba(235, 235, 245, 0.6);
  --muted: #8E8E93;
  --navy: #0B1F4B;
  --navy-2: #10306E;
  --blue: #0A84FF;
  --blue-light: #007AFF;
  --blue-soft: rgba(10, 132, 255, 0.16);
  --blue-glow: rgba(10, 132, 255, 0.35);
  --logo-blue: #3D6BFF;
  --green: #04D16E;
  --green-soft: rgba(4, 209, 110, 0.14);
  --red: #FF3A30;
  --red-soft: rgba(255, 58, 48, 0.14);
  --orange: #EA580C;
  --orange-soft: rgba(234, 88, 12, 0.16);
  --purple: #330066;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --bottombar-h: 64px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 480px at 10% -10%, rgba(16, 48, 110, 0.45), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(10, 132, 255, 0.08), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(10, 132, 255, 0.45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column;
  background: rgba(8, 8, 9, 0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .25s ease;
}
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 39; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; }
.brand img { width: 40px; height: 34px; }
.brand .name { font-weight: 800; letter-spacing: .3px; font-size: 17px; }
.brand .sub { font-size: 11px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; }
.nav { padding: 6px 12px; flex: 1; overflow-y: auto; }
.nav .group { font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0;
  border-radius: 12px; color: var(--text-2); font-weight: 500; position: relative;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--blue-soft); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--blue); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, var(--navy-2), var(--blue)); color: #fff; }
.user-chip .meta { flex: 1; min-width: 0; }
.user-chip .meta .n { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .meta .r { font-size: 11px; color: var(--muted); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); transition: .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.main { flex: 1; min-width: 0; padding-bottom: calc(var(--bottombar-h) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 17px; font-weight: 700; margin: 0; flex: 1; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .crumb { font-size: 12px; color: var(--muted); display: none; }
.content { padding: 18px 16px 24px; max-width: 1400px; margin: 0 auto; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottombar-h); z-index: 35;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(8, 8, 9, 0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.bottombar a svg { width: 22px; height: 22px; }
.bottombar a.active { color: var(--blue); }

@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .sidebar-backdrop { display: none; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 24px; }
  .bottombar { display: none; }
  .topbar { padding: 0 28px; }
  .topbar .crumb { display: block; }
  .topbar .menu-btn { display: none; }
  .content { padding: 24px 28px 40px; }
}

/* ---------- primitives ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-h h2 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.card-h .hint { color: var(--muted); font-size: 12px; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat.blue { background: linear-gradient(180deg, rgba(10,132,255,.14), rgba(10,132,255,.04)); border-color: rgba(10,132,255,.28); }
.stat.blue .v { color: #5DAEFF; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v.pos { color: var(--green); } .stat .v.neg { color: var(--red); }
.stat .d { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat.orange { background: linear-gradient(180deg, rgba(234,88,12,.14), rgba(234,88,12,.04)); border-color: rgba(234,88,12,.28); }
.stat.orange .v { color: #FF8A4C; }
.stat.green { background: linear-gradient(180deg, rgba(4,209,110,.14), rgba(4,209,110,.03)); border-color: rgba(4,209,110,.28); }
.stat.green .v { color: var(--green); }
.stat.red { background: linear-gradient(180deg, rgba(255,58,48,.14), rgba(255,58,48,.03)); border-color: rgba(255,58,48,.28); }
.stat.red .v { color: var(--red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: .15s; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--blue); border-color: transparent; box-shadow: 0 6px 18px var(--blue-glow); }
.btn-primary:hover { filter: brightness(1.1); background: var(--blue); }
.btn-accent { background: var(--blue); color: #fff; border-color: transparent; box-shadow: 0 6px 18px var(--blue-glow); }
.btn-accent:hover { filter: brightness(1.1); background: var(--blue); }
.btn-success { background: var(--green); color: #04220F; border-color: transparent; }
.btn-danger { background: var(--red-soft); color: #FF6B63; border-color: rgba(255,58,48,.3); }
.btn-danger:hover { background: rgba(255,58,48,.25); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(0,0,0,.25); color: var(--text); outline: none; transition: .15s;
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,255,.2); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.input-icon .input { padding-left: 36px; }
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-row { grid-template-columns: repeat(var(--cols, 2), 1fr); align-items: end; } }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--orange-soft); color: #FF8A4C; }
.badge.red { background: var(--red-soft); color: #FF6B63; }
.badge.blue { background: var(--blue-soft); color: #5DAEFF; }
.badge.purple { background: var(--blue-soft); color: #5DAEFF; }
.badge.gray { background: var(--surface-2); color: var(--text-2); }
.badge.plain::before { display: none; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); font-size: 11px; color: var(--text-2); font-family: var(--mono); }

/* ---------- table (responsive) ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface); }
.tbl tr.clickable { cursor: pointer; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .mono { font-family: var(--mono); font-size: 12px; }
.tbl .muted { color: var(--muted); }
.tbl .nowrap { white-space: nowrap; }
@media (max-width: 719px) {
  table.tbl.cards, table.tbl.cards tbody, table.tbl.cards tr, table.tbl.cards td { display: block; }
  table.tbl.cards thead { display: none; }
  table.tbl.cards tr { border: 1px solid var(--border); border-radius: 14px; margin: 10px 12px; padding: 6px 0; background: var(--surface); }
  table.tbl.cards td { border: 0; padding: 6px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
  table.tbl.cards td::before { content: attr(data-l); font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; flex: none; padding-top: 2px; }
  table.tbl.cards td.num { text-align: right; }
  table.tbl.cards td.full { display: block; }
  table.tbl.cards td.full::before { display: block; margin-bottom: 4px; }
}

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; transition: background .12s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface); }
.list-item.clickable { cursor: pointer; }
.list-item .thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; font-size: 14px; line-height: 1.35; }
.list-item .s { color: var(--text-2); font-size: 13px; margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.list-item .m { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.list-item .actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 719px) { .list-item { flex-wrap: wrap; } .list-item .actions { width: 100%; justify-content: flex-end; } }

/* ---------- chat (ticket) ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; position: relative; }
.msg .who { font-size: 11px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.msg .when { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: right; }
.msg.user { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.admin { align-self: flex-end; background: linear-gradient(135deg, #0A5FD6, var(--blue)); border-bottom-right-radius: 4px; }
.msg img { max-width: 100%; border-radius: 10px; margin-top: 6px; display: block; }
.composer { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); align-items: flex-end; position: sticky; bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom)); background: rgba(19,19,21,.95); backdrop-filter: blur(12px); border-radius: 0 0 var(--radius) var(--radius); }
@media (min-width: 1024px) { .composer { bottom: 0; } }
.composer textarea { flex: 1; min-height: 44px; max-height: 160px; }

/* ---------- modal / sheet ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-bg.show { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 520px; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); transform: translateY(20px); transition: transform .2s; max-height: 92vh; display: flex; flex-direction: column; }
.modal-bg.show .modal { transform: translateY(0); }
.modal-h { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-h h3 { margin: 0; font-size: 15px; flex: 1; }
.modal-b { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
@media (min-width: 720px) { .modal-bg { align-items: center; padding: 20px; } .modal { border-radius: 20px; } }

/* ---------- misc ---------- */
.toast-wrap { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(92vw, 420px); }
.toast { padding: 11px 14px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: toastIn .2s ease; }
.toast.ok { border-color: rgba(4,209,110,.4); } .toast.err { border-color: rgba(255,58,48,.45); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.toast.ok .dot { background: var(--green); } .toast.err .dot { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-rows { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.sk-rows .skeleton { height: 42px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.empty .ico svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 4px; color: var(--text-2); font-size: 15px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.segmented button.active { background: var(--surface-3); color: #fff; }
.pager { display: flex; justify-content: center; gap: 10px; padding: 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv .k { color: var(--muted); }
.pos { color: var(--green); } .neg { color: #FF6B63; }
.hidden { display: none !important; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
pre.log { margin: 0; padding: 16px 18px; font-family: var(--mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; color: var(--text-2); max-height: 70vh; overflow: auto; }
.log-line { display: flex; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 12px; }
.log-line .ts { color: var(--muted); flex: none; }
.log-line .lv { flex: none; width: 52px; font-weight: 700; }
.log-line .lv.ERROR, .log-line .lv.error { color: #FF6B63; } .log-line .lv.WARN, .log-line .lv.warn { color: var(--orange); } .log-line .lv.INFO, .log-line .lv.info { color: var(--green); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; padding: 32px 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow), 0 0 90px rgba(16,48,110,.35); }
.login-card .logo { width: 72px; height: 60px; margin: 0 auto 14px; display: block; }
.login-card h1 { text-align: center; font-size: 22px; margin: 0; letter-spacing: -.3px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.alert { padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--red-soft); color: #FF8A83; border: 1px solid rgba(255,58,48,.3); }
.progress { height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--blue); transition: width .3s; }

/* ---------- iki sutunlu sayfa duzenleri (mobilde alt alta) ---------- */
.cols-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.cols-2-1 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .cols-2 { grid-template-columns: 1fr 1fr; } .cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.pick-item { padding: 9px 18px; align-items: center; gap: 12px; }
.pick-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); flex: none; }
.pick-item .body { min-width: 0; }
.pick-item .t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 719px) { .pick-item .tag.opt { display: none; } .pick-item { flex-wrap: nowrap; } .pick-item .t { white-space: normal; } }

/* ---------- secici alan (tag kutusu) + popup listeleri ---------- */
.picker { min-height: 46px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(0,0,0,.25); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: pointer; transition: .15s; }
.picker:hover, .picker:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(10,132,255,.15); }
.picker .ph { color: var(--muted); padding: 4px 6px; font-size: 13px; }
.picker.is-loading { pointer-events: none; opacity: .6; } .picker.is-loading .ph { display: inline-flex; align-items: center; gap: 6px; } .picker.is-loading svg { width: 14px; height: 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--blue-soft); color: #8CC4FF; font-size: 12px; font-weight: 600; font-family: var(--mono); }
.chip .x { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 11px; padding: 2px 5px; border-radius: 999px; opacity: .7; }
.chip .x:hover { background: rgba(255,255,255,.12); opacity: 1; }
.chip.add { background: var(--surface-2); color: var(--muted); font-family: var(--font); padding: 4px 10px; }
.pick-list { max-height: min(52vh, 480px); overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pick-group { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); padding: 10px 18px 4px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface-solid); z-index: 1; }
.modal { max-width: 640px; }
/* picker popup: ustten sabit + sabit yukseklik; sonuc azalinca kuculmez, arama kutusu hep ustte kalir */
.modal-bg.picker { align-items: flex-start; padding-top: env(safe-area-inset-top); }
.modal-bg.picker .modal { height: 92dvh; max-height: 92dvh; border-radius: 0 0 20px 20px; }
.modal-bg.picker .modal-b { flex: 1; min-height: 0; }
.modal-bg.picker .modal-b > div { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.modal-bg.picker .pick-list { flex: 1; min-height: 0; max-height: none; }
@media (min-width: 720px) { .modal-bg.picker { align-items: center; } .modal-bg.picker .modal { height: min(80vh, 720px); max-height: min(80vh, 720px); border-radius: 20px; } }
/* iOS: 16px altindaki inputlara focus'ta Safari zoom yapar */
@media (max-width: 719px) { .input, select.input, textarea.input { font-size: 16px; } }

/* ---------- Moduller: cihaz cercevesi ---------- */
.modules-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 900px) { .modules-layout { grid-template-columns: 340px minmax(0, 1fr); } .modules-side { position: sticky; top: 76px; } }
.device-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 0 24px; overflow: visible; }
.device { transform-origin: top left; flex-shrink: 0; } /* wrap yuksekligi olcekli boyuta gore ayarlanir; cerceve kuculmesin */
.device { position: relative; width: 393px; height: 852px; max-width: 100%; border: 10px solid #1a1b1f; border-radius: 44px; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 0 0 1px #2a2c33; resize: both; overflow: hidden; min-width: 280px; min-height: 400px; }
.device.free { width: 100%; height: 760px; border-radius: 16px; border-width: 4px; }
.device .notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; background: #000; border-radius: 20px; z-index: 5; pointer-events: none; box-shadow: 0 0 0 1px #111; }
.device.free .notch { display: none; }
.device .screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; background: #000; color: #fff; scrollbar-width: none; -ms-overflow-style: none; }
.device .screen::-webkit-scrollbar { display: none; width: 0; height: 0; }
.device:not(.free) .screen { padding-top: 54px; }
.device.landscape { max-width: none; }
.device.landscape .notch { top: 50%; left: 10px; transform: translateY(-50%); width: 34px; height: 120px; }
.device.landscape:not(.free) .screen { padding-top: 0; padding-left: 54px; padding-right: 34px; }
.device .grip { position: absolute; right: 6px; bottom: 6px; width: 14px; height: 14px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); opacity: .6; pointer-events: none; }
.device-size { font-size: 12px; color: var(--muted); font-family: var(--mono); }
/* Moduller sayfasi: modul rehberi (telefon cercevesi disinda, form panelinde) */
.mod-guide { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,.03); font-size: 12.5px; line-height: 1.5; color: var(--text, #e6e6e6); }
.mod-guide:empty { display: none; }
.mod-guide-t { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mod-guide p { margin: 0 0 8px; } .mod-guide p:last-child { margin-bottom: 0; }

/* ---------- modul notlari (Moduller sayfasi sol panel; localStorage) ---------- */
.notes { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.notes-h { display: flex; align-items: center; gap: 8px; }
.notes-t { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.note { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,.03); }
.note-t { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.note-m { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.note-a { margin-left: auto; display: flex; gap: 2px; white-space: nowrap; }
.note-a .btn { padding: 2px 6px; font-size: 11.5px; }
.notes-empty { font-size: 12.5px; color: var(--muted); }
.notes-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notes-total { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

/* ---------- TEB Paneli: tam ekran gomme (ic ice kaydirmayi kaldirir) ---------- */
body.teb-full #teb-wrap { position: fixed; inset: 0; z-index: 70; border-radius: 0; border: 0; margin: 0; }
body.teb-full #teb-frame { height: 100%; }
body.teb-full #teb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; margin: 0; padding: 8px 12px;
    background: rgba(0,0,0,.82); backdrop-filter: blur(10px); border-top: 1px solid var(--border); overflow-x: auto; }
body.teb-full #teb-bar .hint { display: none; }
body.teb-full .sidebar, body.teb-full .topbar, body.teb-full .bottombar { display: none; }
body.teb-full #teb-wrap { bottom: 52px; }
