/* Reanner desk — app theme (AR + EN, light + dark). Loaded after style.css. */
:root {
  color-scheme: light;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f1f4f9; --text: #0f1b2d; --muted: #6b7a90; --line: #e6eaf0;
  --primary: #2563eb; --primary-hover: #1d4fd8; --primary-soft: #e8f0fe;
  --brand: var(--primary); --brand-ink: #fff; --brand-soft: var(--primary-soft);
  --ok: #16a34a; --ok-soft: #e7f6ec; --warn: #d97706; --warn-soft: #fdf3e2; --bad: #dc2626; --bad-soft: #fdecec;
  --violet: #6d4fd8; --violet-soft: #efeafd; --note: #fef9c3;
  --nav: #0b1f3a; --nav-2: #10284a; --radius: 16px;
  --shadow: 0 1px 2px rgba(15,27,45,.04), 0 6px 18px rgba(15,27,45,.05);
  --font: "Plus Jakarta Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f1f4f9; --text: #0f1b2d; --muted: #6b7a90; --line: #e6eaf0;
  --brand: #2563eb; --brand-ink: #fff; --brand-soft: #e8f0fe;
  --ok: #16a34a; --ok-soft: #e7f6ec; --warn: #d97706; --warn-soft: #fdf3e2; --bad: #dc2626; --bad-soft: #fdecec; --note: #fef9c3;
  --shadow: 0 1px 2px rgba(15,27,45,.04), 0 6px 18px rgba(15,27,45,.05);
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111e; --surface: #111a2a; --surface-2: #172234; --text: #e6ecf5; --muted: #95a3b8; --line: #223047;
  --primary: #4f8cff; --primary-hover: #6a9dff; --primary-soft: #1a2c4d;
  --brand: #4f8cff; --brand-ink: #fff; --brand-soft: #1a2c4d;
  --ok: #34d399; --ok-soft: #10291f; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #f87171; --bad-soft: #2d1515;
  --violet: #a78bfa; --violet-soft: #231b3d; --note: #2b2a12;
  --nav: #060d19; --nav-2: #0c1830; --shadow: 0 1px 2px rgba(0,0,0,.3);
}

html, body { background: var(--bg) !important; color: var(--text); }
body, button, input, select, textarea { font-family: var(--font) !important; }
body.zbody { margin: 0; padding: 0; min-height: 100vh; -webkit-font-smoothing: antialiased; font-size: 15px; }
.zi { flex-shrink: 0; display: block; }
a { color: var(--primary); }

/* ---------- Header ---------- */
.zbar {
  position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 16px; background: var(--nav); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.zbar-start, .zbar-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.zbar-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; cursor: pointer; }
.zbar-btn:hover { background: rgba(255,255,255,.08); }
.zlogo { display: block; height: 28px; aspect-ratio: 1042 / 208; background: url(reanner-logo-white.svg) no-repeat center/contain; }
.ztag { font-size: 12px; color: #dbe5f3; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.zpill {
  height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff !important; font-size: 13.5px; font-weight: 600;
  text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.zpill:hover { background: rgba(255,255,255,.08); }
.zpill-icon { width: 40px; justify-content: center; padding: 0; }
.zi-sun { display: none; } :root[data-theme="dark"] .zi-sun { display: block; } :root[data-theme="dark"] .zi-moon { display: none; }
.zinstall { background: #fff; color: var(--nav) !important; border-color: #fff; }
.zinstall:hover { background: #e8eef7; }
.zinstall[hidden] { display: none !important; }
@media (display-mode: standalone) { .zinstall { display: none !important; } }
.zuser { position: relative; }
.zuser > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 12px; padding-inline-start: 6px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.18); cursor: pointer; user-select: none;
}
.zuser > summary::-webkit-details-marker { display: none; }
.zuser > summary:hover { background: rgba(255,255,255,.06); }
.zav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.zuser-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.zuser-txt b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.zuser-txt small { font-size: 11.5px; color: #b9c6d8; white-space: nowrap; }
.zuser .zchev { color: #b9c6d8; }
.zmenu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 230px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(15,27,45,.16); padding: 6px; z-index: 60; }
.zmenu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.zmenu-head small { color: var(--muted); font-size: 12px; }
.zmenu a, .zmenu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--text) !important; font-size: 14px; font-weight: 600; text-decoration: none !important; cursor: pointer; }
.zmenu a:hover, .zmenu button:hover { background: var(--surface-2); }
.zmenu form { margin: 0; }

