/* Homplex Ecosystem. Color tokens copied from the dashboard stylesheet (2026-11-25).
   This file does not import /homplex/dashboard/styles.css. */

:root, [data-theme="light"] {
  --o: #e64425;
  --o2: #ff7a45;
  --o3: #ffb347;
  --bg: #f6f2f1;
  --side: #ffffff;
  --c1: #ffffff;
  --c2: #fcf9f8;
  --line: #ecdfdb;
  --line2: #f1e8e5;
  --ink: #1a1918;
  --ink2: #2a2424;
  --mut: #3f3838;
  --mut2: #3f3838;
  --mut3: #4a4344;
  --chip: #f4ecea;
  --inp: #ffffff;
  --shadow: 0 6px 20px rgba(60, 30, 20, 0.07);
}
[data-theme="dark"] {
  --bg: #121110;
  --side: #181615;
  --c1: #221e1c;
  --c2: #1c1917;
  --line: #3a3330;
  --line2: #2a1a16;
  --ink: #f3e9e6;
  --ink2: #d9c7c2;
  --mut: #cbb8b3;
  --mut2: #cbb8b3;
  --mut3: #cbb8b3;
  --chip: #2c2725;
  --inp: #141211;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"],
html[data-theme="dark"] * { scrollbar-width: thin; scrollbar-color: #5c534f transparent; }
html[data-theme="dark"] *::-webkit-scrollbar { width: 8px; height: 8px; }
html[data-theme="dark"] *::-webkit-scrollbar-track { background: transparent; }
html[data-theme="dark"] *::-webkit-scrollbar-thumb { background: #5c534f; border-radius: 999px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans Armenian", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }

.gate { position: fixed; inset: 0; z-index: 9999; overflow: auto; display: grid; place-items: center; padding: 72px 16px 32px; background: var(--bg); }
.gate::before {
  content: ""; position: fixed; inset: -40px; z-index: -1; filter: blur(18px);
  background: radial-gradient(520px 360px at 18% 12%, rgba(230, 68, 37, 0.42), transparent 70%),
    radial-gradient(480px 340px at 86% 88%, rgba(31, 174, 107, 0.3), transparent 68%), var(--bg);
}
.login-card {
  position: relative;
  width: min(420px, 100%); display: grid; gap: 14px; padding: 56px 28px 28px; border-radius: 28px;
  background: color-mix(in srgb, var(--c1) 80%, transparent); border: 1px solid transparent;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, transparent 32%, rgba(255, 122, 69, 0.85), transparent 68%);
  background-size: 220% 220%;
  animation: hx-sheen 7s linear infinite;
  pointer-events: none;
  z-index: 4;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.login-card h1 {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 5;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--o), var(--o2));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
}
.login-card .logo {
  position: relative;
  z-index: 3;
  height: 54px;
  max-width: 78%;
  margin: 0 auto;
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 10px 28px rgba(230, 68, 37, 0.28);
}
.brand-orbit {
  --orbit: 176px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(var(--orbit) * 2);
  max-width: 100%;
  height: calc(var(--orbit) * 2);
  margin: 0 auto;
}
.orbit-ring, .orbit-dot { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.brand-orbit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 68, 37, 0.38), transparent 68%);
  animation: hx-glow 3.6s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}
