/* Bonda Inbox — gaya utama */
:root {
  --navy: #0b1838; --navy-2: #13244f; --navy-3: #1c3166;
  --green: #22c55e; --green-d: #15803d; --green-l: #dcfce7;
  --ink: #111b2e; --mut: #5b6782; --mut-2: #8a94ab; --line: #e3e7ef; --soft: #f4f6fa;
  --bubble-in: #ffffff; --bubble-out: #d9fdd3; --note: #fff4c2; --note-line: #f2d675;
  --red: #dc2626; --amber: #d97706; --blue: #2563eb;
  --r: 12px; --shadow: 0 6px 24px rgba(11, 24, 56, .12);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--soft); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Butang & borang ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent; background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--navy-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.green { background: var(--green); color: #052e16; }
.btn.green:hover { background: #16a34a; color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--mut); }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; flex: none; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--mut); }
.field small { color: var(--mut-2); font-size: 12px; }
.inp, select.inp, textarea.inp { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: none; }
textarea.inp { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; }
.inp:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.inp[readonly] { background: var(--soft); color: var(--mut); }
.row { display: flex; gap: 8px; align-items: center; }
.err { color: var(--red); font-size: 13px; min-height: 18px; }
.muted { color: var(--mut); }
.small { font-size: 12.5px; }

/* ---------- Mula & log masuk ---------- */
.boot { display: grid; place-items: center; height: 100vh; }
.boot-logo { width: 54px; height: 54px; background: url('/ikon.svg') center / contain no-repeat; animation: denyut 1.2s ease-in-out infinite; }
@keyframes denyut { 50% { transform: scale(.9); opacity: .6; } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, #1c3166 0%, transparent 60%), var(--navy); }
.login-card { width: min(380px, 100%); background: #fff; border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand i { width: 34px; height: 34px; background: url('/ikon.svg') center / contain no-repeat; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--mut); }
.login h1 { font-size: 20px; margin: 22px 0 4px; }
.login p { margin: 0 0 18px; color: var(--mut); }
.login .btn { width: 100%; height: 42px; margin-top: 4px; }

/* ---------- Susun atur utama ---------- */
.app { display: grid; grid-template-columns: 232px 360px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.app.page { grid-template-columns: 232px minmax(0, 1fr); }
.list, .chat, .pg { min-width: 0; }
.side { background: var(--navy); color: #cdd6ee; display: flex; flex-direction: column; min-height: 0; }
.side .brand { color: #fff; padding: 16px 16px 12px; }
.side .brand small { color: #8fa0c8; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.nav h4 { margin: 16px 8px 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #7e8fb8; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #dbe3f6; text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .06); }
.nav a.on { background: var(--navy-3); color: #fff; }
.nav a svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav a .n { margin-left: auto; font-size: 12px; font-weight: 700; color: #9fb0d6; }
.nav a.on .n { color: #fff; }
.nav a .n.hot { background: var(--green); color: #052e16; border-radius: 99px; padding: 0 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #94a3b8); flex: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me b { display: block; color: #fff; font-weight: 600; line-height: 1.2; }
.me small { color: #8fa0c8; }
.me .icon-btn { margin-left: auto; color: #9fb0d6; }
.me .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.wa-warn { margin: 0 10px 10px; padding: 9px 11px; border-radius: 9px; background: #3b2a06; color: #fde68a; font-size: 12.5px; }
.wa-warn a { color: #fff; }

.av { font-style: normal; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c, #64748b); flex: none; font-size: 14px; text-transform: uppercase; }
.av.sm { width: 24px; height: 24px; font-size: 11px; }
.av.xs { width: 20px; height: 20px; font-size: 10px; }
.av.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--green); }

/* ---------- Senarai chat ---------- */
.list { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.list-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.list-head .top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.list-head h2 { font-size: 17px; margin: 0; flex: 1; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--mut-2); }
.search .inp { padding-left: 32px; height: 36px; background: var(--soft); border-color: transparent; }
.filters { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.filters select { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mut); margin-left: auto; cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 30px; height: 18px; border-radius: 99px; background: #cbd5e1; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.toggle input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--green); }
.toggle input:checked::after { transform: translateX(12px); }
.items { flex: 1; overflow-y: auto; }
.item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f0f2f6; cursor: pointer; position: relative; }
.item:hover { background: #f8fafc; }
.item.on { background: #eef6ff; }
.item.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--green); }
.item .body { flex: 1; min-width: 0; }
.item .l1 { display: flex; align-items: baseline; gap: 6px; }
.item .l1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.item .l1 time { font-size: 11.5px; color: var(--mut-2); flex: none; }
.item .l2 { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.item .l2 p { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); font-size: 13px; }
.item .l2 p .dir { color: var(--mut-2); }
.item.unread .l1 b, .item.unread .l2 p { color: var(--ink); font-weight: 700; }
.badge { min-width: 20px; height: 20px; border-radius: 99px; background: var(--green); color: #052e16; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; padding: 0 6px; flex: none; }
.item .l3 { display: flex; gap: 6px; align-items: center; margin-top: 5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--c, #94a3b8) 16%, #fff); color: color-mix(in srgb, var(--c, #94a3b8) 70%, #000); border: 1px solid color-mix(in srgb, var(--c, #94a3b8) 35%, #fff); white-space: nowrap; }
.chip.grey { --c: #94a3b8; }
.chip.warn { --c: #d97706; }
.item .who { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--mut); }
.empty { padding: 40px 24px; text-align: center; color: var(--mut); }
.empty svg { width: 42px; height: 42px; color: #cbd5e1; display: block; margin: 0 auto 10px; }
.more { display: block; margin: 12px auto; }

/* ---------- Perbualan ---------- */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #efeae2; position: relative; }
.chat-wrap { display: flex; min-height: 0; flex: 1; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-head .who { flex: 1; min-width: 140px; cursor: pointer; }
.chat-head .who b { display: block; font-size: 15px; line-height: 1.2; }
.chat-head .who small { color: var(--mut); }
.chat-head .typing { color: var(--green-d); font-style: italic; }
.chat-head .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stage-sel { height: 30px; border-radius: 99px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--c, #94a3b8) 40%, #fff); background: color-mix(in srgb, var(--c, #94a3b8) 14%, #fff); font-weight: 600; font-size: 12.5px; }
.assignee { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 12.5px; font-weight: 600; }
.assignee.none { padding-left: 10px; color: var(--mut); }
.back { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 6% 10px; display: flex; flex-direction: column; gap: 3px; }
.day { align-self: center; margin: 10px 0 6px; padding: 3px 12px; border-radius: 8px; background: #fff; color: var(--mut); font-size: 12px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.sys { align-self: center; margin: 6px 0; padding: 4px 12px; border-radius: 8px; background: rgba(255, 255, 255, .75); color: var(--mut); font-size: 12px; text-align: center; max-width: 85%; }
.m { max-width: min(560px, 78%); padding: 6px 9px 4px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); position: relative; word-wrap: break-word; overflow-wrap: anywhere; margin-top: 4px; }
.m.in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 3px; }
.m.out { align-self: flex-end; background: var(--bubble-out); border-top-right-radius: 3px; }
.m.nota { align-self: flex-end; background: var(--note); border: 1px dashed var(--note-line); }
.m.cont { margin-top: 1px; }
.m .by { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--c, var(--green-d)); margin-bottom: 2px; }
.m.nota .by { color: #92400e; }
.m .by svg { width: 13px; height: 13px; flex: none; }
.m .txt { white-space: pre-wrap; }
.m .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--mut-2); margin-top: 2px; float: right; margin-left: 10px; position: relative; top: 4px; }
.m .meta svg { width: 16px; height: 16px; }
.m .meta .dibaca { color: #2563eb; }
.m .meta .gagal { color: var(--red); }
.m::after { content: ''; display: block; clear: both; }
.m .quote { border-left: 3px solid var(--green); background: rgba(0, 0, 0, .05); border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; font-size: 12.5px; color: var(--mut); cursor: pointer; }
.m .quote b { display: block; font-size: 11.5px; color: var(--green-d); }
.m img.media { display: block; max-width: 100%; max-height: 320px; border-radius: 7px; margin-bottom: 3px; cursor: zoom-in; background: #eee; }
.m video.media { display: block; max-width: 100%; max-height: 320px; border-radius: 7px; }
.m audio { width: 260px; max-width: 100%; }
.doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .05); text-decoration: none; color: var(--ink); margin-bottom: 3px; }
.doc svg { width: 28px; height: 28px; color: var(--red); flex: none; }
.doc span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.doc small { display: block; font-weight: 400; color: var(--mut); }
.pending { font-size: 12.5px; color: var(--mut); font-style: italic; }
.m .react { position: absolute; bottom: -12px; right: 8px; background: #fff; border-radius: 99px; padding: 0 5px; font-size: 13px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); line-height: 20px; }
.m.has-react { margin-bottom: 12px; }
.m .err-line { color: var(--red); font-size: 12px; margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m .tools { position: absolute; top: 2px; display: none; gap: 2px; background: #fff; border-radius: 8px; box-shadow: var(--shadow); padding: 2px; z-index: 2; }
.m.in .tools { left: 100%; margin-left: 6px; }
.m.out .tools, .m.nota .tools { right: 100%; margin-right: 6px; }
.m:hover .tools, .m:focus-within .tools { display: flex; }
.m .tools button { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; color: var(--mut); display: grid; place-items: center; }
.m .tools button:hover { background: var(--soft); color: var(--ink); }
.m .tools svg { width: 16px; height: 16px; }
.m.flash { animation: kilat 1.2s; }
@keyframes kilat { 30% { box-shadow: 0 0 0 4px rgba(34, 197, 94, .45); } }
.emojis { position: absolute; z-index: 5; background: #fff; border-radius: 99px; box-shadow: var(--shadow); padding: 4px 6px; display: flex; gap: 2px; }
.emojis button { border: 0; background: transparent; font-size: 20px; width: 34px; height: 34px; border-radius: 50%; }
.emojis button:hover { background: var(--soft); }

/* ---------- Kotak balas ---------- */
.composer { background: #fff; border-top: 1px solid var(--line); padding: 8px 12px 10px; }
.composer.nota-mode { background: #fffbea; }
.tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.tabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--mut); }
.tabs button.on { background: var(--green-l); color: var(--green-d); }
.tabs button.on.nota { background: var(--note); color: #92400e; }
.lock { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--mut); margin-bottom: 6px; font-size: 13.5px; }
.lock svg { width: 20px; height: 20px; flex: none; }
.lock > span { flex: 1; min-width: 0; }
.lock.warn { background: #fff7ed; color: #9a3412; }
.lock .btn { margin-left: auto; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px; border-left: 3px solid var(--green); background: var(--soft); border-radius: 6px; font-size: 12.5px; color: var(--mut); }
.reply-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px; background: var(--soft); border-radius: 8px; font-size: 13px; }
.attach span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.write { display: flex; align-items: flex-end; gap: 6px; }
.write textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 40px; max-height: 160px; outline: none; background: #fff; line-height: 1.4; }
.write textarea:focus { border-color: var(--green); }
.nota-mode .write textarea { background: #fffdf3; border-color: var(--note-line); }
.write .btn { height: 40px; }

/* ---------- Panel maklumat pelanggan ---------- */
.info { width: 300px; flex: none; background: #fff; border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; }
.info .head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.info .head b { flex: 1; font-size: 15px; }
.info dl { margin: 0 0 14px; display: grid; gap: 10px; }
.info dt { font-size: 11.5px; font-weight: 700; color: var(--mut-2); text-transform: uppercase; letter-spacing: .04em; }
.info dd { margin: 2px 0 0; }
.collabs { display: flex; flex-wrap: wrap; gap: 6px; }
.collabs .chip button { border: 0; background: transparent; padding: 0; margin-left: 2px; color: inherit; font-weight: 800; }

.welcome { flex: 1; display: grid; place-items: center; text-align: center; color: var(--mut); padding: 30px; background: var(--soft); }
.welcome i { display: block; width: 64px; height: 64px; margin: 0 auto 12px; background: url('/ikon.svg') center / contain no-repeat; opacity: .9; }
.welcome h3 { color: var(--ink); margin: 0 0 4px; }

/* ---------- Halaman (laporan, tetapan) ---------- */
.pg { overflow-y: auto; padding: 22px clamp(14px, 3vw, 34px) 40px; min-width: 0; }
.pg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pg-head h2 { margin: 0; font-size: 21px; flex: 1; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font-weight: 600; color: var(--mut); }
.seg button.on { background: var(--navy); color: #fff; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card > p.muted { margin: 0 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tile b { display: block; font-size: 26px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile span { color: var(--mut); font-size: 13px; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; color: var(--mut-2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar .track { height: 12px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--c, #94a3b8); border-radius: 0 4px 4px 0; width: var(--w, 0%); }
.bar .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.stage-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.stage-row input[type=color] { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: #fff; flex: none; }
.copy { display: flex; gap: 6px; }
.copy .inp { flex: 1; }
.notice { padding: 10px 12px; border-radius: 10px; background: #eff6ff; color: #1e3a8a; font-size: 13px; margin-bottom: 14px; }
.notice.warn { background: #fff7ed; color: #9a3412; }
.notice.ok { background: var(--green-l); color: var(--green-d); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- Menu timbul, modal, notifikasi ---------- */
.pop { position: fixed; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; max-height: 60vh; overflow-y: auto; }
.pop button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; text-align: left; }
.pop button:hover { background: var(--soft); }
.pop button.on { font-weight: 700; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(11, 24, 56, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal h3 { margin: 0 0 14px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toasts { position: fixed; z-index: 70; right: 16px; bottom: 16px; display: grid; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 340px; font-size: 13.5px; animation: masuk .2s ease-out; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green-d); }
@keyframes masuk { from { transform: translateY(8px); opacity: 0; } }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .85); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ---------- Telefon & tablet ---------- */
.menu-btn { display: none; }
@media (max-width: 1180px) {
  .app { grid-template-columns: 72px 320px minmax(0, 1fr); }
  .app.page { grid-template-columns: 72px minmax(0, 1fr); }
  .side .brand span, .nav h4, .nav a span, .nav a .n:not(.hot), .me div, .wa-warn { display: none; }
  .side .brand { justify-content: center; padding: 14px 0; }
  .nav a { justify-content: center; padding: 10px 0; position: relative; }
  .nav a .n.hot { position: absolute; top: 2px; right: 6px; font-size: 10px; padding: 0 5px; }
  .nav .dot { width: 12px; height: 12px; }
  .me { flex-direction: column; padding: 10px 0; }
  .me .icon-btn { margin: 0; }
  .info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; box-shadow: var(--shadow); }
}
@media (max-width: 760px) {
  .app, .app.page { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .side .brand span, .nav h4, .nav a span, .nav a .n:not(.hot), .me div, .wa-warn { display: revert; }
  .side .brand { justify-content: flex-start; padding: 16px; }
  .nav a { justify-content: flex-start; padding: 9px 10px; }
  .nav a .n.hot { position: static; margin-left: auto; }
  .me { flex-direction: row; padding: 12px 14px; }
  .me .icon-btn { margin-left: auto; }
  .menu-btn { display: inline-grid; }
  .app.chat-open .list { display: none; }
  .app:not(.chat-open) .chat { display: none; }
  .back { display: inline-grid; }
  .msgs { padding: 12px 10px 8px; }
  .m { max-width: 88%; }
  .m .tools { display: none !important; }
  .info { width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 100px 1fr 36px; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .35); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