/* ---------- Shell + sidebar ---------- */
.zshell { display: flex; min-height: calc(100vh - 64px); }
.zside {
  position: sticky; top: 64px; height: calc(100vh - 64px); width: 268px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--surface); border-inline-end: 1px solid var(--line); transition: width .2s ease; z-index: 40;
}
.znav { flex: 1; overflow-y: auto; padding: 12px 12px 16px; }
.zsec { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 16px 10px 8px; }
.zsec:first-child { padding-top: 8px; }
.zsingle, .zgrp > summary {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; color: var(--text) !important;
  font-weight: 600; font-size: 14.5px; text-decoration: none !important; cursor: pointer; list-style: none; user-select: none;
}
.zgrp > summary::-webkit-details-marker { display: none; }
.zsingle:hover, .zgrp > summary:hover { background: var(--surface-2); }
.zico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.zsingle.on { background: var(--primary-soft); }
.zsingle.on .zico { background: var(--primary); color: #fff; }
.zgrp[open] > summary .zico { background: var(--primary-soft); color: var(--primary); }
.zlabel { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zchev { display: grid; place-items: center; color: var(--muted); transition: transform .2s; }
.zgrp[open] > summary .zchev { transform: rotate(180deg); }
.zgrp ul { list-style: none; margin: 4px 0 8px; padding: 0; padding-inline-start: 28px; }
.zgrp ul li { position: relative; }
.zgrp ul::before { content: none; }
.zgrp ul a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--muted) !important; font-size: 14px; font-weight: 600;
  text-decoration: none !important; border-inline-start: 2px solid var(--line);
}
.zgrp ul a:hover { color: var(--text) !important; background: var(--surface-2); }
.zgrp ul a.on { color: var(--primary) !important; border-inline-start-color: var(--primary); font-weight: 700; }
.zcount { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.zcount-bad { background: var(--bad-soft); color: var(--bad); }
.zcount-warn { background: var(--warn-soft); color: var(--warn); }
.zcollapse { display: flex; align-items: center; gap: 12px; margin: 0; padding: 18px 22px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; text-align: start; }
.zcollapse:hover { color: var(--text); }
[dir="rtl"] .zcollapse .zi { transform: scaleX(-1); }
.znav-collapsed .zside { width: 76px; }
.znav-collapsed .zside .zlabel, .znav-collapsed .zside .zsec, .znav-collapsed .zside .zchev, .znav-collapsed .zside .zgrp ul, .znav-collapsed .zside .zgrp > summary .zcount { display: none; }
.znav-collapsed .zside .zsingle, .znav-collapsed .zside .zgrp > summary { justify-content: center; padding: 8px 0; }
.znav-collapsed .zside .zcollapse { justify-content: center; padding: 18px 0; }
.znav-collapsed .zcollapse .zi { transform: scaleX(-1); }
[dir="rtl"].znav-collapsed .zcollapse .zi { transform: none; }
.zscrim { display: none; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; max-width: none !important; width: auto !important; margin: 0 !important; padding: 28px !important; box-sizing: border-box; color: var(--text); }
.foot { text-align: center; color: var(--muted) !important; font-size: 12.5px; padding: 26px 0 6px; border: 0 !important; }
.zpage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.zpage-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.zsub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.zcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.zbtn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 14.5px; text-decoration: none !important; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.zbtn-primary { background: var(--primary); color: #fff !important; box-shadow: 0 8px 18px rgba(37,99,235,.28); }
.zbtn-primary:hover { background: var(--primary-hover); }
.zcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.zcard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.zcard-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.zcard-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; font-weight: 500; }
.zlink { color: var(--primary) !important; font-weight: 600; font-size: 13.5px; text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; }
.zlink:hover { text-decoration: underline !important; }
[dir="rtl"] .zflip { transform: scaleX(-1); }

/* ---------- Stat cards ---------- */
.zstats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.zstat { --tone: var(--text); --tone-soft: var(--surface-2); display: flex; flex-direction: column; gap: 10px; padding: 18px; text-decoration: none !important; color: var(--text) !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.zstat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,27,45,.08); }
.zstat.on { border-color: var(--tone); }
.zstat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.zstat-label { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.zstat-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); flex-shrink: 0; }
.zstat-val { font-size: 30px; font-weight: 700; line-height: 1; }
.zbar-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.zbar-track > span { display: block; height: 100%; border-radius: 999px; background: var(--tone); }
.zstat-foot { font-size: 12px; color: var(--muted); }
.t-dark   { --tone: var(--text); --tone-soft: var(--surface-2); }
.t-red    { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.t-blue   { --tone: var(--primary); --tone-soft: var(--primary-soft); }
.t-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.t-amber  { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.t-green  { --tone: var(--ok); --tone-soft: var(--ok-soft); }
:root[data-theme="dark"] .t-dark .zbar-track > span { background: #cbd5e1; }

/* ---------- Dashboard grid ---------- */
.zgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.zchart { padding: 20px 22px 16px; }
.zchart-plot { position: relative; height: 220px; display: flex; align-items: flex-end; gap: 2.2%; padding-inline-start: 26px; border-bottom: 1px solid var(--line); }
.zchart-grid { position: absolute; inset: 0 0 0 0; pointer-events: none; }
.zchart-grid div { position: absolute; inset-inline: 0; border-top: 1px dashed var(--line); }
.zchart-grid span { position: absolute; inset-inline-start: 0; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); background: var(--surface); padding-inline-end: 4px; }
.zchart-bar { flex: 1; position: relative; display: flex; align-items: flex-end; height: 100%; }
.zchart-bar i { display: block; width: 100%; max-width: 30px; margin: 0 auto; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; transition: opacity .15s; }
.zchart-bar:hover i { opacity: .8; }
.zchart-bar b { position: absolute; bottom: calc(var(--h) + 4px); inset-inline: 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--text); opacity: 0; transition: opacity .15s; }
.zchart-bar:hover b { opacity: 1; }
.zchart-x { display: flex; gap: 2.2%; padding-inline-start: 26px; margin-top: 8px; }
.zchart-x span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.zatt { list-style: none; margin: 0; padding: 0; }
.zatt li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; border-bottom: 1px solid var(--line); color: var(--text) !important; text-decoration: none !important; }
.zatt li:last-child a { border-bottom: 0; }
.zatt li a:hover { background: var(--surface-2); }
.zatt strong { display: block; font-size: 14.5px; font-weight: 700; }
.zatt small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.zatt small bdi { color: var(--primary); font-weight: 700; }
.zcats { padding: 14px 22px 20px; display: grid; gap: 14px; }
.zcat { display: grid; grid-template-columns: minmax(110px, 170px) 1fr 28px; align-items: center; gap: 16px; font-size: 14px; font-weight: 600; }
.zcat .zbar-track { --tone: var(--primary); height: 8px; }
.zcat b { text-align: end; font-weight: 700; }
.zassets { padding: 22px; }
.zassets-total { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.zassets-total b { font-size: 30px; color: var(--text); font-weight: 700; }
.zstack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; margin-bottom: 18px; background: var(--surface-2); }
.zstack span { display: block; height: 100%; }
.zlegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.zlegend li a { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text) !important; text-decoration: none !important; }
.zlegend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.zlegend b { margin-inline-start: auto; font-weight: 700; }
.zempty { padding: 40px 22px; text-align: center; color: var(--muted); }
.zempty .zi { margin: 0 auto 10px; color: var(--muted); }
.zempty h3 { margin: 0 0 4px; color: var(--text); font-size: 16px; }