.orbit-ring {
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--o) 32%, transparent);
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: hx-ring 36s linear infinite;
}
.orbit-ring.r1 { width: 78%; height: 78%; }
.orbit-ring.r2 { width: 90%; height: 90%; border-color: color-mix(in srgb, #1fae6b 38%, transparent); animation-duration: 48s; animation-direction: reverse; }
.orbit-ring.r3 { width: 100%; height: 100%; border-color: color-mix(in srgb, var(--o2) 42%, transparent); animation-duration: 28s; }
.orbit-dot { width: 0; height: 0; z-index: 2; animation: hx-orbit linear infinite; }
.orbit-dot::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  left: -4.5px;
  top: -4.5px;
  border-radius: 50%;
  background: var(--dot, var(--o));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, var(--o)) 22%, transparent), 0 0 12px var(--dot, var(--o));
  transform: translateY(calc(var(--radius) * -1));
}
.orbit-dot.d1 { --radius: calc(var(--orbit) * 0.78); --dot: var(--o); animation-duration: 11s; }
.orbit-dot.d2 { --radius: calc(var(--orbit) * 0.9); --dot: #1fae6b; animation-duration: 15s; animation-direction: reverse; }
.orbit-dot.d3 { --radius: calc(var(--orbit) * 1); --dot: var(--o2); animation-duration: 18s; animation-delay: -7s; }
.orbit-dot.d4 { --radius: calc(var(--orbit) * 0.9); --dot: #6d5efc; animation-duration: 9s; animation-direction: reverse; animation-delay: -4s; }
.brand-orbit .logo { position: relative; z-index: 3; }
@keyframes hx-orbit { to { transform: rotate(360deg); } }
@keyframes hx-ring { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes hx-glow { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes hx-sheen { to { background-position: 220% 0; } }
@media (max-width: 640px) {
  .brand-orbit { --orbit: 132px; }
  .login-card .logo { height: 44px; }
  .login-card h1 { font-size: 13px; letter-spacing: 0.1em; }
}
.login-card label { display: grid; gap: 6px; font-size: 14px; color: var(--mut); }
.login-card input { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--inp); }
.login-card button[type="submit"] { border: 0; border-radius: 999px; min-height: 46px; font-weight: 700; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--o), var(--o2)); }
.login-card button:disabled { opacity: 0.55; cursor: wait; }
.secret { position: relative; }
.secret input { padding-right: 46px; }
.eye { position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; border: 0; border-radius: 12px; background: transparent; color: var(--mut); cursor: pointer; }
.err { color: #ff7b7b; min-height: 1em; margin: 0; font-size: 12px; }
.login-card.shake { animation: shake 0.42s ease; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.shell { display: flex; align-items: stretch; height: 100vh; min-height: 100vh; }
.side {
  position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; width: 260px; flex: 0 0 260px;
  height: 100vh; padding: 18px 14px 0; background: var(--side); border-right: 1px solid var(--line); overflow: hidden;
}
.side-logo { display: block; background: #fff; border-radius: 16px; padding: 12px; text-align: center; box-shadow: 0 6px 24px rgba(230, 68, 37, 0.25); }
.side-logo img { height: 64px; max-width: 100%; display: block; margin: 0 auto; object-fit: contain; }
.side-sub { text-align: center; color: var(--mut); font-size: 12px; margin: 8px 0 12px; }
.side-hello {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin: 10px 0 12px; padding: 12px 10px; border-radius: 16px; text-align: center;
  background:
    radial-gradient(90px 40px at 50% 0%, rgba(230, 68, 37, 0.18), transparent 70%),
    var(--c1);
  border: 1px solid color-mix(in srgb, var(--o) 28%, var(--line));
}
.side-hello-when {
  margin: 0; padding: 2px 8px 2px calc(8px + 0.14em); border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--o); background: color-mix(in srgb, var(--o) 12%, var(--c1));
}
.side-hello-name {
  margin: 0; max-width: 100%; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-hello-role {
  border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700;
  background: #e5f6ee; color: #127a4b;
}
[data-theme="dark"] .side-hello-role { background: #143028; color: #8ee0b4; }
.side-nav { flex: 1; overflow: auto; margin: 0 -4px; padding: 0 4px 12px; }
.side-k { font-size: 10.5px; letter-spacing: 1.5px; color: var(--mut3); margin: 12px 8px 5px; font-weight: 700; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 2px 0; border-radius: 11px;
  color: var(--ink2); text-decoration: none; font-size: 12.5px; white-space: nowrap; transition: background 0.15s;
}
.side-nav a:hover { background: var(--chip); }
.side-nav a .ic { width: 20px; text-align: center; flex: 0 0 20px; }
.side-nav a .side-txt { overflow: hidden; text-overflow: ellipsis; }
.side-nav a.on { background: linear-gradient(90deg, var(--o), var(--o2)); color: #fff; box-shadow: 0 4px 16px rgba(230, 68, 37, 0.4); }
.side-nav a.child { padding-left: 28px; }
.side-nav a:focus-visible, .burger:focus-visible, .foot-btn:focus-visible, .tgl:focus-visible, .eye:focus-visible { outline: 2px solid var(--o2); outline-offset: 2px; }

.side-foot {
  margin: auto -14px 0; display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.foot-btn {
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2);
  cursor: pointer; display: grid; place-items: center; flex: 0 0 auto;
}
.foot-btn:hover { background: var(--chip); }
.foot-btn.on { background: linear-gradient(90deg, var(--o), var(--o2)); color: #fff; }
.foot-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tgl { width: 52px; height: 28px; border-radius: 30px; border: 0; background: var(--line); position: relative; cursor: pointer; flex: 0 0 auto; }
.tgl i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--c1); display: grid; place-items: center; font-style: normal; font-size: 12px; transition: transform 0.3s; }
[data-theme="dark"] .tgl { background: var(--o); }
[data-theme="dark"] .tgl i { transform: translateX(24px); }

.maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.topbar {
  display: none; align-items: center; gap: 12px; padding: 10px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-title { min-width: 0; }
.crumb { margin: 0; color: var(--mut2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title h1 { margin: 2px 0 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.burger { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--chip); color: var(--ink); cursor: pointer; flex: 0 0 auto; }
.burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.view { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--bg); }

@media (min-width: 901px) {
  .side { width: 290px; flex: 0 0 290px; }
  .side-logo img { height: 76px; }
  .side-sub { display: none; }
  .side-k { font-size: 12px; margin: 16px 8px 6px; }
  .side-nav a { font-size: 15px; padding: 11px 12px; gap: 12px; margin: 3px 0; }
  .side-nav a.child { padding-left: 36px; font-size: 14px; }
  .side-nav a .ic { font-size: 18px; width: 24px; flex-basis: 24px; }
}

@media (max-width: 900px) {
  .side { width: 72px; flex-basis: 72px; padding: 14px 8px 0; }
  .side .side-txt, .side .side-k, .side-sub, .side-hello { display: none; }
  .side-logo { padding: 6px; border-radius: 12px; }
  .side-logo img { height: 32px; }
  .side-nav a, .side-nav a.child { justify-content: center; gap: 0; padding: 10px 0; }
  .side-nav a .ic { font-size: 16px; }
  .side-foot { margin: auto -8px 0; flex-direction: column; padding: 10px 6px; gap: 6px; }
}

@media (max-width: 640px) {
  .topbar { display: flex; position: relative; justify-content: center; }
  .topbar .burger { position: absolute; left: 12px; top: 10px; }
  .top-title { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 52px; text-align: center; }
  .top-logo { height: 36px; width: auto; display: block; }
  .topbar .crumb { display: none; }
  .top-title h1 { margin: 10px 0 0; font-size: 13px; font-weight: 600; }
  .side {
    position: fixed; left: 0; top: 0; z-index: 80; width: min(280px, 88vw); flex-basis: auto; padding: 18px 14px 0;
    transform: translateX(-105%); transition: transform 0.2s ease;
  }
  .side.open { transform: none; box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5); }
  .side-logo { display: none; }
  .side .side-txt { display: inline; }
  .side .side-k { display: block; }
  .side-hello { display: flex; }
  .side-logo { padding: 10px; }
  .side-logo img { height: 48px; }
  .side-nav a { justify-content: flex-start; gap: 10px; padding: 8px 10px; }
  .side-nav a.child { padding-left: 28px; }
  .side-foot { margin: auto -14px 0; flex-direction: row; padding: 12px 14px; }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.55); }
  body.nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .login-card.shake, .tgl i, .side, .orbit-dot, .orbit-ring, .brand-orbit::after, .login-card::before { animation: none !important; transition: none !important; }
  .orbit-ring { transform: translate(-50%, -50%); }
  .orbit-dot.d2 { transform: rotate(140deg); }
  .orbit-dot.d3 { transform: rotate(40deg); }
  .orbit-dot.d4 { transform: rotate(220deg); }
}
.side-nav a .soon, .side-nav .soon { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, #e64425); border: 1px solid color-mix(in srgb, var(--accent, #e64425) 70%, transparent); border-radius: 999px; padding: 1px 6px; }

/* Account / staff pages shown in the hub iframe */
.acct, .logs { padding: 22px 24px 40px; }
.acct .split { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; justify-items: stretch; }
.acct .split:has(> .side > :not([hidden])) { grid-template-columns: 1fr 1fr; }
.acct .split.users { grid-template-columns: 1.45fr 0.9fr; }
.acct .split > .card, .acct .split > form, .acct .side, .acct .side > .card { min-width: 0; width: 100%; box-sizing: border-box; margin: 0; }
.acct .side { display: grid; gap: 16px; align-content: start; }
.acct .side:not(:has(> :not([hidden]))) { display: none; }
.acct h1, .logs h1 { font-size: 22px; margin: 0; letter-spacing: -0.03em; }
.acct .eyebrow, .logs .eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--o); }
.acct .lead, .logs .lead { color: var(--mut); margin: 6px 0 16px; }
.acct .card { background: var(--c1); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.acct label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mut); margin: 0; }
.acct input, .acct select { width: 100%; box-sizing: border-box; height: 40px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--inp); color: var(--ink); }
.acct .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.acct .row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.acct .hint { font-weight: 500; font-size: 11px; line-height: 1.4; color: var(--mut); }
.acct .actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 4px 0 8px; }
.acct .actions .btn { min-height: 40px; }
.acct .btn { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 700; background: linear-gradient(90deg, #e64425, #ff7a45); color: #fff; cursor: pointer; }
.acct .btn.ghost { background: var(--chip); color: var(--ink); }
.acct .btn.danger { background: #b42318; }
.acct .msg { min-height: 18px; color: var(--o); font-weight: 600; }
.acct .msg.ok { color: #1f9d55; }
.acct .table-wrap { overflow-x: auto; }
.acct table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.acct th, .acct td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.acct th { font-size: 11px; color: var(--mut); letter-spacing: .04em; text-transform: uppercase; }
.acct th:nth-child(1), .acct td:nth-child(1) { width: 22%; }
.acct th:nth-child(2), .acct td:nth-child(2) { width: 16%; }
.acct th:nth-child(3), .acct td:nth-child(3) { width: 12%; }
.acct th:nth-child(4), .acct td:nth-child(4) { width: 14%; }
.acct th:nth-child(5), .acct td:nth-child(5) { width: 22%; }
.acct th:nth-child(6), .acct td:nth-child(6) { width: 14%; }
.acct td.acts { text-align: right; overflow-wrap: normal; }
.acct td.acts .btn { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; min-height: 32px; margin: 0 0 6px; padding: 6px 8px; font-size: 12px; white-space: nowrap; }
.acct td.acts .btn:last-child { margin-bottom: 0; }
.acct .pill { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 88px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.acct .pill.on { background: #e3f6ea; color: #157347; }
.acct .pill.off { background: #fde8e6; color: #b42318; }
.acct .perms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin: 0 0 14px; }
.acct .perms label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; color: var(--ink); }
.acct .perms input { width: auto; height: auto; }
.acct .once { background: var(--chip); border: 1px dashed var(--o); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.set-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.set-nav a { border-radius: 999px; padding: 8px 14px; font-weight: 700; text-decoration: none; background: var(--chip); color: var(--ink); }
.set-nav a.on { background: linear-gradient(90deg, var(--o), var(--o2)); color: #fff; }
.acct .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acct .tools select, .acct .tools .btn { width: auto; height: 40px; margin: 0; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }

/* Light-contrast polish: muted text stays readable on white/peach */
[data-theme="light"] .err { color: #b42318; }
[data-theme="light"] ::placeholder { color: #5a5253; opacity: 1; }
[data-theme="light"] .crumb,
[data-theme="light"] .lead,
[data-theme="light"] .k,
[data-theme="light"] .side-sub,
[data-theme="light"] .side-k,
[data-theme="light"] .acct .lead,
[data-theme="light"] .acct label,
[data-theme="light"] .acct th { color: var(--mut); }
@media (max-width: 640px) {
  .side-sub,
  [data-theme="light"] .side-sub,
  [data-theme="dark"] .side-sub { color: transparent; }
}

/* Logs */
.logs-body { overflow: auto !important; background: var(--bg); color: var(--ink); }
.logs-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.logs-head .lead { margin: 4px 0 0; }
.view-tabs, .role-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.acct .role-tabs { margin: 6px 0 0; }
.acct .work-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.acct .work-picks label { position: relative; display: inline-flex; align-items: center; margin: 0; border-radius: 999px; padding: 8px 14px; background: var(--chip); color: var(--ink); font-weight: 700; cursor: pointer; }
.acct .work-picks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct .work-picks label:has(input:checked) { background: linear-gradient(90deg, var(--o), var(--o2)); color: #fff; }
.view-tabs button, .role-tabs button { border: 0; background: var(--chip); color: var(--ink); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; }
.view-tabs button.on, .role-tabs button.on { background: linear-gradient(90deg, var(--o), var(--o2)); color: #fff; }
.logs .filters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; margin: 0 0 14px; }
.logs .filters label { display: grid; gap: 4px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--mut); }
.logs .filters input, .logs .filters select { width: 100%; box-sizing: border-box; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--inp); color: var(--ink); }
.logs .filters .chk { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; font-weight: 500; color: var(--ink); }
.logs .filters .chk input { width: auto; height: auto; }
.stat-tiles { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin: 0 0 16px; }
.stat-tiles .tile { background: var(--c1); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat-tiles .k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); }
.stat-tiles .v { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.logs .panel { display: none; }
.logs .panel.on { display: block; }
#sessionsOut { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
#sessionsOut > .day, #sessionsOut > .empty { grid-column: 1 / -1; margin: 4px 0 0; }
#sessionsOut > .card { margin: 0; height: 100%; box-sizing: border-box; }
.logs .day { margin: 18px 0 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--mut); background: var(--c1); border: 1px solid var(--line); border-radius: 12px; }
.logs .month { margin: 22px 0 4px; font-size: 18px; }
.logs .card { background: var(--c1); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0 0 10px; box-shadow: var(--shadow); }
.logs .sess-h { display: flex; align-items: center; gap: 10px; }
.logs .card.sess .sess-h { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 8px; }
.logs .sess-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logs .sess-who b { overflow-wrap: anywhere; }
.logs .card.sess .sess-meta { grid-column: 1 / -1; min-width: 0; font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.logs .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--o), var(--o3)); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 34px; }
.logs .badge { display: inline-flex; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.logs .badge.owner { background: #ffe3d8; color: #9a2b14; }
.logs .badge.staff { background: #e8efff; color: #243f9a; }
[data-theme="dark"] .logs .badge.owner { background: #4a2014; color: #ffb08a; }
[data-theme="dark"] .logs .badge.staff { background: #16304a; color: #6cb6ff; }
.logs .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.logs .chips.device { margin-top: 10px; }
.logs .chips.sections { margin-top: 6px; }
.logs .chip { background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 11px; color: var(--ink2); }
.logs .pill { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; margin-left: auto; }
.logs .card.sess .pill { width: 64px; margin-left: 0; flex: 0 0 64px; }
.logs .pill.on { background: #e3f6ea; color: #0f6a41; }
.logs .pill.off { background: #fde8e6; color: #b42318; }
.logs .pill.mut { background: var(--chip); color: var(--mut); }
.logs .ev-h { display: flex; align-items: flex-start; gap: 8px; }
.logs .ev-h .grow { flex: 1; min-width: 0; }
.logs .ico { font-size: 16px; }
.logs .tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.logs .tag.login { background: #e3f6ea; color: #0f6a41; }
.logs .tag.logout { background: var(--chip); color: var(--mut); }
.logs .tag.fail { background: #fde8e6; color: #b42318; }
.logs .tag.click { background: #fff3dc; color: #8a5000; }
.logs .tag.page { background: #e8efff; color: #243f9a; }
.logs .tag.change { background: #ffe3d8; color: #9a2b14; }
.logs .desc { margin: 8px 0 0; }
.logs .when { color: var(--mut); font-variant-numeric: tabular-nums; font-size: 12px; }
.logs details { margin-top: 8px; color: var(--mut); }
.logs details pre { background: var(--c2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow: auto; color: var(--ink); font-size: 11px; }
.logs .empty { color: var(--mut); padding: 24px; text-align: center; }
.user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.mini-stats b { display: block; }
.sess-line { padding: 8px 0; border-top: 1px solid var(--line2); font-size: 12px; }
.logs .more { border: 0; background: none; color: var(--o); font-weight: 700; cursor: pointer; padding: 8px 0; }
@media (max-width: 1100px) { #sessionsOut { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .stat-tiles, .user-grid { grid-template-columns: 1fr 1fr; }
  .acct .split, .acct .split:has(> .side > :not([hidden])), .acct .split.users { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .acct .row, .acct .row.cols-3, .acct .perms, .logs .filters, #sessionsOut { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .stat-tiles, .user-grid, .mini-stats { grid-template-columns: 1fr; } }

/* Floating AI widget */
.hx-ai-btn { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 56px; height: 56px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; font-size: 22px; background: linear-gradient(135deg, var(--o), var(--o2)); box-shadow: 0 10px 24px rgba(230,68,37,.35); }
.hx-ai-btn:hover { transform: translateY(-1px); }
.hx-ai-panel { position: fixed; right: 20px; bottom: 86px; z-index: 81; width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 140px)); background: var(--c1); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(40,20,10,.18); display: flex; flex-direction: column; overflow: hidden; }
.hx-ai-panel:not(.embedded).list-open { width: min(560px, calc(100vw - 32px)); }
.hx-ai-panel[hidden] { display: none !important; }
.hx-ai-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--c2); }
.hx-ai-head b { flex: 1; }
.hx-ai-head .demo { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--o); border: 1px solid color-mix(in srgb, var(--o) 50%, transparent); border-radius: 999px; padding: 1px 6px; }
.hx-ai-head button { border: 0; background: none; color: var(--ink); cursor: pointer; font-size: 18px; }
.hx-ai-tool { font-size: 12px !important; font-weight: 700; padding: 4px 6px; border-radius: 8px; }
.hx-ai-tool:hover { background: var(--chip); }
.hx-ai-body { flex: 1; display: flex; min-height: 0; position: relative; }
.hx-ai-panel:not(.embedded) .hx-ai-list {
  width: 180px; flex: 0 0 180px; overflow: auto;
  border-right: 1px solid var(--line); background: var(--c2);
}
.hx-ai-list[hidden] { display: none !important; }
.hx-ai-chat { display: flex; align-items: center; gap: 4px; min-width: 0; }
.hx-ai-chat .hx-ai-item { flex: 1; min-width: 0; }
.hx-ai-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; padding: 10px; font-size: 12px; line-height: 1.35; }
.hx-ai-edit { flex: 0 0 28px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--mut); cursor: pointer; font-size: 14px; line-height: 1; }
.hx-ai-edit:hover { color: var(--o); background: var(--chip); }
.hx-ai-rename { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--o); border-radius: 8px; background: var(--inp); color: var(--ink); padding: 8px 10px; font: inherit; font-size: 12px; }
.hx-ai-item.on { background: var(--chip); font-weight: 700; }
.hx-ai-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.hx-ai-panel.embedded .hx-ai-list,
.hx-ai-panel.embedded .hx-ai-tool { display: none !important; }
.hx-ai-msgs { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.hx-ai-msg { max-width: 90%; padding: 8px 11px; border-radius: 14px; line-height: 1.45; font-size: 13px; }
.hx-ai-msg.bot { background: var(--chip); align-self: flex-start; }
.hx-ai-msg.me { background: linear-gradient(135deg, var(--o), var(--o2)); color: #fff; align-self: flex-end; }
.hx-ai-msg.hx-ai-think { position: relative; overflow: hidden; display: flex; gap: 5px; align-items: center; min-width: 52px; padding: 12px 14px; }
.hx-ai-msg.hx-ai-think i { width: 7px; height: 7px; border-radius: 50%; background: var(--o); display: block; animation: hx-ai-bounce 1s ease-in-out infinite; }
.hx-ai-msg.hx-ai-think i:nth-child(2) { animation-delay: .15s; }
.hx-ai-msg.hx-ai-think i:nth-child(3) { animation-delay: .3s; }
.hx-ai-msg.hx-ai-think::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%); transform: translateX(-120%); animation: hx-ai-shimmer 1.6s ease-in-out infinite; }
.hx-ai-msg.hx-ai-in { animation: hx-ai-in .35s ease; }
@keyframes hx-ai-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes hx-ai-shimmer { 0% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes hx-ai-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hx-ai-form { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.hx-ai-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; }
.hx-ai-tools { display: flex; gap: 4px; flex: none; }
.hx-ai-form .hx-ai-mini { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: var(--chip); color: var(--ink); font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.hx-ai-form .hx-ai-mini svg { width: 18px; height: 18px; display: block; }
.hx-ai-form .hx-ai-mini.on { color: #fff; background: linear-gradient(135deg, var(--o), var(--o2)); }
.hx-ai-form input[type="text"] { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--inp); color: var(--ink); }
.hx-ai-form button[type="submit"] { flex-shrink: 0; height: 40px; border: 0; border-radius: 12px; padding: 0 14px; font-weight: 700; color: #fff; background: linear-gradient(90deg, var(--o), var(--o2)); cursor: pointer; white-space: nowrap; }
.hx-ai-note { margin: 0; font-size: 12px; color: var(--o); }
.hx-ai-note[hidden] { display: none !important; }
.hx-ai-msg img { display: block; max-width: 100%; max-height: 160px; border-radius: 10px; margin-bottom: 6px; object-fit: cover; }
.hx-ai-confirm { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(26, 18, 16, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hx-ai-confirm[hidden] { display: none !important; }
.hx-ai-confirm .card { width: min(360px, calc(100vw - 32px)); background: var(--c1); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 24px 60px rgba(40, 20, 10, .28); }
.hx-ai-confirm h2 { margin: 0 0 16px; font-size: 18px; }
.hx-ai-confirm .row { display: flex; justify-content: flex-end; gap: 8px; }
.hx-ai-confirm button { border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.hx-ai-confirm .no { background: var(--chip); color: var(--ink); }
.hx-ai-confirm .yes { color: #fff; background: linear-gradient(90deg, var(--o), var(--o2)); }
#gate:not([hidden]) ~ .hx-ai-btn, #gate:not([hidden]) ~ .hx-ai-panel, .gate:not([hidden]) ~ .hx-ai-btn { display: none !important; }
