/* public/css/dash.css — SoftTech dashboard v1.4 (phone-first). Bottom tab bar on phones, sidebar from 900px. */
:root {
  --bg: #0b1220; --surface: #111a2c; --surface-2: #17223a; --surface-3: #1d2a47; --border: #24314d; --border-2: #31406a;
  --text: #e8ecf5; --dim: #97a3bb; --faint: #6b7896;
  --accent: #3b82f6; --accent-2: #2563eb; --accent-soft: rgba(59,130,246,.14);
  --green: #22c55e; --green-soft: rgba(34,197,94,.14); --red: #ef4444; --red-soft: rgba(239,68,68,.14); --amber: #f59e0b; --amber-soft: rgba(245,158,11,.14);
  --radius: 14px; --radius-s: 10px; --tabbar-h: 64px; --topbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
a { color: #7fb0ff; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #8bb8ff; outline-offset: 2px; border-radius: 6px; }
svg.i { width: 22px; height: 22px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; letter-spacing: .2px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.login-card .brand { margin-bottom: 18px; }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }

/* ---------- shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 6px; padding: 0 8px 0 16px;
  background: rgba(11,18,32,.98); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar h1 { flex: 1; min-width: 0; margin: 0; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { margin-left: -10px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; flex: 0 0 auto; }
.icon-btn:hover { background: var(--surface-2); }
.content { padding: 14px 14px 0; max-width: 1040px; margin: 0 auto; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(13,21,37,.97); border-top: 1px solid var(--border); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; text-decoration: none; color: var(--dim);
  font-size: 11px; font-weight: 600; position: relative; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tabbar a[aria-current="page"] { color: #fff; }
.tabbar a[aria-current="page"] svg.i { stroke: #8bb8ff; }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; border-right: 1px solid var(--border); background: var(--surface); }
  .sidebar .brand { padding: 4px 10px 18px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 11px; color: var(--dim); text-decoration: none; font-weight: 600; position: relative; }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
  .sidebar nav a[aria-current="page"] { background: var(--accent-soft); color: #fff; }
  .sidebar nav a[aria-current="page"] svg.i { stroke: #8bb8ff; }
  .sidebar .nav-badge { position: static; margin-left: auto; }
  .sidebar .side-foot { margin-top: auto; padding: 10px; font-size: 13px; color: var(--faint); }
  .sidebar .side-foot .btn { width: 100%; margin-top: 8px; }
  .tabbar { display: none; }
  .main { padding-bottom: 40px; }
  .topbar { padding: 0 20px 0 28px; height: 64px; }
  .topbar .back { margin-left: -12px; }
  .content { padding: 20px 28px 0; }
}

/* ---------- cards / sections ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; min-width: 0; }
.card > h2, .card-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { flex: 1; min-width: 0; }
.card > h2 { margin-bottom: 10px; }
.card .sub, .muted { color: var(--dim); font-size: 14px; }
.card p { margin: 0 0 10px; }
.tiny { font-size: 12.5px; color: var(--faint); }
.section-title { font-size: 13px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin: 20px 4px 8px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid2 > .card { margin-bottom: 0; } .grid2 { margin-bottom: 14px; } }
details.fold { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 4px; }
details.fold > summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--dim); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "›"; margin-left: auto; font-size: 22px; transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(90deg); }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-size: 15px; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; max-width: 100%; }
.btn:hover { border-color: #4b67a6; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.good { background: #15803d; border-color: #16a34a; color: #fff; }
.btn.bad { background: var(--red-soft); border-color: #b42323; color: #fecaca; }
.btn.ghost { background: transparent; border-color: transparent; color: #8bb8ff; padding: 0 10px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn-row.end { justify-content: flex-end; }
label.lbl { display: block; font-size: 14px; font-weight: 600; color: var(--dim); margin: 12px 0 6px; }
.field { margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=url], input[type=tel], input[type=email], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: #0c1426; color: var(--text); font-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: 0 0 auto; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form > input, .inline-form > select { flex: 1 1 180px; min-width: 0; }
.err { color: #fca5a5; font-size: 14px; margin-top: 8px; min-height: 0; }
.err:empty { display: none; }
.ok { color: #86efac; font-size: 14px; margin-top: 8px; }
.ok:empty { display: none; }

/* segmented control */
.seg { display: flex; background: #0c1426; border: 1px solid var(--border-2); border-radius: 12px; padding: 3px; gap: 3px; min-width: 0; }
.seg button { flex: 1 1 0; min-width: 0; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font-size: 14px; font-weight: 650; cursor: pointer;
  padding: 3px 6px; line-height: 1.15; overflow-wrap: anywhere; }
.seg button small { display: block; font-size: 11.5px; font-weight: 600; opacity: .8; margin-top: 1px; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.seg button[aria-pressed="true"].is-block { background: #4a1717; color: #fecaca; }
.seg button[aria-pressed="true"].is-allow { background: #12391f; color: #bbf7d0; }

/* ---------- chips / badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--surface-3); color: #c9d3e6; white-space: nowrap; }
.chip.mdm { background: rgba(168,85,247,.16); color: #e9d5ff; }
.chip.browser { background: var(--accent-soft); color: #bfdbfe; }
.chip.good { background: var(--green-soft); color: #bbf7d0; }
.chip.bad { background: var(--red-soft); color: #fecaca; }
.chip.warn { background: var(--amber-soft); color: #fde68a; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: 0 0 auto; }
.dot-s.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-s.idle { background: var(--amber); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); min-width: 0; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 650; overflow-wrap: anywhere; }
.row .meta { font-size: 13.5px; color: var(--dim); overflow-wrap: anywhere; }
.row .actions { display: flex; gap: 6px; flex: 0 0 auto; }
.empty { text-align: center; color: var(--dim); padding: 22px 8px; font-size: 15px; }
.empty .btn { margin-top: 12px; }

/* phones list */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 220px; position: relative; min-width: 0; }
.toolbar .search input { padding-left: 40px; }
.toolbar .search svg { position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; color: var(--faint); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: var(--dim); font-weight: 650; font-size: 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--text); color: #0b1220; border-color: var(--text); }
.phones { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.phone-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; min-width: 0; }
.phone-card:hover { border-color: var(--border-2); background: #131e33; }
.phone-card .ph-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); flex: 0 0 auto; color: #c7d2fe; }
.phone-card.revoked { opacity: .62; }
.phone-card .grow { flex: 1; min-width: 0; }
.phone-card .name { font-weight: 700; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-card .model { font-size: 13.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-card .chips { margin-top: 8px; }
.phone-card .seen { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); margin-top: 8px; }
.phone-card .pend { flex: 0 0 auto; align-self: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: var(--red); color: #fff; font-weight: 750; display: grid; place-items: center; font-size: 14px; }
.phone-card .chev { align-self: center; color: var(--faint); font-size: 24px; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.stat b { display: block; font-size: 21px; }
.stat span { font-size: 12.5px; color: var(--dim); }
.stat.alert b { color: #fca5a5; }

/* phone page */
.phone-head { display: flex; gap: 14px; align-items: center; margin: 2px 0 12px; min-width: 0; }
.phone-head .ph-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: #c7d2fe; flex: 0 0 auto; }
.phone-head .grow { min-width: 0; flex: 1; }
.phone-head .name { font-size: 20px; font-weight: 750; overflow-wrap: anywhere; }
.phone-head .meta { font-size: 13.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ptabs { position: sticky; top: var(--topbar-h); z-index: 15; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px 0 10px; background: var(--bg); margin: 0 0 6px; }
@media (min-width: 900px) { .ptabs { top: 64px; } }
.ptabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 12px; text-decoration: none; color: var(--dim); font-weight: 700; font-size: 15px; background: var(--surface); border: 1px solid var(--border); position: relative; min-width: 0; }
.ptabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ptabs a .nav-badge { position: static; margin-left: 2px; }
.ptabs a.off { opacity: .75; }

/* site entries */
.entry .kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.entry .kind.allow { background: var(--green-soft); color: #86efac; }
.entry .kind.block { background: var(--red-soft); color: #fca5a5; }
.entry .kind svg.i { width: 18px; height: 18px; }
.entry .reason { font-size: 13.5px; color: #fecaca; margin-top: 2px; overflow-wrap: anywhere; }
.req .url { font-weight: 650; overflow-wrap: anywhere; font-size: 15px; }
.req .note { font-size: 14px; color: #d6deee; margin-top: 4px; overflow-wrap: anywhere; }
.req-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.req-actions select { grid-column: 1 / -1; }
.req .denyform { grid-column: 1 / -1; }
.req.row { flex-direction: column; align-items: stretch; }

/* settings rows */
.setting { padding: 12px 0; border-top: 1px solid var(--border); }
.setting:first-of-type { border-top: 0; padding-top: 0; }
.setting .s-label { font-weight: 650; }
.setting .s-help { font-size: 13.5px; color: var(--dim); margin: 2px 0 8px; }
.setting .s-state { font-size: 13.5px; margin-top: 6px; color: var(--dim); }
.state-on { color: #fca5a5; font-weight: 700; }
.state-off { color: #86efac; font-weight: 700; }

.kv { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 8px 12px; font-size: 15px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.code-big { font: 700 24px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 2px; background: #0a1020; border: 1px dashed var(--border-2); border-radius: 12px; padding: 14px; text-align: center; overflow-wrap: anywhere; margin-top: 10px; }
.code-big.long { font-size: 15px; letter-spacing: 0; }
.code-big.mdm-short { font-size: 40px; letter-spacing: 6px; padding: 18px 10px; }
.code-cmd { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0a1020; border: 1px solid var(--border-2); border-radius: 10px; padding: 10px; overflow-wrap: anywhere; margin: 8px 0; }
.note { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-size: 14px; color: #cdd6e6; margin: 10px 0; }
.note.warn { background: var(--amber-soft); border-color: rgba(245,158,11,.45); color: #fde68a; }
.note.bad { background: var(--red-soft); border-color: rgba(239,68,68,.45); color: #fecaca; }
.note.good { background: var(--green-soft); border-color: rgba(34,197,94,.4); color: #bbf7d0; }

/* log */
.log-row { padding: 11px 0; border-top: 1px solid var(--border); }
.log-row:first-child { border-top: 0; }
.log-row .what { font-weight: 650; overflow-wrap: anywhere; }
.log-row .meta { font-size: 13px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; }
.log-row .det { font-size: 13.5px; color: #c3cde0; overflow-wrap: anywhere; margin-top: 2px; }

/* store slot */
.slot { border: 1px dashed var(--border-2); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: rgba(23,34,58,.45); }
.slot h2 { margin: 0 0 6px; font-size: 17px; }
.feature-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; color: var(--dim); }
.feature b { color: var(--text); display: block; font-size: 15px; }

/* sheet (dialog) */
dialog.sheet { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 560px; width: 100%; margin: auto auto 0; max-height: 92vh; }
dialog.sheet::backdrop { background: rgba(3,6,14,.65); }
dialog.sheet .sheet-body { background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 10px 18px calc(18px + var(--safe-b)); max-height: 92vh; overflow-y: auto; }
dialog.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 0 auto 12px; }
dialog.sheet h3 { margin: 0 0 4px; font-size: 18px; overflow-wrap: anywhere; }
@media (min-width: 640px) { dialog.sheet { margin: auto; } dialog.sheet .sheet-body { border-radius: 20px; border-bottom: 1px solid var(--border); } }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.menu-item { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; text-align: left; width: 100%; }
.menu-item.bad { color: #fca5a5; }

/* toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); z-index: 60; background: #e8ecf5; color: #0b1220; padding: 12px 18px; border-radius: 12px; font-weight: 650; font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.toast.bad { background: #fecaca; color: #450a0a; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
/* v1.26: skeleton placeholders (first load) */
.boot { min-height: 100vh; min-height: 100dvh; }
.sk { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; border-radius: 8px; animation: sk-shine 1.3s ease-in-out infinite; }
.sk-line { height: 12px; margin: 6px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-chip { height: 22px; border-radius: 999px; width: 45%; margin-top: 10px; }
.sk-num { height: 22px; width: 34px; margin: 2px 0 6px; }
.sk-bar { height: 46px; border-radius: 12px; margin-bottom: 12px; }
.sk-ico { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; }
.sk-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.sk-card .grow { flex: 1; min-width: 0; }
@keyframes sk-shine { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.redirect-box { max-width: 420px; margin: 20vh auto; padding: 20px; text-align: center; }

/* v1.6: phones-first */
.toolbar .add-phone { flex: 0 0 auto; }
.phone-item { display: flex; flex-direction: column; min-width: 0; }
.phone-item .phone-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.phone-link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.phone-link-row .tiny { margin: 0; flex: 1 1 160px; }
.row.conn .conn-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: #c7d2fe; flex: 0 0 auto; }
.row.conn .title .chip { margin-left: 4px; vertical-align: middle; }
.row.conn:first-child { border-top: 0; }
.tiny.center { text-align: center; }
.menu-item[disabled] { opacity: .5; cursor: not-allowed; }
[data-newname][hidden] { display: none; }

.tracker-map { position:relative; overflow:hidden; height:280px; width:100%; background:#e6edf1; border-radius:15px; margin-top:14px; }
.tracker-pin {position:absolute;left:50%;top:50%;transform:translate(-50%,-75%);color:#e73648;font-size:36px;text-shadow:0 1px 4px #fff;z-index:1;}
.location-coords {font-size:22px;font-weight:750;letter-spacing:-.025em;word-break:break-word;}
.location-hero p {margin:9px 0;}

/* ---------- v1.11 Backup & move ---------- */
.steps { margin: 0 0 10px; padding-left: 22px; font-size: 14.5px; color: #cdd6e6; }
.steps li { margin: 0 0 8px; }
.steps a { color: #8bb8ff; }
.preview { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.preview h3 { margin: 0 0 10px; font-size: 15px; overflow-wrap: anywhere; }
.counts { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.counts th, .counts td { text-align: right; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.counts th:first-child, .counts td:first-child { text-align: left; color: var(--dim); }
.confirm-box { margin-top: 8px; }
.confirm-box input[name=confirm] { letter-spacing: 1px; }
#bk-imp-status .chip, #bk-exp-status .chip { margin-right: 4px; }

label.check { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 14px; }
/* Remote dashboard: designed for narrow phone and desktop views alike. */
.remote-card,.remote-card+section{max-width:780px;margin:0 auto 18px}
.remote-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.remote-head h2{margin:0}
.remote-setting{display:flex;align-items:center;gap:10px;padding:14px 0;font-size:.9rem;line-height:1.4}
.remote-setting input{width:20px;height:20px;accent-color:#2f6fd6}
.remote-screen{background:#101c32;border:6px solid #172b49;border-radius:18px;min-height:250px;max-width:520px;margin:16px auto;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;box-shadow:0 14px 35px #0b1f3b35}
.remote-screen img{display:block;width:100%;height:auto;min-height:250px;object-fit:contain;cursor:crosshair;user-select:none;-webkit-user-drag:none}
.remote-controls{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.remote-controls .btn{min-width:62px}
#remote-text{margin-top:18px}#remote-text label{display:block;font-weight:600;margin-bottom:8px}#remote-text input{min-width:160px;flex:1;padding:10px;border:1px solid #9baac0;border-radius:8px}
.status-pill{background:#e6efff;color:#163b76;border-radius:100px;padding:5px 12px;font-size:.82rem;font-weight:700}
@media(max-width:520px){.remote-head{align-items:flex-start}.remote-screen{max-width:calc(100vw - 44px)}.remote-controls .btn{flex:1}}
/* v1.17: Installed apps filter (Installed / In drawer / System / All) */
.app-filter { margin: 10px 0 2px; }
.app-filter .seg { flex-wrap: wrap; }
#app-filter-note:empty { display: none; }

/* v1.18 Launcher backgrounds */
.lbg-head{display:flex;gap:14px;align-items:flex-start}
.lbg-thumb{width:96px;height:128px;object-fit:cover;border-radius:10px;background:#e6e9ef;flex:none;border:1px solid rgba(0,0,0,.08)}
.lbg-meta{min-width:0;flex:1}.lbg-meta .s-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lbg-table{width:100%;border-collapse:collapse;margin-top:12px;font-size:14px}
.lbg-table th{font-weight:600;text-align:left;color:var(--muted,#667);font-size:12px;padding:6px 4px;border-bottom:1px solid rgba(0,0,0,.08)}
.lbg-table td{padding:8px 4px;border-bottom:1px solid rgba(0,0,0,.05)}
.lbg-table th:not(:first-child),.lbg-table td:not(:first-child){text-align:center;width:28%}
.lbg-table input[type=checkbox]{width:20px;height:20px}
.release-card{border:1px solid #f1c2c2}

/* v1.21.5: Unblock / Allow / Block right in the Sites list */
.site-acts { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.site-acts .btn.small { min-height: 36px; padding: 0 12px; }
@media (max-width: 420px) { .row.entry { flex-wrap: wrap; } .row.entry .site-acts { width: 100%; padding-left: 46px; justify-content: flex-start; } }

/* ---------- v1.22 agents: register, waiting card, role gating, "Viewing as" banner, Agents page, All phones ---------- */
.auth-switch { margin: 16px 0 0; text-align: center; color: var(--dim); font-size: 14.5px; }
.auth-switch a { font-weight: 650; text-decoration: none; }
.lbl-hint { color: var(--faint); font-weight: 500; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pending-card { text-align: center; }
.pending-card .brand { justify-content: center; }
.pending-ico { width: 64px; height: 64px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: #8bb8ff; border: 1px solid rgba(59,130,246,.35); }
.pending-ico svg.i { width: 30px; height: 30px; }
.chip.pend { background: var(--accent-soft); color: #bfdbfe; box-shadow: inset 0 0 0 1px rgba(59,130,246,.35); }

/* main-admin-only parts are hidden for agents (the server also answers 403) */
body.role-agent .admin-only,
body.role-agent [data-action="storeUpload"], body.role-agent [data-action="storePromote"], body.role-agent [data-action="storeWithdraw"],
body.role-agent [data-action="storeRestore"], body.role-agent [data-action="storeForce"], body.role-agent [data-action="storeForceStop"][data-target="all"],
body.role-agent [data-action="storeForceStop"][data-target="beta"], body.role-agent [data-action="storeUninstall"][data-target="all"],
body.role-agent [data-action="storeUninstall"][data-target="beta"], body.role-agent form[data-submit="storeAppEdit"],
body.role-agent .setting:has(#beta-only), body.role-agent .card:has(> .btn-row > [data-action="storeUninstall"][data-target="all"]) { display: none !important; }

/* "Viewing as <agent> — Return to main admin" */
.imp-banner { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  min-height: 48px; padding: 7px 10px 7px 14px; background: linear-gradient(90deg, #1e3a8a, #1d4ed8); color: #fff; border-bottom: 1px solid #3b82f6; font-size: 14.5px; }
.imp-banner .imp-text { min-width: 0; flex: 1 1 150px; overflow-wrap: anywhere; }
.imp-banner .imp-text::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #93c5fd; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 8px #93c5fd; }
.imp-banner .imp-return { background: #fff; color: #0b1a3a; border-color: #fff; font-weight: 700; white-space: nowrap; }
.imp-banner .imp-return:hover { background: #dbeafe; }
body.impersonating .topbar { top: 48px; }
body.impersonating .ptabs { top: calc(var(--topbar-h) + 48px); }

/* Agents page */
.subtabs { display: flex; gap: 6px; margin: 0 0 12px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.subtabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border-radius: 9px; color: var(--dim); text-decoration: none; font-weight: 650; font-size: 14.5px; }
.subtabs a svg.i { width: 18px; height: 18px; }
.subtabs a[aria-current="page"] { background: var(--accent-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(59,130,246,.4); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-size: 22px; line-height: 1.15; }
.stat span { color: var(--dim); font-size: 12.5px; font-weight: 600; }
.stat.hot { border-color: rgba(59,130,246,.55); background: var(--accent-soft); }
.count-pill { display: inline-block; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 13px; line-height: 22px; text-align: center; vertical-align: 2px; margin-left: 4px; }
.agent-row { border-top: 1px solid var(--border); }
.list > .agent-row:first-child { border-top: 0; }
.agent-row .title .chip { margin-left: 4px; vertical-align: 1px; }
.avatar { width: 40px; height: 40px; min-height: 40px; max-height: 40px; align-self: center; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface-3); color: #c7d2fe; font-weight: 750; font-size: 14px; letter-spacing: .3px; }
.avatar.main { background: var(--accent-soft); color: #bfdbfe; box-shadow: inset 0 0 0 1px rgba(59,130,246,.45); }
.agent-acts { margin: -4px 0 8px 52px; gap: 6px; align-items: center; }
.agent-acts .icon-btn { width: 38px; height: 38px; margin-left: auto; color: var(--dim); }

/* All phones: owner table (stays readable at phone width) */
#ap-owner { margin-bottom: 10px; }
.otable { display: flex; flex-direction: column; }
.otr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34%) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); }
.otr.oth { padding: 6px 0; border-top: 0; color: var(--faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.ocell-phone { min-width: 0; display: flex; flex-direction: column; }
.ocell-phone b { font-weight: 650; overflow-wrap: anywhere; }
.ocell-phone small { color: var(--dim); font-size: 12.5px; overflow-wrap: anywhere; }
.owner-tag { display: inline-block; max-width: 100%; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: #dbe4f5; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.owner-tag.main { background: var(--accent-soft); color: #bfdbfe; }

/* ---------- v1.26: phone → Apps list (sections, status chips) and the app detail page. Navy only. ---------- */
.apps-search { display: flex; margin-bottom: 12px; }
.app-section { margin-top: 6px; }
.app-section + .app-section { margin-top: 14px; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 6px 0 4px; border-bottom: 1px solid var(--border-2); }
.sec-head h3 { flex: 1; margin: 0; font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: #9fb4da; }
.sec-head .count { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px; border-radius: 11px; background: var(--surface-3); color: #c9d3e6; font-size: 12px; line-height: 20px; text-align: center; letter-spacing: 0; }
a.row.app-row { color: inherit; text-decoration: none; cursor: pointer; border-radius: 10px; }
a.row.app-row:hover { background: var(--surface-2); }
.app-row .chev { color: var(--faint); font-size: 24px; line-height: 1; }
.app-ico { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center; background: #1b2c52; color: #c7d7ff; font-weight: 750; font-size: 17px; box-shadow: inset 0 0 0 1px rgba(99,140,230,.28); object-fit: cover; }
.app-ico.big { width: 56px; height: 56px; border-radius: 15px; font-size: 24px; }
.app-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.chip.st { background: rgba(59,130,246,.16); color: #cfe0ff; box-shadow: inset 0 0 0 1px rgba(59,130,246,.35); height: 22px; font-size: 12px; }
.chip.st-locked, .chip.st-suspended { background: #1e3a8a; color: #e0eaff; box-shadow: none; }
.chip.st-removed { background: #172554; color: #c7d2fe; box-shadow: inset 0 0 0 1px #3b4f8f; }
.chip.st-off { background: var(--surface-3); color: #c9d3e6; box-shadow: none; }
.chip.st-ok { background: var(--surface-3); color: #c9d3e6; box-shadow: none; }
.back-link { margin: 0 0 8px -6px; }
.app-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.app-detail > .card { margin-bottom: 0; }
@media (min-width: 1000px) {
  .app-detail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .app-detail .app-hero { grid-column: 1 / -1; }
  .app-detail .app-actions { grid-row: span 2; }
}
.app-hero { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.app-hero > .grow { flex: 1 1 200px; min-width: 0; }
.app-hero .name { font-size: 21px; font-weight: 750; overflow-wrap: anywhere; }
.app-hero .pkg { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--dim); overflow-wrap: anywhere; }
.facts { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
@media (min-width: 1000px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts dt { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.facts dd { margin: 1px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
.act-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.card h2 + .tiny + #app-last + .act-row, #app-settings-body > .act-row:first-child { border-top: 0; }
.act-text { flex: 1 1 220px; min-width: 0; }
.act-label { font-weight: 650; }
.act-now { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: #c9d3e6; font-size: 12px; font-weight: 650; vertical-align: 1px; }
.act-help { font-size: 13px; color: var(--dim); margin-top: 2px; }
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.act-btns .btn { min-width: 104px; }
.btn.is-now { background: rgba(59,130,246,.12); border-color: #3b5bb5; color: #dbe6ff; }
.btn.is-now svg.i { width: 16px; height: 16px; color: #8bb8ff; }
@media (max-width: 520px) { .act-btns { width: 100%; } .act-btns .btn { flex: 1 1 0; min-width: 0; } }
.res-row .meta { color: #cdd6e6; }
.chip.res { height: 24px; }
.chip.res-good { background: var(--green-soft); color: #bbf7d0; }
.chip.res-bad { background: var(--red-soft); color: #fecaca; }
.chip.res-kept { background: rgba(59,130,246,.18); color: #cfe0ff; box-shadow: inset 0 0 0 1px rgba(59,130,246,.45); }
.chip.res-wait { background: var(--surface-3); color: #c9d3e6; }
.note.res-note.res-good { background: var(--green-soft); border-color: rgba(34,197,94,.4); color: #bbf7d0; }
.note.res-note.res-bad { background: var(--red-soft); border-color: rgba(239,68,68,.45); color: #fecaca; }
.note.res-note.res-kept, .note.res-note.res-wait { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.4); color: #dbe6ff; }

/* v1.27: Store app rows: the row opens the app, the Download button saves its APK */
.store-app-row .row-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.store-app-row .chev { color: var(--faint); font-size: 24px; line-height: 1; text-decoration: none; padding: 0 2px; }
.dl-btn { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 480px) { .store-app-row .dl-btn { padding: 0 10px; min-width: 44px; } .store-app-row .dl-btn .dl-text { display: none; } }

/* ---------- v1.28: phone page reorganised (Overview · Apps · Settings · Browser · Remote · Location). Navy + cyan only. ---------- */
.ptabs { grid-template-columns: repeat(7, minmax(0, 1fr)); } /* v1.29: + Web apps */
@media (max-width: 640px) {
  .ptabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .ptabs::-webkit-scrollbar { display: none; }
  .ptabs a { flex: 0 0 auto; padding: 0 14px; font-size: 14.5px; }
}
.ph-head2 { flex-wrap: wrap; background: linear-gradient(135deg, #111c33, #0f1a30); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.ph-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; width: 100%; }
.ph-facts > div { background: #0c1528; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.ph-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; }
.ph-facts dd { margin: 0; font-size: 14px; font-weight: 700; color: #e6f6ff; }
@media (min-width: 1100px) { .ph-facts { width: auto; margin-left: auto; justify-content: flex-end; max-width: 52%; } }
/* phone page warnings use a calm cyan-navy, never the yellow tone */
#ptab .chip.warn, .phone-head .chip.warn { background: rgba(34,211,238,.13); color: #a5f3fc; }
#ptab .note.warn { background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.35); color: #cffafe; }
.ua-lead { margin: 2px 0 10px; color: var(--dim); font-size: 14px; }
/* Overview */
.glance h2 { margin: 0 0 10px; font-size: 17px; }
.glance-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.g-tile { background: #0c1528; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.g-tile span { display: block; font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.g-tile b { display: block; font-size: 15px; margin-top: 2px; overflow-wrap: anywhere; }
.g-tile.hot { border-color: rgba(34,211,238,.5); } .g-tile.hot b { color: #67e8f9; }
.g-tile.bad b { color: #fecaca; } .g-tile.muted b { color: var(--dim); font-weight: 600; }
.glance-go { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
@media (min-width: 760px) { .glance-go { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.g-go { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0; }
.g-go:hover { border-color: #22d3ee; }
.g-go svg.i { color: #67e8f9; }
.g-go > span:nth-child(2) { flex: 1; min-width: 0; } .g-go b { display: block; } .g-go small { display: block; color: var(--dim); font-size: 13px; }
.g-go .chev { color: var(--faint); font-size: 22px; }
/* Apps: one list, options open under the row */
.ua-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.ua-tools .search { flex: 1 1 260px; }
.ua-filter { flex: 1 1 360px; }
.ua-filter button { font-size: 13.5px; min-height: 40px; }
.ua-filter button b { font-weight: 750; color: #67e8f9; margin-left: 2px; }
.ua-section { margin-top: 14px; }
.ua-section .sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ua-section .sec-head h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #8fa3c7; }
.ua-section .count { background: var(--surface-3); color: #cfe0ff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }
.ua-list { margin-top: 6px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0e1729; }
.ua-item + .ua-item { border-top: 1px solid var(--border); }
.ua-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: transparent; border: 0; color: inherit; text-align: left; cursor: pointer; min-width: 0; min-height: 60px; }
.ua-row:hover { background: #13203a; }
.ua-row .grow { flex: 1; min-width: 0; display: block; }
.ua-row .title { display: block; font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua-row .meta { display: block; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua-row img.app-ico { object-fit: cover; padding: 0; }
.ua-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; max-width: 46%; }
.ua-chev { font-size: 22px; color: var(--faint); transition: transform .15s; flex: 0 0 auto; }
.ua-item.open { background: #101b31; box-shadow: inset 3px 0 0 #22d3ee; }
.ua-item.open .ua-chev { transform: rotate(90deg); color: #67e8f9; }
.chip.ua-c { height: 22px; font-size: 12px; }
.chip.ua-update { background: rgba(34,211,238,.15); color: #a5f3fc; box-shadow: inset 0 0 0 1px rgba(34,211,238,.4); }
.chip.ua-ok { background: var(--surface-3); color: #c9d3e6; }
.chip.ua-muted { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--border-2); }
.chip.ua-store { background: #172554; color: #c7d2fe; box-shadow: inset 0 0 0 1px #3b4f8f; }
.ua-panel { padding: 0 12px 14px 64px; }
.ua-panel-in { border-top: 1px dashed var(--border-2); padding-top: 12px; }
.ua-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.ua-facts > div { background: #0b1324; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.ua-facts dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.ua-facts dd { margin: 0; font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.ua-facts dd.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.ua-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 1100px) { .ua-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.ua-col { display: grid; gap: 10px; min-width: 0; }
.ua-group { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.ua-group h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #67e8f9; }
.ua-help { margin: 3px 0 6px; font-size: 12.5px; color: var(--dim); }
.ua-group .act-row { padding: 8px 0; }
.ua-group .act-row:first-of-type { border-top: 0; }
.ua-group .act-label { font-size: 14px; }
.ua-group .act-help { font-size: 12.5px; }
.ua-group .btn-row { margin: 6px 0 0; }
.ua-group.ua-danger { border-color: rgba(239,68,68,.28); }
.ua-group.ua-danger h4 { color: #fca5a5; }
.ua-results { margin-top: 10px; }
.ua-res-head { display: flex; align-items: center; justify-content: space-between; }
.ua-more { margin-top: 8px; }
.ua-phone-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 1100px) { .ua-phone-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (max-width: 640px) {
  .ua-row { flex-wrap: wrap; gap: 6px 12px; }
  .ua-row .grow { flex: 1 1 calc(100% - 90px); }
  .ua-chips { order: 4; max-width: none; width: 100%; justify-content: flex-start; padding-left: 52px; }
  .ua-chips:empty { display: none; }
  .ua-chev { order: 3; }
  .ua-panel { padding: 0 10px 12px; }
  .ua-filter button { font-size: 12.5px; padding: 3px 4px; }
}
/* Settings: restriction groups fold, each with a count */
.set-intro { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid #22d3ee; background: #0e1729; border-radius: 0 10px 10px 0; }
.set-intro span { color: var(--dim); font-size: 14px; }
details.r-group { border: 1px solid var(--border); border-radius: 12px; margin: 8px 0; background: #0e1729; }
details.r-group > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; align-items: center; }
details.r-group > summary::-webkit-details-marker { display: none; }
details.r-group > summary::after { content: "›"; grid-column: 2; grid-row: 1 / span 3; font-size: 22px; color: var(--faint); transition: transform .15s; }
details.r-group[open] > summary::after { transform: rotate(90deg); color: #67e8f9; }
.r-g-title { font-weight: 750; font-size: 16px; }
.r-g-help { font-size: 13px; color: var(--dim); grid-column: 1; }
.r-g-meta { font-size: 12.5px; color: #67e8f9; grid-column: 1; font-weight: 650; }
.r-g-body { padding: 0 14px 6px; }
.zone-title { margin: 22px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #fca5a5; }
.ua-card h2 .count { background: var(--surface-3); color: #cfe0ff; border-radius: 999px; padding: 1px 9px; font-size: 13px; margin-left: 4px; vertical-align: 2px; }
.ua-tools { margin-bottom: 6px; }
@media (max-width: 640px) {
  .ph-head2 { padding: 12px; gap: 10px 12px; }
  .ph-facts { gap: 6px; }
  .ph-facts > div { display: flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 999px; }
  .ph-facts dt { font-size: 10.5px; }
  .ph-facts dd { font-size: 13px; }
  .ua-facts > div { padding: 4px 9px; }
  .ua-facts .ua-pkg { display: none; }
}

/* v1.29 Phone → Web apps (SoftTech Web) */
.web-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.web-site { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.web-site.open { border-color: var(--border-2); }
.web-site-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; min-height: 56px; }
.web-site-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.web-site-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.web-site-head .title { font-weight: 650; overflow-wrap: anywhere; }
.web-site-head .meta { font-size: 13.5px; color: var(--dim); overflow-wrap: anywhere; }
.web-caret { color: var(--dim); flex: 0 0 auto; }
.web-ico { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto; object-fit: cover; background: #fff; }
.web-ico.big { width: 56px; height: 56px; border-radius: 14px; }
.web-ico.ph { display: grid; place-items: center; background: linear-gradient(135deg, #0e2a4a, #134e6f); color: #67e8f9; font-weight: 750; font-size: 16px; }
.web-ico.big.ph { font-size: 24px; }
.web-site-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.web-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 0 16px; }
.web-grid .setting { border-top: 0; display: block; }
.web-grid input { width: 100%; }
.web-site-body textarea { width: 100%; min-height: 64px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.web-preview { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.web-preview .grow { flex: 1; min-width: 0; }
.web-preview .meta { font-size: 13.5px; color: var(--dim); overflow-wrap: anywhere; }
.web-opt { align-items: flex-start; min-height: 0; padding: 6px 0; }
.web-opt > span, #web-tab .check > span { display: flex; flex-direction: column; }
.web-opt input { margin-top: 2px; }
.web-site-actions { margin-top: 8px; }
.web-empty { padding: 10px 0; }
#web-tab .card + .card { margin-top: 14px; }
#web-tab .err { white-space: pre-line; }
@media (max-width: 640px) {
  .web-grid { grid-template-columns: 1fr; }
  .web-site-head { padding: 10px; }
  .web-site-body { padding: 4px 10px 12px; }
  .web-preview { flex-wrap: wrap; }
  .web-preview .btn { width: 100%; }
}
#web-tab .setting .s-label, #web-tab .setting .s-help { display: block; }
#web-tab .setting > input, #web-tab .setting > textarea { margin-top: 2px; }
#web-tab .web-opt { min-height: 0; padding: 5px 0; gap: 10px; }
#web-tab .web-opt .s-help { margin: 1px 0 0; }
#web-tab .check > span .s-help { margin: 1px 0 0; }
#web-tab .check + .setting { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 12px; }
.web-grid { align-items: end; }
@media (max-width: 640px) { #web-tab .row.conn { flex-wrap: wrap; } #web-tab .row.conn .grow { min-width: calc(100% - 60px); } #web-tab .row.conn .actions { width: 100%; justify-content: flex-end; } }

/* v1.30 Web apps: allowed-links scope */
.web-warn { margin-top: 6px; color: #bfdbfe; }

/* v1.32: SoftTech Web site requests + the Sites editor inside a sheet */
.web-req { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin: 8px 0; }
.web-req .grow { min-width: 0; flex: 1 1 220px; }
.web-req .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.web-req-url { overflow-wrap: anywhere; }
.web-req-note { margin-top: 4px; font-style: italic; overflow-wrap: anywhere; }
.web-req-scope { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.web-req-scope .check { margin: 0; }
.web-sheet #web-tab > .set-intro:first-child { margin-top: 0; }
.ph-sites-link { text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent, #54dcec); text-decoration: underline; cursor: pointer; font: inherit; }

/* v1.33 Kyocera Home menu editor */
.hm-list{list-style:none;margin:8px 0;padding:0;display:flex;flex-direction:column;gap:8px}
.hm-row{border:1px solid rgba(53,210,230,.25);border-radius:10px;padding:8px;background:rgba(255,255,255,.03)}
.hm-row-main{display:grid;grid-template-columns:22px minmax(0,1.3fr) minmax(0,1fr) auto;gap:6px;align-items:center}
.hm-row-main input,.hm-more input,.hm-add input,.hm-form textarea,.hm-tri select{width:100%;min-width:0;box-sizing:border-box}
.hm-n{font-weight:700;color:#35D2E6;text-align:center}
.hm-btns{display:flex;gap:2px}.hm-btns .btn{padding:4px 8px;min-width:30px}
.hm-more{margin-top:6px}.hm-more summary{font-size:.85em;cursor:pointer;opacity:.8}.hm-more input{margin-top:4px}
.hm-add{display:flex;gap:6px;margin-top:8px}.hm-presets{margin-top:6px}
.hm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px 14px}
.hm-tri{display:flex;flex-direction:column;gap:3px;font-size:.9em}
.hm-json textarea{font-family:ui-monospace,Menlo,monospace;font-size:.85em}
.ky-rep-items{overflow-wrap:anywhere;opacity:.8}
@media (max-width:480px){.hm-row-main{grid-template-columns:22px minmax(0,1fr) auto}.hm-row-main input[name^="pkg_"]{grid-column:2/4}.hm-row-main input[name^="lbl_"]{grid-column:2/3}}
.ky-rep-list{margin:6px 0 0;padding-left:18px;max-height:220px;overflow:auto}.ky-rep-list li{margin:3px 0;overflow-wrap:anywhere}

/* ---------- v1.37: "Search apps" box on every list of a phone's apps (dash-app-search.js). Navy + cyan only. ---------- */
.app-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.app-search .search { flex: 1 1 auto; position: relative; min-width: 0; display: block; }
.app-search .search input { width: 100%; padding-left: 40px; padding-right: 46px; min-height: 46px; }
.app-search .search svg { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; color: #67e8f9; pointer-events: none; }
.app-search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.app-search input[type=search]:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.app-search-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(34,211,238,.14); color: #a5f3fc; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px; }
.app-search-x:hover, .app-search-x:focus-visible { background: rgba(34,211,238,.28); color: #ecfeff; }
.app-search-none { text-align: center; color: var(--dim); padding: 18px 8px; font-size: 15px; border-top: 1px solid var(--border); }
.app-search-none .linkish { color: #67e8f9; margin-left: 4px; }
.toolbar .app-search { margin: 0; }
.setting > .app-search, .app-pick > .app-search, .card > .app-search { margin: 6px 0 8px; }
.app-pick-fold { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface-2); padding: 0 10px; }
.app-pick-fold > summary { cursor: pointer; padding: 10px 2px; color: #a5f3fc; font-weight: 650; font-size: 14.5px; list-style-position: inside; }
.app-pick-fold[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.app-pick { padding-bottom: 8px; }
.app-pick-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--border); }
.app-pick-list > li { border-bottom: 1px solid var(--border); }
.app-pick-list > li.tiny { padding: 10px 4px; color: var(--dim); }
.app-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 4px; background: none; border: 0; text-align: left; color: var(--text); cursor: pointer; }
.app-pick-row input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #22d3ee; }
.app-pick-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-pick-name { font-weight: 650; overflow-wrap: anywhere; }
.app-pick-pkg { font-size: 12.5px; color: var(--dim); overflow-wrap: anywhere; }
.app-pick-btn { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #67e8f9; border: 1px solid rgba(34,211,238,.4); border-radius: 999px; padding: 4px 10px; }
.app-pick-row:hover .app-pick-btn, .app-pick-row:focus-visible .app-pick-btn { background: rgba(34,211,238,.16); }
.ms-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 480px) { .app-pick-list { max-height: 50vh; } .app-search { flex-basis: 100%; } }