/* ---------- Tickets page ---------- */
.zfilters { padding: 18px; margin-bottom: 20px; display: grid; gap: 14px; }
.zpills { display: flex; flex-wrap: wrap; gap: 10px; }
.zpill-f { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text) !important; font-size: 13.5px; font-weight: 600; text-decoration: none !important; }
.zpill-f:hover { border-color: var(--muted); }
.zpill-f .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.zpill-f b { font-weight: 600; color: var(--muted); }
.zpill-f.on { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.zpill-f.on .dot { background: #fff; }
.zpill-f.on b { color: #fff; }
.zrowf { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.zseg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.zseg a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; color: var(--muted) !important; font-size: 13.5px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.zseg a b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; background: var(--line); color: var(--muted); }
.zseg a.on { background: var(--surface); color: var(--text) !important; box-shadow: 0 1px 3px rgba(15,27,45,.12); }
.zseg a.on b { background: var(--primary); color: #fff; }
.zsearch { flex: 1; min-width: 240px; position: relative; display: block; margin: 0; }
.zsearch .zi { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--muted); }
.zsearch input { width: 100%; height: 46px; margin: 0 !important; padding: 0 16px; padding-inline-start: 42px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font-size: 14px; box-sizing: border-box; }
.zsearch input:focus, .zselect:focus-within { outline: none; border-color: var(--primary) !important; background: var(--surface); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.zselect { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); margin: 0; }
.zselect select { appearance: none; -webkit-appearance: none; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; height: 100%; margin: 0 !important; padding: 0 22px 0 4px !important; padding-inline-end: 26px !important; padding-inline-start: 4px !important; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; min-width: 140px; }
.zselect .zsel-chev { position: absolute; inset-inline-end: 10px; pointer-events: none; color: var(--muted); }
.zlist-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); color: var(--text) !important; text-decoration: none !important; border-inline-end: 3px solid transparent; }
.zlist-row:last-child { border-bottom: 0; }
.zlist-row:hover { background: var(--surface-2); }
.zlist-row.edge-bad { border-inline-end-color: var(--bad); }
.zlist-row.edge-warn { border-inline-end-color: var(--warn); }
.zlist-main { flex: 1; min-width: 0; }
.zlist-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.zlist-title strong { font-size: 16px; font-weight: 700; }
.zref { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.zmeta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 13px; }
.zmeta > span { display: inline-flex; align-items: center; gap: 6px; }
.zmeta b { color: var(--text); font-weight: 700; }
.zlist-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.zbadges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.zassignee { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.zassignee .zav { width: 24px; height: 24px; font-size: 9.5px; }
.zclaim { display: inline-flex; align-items: center; height: 30px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--primary); color: var(--primary); font-size: 13px; font-weight: 700; background: var(--surface); }
.zlist-row:hover .zclaim { background: var(--primary); color: #fff; }

/* ---------- Badges / SLA ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px !important; padding: 4px 12px !important; font-size: 12px !important; font-weight: 700 !important; border: 0 !important; white-space: nowrap; line-height: 1.4; }
.status-open { background: var(--bad-soft) !important; color: var(--bad) !important; }
.status-in_progress { background: var(--primary-soft) !important; color: var(--primary) !important; }
.status-pending { background: var(--violet-soft) !important; color: var(--violet) !important; }
.status-resolved, .status-closed { background: var(--ok-soft) !important; color: var(--ok) !important; }
.priority-urgent { background: var(--bad) !important; color: #fff !important; }
.priority-high { background: var(--warn-soft) !important; color: var(--warn) !important; }
.priority-medium { background: var(--surface-2) !important; color: var(--text) !important; }
.priority-low { background: var(--surface-2) !important; color: var(--muted) !important; }
.sla-over, .zlist-side .overdue, .zatt .overdue { display: inline-flex; align-items: center; gap: 5px; background: var(--bad) !important; color: #fff !important; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.sla-soon { display: inline-flex; align-items: center; gap: 5px; color: var(--warn) !important; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.sla-ok { display: inline-flex; align-items: center; gap: 5px; color: var(--muted) !important; font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* ---------- Existing pages (cards, tables, forms) ---------- */
.card, .table-wrap, .filters { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow) !important; color: var(--text); }
.narrow-wide { max-width: none !important; width: 100% !important; }
.page-head h1 { font-size: 26px; font-weight: 700; }
.btn { background: var(--primary) !important; color: #fff !important; border: 1px solid transparent !important; border-radius: 12px !important; font-weight: 700; }
.btn:hover { background: var(--primary-hover) !important; }
.btn-ghost { background: transparent !important; color: var(--text) !important; border-color: var(--line) !important; }
.btn-ghost:hover { background: var(--surface-2) !important; }
input, select, textarea { background: var(--surface); color: var(--text); border-color: var(--line); border-radius: 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(37,99,235,.14) !important; }
.flash { border-radius: 12px !important; border: 1px solid var(--line) !important; border-inline-start: 4px solid var(--muted) !important; background: var(--surface) !important; color: var(--text) !important; }
.flash-info { border-inline-start-color: var(--primary) !important; background: var(--primary-soft) !important; }
.flash-warn { border-inline-start-color: var(--warn) !important; background: var(--warn-soft) !important; }
.flash-error { border-inline-start-color: var(--bad) !important; background: var(--bad-soft) !important; }
.flash-success { border-inline-start-color: var(--ok) !important; background: var(--ok-soft) !important; }
.table th { background: var(--surface-2) !important; color: var(--muted) !important; font-weight: 700; }
.table td { border-color: var(--line) !important; }
.table tr:hover td { background: var(--surface-2); }
.stat { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow); color: var(--text) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .zstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .zgrid { grid-template-columns: 1fr; } }
@media (max-width: 991px) {
  .zside { position: fixed; top: 64px; inset-inline-start: 0; bottom: 0; height: auto; width: 280px !important; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
  [dir="rtl"] .zside { transform: translateX(105%); }
  .znav-open .zside { transform: none !important; }
  .znav-open .zscrim { display: block; position: fixed; inset: 64px 0 0 0; background: rgba(10,17,30,.45); z-index: 39; }
  .zside .zlabel, .zside .zsec, .zside .zchev { display: initial !important; }
  .zside .zgrp ul { display: block !important; }
  .zcollapse { display: none; }
  .zclock, .ztag { display: none !important; }
  .main { padding: 18px 16px !important; }
}
@media (max-width: 720px) {
  .zstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .zuser-txt, .zuser .zchev, .zinstall span { display: none; }
  .zuser > summary { padding: 0 4px; height: 44px; }
  .zpill span:not(.zi-moon):not(.zi-sun):not(.zlang-code) { display: none; }
  .zpill { padding: 0 11px; }
  .zbar { padding: 0 10px; gap: 6px; }
  .zlogo { height: 22px; }
  .zlist-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .zlist-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .zseg { width: 100%; } .zseg a { flex: 1; justify-content: center; padding: 0 8px; }
  .zselect { flex: 1 1 45%; } .zselect select { min-width: 0; width: 100%; }
  .zpage-head h1 { font-size: 22px; }
  .zcat { grid-template-columns: 100px 1fr 24px; gap: 10px; }
}


/* ===== Sidebar v2 — simple & modern ===== */
.zside { width: 252px; background: var(--surface); border-inline-end: 1px solid var(--line); }
.znav { padding: 14px 12px 18px; scrollbar-width: thin; }
.zcta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin: 2px 2px 10px; border-radius: 12px;
  background: var(--primary); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none !important;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 28%, transparent); transition: background .15s, transform .15s; }
.zcta:hover { background: var(--primary-hover); transform: translateY(-1px); }
.zcta .zlabel { flex: none; }
.zsec { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .75; padding: 18px 12px 6px; }
.zsec:first-of-type { padding-top: 10px; }
.zsingle, .zgrp > summary { position: relative; gap: 12px; height: 40px; padding: 0 10px; margin: 1px 0; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text) !important; transition: background .15s, color .15s; }
.zico { width: 22px; height: 22px; border-radius: 0; background: none !important; color: var(--muted); }
.zico .zi { width: 19px; height: 19px; }
.zsingle:hover, .zgrp > summary:hover { background: var(--surface-2); }
.zsingle:hover .zico, .zgrp > summary:hover .zico { color: var(--text); }
.zsingle.on { background: var(--primary-soft); color: var(--primary) !important; }
.zsingle.on .zico, .zgrp[open] > summary .zico { color: var(--primary) !important; }
.zsingle.on::before { content: ""; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
[dir="rtl"] .zsingle.on::before { border-radius: 3px 0 0 3px; }
.zgrp[open] > summary { color: var(--text) !important; }
.zchev { opacity: .6; }
.zchev .zi { width: 15px; height: 15px; }
.zgrp ul { margin: 2px 0 8px; padding-inline-start: 20px; position: relative; }
.zgrp ul::before { content: "" !important; position: absolute; inset-inline-start: 21px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.zgrp ul a { height: 36px; padding: 0 10px; margin: 1px 0; margin-inline-start: 10px; border: 0 !important; border-radius: 9px; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--muted) !important; }
.zgrp ul a .zi { width: 16px; height: 16px; opacity: .8; }
.zgrp ul a:hover { background: var(--surface-2); color: var(--text) !important; }
.zgrp ul a.on { background: var(--primary-soft); color: var(--primary) !important; font-weight: 600; }
.zgrp ul a.on .zi { opacity: 1; }
.zcount { min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.zsingle.on .zcount, .zgrp ul a.on .zcount { background: var(--primary); color: #fff; }
.zcount-bad { background: var(--bad) !important; color: #fff !important; }
.zcount-warn { background: var(--warn-soft); color: var(--warn); }
.zcollapse { margin: 0 12px 12px; padding: 10px 12px; border: 0; border-radius: 10px; font-size: 13px; background: var(--surface-2); border-top: 0; }
.zcollapse:hover { background: var(--line); }
.znav-collapsed .zside { width: 72px; }
.znav-collapsed .zside .zcta { width: 44px; height: 44px; margin: 2px auto 10px; padding: 0; }
.znav-collapsed .zside .zcta .zlabel { display: none; }
.znav-collapsed .zside .zsingle, .znav-collapsed .zside .zgrp > summary { width: 44px; margin: 4px auto; padding: 0; justify-content: center; }
.znav-collapsed .zside .zsingle.on::before { display: none; }
.znav-collapsed .zside .zcollapse { margin: 0 auto 12px; width: 44px; justify-content: center; padding: 10px 0; }
@media (max-width: 980px) { .zside .zcta .zlabel { display: initial !important; } }


/* ===== Notification bell ===== */
.znotif { position: relative; padding: 0 !important; }
.znotif > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 38px; height: 36px; position: relative; }
.znotif > summary::-webkit-details-marker { display: none; }
.znotif-dot { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--nav); }
.znotif-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 360px; max-width: calc(100vw - 24px); background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(15,27,45,.2); overflow: hidden; z-index: 60; text-align: start; }
.znotif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.znotif-head form { margin: 0; }
.znotif-head button { background: none; border: 0; color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.znotif-list { max-height: 400px; overflow-y: auto; }
.znotif-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; text-decoration: none !important; color: var(--text) !important; border-bottom: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.4; font-weight: 500; }
.znotif-item:last-child { border-bottom: 0; }
.znotif-item:hover { background: var(--surface-2); }
.znotif-item.unread { background: var(--primary-soft); }
.znotif-item.unread > span:last-child > span { font-weight: 700; }
.znotif-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.znotif-item.unread .znotif-ic { background: var(--surface); color: var(--primary); }
.znotif-item.k-escalated .znotif-ic { background: var(--warn-soft); color: var(--warn); }
.znotif-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 500; }
.znotif-empty { padding: 30px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px) { .znotif-menu { position: fixed; top: 64px; inset-inline: 12px; width: auto; } }


/* hide the menu (hamburger) button next to the logo on desktop; phones still need it to open the menu */
@media (min-width: 992px) { .zbar .zbar-btn { display: none !important; } }


/* ===== Avatars with pictures ===== */
.has-img { padding: 0 !important; overflow: hidden; background: var(--surface-2) !important; }
.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* ===== Reanner DNA (matches reanner.com): off-white, near-black, soft mint ===== */
html:root:not([data-theme="dark"]) {
  --bg:#f5f5f2; --surface:#ffffff; --surface-2:#f5f5f2;
  --text:#12140f; --muted:#6f7268; --line:#e4e4de;
  --primary:#1f6b4a; --primary-hover:#185a3e; --primary-soft:#e7f7ee;
  --brand:#1f6b4a; --brand-ink:#ffffff; --brand-soft:#e7f7ee;
  --mint:#c6efd9; --mint-2:#a9e5c6; --mint-ink:#0f3b28;
  --ok:#1a7a52; --ok-soft:#e3f5ea;
  --nav:#12140f; --nav-2:#1d2019;
  --radius:20px;
  --shadow:0 1px 2px rgba(18,20,15,.04), 0 10px 28px rgba(18,20,15,.05);
}
html:root:not([data-theme="dark"]) .zcta,
html:root:not([data-theme="dark"]) .zbtn-primary,
html:root:not([data-theme="dark"]) .btn-primary { background:var(--mint) !important; color:var(--mint-ink) !important; border-color:transparent !important; box-shadow:none !important; }
html:root:not([data-theme="dark"]) .zcta:hover,
html:root:not([data-theme="dark"]) .zbtn-primary:hover,
html:root:not([data-theme="dark"]) .btn-primary:hover { background:var(--mint-2) !important; }
html:root:not([data-theme="dark"]) .zcta svg,
html:root:not([data-theme="dark"]) .zbtn-primary svg { stroke:currentColor; }
.zcta, .zbtn, .btn { border-radius:999px !important; }
html:root:not([data-theme="dark"]) .zbar { background:#ffffff !important; color:var(--text) !important; border-bottom:1px solid var(--line); }
html:root:not([data-theme="dark"]) .zbar .zlogo { background-image:url(reanner-logo.svg) !important; }
html:root:not([data-theme="dark"]) .zbar .zbar-btn,
html:root:not([data-theme="dark"]) .zbar .zpill { color:var(--text) !important; border-color:var(--line) !important; background:#fff !important; }
html:root:not([data-theme="dark"]) .zbar .zbar-btn:hover,
html:root:not([data-theme="dark"]) .zbar .zpill:hover { background:var(--surface-2) !important; }
html:root:not([data-theme="dark"]) .zbar .zpill * , html:root:not([data-theme="dark"]) .zbar .zbar-btn * { color:inherit; }
/* dna-labels */
html:root:not([data-theme="dark"]) .zbar .ztag { color:var(--muted) !important; border-color:var(--line) !important; background:transparent !important; }
html:root:not([data-theme="dark"]) .zbar summary { border-color:var(--line) !important; color:var(--text) !important; }
html:root:not([data-theme="dark"]) .zbar .zuser-txt { color:var(--text) !important; }
html:root:not([data-theme="dark"]) .zbar .zuser-txt small { color:var(--muted) !important; }
/* dna-logo */
html:root[data-theme="dark"] .zbar .zlogo { background-image:url(reanner-logo-white.svg) !important; }
/* ===== end Reanner DNA ===== */

/* ===== Team chat ===== */
.zchat { display:grid; grid-template-columns:320px 1fr; height:calc(100vh - 64px - 48px); min-height:480px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.zchat-list { border-inline-end:1px solid var(--line); overflow-y:auto; padding:14px 10px; background:var(--surface); }
.zchat-list-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:4px 6px 12px; }
.zchat-list-head h1 { font-size:20px; margin:0; }
.zchat-sec { font-size:12px; font-weight:700; color:var(--muted); padding:14px 8px 6px; text-transform:none; }
.zchat-empty { font-size:13px; color:var(--muted); padding:0 8px; margin:0 0 6px; }
.zchat-item { display:flex; align-items:center; gap:10px; padding:9px 8px; border-radius:14px; color:var(--text); text-decoration:none; }
.zchat-item:hover { background:var(--surface-2); }
.zchat-item.on { background:var(--primary-soft); }
.zchat-txt { display:flex; flex-direction:column; min-width:0; flex:1; }
.zchat-txt b { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zchat-txt small { font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zchat-unread { margin-inline-start:auto; }
.zchat-gav { background:var(--mint, #c6efd9) !important; color:var(--mint-ink, #0f3b28) !important; display:inline-grid; place-items:center; }
.zav-sm { width:24px !important; height:24px !important; font-size:10px !important; }
.zchat-new { position:relative; }
.zchat-new > summary { list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.zchat-new > summary::-webkit-details-marker { display:none; }
.zchat-pop { position:absolute; inset-inline-end:0; top:calc(100% + 8px); z-index:30; width:300px; max-width:86vw; background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:14px; display:grid; gap:12px; }
.zchat-pop label { display:grid; gap:6px; font-size:13px; font-weight:600; }
.zchat-pop input[name="name"] { padding:9px 12px; border:1px solid var(--line); border-radius:12px; font:inherit; background:var(--surface); color:var(--text); }
.zchat-pick { max-height:240px; overflow-y:auto; display:grid; gap:2px; }
.zchat-pick label { display:flex; align-items:center; gap:8px; font-weight:500; padding:6px; border-radius:10px; cursor:pointer; }
.zchat-pick label:hover { background:var(--surface-2); }
.zchat-pick small { color:var(--muted); margin-inline-start:auto; font-weight:400; }
.zchat-rename { display:flex; gap:8px; }
.zchat-rename input { flex:1; min-width:0; }
.zchat-leave { background:none; border:0; color:var(--bad); font:inherit; font-size:13px; cursor:pointer; padding:4px 0; text-align:start; }
.zchat-room { display:flex; flex-direction:column; min-width:0; background:var(--bg); }
.zchat-head { display:flex; align-items:center; gap:12px; padding:12px 18px; border-bottom:1px solid var(--line); background:var(--surface); }
.zchat-title { display:flex; flex-direction:column; min-width:0; flex:1; }
.zchat-title b { font-size:15px; }
.zchat-title small { font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zchat-back { display:none; color:var(--text); }
[dir="rtl"] .zchat-back svg { transform:scaleX(-1); }
.zchat-msgs { flex:1; overflow-y:auto; padding:20px 18px; display:flex; flex-direction:column; gap:10px; }
.zmsg { max-width:min(70%, 560px); align-self:flex-start; background:var(--surface); border:1px solid var(--line); border-radius:18px; border-start-start-radius:6px; padding:9px 14px; }
.zmsg.mine { align-self:flex-end; background:var(--mint, #c6efd9); border-color:transparent; color:var(--mint-ink, #0f3b28); border-start-start-radius:18px; border-start-end-radius:6px; }
.zmsg b { display:block; font-size:12px; color:var(--primary); margin-bottom:2px; }
.zmsg-body { font-size:14.5px; line-height:1.6; overflow-wrap:anywhere; }
.zmsg-body a { color:inherit; text-decoration:underline; }
.zmsg time { display:block; font-size:11px; color:var(--muted); margin-top:3px; text-align:end; }
.zmsg.mine time { color:inherit; opacity:.65; }
.zchat-none { margin:auto; color:var(--muted); font-size:14px; }
.zchat-send { display:flex; align-items:flex-end; gap:10px; padding:12px 14px; border-top:1px solid var(--line); background:var(--surface); }
.zchat-send textarea { flex:1; resize:none; font:inherit; font-size:14.5px; padding:11px 16px; border:1px solid var(--line); border-radius:22px; background:var(--surface-2); color:var(--text); max-height:160px; }
.zchat-send textarea:focus { outline:none; border-color:var(--primary); }
.zchat-send .zbtn { display:inline-flex; align-items:center; gap:6px; }
[dir="rtl"] .zchat-send .ic-send { transform:scaleX(-1); }
.zchat-welcome { margin:auto; text-align:center; max-width:360px; padding:24px; color:var(--muted); }
.zchat-welcome h2 { color:var(--text); font-size:20px; margin:12px 0 6px; }
.zchat-welcome-ic { width:64px; height:64px; border-radius:20px; display:inline-grid; place-items:center; background:var(--mint, #c6efd9); color:var(--mint-ink, #0f3b28); }
@media (max-width:820px) {
  .zchat { grid-template-columns:1fr; height:calc(100vh - 64px - 24px); }
  .zchat.has-room .zchat-list { display:none; }
  .zchat:not(.has-room) .zchat-room { display:none; }
  .zchat-back { display:inline-flex; }
  .zmsg { max-width:85%; }
}
.zchat-unread[hidden] { display:none !important; }
.zchat-call { margin-inline-start:auto; display:inline-flex; align-items:center; gap:6px; cursor:pointer; font:inherit; }
.zchat-head .zchat-more { margin-inline-start:0; }
.zcall { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-weight:600; }
.zcall .zbtn { padding:6px 14px; font-size:13px; text-decoration:none !important; color:var(--mint-ink, #0f3b28) !important; }
.zmsg.mine .zcall .zbtn { background:#fff !important; }
.zchat-head .zpill { height:38px; display:inline-flex; align-items:center; gap:6px; padding:0 14px; border-radius:999px !important; border:1px solid var(--line) !important; background:var(--surface) !important; color:var(--text) !important; cursor:pointer; font:inherit; font-size:14px; }
.zchat-head .zpill:hover { background:var(--surface-2) !important; }
.zchat-head .zchat-call { background:var(--mint, #c6efd9) !important; border-color:transparent !important; color:var(--mint-ink, #0f3b28) !important; font-weight:600; }
.zchat-head .zchat-call:hover { background:var(--mint-2, #a9e5c6) !important; }
.zchat-send textarea { min-height:46px !important; height:46px; line-height:1.5; }
.zchat-mic { width:46px; height:46px; flex:none; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--text); display:inline-grid; place-items:center; cursor:pointer; }
.zchat-mic:hover { background:var(--surface-2); }
.zchat-mic.on { background:var(--bad, #b03a2e); border-color:transparent; color:#fff; animation:zpulse 1.2s infinite; }
@keyframes zpulse { 0%,100% { box-shadow:0 0 0 0 rgba(176,58,46,.35); } 50% { box-shadow:0 0 0 8px rgba(176,58,46,0); } }
.zchat-rec { flex:1; display:flex; align-items:center; gap:10px; height:46px; padding:0 16px; border-radius:22px; background:var(--surface-2); }
.zchat-rec[hidden] { display:none; }
.zchat-rec-dot { width:10px; height:10px; border-radius:50%; background:var(--bad, #b03a2e); animation:zblink 1s infinite; }
@keyframes zblink { 50% { opacity:.2; } }
.zchat-rec button { margin-inline-start:auto; background:none; border:0; color:var(--muted); font:inherit; cursor:pointer; }
.zchat-send textarea[hidden] { display:none; }
.zvoice { display:flex; align-items:center; gap:8px; }
.zvoice audio { height:36px; max-width:240px; }
.zvoice small { font-size:11px; opacity:.7; }
.zmenu .zmenu-btn { display:flex; align-items:center; gap:10px; width:100%; padding:10px 14px; background:none; border:0; font:inherit; color:inherit; cursor:pointer; text-align:start; border-radius:10px; }
.zmenu .zmenu-btn:hover { background:var(--surface-2); }
.zmenu .zmenu-btn[hidden] { display:none; }
.tk-ss { padding:4px 0 10px; }
.tk-ss .btn { background:var(--mint, #c6efd9) !important; color:var(--mint-ink, #0f3b28) !important; border-color:transparent !important; border-radius:999px !important; font-weight:600; }
.bubble.ss-bubble { background:var(--surface) !important; border:1px solid var(--mint-2, #a9e5c6) !important; color:var(--text) !important; }
.ss-card { display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.ss-card b { font-size:15px; }
.ss-steps { margin:0; padding-inline-start:20px; font-size:14px; line-height:1.7; }
.ss-join { background:var(--mint, #c6efd9) !important; color:var(--mint-ink, #0f3b28) !important; border-color:transparent !important; border-radius:999px !important; padding:8px 22px !important; font-weight:600; text-decoration:none !important; }
/* ===== end Team chat ===== */
.zlang-code { font-weight: 700; letter-spacing: .04em; font-size: 13px; }
