/* =========================================================
   Hostify — main website
   ========================================================= */
:root {
  --bg: #f7f8ff;
  --card: #ffffff;
  --line: #e4e7f6;
  --text: #14162d;
  --muted: #5c6180;
  --accent: #5865f2;
  --accent-dark: #4450d6;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 20px;
  --shadow: 0 8px 30px rgba(40, 50, 120, 0.07);
  --shadow-lg: 0 20px 60px rgba(60, 70, 170, 0.16);
  --grad: linear-gradient(135deg, #5865f2 0%, #8b5cf6 55%, #ec4899 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); font-weight: 600; }
::selection { background: rgba(88, 101, 242, 0.2); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 96px; }
.section.first { padding-top: 56px; }
.narrow { max-width: 820px; }

/* ---------- Background ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad); z-index: 50;
}
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55;
  animation: blob 20s ease-in-out infinite alternate;
}
.b1 { width: 520px; height: 520px; background: #a5b0ff; top: -160px; left: -120px; }
.b2 { width: 460px; height: 460px; background: #ffc2e6; top: 10%; right: -140px; animation-delay: -6s; }
.b3 { width: 560px; height: 560px; background: #b8ecff; bottom: -220px; left: 30%; animation-delay: -12s; }
@keyframes blob {
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(88, 101, 242, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 101, 242, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(228, 231, 246, 0.8);
  transition: box-shadow 0.3s;
}
.topbar.scrolled { box-shadow: 0 6px 30px rgba(40, 50, 120, 0.08); }

.brand {
  display: flex; align-items: center; gap: 12px; justify-self: start;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.brand-logo {
  display: grid; place-items: center; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 12px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.22);
  transition: transform 0.3s;
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tabs {
  position: relative; display: flex;
  background: rgba(238, 240, 252, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 5px;
}
.tab {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.94rem;
  color: var(--muted); padding: 9px 20px; border-radius: 999px;
  white-space: nowrap; transition: color 0.3s;
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; }
.tab-pill {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--pink); color: #fff;
}
.tab.active .tab-pill { background: rgba(255, 255, 255, 0.25); }
.tab-indicator {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0;
  background: var(--grad); border-radius: 999px;
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.4);
  transition: transform 0.45s cubic-bezier(.6, .05, .25, 1.1), width 0.45s cubic-bezier(.6, .05, .25, 1.1);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 700; font-size: 0.98rem;
  padding: 12px 24px; border-radius: 14px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.25s; }
.btn:hover svg { transform: translateX(3px); }
.btn.discord:hover svg { transform: none; }
.btn.big { padding: 16px 30px; font-size: 1.05rem; border-radius: 16px; }
.btn.small { padding: 9px 18px; font-size: 0.92rem; }
.btn.primary, .btn.discord {
  background: var(--grad); background-size: 160% 160%; background-position: 0% 50%;
  color: #fff; box-shadow: 0 10px 26px rgba(88, 101, 242, 0.35);
}
.btn.primary:hover, .btn.discord:hover { background-position: 100% 50%; box-shadow: 0 14px 34px rgba(139, 92, 246, 0.45); }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.light { background: #fff; color: #2a2f7a; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.btn.outline {
  width: 100%; margin-top: auto;
  background: transparent; color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, transparent);
}
.btn.outline:hover { background: var(--c); color: #fff; border-color: var(--c); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Panels ---------- */
main { flex: 1; width: 100%; padding-bottom: 96px; }
.panel { display: none; }
.panel.active { display: block; }
.panel.from-right { animation: inRight 0.55s cubic-bezier(.2, .7, .2, 1); }
.panel.from-left  { animation: inLeft 0.55s cubic-bezier(.2, .7, .2, 1); }
@keyframes inRight { from { opacity: 0; transform: translateX(70px); } to { opacity: 1; transform: none; } }
@keyframes inLeft  { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: none; } }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.reveal.shown { opacity: 1; transform: none; }

/* ---------- Section headings ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.03em; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-top: 12px; }
.page-title { font-size: clamp(2.4rem, 6vw, 3.6rem) !important; }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding-top: 64px;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.86rem; font-weight: 700; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 24px;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.2rem); line-height: 1.04;
  letter-spacing: -0.045em; font-weight: 800; margin-bottom: 22px;
}
.grad {
  background: var(--grad); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine { 50% { background-position: 100% 50%; } }
.lead { color: var(--muted); font-size: 1.16rem; max-width: 540px; margin-bottom: 32px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-weight: 600; font-size: 0.93rem; }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 7px; }

/* Discord mock window */
.hero-art { position: relative; }
.dc-window {
  position: relative; z-index: 1;
  background: #313338; color: #dbdee1;
  border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: perspective(1400px) rotateY(-8deg) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(.2, .7, .2, 1);
}
.hero-art:hover .dc-window { transform: perspective(1400px) rotateY(0) rotateX(0); }
.dc-top {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: #2b2d31; border-bottom: 1px solid #1f2023;
}
.lights { display: flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.dc-channel { font-weight: 700; color: #f2f3f5; font-size: 0.95rem; }
.dc-body { padding: 18px 16px 6px; min-height: 340px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; font-size: 0.92rem; opacity: 0; transform: translateY(10px); }
.msg b { color: #f2f3f5; font-weight: 700; }
.msg b em {
  font-style: normal; font-size: 0.62rem; font-weight: 800; vertical-align: middle;
  background: #5865f2; color: #fff; padding: 1px 5px; border-radius: 4px; margin-left: 4px;
}
.msg .staff-name { color: #57f287; }
.msg .time { font-size: 0.72rem; color: #949ba4; margin-left: 8px; }
.msg p { margin-top: 2px; }
.msg code { background: #1e1f22; padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; color: #c9cdfb; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden;
}
.avatar.user { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar.staff { background: linear-gradient(135deg, #22c55e, #0ea5e9); }
.avatar.bot { background: var(--card); }
.avatar.bot img { width: 100%; height: 100%; object-fit: cover; }
.embed {
  margin-top: 6px; padding: 12px 14px; max-width: 320px;
  background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 6px;
}
.embed strong { color: #f2f3f5; }
.embed p { font-size: 0.86rem; color: #b5bac1; }
.embed-fields { display: flex; gap: 26px; margin-top: 10px; font-size: 0.85rem; }
.embed-fields small { display: block; font-weight: 700; color: #f2f3f5; font-size: 0.74rem; }
.embed-fields .ok { font-style: normal; color: #57f287; font-weight: 700; }
.dots { display: flex; gap: 4px; padding-top: 8px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #b5bac1; animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 30% { transform: translateY(-5px); opacity: 0.5; } }
.dc-input { margin: 8px 16px 16px; padding: 11px 14px; border-radius: 9px; background: #383a40; color: #6d6f78; font-size: 0.9rem; }

/* chat animation sequence (restarted by JS) */
#chat.play .m1 { animation: msgIn 0.45s 0.3s forwards; }
#chat.play .m2 { animation: msgIn 0.35s 1.1s forwards, msgOut 0.2s 2.5s forwards; }
#chat.play .m3 { animation: msgIn 0.45s 2.6s forwards; }
#chat.play .m4 { animation: msgIn 0.45s 4.3s forwards; }
#chat .m2 { height: auto; }
@keyframes msgIn { to { opacity: 1; transform: none; } }
@keyframes msgOut { to { opacity: 0; height: 0; margin-top: -16px; overflow: hidden; } }

.float-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); color: var(--text);
  font-weight: 700; font-size: 0.86rem;
  padding: 10px 16px; border-radius: 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: bob 5s ease-in-out infinite;
}
.c1 { top: -18px; left: -22px; }
.c2 { top: 42%; right: -28px; animation-delay: -1.6s; }
.c3 { bottom: -18px; left: 12%; animation-delay: -3.2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature, .role, .step, .apply-side, .form {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature {
  position: relative; overflow: hidden; padding: 30px;
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s, border-color 0.35s, opacity 0.7s;
}
.feature::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%);
  transition: transform 0.5s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.feature:hover::after { transform: scale(1.4); }
.feature h3, .role h3, .step h3 { font-size: 1.15rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p, .role > p, .step p { color: var(--muted); font-size: 0.97rem; }
.icon {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 20px;
  border-radius: 15px; background: color-mix(in srgb, var(--c) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
  transition: transform 0.4s;
}
.feature:hover .icon { transform: rotate(-8deg) scale(1.08); }
.icon svg { width: 24px; height: 24px; fill: var(--c); }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.timeline::before {
  content: ""; position: absolute; top: 58px; left: 16%; right: 16%; height: 3px; z-index: 0;
  background: repeating-linear-gradient(90deg, #c7cbf5 0 10px, transparent 10px 18px);
}
.step { position: relative; z-index: 1; padding: 30px; text-align: center; transition: transform 0.35s, box-shadow 0.35s, opacity 0.7s; }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.num {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 18px; background: var(--grad); color: #fff;
  font-size: 1.4rem; font-weight: 800; box-shadow: 0 10px 24px rgba(88, 101, 242, 0.35);
}

/* ---------- Why ---------- */
.why {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  padding: 52px; border-radius: 28px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.why h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.18; letter-spacing: -0.03em; margin-bottom: 26px; }
.checklist { list-style: none; display: grid; gap: 16px; }
.checklist li { position: relative; padding-left: 40px; color: var(--muted); }
.checklist b { color: var(--text); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; background: rgba(22, 163, 74, 0.12); color: var(--ok); font-weight: 800; font-size: 0.85rem;
}
.why-art { position: relative; height: 300px; display: grid; place-items: center; }
.why-art::before, .why-art::after {
  content: ""; position: absolute; border-radius: 50%; border: 2px dashed #d5d9f7;
}
.why-art::before { width: 260px; height: 260px; top: calc(50% - 130px); left: calc(50% - 130px); animation: spin 40s linear infinite; }
.why-art::after { width: 170px; height: 170px; top: calc(50% - 85px); left: calc(50% - 85px); border-style: solid; border-color: #e7e9fb; }
.why-logo {
  position: relative; z-index: 1; width: 104px; height: 104px; padding: 3px; border-radius: 28px;
  background: var(--grad); box-shadow: 0 0 0 10px rgba(88, 101, 242, 0.08), var(--shadow-lg);
  animation: bob 5s ease-in-out infinite;
}
.why-logo img { width: 100%; height: 100%; display: block; border-radius: 25px; background: var(--card); object-fit: cover; }
.orbit { position: absolute; width: 260px; height: 260px; top: calc(50% - 130px); left: calc(50% - 130px); animation: spin 14s linear infinite; }
.orbit span {
  position: absolute; top: -22px; left: calc(50% - 22px);
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.2rem;
  background: var(--card); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: spin 14s linear infinite reverse;
}
.o2 { animation-delay: -4.67s; } .o2 span { animation-delay: -4.67s; }
.o3 { animation-delay: -9.33s; } .o3 span { animation-delay: -9.33s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.7s, transform 0.7s;
}
.faq details[open] { border-color: rgba(88, 101, 242, 0.4); box-shadow: var(--shadow-lg); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 60px 20px 24px; font-weight: 700; font-size: 1.04rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: #eef0fc; color: var(--accent); font-size: 1.2rem; transition: transform 0.3s, background 0.3s, color 0.3s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--accent); color: #fff; }
.faq details p { padding: 0 24px 22px; color: var(--muted); animation: fadeDown 0.35s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Banner ---------- */
.banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 56px; border-radius: 30px; color: #fff;
  background: var(--grad); box-shadow: 0 30px 70px rgba(139, 92, 246, 0.35);
}
.banner > * { position: relative; z-index: 1; }
.banner h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; }
.banner p { color: rgba(255, 255, 255, 0.88); font-size: 1.08rem; }
.banner-glow {
  position: absolute; inset: 0; z-index: 0 !important;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255, 255, 255, 0.18), transparent 40%);
  animation: blob 12s ease-in-out infinite alternate;
}

/* ---------- Staff ---------- */
.group-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hiring {
  font-size: 0.68rem; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px;
  background: rgba(22, 163, 74, 0.12); color: var(--ok);
}
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 48px; }
.roles.two { grid-template-columns: repeat(2, 1fr); }
.role {
  position: relative; overflow: hidden; padding: 28px;
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s, border-color 0.35s, opacity 0.7s;
}
.role::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c);
}
.role:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.role-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.role-icon {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 15px; background: color-mix(in srgb, var(--c) 12%, var(--card));
}
.role-tag {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
}
.role ul { list-style: none; display: grid; gap: 8px; margin: 18px 0 22px; font-size: 0.93rem; }
.role ul li { padding-left: 24px; position: relative; }
.role ul li::before { content: "→"; position: absolute; left: 0; color: var(--c); font-weight: 800; }
.lead-role { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 20px; }
.lead-role .role-top { margin: 0; flex-direction: column; align-items: flex-start; gap: 10px; }
.lead-role h3 { width: auto; }
.lead-role { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 22px; }
.lead-role .role-top { grid-row: 1 / 4; }
.closed {
  justify-self: start; margin-top: 12px; font-size: 0.78rem; font-weight: 700; color: var(--muted);
  padding: 4px 10px; border-radius: 8px; background: #f1f2f9;
}

.join-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 30px 34px; border-radius: 24px;
  background: var(--card); border: 1px dashed #c7cbf5; box-shadow: var(--shadow);
}
.join-card h3 { font-size: 1.3rem; }
.join-card p { color: var(--muted); }

/* ---------- Staff page ---------- */
.team-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 720px; margin: -8px auto 64px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
}
.team-stats div { padding: 22px 12px; text-align: center; }
.team-stats div + div { border-left: 1px solid var(--line); }
.team-stats strong {
  display: block; font-size: 2.2rem; font-weight: 800; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.team-stats span { color: var(--muted); font-weight: 600; font-size: 0.9rem; }

.org { margin-bottom: 56px; }
.person {
  position: relative; overflow: hidden; text-align: center;
  padding: 30px 22px 26px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s, border-color 0.35s, opacity 0.7s;
}
.person::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 76px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--card)), color-mix(in srgb, var(--c) 5%, var(--card)));
}
.person > * { position: relative; }
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.p-avatar {
  display: grid; place-items: center; margin: 2px auto 14px;
  width: 80px; height: 80px; border-radius: 50%;
  font-size: 2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #ec4899));
  border: 4px solid var(--card); box-shadow: 0 10px 26px color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform 0.4s;
}
.person:hover .p-avatar { transform: scale(1.07) rotate(-5deg); }
.p-mention {
  display: inline-block; margin-bottom: 8px;
  font-size: 0.8rem; font-weight: 700; padding: 3px 9px; border-radius: 6px;
  color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.person h3 { font-size: 1.35rem; letter-spacing: -0.02em; }
.person p { color: var(--muted); font-size: 0.93rem; font-weight: 600; }
.person p.also { font-size: 0.82rem; font-weight: 600; color: color-mix(in srgb, var(--c) 80%, #000); margin-top: 4px; }
.person small { display: block; color: var(--muted); margin-top: 8px; font-size: 0.9rem; }

.ceo {
  display: flex; align-items: center; gap: 28px; text-align: left;
  max-width: 620px; margin: 0 auto; padding: 32px 36px;
  border: 2px solid color-mix(in srgb, var(--c) 35%, transparent);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--c) 22%, transparent);
}
.ceo::before { height: 100%; width: 150px; inset: 0 auto 0 0; }
.ceo .p-avatar { width: 112px; height: 112px; font-size: 2.8rem; margin: 0; flex-shrink: 0; }
.ceo h3 { font-size: 1.8rem; }
.crown {
  position: absolute !important; top: 14px; right: 18px; font-size: 1.6rem;
  animation: bob 4s ease-in-out infinite;
}
.org-line {
  width: 3px; height: 42px; margin: 0 auto;
  background: linear-gradient(#d97706, #c7cbf5);
}
.exec-row {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 30px;
}
.exec-row::before {
  content: ""; position: absolute; top: 0; left: 12.5%; right: 12.5%; height: 3px;
  background: #c7cbf5; border-radius: 3px;
}
.exec-row .person::after {
  content: ""; position: absolute; top: -30px; left: calc(50% - 1.5px); width: 3px; height: 30px; background: #c7cbf5;
}
.exec-row .person { overflow: visible; }
.exec-row .person::before { border-radius: 22px 22px 0 0; }

.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
.person.wide { display: flex; align-items: center; gap: 22px; text-align: left; padding: 24px 28px; }
.person.wide::before { height: 100%; width: 110px; inset: 0 auto 0 0; }
.person.wide .p-avatar { margin: 0; flex-shrink: 0; }

.dept-head { margin-top: 72px; }
.depts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.dept {
  display: flex; flex-direction: column; text-align: left;
  font: inherit; color: var(--text); cursor: pointer;
  padding: 24px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s, border-color 0.35s, opacity 0.7s;
}
.dept:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.dept-icon {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 15px; margin-bottom: 16px; background: color-mix(in srgb, var(--c) 13%, var(--card));
  transition: transform 0.4s;
}
.dept:hover .dept-icon { transform: rotate(-8deg) scale(1.1); }
.dept h3 { font-size: 1.08rem; margin-bottom: 4px; }
.dept p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.dept-lead { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-top: 10px; }
.dept-open {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; align-self: flex-start;
  font-size: 0.82rem; font-weight: 800; padding: 6px 12px; border-radius: 999px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  transition: background 0.25s, color 0.25s;
}
.dept:hover .dept-open { background: var(--c); color: #fff; }

/* ---------- Role picker (Apply step 2) ---------- */
.dept-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  background: var(--soft); color: var(--muted); border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); border-color: #d5d9f7; }
.chip.on { background: var(--accent); color: #fff; }
.role-list {
  display: grid; gap: 18px; max-height: 360px; overflow-y: auto;
  padding: 4px 6px 4px 2px; margin-right: -6px;
}
.role-list.invalid { outline: 2px solid var(--err); outline-offset: 4px; border-radius: 12px; }
.role-group h4 {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.role-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pill { cursor: pointer; display: inline-block !important; }
.role-pill input { position: absolute; opacity: 0; pointer-events: none; }
.role-pill span {
  display: inline-block; padding: 9px 15px; border-radius: 12px;
  font-weight: 600; font-size: 0.9rem;
  background: var(--soft); border: 1.5px solid var(--line-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}
.role-pill:hover span { border-color: color-mix(in srgb, var(--c) 50%, transparent); transform: translateY(-1px); }
.role-pill input:checked + span {
  background: var(--c); border-color: var(--c); color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.role-pill input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.picked {
  font-size: 0.9rem; font-weight: 700; color: var(--accent);
  background: #eef0fc; padding: 10px 14px; border-radius: 12px;
}

/* ---------- Staff login (bottom of every page) ---------- */
.staff-login-wrap { margin-bottom: 40px; }
.staff-login {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 22px 26px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.lock {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.3rem;
  border-radius: 14px; background: var(--soft);
}
.sl-text p { color: var(--muted); font-size: 0.92rem; }
.sl-input { display: flex; gap: 10px; }
.sl-input input {
  font: inherit; font-weight: 700; letter-spacing: 0.3em; text-align: center;
  width: 170px; padding: 11px 14px; border-radius: 13px;
  background: var(--soft); border: 1.5px solid var(--line-2); color: var(--text);
}
.sl-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15); }
.sl-input input.invalid { border-color: var(--err); animation: shake 0.35s; }
.sl-msg { grid-column: 1 / -1; font-weight: 700; font-size: 0.9rem; color: var(--err); }
.sl-msg:empty { display: none; }
.staff-login.unlocked .sl-input input, .staff-login.unlocked .sl-text p { display: none; }
.staff-login.unlocked .lock { background: rgba(22, 163, 74, 0.12); }

/* ---------- Admin: applications ---------- */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.admin-head .page-title { margin: 0; }
.admin-actions { display: flex; gap: 10px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.astat {
  padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-top: 4px solid var(--c);
}
.astat strong { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--c); }
.astat span { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.admin-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-filters select, .admin-filters input {
  font: inherit; font-weight: 500; color: var(--text);
  padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line-2);
}
.admin-filters input { width: 240px; }
.admin-filters select:focus, .admin-filters input:focus { outline: none; border-color: var(--accent); }

.app-list { display: grid; gap: 14px; }
.app {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  border-left: 5px solid var(--sc); overflow: hidden;
  animation: fadeDown 0.35s ease;
}
.app-top {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  padding: 18px 22px; cursor: pointer; width: 100%;
  background: none; border: none; font: inherit; color: inherit; text-align: left;
}
.app-av {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--grad); font-size: 1.1rem;
}
.app-name b { display: block; font-size: 1.05rem; }
.app-name span { color: var(--muted); font-size: 0.88rem; }
.app-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.badge-status {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; color: var(--sc); background: color-mix(in srgb, var(--sc) 13%, transparent);
}
.app-body { display: none; padding: 0 22px 22px; border-top: 1px solid var(--line); }
.app.open .app-body { display: block; animation: fadeDown 0.3s ease; }
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.app-grid div { background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.app-grid small, .app-answer small { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.app-grid b { word-break: break-word; }
.app-answer { margin-bottom: 14px; }
.app-answer p { white-space: pre-wrap; word-break: break-word; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.app-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn.accept { background: #16a34a; color: #fff; }
.btn.deny { background: #dc2626; color: #fff; }
.btn.reset { background: var(--soft); color: var(--text); }
.btn.del { background: transparent; color: var(--err); border-color: #f3c4c4; margin-left: auto; }
.app-btns .btn { padding: 10px 18px; font-size: 0.9rem; }
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  background: var(--card); border: 1px dashed #d5d9f7; border-radius: 20px;
}
.empty b { display: block; font-size: 1.2rem; color: var(--text); margin-bottom: 4px; }

/* ---------- Top bar: user area + notifications tab ---------- */
.top-right { display: flex; align-items: center; gap: 10px; justify-self: end; }
.user-area { display: flex; align-items: center; }
.login-btn { padding: 9px 18px; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 6px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.user-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-av.letter, .as-av.letter {
  display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--grad);
}
.user-name { font-weight: 700; font-size: 0.9rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-out {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--soft); color: var(--muted); font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.user-out:hover { background: #fde8e8; color: var(--err); }
.bell { font-size: 0.95rem; }
.tab-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; background: var(--err); color: #fff;
  animation: pop 0.4s cubic-bezier(.2, .9, .3, 1.3);
}
.tab-count[hidden] { display: none; }

/* ---------- Staff: CEO + COO side by side ---------- */
.top-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; position: relative; }
.top-row .ceo { max-width: none; margin: 0; }
.top-row::after {
  content: ""; position: absolute; left: 25%; right: 25%; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, #d97706, #5865f2); border-radius: 3px; z-index: -1;
}
.exec-row { grid-template-columns: repeat(3, 1fr); }
.exec-row::before { left: 16.66%; right: 16.66%; }
/* middle step of the org chart (Board of Directors) */
.mid-row { display: grid; grid-template-columns: minmax(0, 300px); justify-content: center; }
.org-line.mid { background: linear-gradient(#dc2626, #c7cbf5); }
.split-row.single { grid-template-columns: minmax(0, 520px); justify-content: center; }

/* ---------- Apply: login gate ---------- */
.login-gate {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: 56px 32px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.login-gate[hidden], .form[hidden] { display: none; }
.gate-icon {
  width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center;
  background: #5865f2; box-shadow: 0 16px 40px rgba(88, 101, 242, 0.4);
  animation: bob 5s ease-in-out infinite;
}
.gate-icon svg { width: 44px; height: 44px; fill: #fff; }
.login-gate h3 { font-size: 1.6rem; letter-spacing: -0.02em; }
.login-gate > p { color: var(--muted); max-width: 420px; }
.gate-msg { color: var(--err) !important; font-weight: 700; }
.gate-msg:empty { display: none; }

.applying-as {
  display: flex; align-items: center; gap: 14px; margin-bottom: 4px;
  padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #eef0fe, #f8f0fb); border: 1px solid #e3e6fb;
}
.as-av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--card); }
.applying-as small { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.applying-as b { font-size: 1.05rem; margin-right: 6px; }
.applying-as span { color: var(--muted); font-size: 0.9rem; }
.done-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Notifications ---------- */
#notifBody { display: grid; gap: 14px; }
.notif {
  position: relative; display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-left: 5px solid var(--sc);
  animation: fadeDown 0.4s ease;
}
.notif.new { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 20%, transparent), var(--shadow-lg); }
.notif-icon {
  width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.6rem;
  border-radius: 16px; background: color-mix(in srgb, var(--sc) 12%, var(--card));
}
.notif-main { flex: 1; min-width: 0; }
.notif-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notif-top b { font-size: 1.15rem; color: var(--sc); }
.new-pill {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: var(--err); color: #fff;
}
.notif-date { margin-left: auto; color: var(--muted); font-size: 0.85rem; }
.notif-role { display: block; font-weight: 700; margin: 2px 0 6px; }
.notif-main > p { color: var(--muted); }
.notif-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line-2); }
.notif-note small { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.notif-note p { white-space: pre-wrap; word-break: break-word; }
.notif-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 56px 24px; border-radius: 22px; background: var(--card); border: 1px dashed #d5d9f7;
}
.notif-empty b { font-size: 1.3rem; }
.notif-empty p { color: var(--muted); max-width: 380px; margin-bottom: 8px; }
.big-icon { font-size: 2.6rem; }

/* admin: avatar image + message box */
img.app-av { object-fit: cover; }
.note-box {
  width: 100%; font: inherit; color: var(--text); resize: vertical;
  padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line-2);
}
.note-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15); }

/* ---------- User menu (click your name) ---------- */
.user-area { position: relative; }
button.user-chip { font: inherit; color: var(--text); cursor: pointer; padding-right: 12px; transition: border-color 0.2s, box-shadow 0.2s; }
button.user-chip:hover, button.user-chip[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 6px 20px rgba(88, 101, 242, 0.18); }
.chev { color: var(--muted); font-size: 0.8rem; transition: transform 0.25s; }
.user-chip[aria-expanded="true"] .chev { transform: rotate(180deg); }
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: 250px;
  padding: 8px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(40, 50, 120, 0.18);
  animation: menuIn 0.2s ease;
}
.user-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.um-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.um-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.um-av.letter { display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--grad); }
.um-head b { display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.um-head span { color: var(--muted); font-size: 0.85rem; }
.um-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: none; border-radius: 12px; background: none;
  font: inherit; font-weight: 600; font-size: 0.94rem; color: var(--text); text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.um-item:hover { background: var(--soft); color: var(--accent); }
.um-item span { width: 22px; text-align: center; }
.um-item.out { color: var(--err); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.um-item.out:hover { background: #fdecec; color: var(--err); }
.um-count {
  margin-left: auto; font-style: normal; font-size: 0.72rem; font-weight: 800;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--err); color: #fff;
}

/* ---------- Profile page ---------- */
.profile-card {
  position: relative; overflow: hidden; margin-bottom: 22px;
  border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.pc-banner {
  height: 130px; background: var(--grad); background-size: 200% 200%;
  animation: shine 8s ease-in-out infinite;
}
.pc-main { display: flex; align-items: flex-end; gap: 20px; padding: 0 30px; margin-top: -48px; flex-wrap: wrap; }
.pc-av {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block;
  border: 6px solid var(--card); box-shadow: 0 12px 30px rgba(40, 50, 120, 0.2); background: var(--card);
}
.pc-av.letter { display: grid; place-items: center; font-size: 2.8rem; font-weight: 800; color: #fff; background: var(--grad); }
.pc-names { padding-bottom: 8px; min-width: 0; }
.pc-names h2 { font-size: 1.8rem; letter-spacing: -0.02em; line-height: 1.15; word-break: break-word; }
.pc-names span { color: var(--muted); font-weight: 600; }
.pc-since {
  margin-left: auto; margin-bottom: 14px;
  font-size: 0.82rem; font-weight: 700; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; background: var(--soft);
}
.pc-since:empty { display: none; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border-top: 1px solid var(--line); }
.pc-stats div { padding: 18px; text-align: center; }
.pc-stats div + div { border-left: 1px solid var(--line); }
.pc-stats strong { display: block; font-size: 1.7rem; font-weight: 800; color: var(--c); line-height: 1.1; }
.pc-stats span { color: var(--muted); font-size: 0.88rem; font-weight: 600; }

.settings {
  display: grid; gap: 18px; padding: 30px; margin-bottom: 22px;
  border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.settings-head h3 { font-size: 1.3rem; }
.settings-head p { color: var(--muted); font-size: 0.93rem; }
.settings label { display: grid; gap: 8px; font-weight: 700; font-size: 0.92rem; }
.settings input[type=text], .settings input[type=number] {
  font: inherit; font-weight: 500; color: var(--text); width: 100%;
  background: var(--soft); border: 1.5px solid var(--line-2); border-radius: 13px; padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.settings input:focus { outline: none; background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15); }
.hint { color: var(--muted); font-weight: 500; font-size: 0.8rem; }

.toggle {
  display: flex !important; align-items: center; gap: 14px; cursor: pointer;
  padding: 16px; border-radius: 16px; background: var(--soft); border: 1.5px solid var(--line-2);
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative; flex-shrink: 0; width: 48px; height: 28px; border-radius: 999px;
  background: var(--track); transition: background 0.25s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 0.25s cubic-bezier(.2, .7, .2, 1.2);
}
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(20px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 3px; }
.toggle b { display: block; }
.toggle small { color: var(--muted); font-weight: 500; }

.settings-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.settings-foot .form-msg { margin-right: auto; text-align: left; }
.form-msg.ok { color: var(--ok); }

.danger {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 24px 28px; border-radius: 22px; background: var(--card); border: 1px solid #f4d4d4;
}
.danger p { color: var(--muted); font-size: 0.92rem; max-width: 420px; }
.danger-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.danger .btn.del { margin-left: 0; }
.danger .btn.del:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* ---------- Status ---------- */
.live-dot {
  --dot: #16a34a;
  width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex-shrink: 0;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 60%, transparent);
  animation: livePulse 2s infinite;
}
.live-dot.bad { animation-duration: 1s; }
@keyframes livePulse { 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.tab.active .live-dot { outline: 2px solid var(--card); }

.status-alert {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding: 14px 20px; border-radius: 16px; text-decoration: none;
  color: var(--text); font-weight: 600;
  background: color-mix(in srgb, var(--sc) 10%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--sc) 40%, transparent);
  animation: fadeDown 0.4s ease;
}
.status-alert[hidden] { display: none; }
.status-alert b { color: var(--sc); }
.status-alert span:last-child { margin-left: auto; color: var(--sc); font-weight: 800; }
.sa-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--sc); animation: livePulse 1s infinite; --dot: var(--sc); }

/* Hostify services / Customer services switch on the Status page */
.status-switch {
  display: inline-flex; gap: 4px; padding: 4px; margin-top: 22px; max-width: 100%;
  background: var(--soft); border: 1px solid var(--line-2); border-radius: 999px;
}
.ss-opt {
  font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  background: transparent; color: var(--muted); border: 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.ss-opt:hover { color: var(--text); }
.ss-opt.on { background: var(--card); color: var(--text); box-shadow: 0 2px 10px rgba(30, 35, 90, 0.12); }
.ss-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ss-dot { --dot: var(--faint); width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex-shrink: 0; }
@media (max-width: 420px) {
  .status-switch { display: flex; }
  .ss-opt { flex: 1; justify-content: center; padding: 9px 10px; font-size: 0.85rem; }
}

.status-hero {
  display: flex; align-items: center; gap: 22px;
  padding: 30px 32px; border-radius: 24px; margin-bottom: 28px; color: #fff;
  background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #000));
  box-shadow: 0 20px 50px color-mix(in srgb, var(--sc) 35%, transparent);
}
.sh-icon {
  width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.2); font-size: 1.8rem; font-weight: 800;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
}
.status-hero h3 { font-size: 1.6rem; letter-spacing: -0.02em; }
.status-hero p { opacity: 0.92; }
.status-hero small { opacity: 0.75; font-weight: 600; }

.status-block { margin-bottom: 28px; }
.status-block h4 {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.comp-list { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.comp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
.comp + .comp { border-top: 1px solid var(--line); }
.comp-name { font-weight: 700; }
.comp-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.9rem; color: var(--sc); }
.comp-state i { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }

.incident {
  padding: 20px 22px; margin-bottom: 12px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--sc); box-shadow: var(--shadow);
}
.incident.past { border-left-color: #cfd3ea; box-shadow: none; }
.inc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inc-top b { font-size: 1.05rem; }
.inc-state {
  font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: var(--soft); color: var(--muted);
}
.inc-updates { list-style: none; margin-top: 12px; display: grid; gap: 12px; }
.inc-updates li { position: relative; padding-left: 18px; }
.inc-updates li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.incident.past .inc-updates li::before { background: var(--track); }
.inc-when { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.inc-updates p { white-space: pre-wrap; word-break: break-word; }
.muted-note { color: var(--muted); }

/* leader controls */
.status-editor { margin-top: 48px; display: grid; gap: 20px; }
.status-editor[hidden] { display: none; }
.editor-badge {
  justify-self: center; font-size: 0.85rem; font-weight: 700; color: #92400e;
  padding: 8px 16px; border-radius: 999px; background: #fef3c7; border: 1px solid #fde68a;
}
.ed-card {
  display: grid; gap: 16px; padding: 26px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.ed-card label { display: grid; gap: 7px; font-weight: 700; font-size: 0.9rem; }
.ed-card input, .ed-card select, .ed-card textarea {
  font: inherit; font-weight: 500; color: var(--text); width: 100%;
  padding: 11px 13px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line-2);
}
.ed-card textarea { resize: vertical; }
.ed-card input:focus, .ed-card select:focus, .ed-card textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
.ed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ed-head h3 { font-size: 1.2rem; }
.ed-head p { color: var(--muted); font-size: 0.9rem; }
.quick-set { display: flex; gap: 8px; }
.ed-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.ed-foot .form-msg { margin-right: auto; text-align: left; }
.comp-editor { display: grid; gap: 10px; }
.comp-row {
  display: grid; grid-template-columns: auto 1fr 170px auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--sc) 6%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--sc) 25%, transparent);
}
.row-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); margin-left: 4px; }
.comp-row input, .comp-row select { background: var(--card) !important; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); cursor: pointer;
  background: var(--card); color: var(--muted); font-size: 0.95rem; transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: #fdecec; color: var(--err); border-color: #f3c4c4; }
.inc-top .icon-btn { margin-left: auto; }
.inc-edit { padding: 16px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.inc-edit + .inc-edit { margin-top: 12px; }
.inc-edit.done { opacity: 0.75; }
.inc-form { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; align-items: start; margin-top: 12px; }
.inc-form .form-msg { grid-column: 1 / -1; text-align: left; }
.inc-form .btn { align-self: stretch; }

/* ---------- Host Your Bot ---------- */
.host-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.host-steps > div {
  padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.host-steps span {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 8px;
  border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800;
}
.host-steps b { display: block; }
.host-steps p { color: var(--muted); font-size: 0.9rem; }

.host-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.host-form, .my-bots {
  display: grid; gap: 18px; padding: 28px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.host-form-head, .my-bots-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.host-form-head h3, .my-bots-head h3 { font-size: 1.25rem; }
.host-form label { display: grid; gap: 7px; font-weight: 700; font-size: 0.9rem; }
.host-form input:not([type=file]), .host-form select {
  font: inherit; font-weight: 500; color: var(--text); width: 100%;
  padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line-2);
}
.host-form input:focus, .host-form select:focus { outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15); }
.host-form .invalid { border-color: var(--err) !important; animation: shake 0.35s; }

.dropzone {
  position: relative; display: flex !important; flex-direction: column; align-items: center; gap: 4px;
  padding: 34px 20px; text-align: center; cursor: pointer;
  border: 2px dashed #c7cbf5; border-radius: 18px; background: var(--soft);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: #eef0fe; }
.dropzone.over { transform: scale(1.01); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-icon { font-size: 2.2rem; }
.dropzone b { font-size: 1.05rem; }
.dropzone span:last-child { color: var(--muted); font-weight: 500; }
.dropzone u { color: var(--accent); }
.dropzone.invalid { border-color: var(--err); }

.file-list { list-style: none; display: grid; gap: 6px; }
.file-list:empty { display: none; }
.file-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 11px; background: var(--soft); border: 1px solid var(--line); font-size: 0.9rem;
}
.file-list li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list li span { color: var(--muted); font-size: 0.8rem; }

.count-pill {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 800; background: #eef0fc; color: var(--accent);
}
.bots-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 10px; }
.bots-empty p { color: var(--muted); font-size: 0.92rem; }
.soon-pill {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; background: #fef3c7; color: #92400e;
}
.soon-pill[hidden] { display: none; }

/* ---------- Support tickets ---------- */
.tab[data-tab="notifications"] .tl { display: none; }
.support-layout { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
.support-layout[hidden] { display: none; }
.tk-side {
  display: grid; gap: 12px; padding: 18px; border-radius: 22px; position: sticky; top: 96px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tk-side-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.tk-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; padding-right: 2px; }
.tk-none { color: var(--muted); font-size: 0.92rem; text-align: center; padding: 18px 0; }
.tk-item {
  display: grid; gap: 3px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); padding: 12px 14px; border-radius: 14px;
  background: var(--soft); border: 1.5px solid transparent; transition: border-color 0.2s, background 0.2s;
}
.tk-item:hover { border-color: #d5d9f7; }
.tk-item.on { background: #eef0fe; border-color: var(--accent); }
.tk-item.unread { background: #fff7ed; }
.tk-item-top { display: flex; align-items: center; gap: 8px; }
.tk-item-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-sub { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item small { color: var(--muted); font-size: 0.8rem; }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--err); margin-left: auto; flex-shrink: 0; animation: livePulse 1.5s infinite; --dot: var(--err); }
.tk-status {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; flex-shrink: 0;
}
.tk-status.open { background: rgba(22, 163, 74, 0.12); color: var(--ok); }
.tk-status.closed { background: #eceef6; color: var(--muted); }
/* staff-set statuses on open tickets */
.tk-status[class*="lbl-"] { text-transform: none; letter-spacing: 0; font-size: 0.74rem; white-space: nowrap; }
.tk-status.lbl-wait { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.tk-status.lbl-work { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.tk-status.lbl-hold { background: #eceef6; color: #5b6078; }
.tk-status.lbl-alert { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.tk-status.lbl-done { background: rgba(22, 163, 74, 0.12); color: var(--ok); }
.tk-status.tk-status-pick { border: 0; cursor: pointer; font-family: inherit; padding-right: 22px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 10px center, right 6px center; background-size: 4px 4px; background-repeat: no-repeat; }
.tk-status-pick.open { background-color: rgba(22, 163, 74, 0.12); }
.tk-status-pick.lbl-wait { background-color: rgba(217, 119, 6, 0.14); }
.tk-status-pick.lbl-work { background-color: rgba(37, 99, 235, 0.12); }
.tk-status-pick.lbl-hold { background-color: #eceef6; }
.tk-status-pick.lbl-alert { background-color: rgba(220, 38, 38, 0.12); }
.tk-status-pick.lbl-done { background-color: rgba(22, 163, 74, 0.12); }
.tk-status-pick option { color: #1f2937; background: #fff; text-transform: none; font-weight: 600; }
.tk-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tk-av.letter { display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff; background: var(--grad); }
.tk-av.big { width: 46px; height: 46px; font-size: 1.1rem; }
.tk-search {
  font: inherit; width: 100%; padding: 10px 13px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line-2);
}
.tk-search:focus { outline: none; border-color: var(--accent); }

.tk-main { min-width: 0; }
.tk-new, .tk-view, .tk-empty {
  display: grid; gap: 16px; padding: 26px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tk-new[hidden], .tk-view[hidden], .tk-empty[hidden] { display: none; }
.tk-new h3 { font-size: 1.3rem; }
.tk-sub { color: var(--muted); margin-top: -10px; }
.tk-new label { display: grid; gap: 7px; font-weight: 700; font-size: 0.9rem; }
.tk-new input, .tk-new select, .tk-new textarea, .tk-reply textarea, .tk-reply input {
  font: inherit; font-weight: 500; color: var(--text); width: 100%;
  padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line-2); resize: vertical;
}
.tk-new :is(input, select, textarea):focus, .tk-reply :is(input, textarea):focus {
  outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}
.tk-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.tk-foot .form-msg { margin-right: auto; text-align: left; }
.tk-empty { place-items: center; text-align: center; padding: 60px 24px; gap: 6px; }
.tk-empty p { color: var(--muted); }

.tk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tk-head small { display: block; color: var(--muted); font-size: 0.84rem; }
.tk-title b { font-size: 1.15rem; word-break: break-word; }
.tk-head-btns { display: flex; align-items: center; gap: 10px; }
.tk-who { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.dm-state { font-weight: 700; margin-top: 2px; }
.dm-state.ok { color: var(--ok) !important; }
.dm-state.bad { color: #b45309 !important; }

.tk-thread {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 55vh; min-height: 220px; overflow-y: auto; padding: 6px 4px;
}
.tk-msg { max-width: 78%; padding: 12px 15px; border-radius: 18px; background: #f3f4fb; align-self: flex-start; border-bottom-left-radius: 6px; }
.tk-msg.mine { align-self: flex-end; background: linear-gradient(135deg, #5865f2, #7a6cf5); color: #fff; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.tk-msg.staff.theirs { background: #eef9f1; border: 1px solid #ccebd6; }
.tk-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; margin-bottom: 3px; opacity: 0.85; }
.tk-meta b { font-size: 0.85rem; }
.staff-tag { font-size: 0.62rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; background: var(--ok); color: #fff; }
.tk-msg.mine .staff-tag { background: rgba(255, 255, 255, 0.25); }
.tk-msg p { white-space: pre-wrap; word-break: break-word; }
.tk-sys { align-self: center; font-size: 0.78rem; font-weight: 700; color: var(--muted); background: #f3f4fb; padding: 4px 12px; border-radius: 999px; }

.tk-reply { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.tk-reply[hidden] { display: none; }
.tk-reply.staff { grid-template-columns: 1fr auto; }
.tk-reply.staff input { grid-column: 1 / -1; }
.tk-reply .btn { height: 48px; }
.tk-closed { color: var(--muted); font-weight: 600; text-align: center; padding: 12px; background: #f3f4fb; border-radius: 12px; }
.tk-closed[hidden] { display: none; }

.admin-switch { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.chip.big { padding: 10px 18px; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; }
.chip-count {
  font-style: normal; font-size: 0.72rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; display: inline-grid; place-items: center; background: var(--err); color: #fff;
}
.chip-count[hidden] { display: none; }
.bot-warn { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: #fef3c7; border: 1px solid #fde68a; color: #92400e; font-weight: 600; }
.bot-warn[hidden] { display: none; }
.bot-status-area { display: grid; gap: 20px; max-width: 820px; }
.bot-status-area[hidden], .bot-status-area .ed-card[hidden] { display: none; }
.bs-lock-row { display: flex; gap: 10px; flex-wrap: wrap; }
.bs-lock-row input { flex: 1 1 200px; width: auto; }

/* ---------- Website promo (home) ---------- */
.web-promo {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  padding: 52px; border-radius: 30px;
  background: linear-gradient(135deg, var(--card) 0%, #fdf2fa 100%); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.web-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 14px; }
.web-text > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 22px; }
.web-text .checklist { margin-bottom: 28px; }
.web-text .cta { margin-bottom: 0; }
.web-art { position: relative; }
.browser {
  border-radius: 16px; overflow: hidden; background: var(--card);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transform: perspective(1200px) rotateY(-8deg) rotateX(3deg); transition: transform 0.6s;
}
.web-art:hover .browser { transform: none; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f1f2f8; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 10px; flex: 1; font-size: 0.78rem; color: var(--muted); background: var(--card); border-radius: 6px; padding: 3px 10px; }
.browser-body { padding: 18px; display: grid; gap: 16px; }
.wf-nav { display: flex; gap: 10px; align-items: center; }
.wf-nav span { height: 8px; width: 40px; border-radius: 4px; background: #e6e8f5; }
.wf-nav .wf-logo { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); margin-right: auto; }
.wf-hero { display: grid; gap: 9px; padding: 22px; border-radius: 12px; background: linear-gradient(135deg, #eef0fe, #fdeef7); }
.wf-hero span { display: block; border-radius: 5px; }
.wf-h { height: 16px; width: 70%; background: #c9cdf6; }
.wf-p { height: 8px; width: 90%; background: #e1e3f6; }
.wf-p.short { width: 60%; }
.wf-btn { height: 22px; width: 90px; margin-top: 6px; background: var(--grad); border-radius: 8px !important; }
.wf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wf-cards span { height: 60px; border-radius: 10px; background: #f3f4fb; border: 1px solid var(--line); }
.w1 { top: -16px; right: -10px; }
.w2 { bottom: -16px; left: -16px; animation-delay: -2.5s; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.price-group {
  display: flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.price-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.plans + .price-group { margin-top: 56px; }
.extras {
  max-width: 680px; margin: 0 auto; border-radius: 22px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.extra { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 24px; }
.extra + .extra { border-top: 1px solid var(--line); }
.extra span { font-weight: 600; }
.extra b { font-size: 1.15rem; color: var(--accent); white-space: nowrap; }
.extra small { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 32px 28px; border-radius: 24px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s, border-color 0.35s, opacity 0.7s;
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.plan.popular { border: 2px solid var(--c); box-shadow: 0 24px 60px color-mix(in srgb, var(--c) 25%, transparent); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  padding: 5px 14px; border-radius: 999px; background: var(--grad); color: #fff;
}
.plan-icon {
  width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.6rem;
  border-radius: 16px; background: color-mix(in srgb, var(--c) 12%, var(--card));
}
.plan h3 { font-size: 1.35rem; }
.plan-desc { color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-block: 1px solid var(--line); margin: 6px 0; }
.plan-price strong { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--c); }
.plan-price span { color: var(--muted); font-weight: 600; }
.plan-price.soon strong { font-size: 1.15rem; color: var(--muted); }
.plan ul { list-style: none; display: grid; gap: 10px; margin: 6px 0 22px; flex: 1; }
.plan li { position: relative; padding-left: 28px; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; display: grid; place-items: center;
  border-radius: 6px; font-size: 0.72rem; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.plan .btn { width: 100%; }
.plans-note { text-align: center; color: var(--muted); margin-top: 32px; }

/* ---------- Apply ---------- */
.apply-layout { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.apply-side { padding: 30px; position: sticky; top: 100px; }
.apply-side h3 { font-size: 1.2rem; margin-bottom: 20px; }
.next { list-style: none; display: grid; gap: 18px; margin-bottom: 24px; }
.next li { display: flex; gap: 14px; }
.next li > span {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 11px; background: var(--grad); color: #fff; font-weight: 800;
}
.next p { color: var(--muted); font-size: 0.92rem; }
.side-note { padding: 18px; border-radius: 14px; background: var(--soft); border: 1px solid #e3e6fb; font-size: 0.93rem; }
.side-note ul { margin: 8px 0 0 18px; color: var(--muted); display: grid; gap: 4px; }

.form { padding: 34px; display: flex; flex-direction: column; gap: 22px; min-height: 480px; }
.stepper-bar { height: 8px; border-radius: 999px; background: #eceefb; overflow: hidden; }
.stepper-bar span { display: block; height: 100%; width: 33.33%; background: var(--grad); border-radius: inherit; transition: width 0.5s cubic-bezier(.2, .7, .2, 1); }
.stepper-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.82rem; font-weight: 700; color: #a3a7c2; }
.stepper-labels .on { color: var(--accent); }

.fstep { display: none; border: none; flex-direction: column; gap: 18px; }
.fstep.active { display: flex; animation: inRight 0.4s cubic-bezier(.2, .7, .2, 1); }
.fstep.back { animation-name: inLeft; }
.fstep legend { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-weight: 700; font-size: 0.92rem; }
.form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea {
  font: inherit; font-weight: 500; color: var(--text);
  background: var(--soft); border: 1.5px solid var(--line-2); border-radius: 13px;
  padding: 13px 15px; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; background: var(--card); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}
.form .invalid { border-color: var(--err) !important; animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.form label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--muted); }
.form label.check input { margin-top: 5px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }

.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pick-card { cursor: pointer; display: block !important; }
.pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.pick-in {
  display: grid; gap: 2px; padding: 18px; height: 100%;
  border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--soft);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pick-in small { color: var(--muted); font-weight: 500; }
.pick-icon { font-size: 1.5rem; margin-bottom: 4px; }
.pick-card:hover .pick-in { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.pick-card input:checked + .pick-in {
  border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--card));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 15%, transparent);
}
.pick-card input:focus-visible + .pick-in { outline: 2px solid var(--c); outline-offset: 2px; }
.pick.invalid .pick-in { border-color: var(--err); }

.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; }
.form-nav .btn { min-width: 130px; }
.form-msg { text-align: center; font-weight: 700; min-height: 1.4em; }
.form-msg.err { color: var(--err); }

.done { display: none; text-align: center; padding: 40px 10px; flex-direction: column; align-items: center; gap: 12px; }
.done.show { display: flex; animation: pop 0.5s cubic-bezier(.2, .9, .3, 1.3); }
.done p { color: var(--muted); max-width: 400px; margin-bottom: 10px; }
.done h3 { font-size: 1.6rem; }
.done-icon {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.4rem; color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 16px 40px rgba(22, 163, 74, 0.35);
}
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }
.form.sent .stepper, .form.sent .form-nav, .form.sent .fstep { display: none; }

.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 60; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0.6; } }

/* ---------- Footer ---------- */
.footer { background: var(--card); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 28px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links a {
  color: var(--muted); text-decoration: none; font-size: 0.93rem;
  padding: 8px 14px; border-radius: 10px; transition: background 0.2s, color 0.2s;
}
.footer-links a:hover { background: #eef0fc; color: var(--accent); }
.footer-bottom { padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.86rem; text-align: center; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 48px; height: 48px; border-radius: 15px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.4);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .tab { padding: 9px 14px; font-size: 0.9rem; }
  .join-btn span { display: none; }
  .join-btn { padding: 9px 11px; }
}
@media (max-width: 1000px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .web-promo { grid-template-columns: 1fr; padding: 36px; }
  .support-layout { grid-template-columns: 1fr; }
  .tk-side { position: static; }
  .tk-list { max-height: 260px; }
  .host-layout { grid-template-columns: 1fr; }
  .inc-form { grid-template-columns: 160px 1fr; }
  .inc-form .btn { grid-column: 1 / -1; }
  .exec-row { grid-template-columns: repeat(3, 1fr); }
  .depts { grid-template-columns: repeat(2, 1fr); }
  .exec-row { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .exec-row::before, .exec-row .person::after { display: none; }
  .admin-stats, .app-grid { grid-template-columns: repeat(2, 1fr); }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .apply-layout { grid-template-columns: 1fr; }
  .apply-side { position: static; }
}
@media (max-width: 880px) {
  .top-row { grid-template-columns: 1fr; }
  .top-row::after { display: none; }
  .exec-row { grid-template-columns: 1fr 1fr 1fr; }
  .split-row { grid-template-columns: 1fr; }
  .staff-login { grid-template-columns: auto 1fr; }
  .sl-input { grid-column: 1 / -1; }
  .sl-input input { flex: 1; width: auto; }
  .app-top { grid-template-columns: auto 1fr auto; }
  .app-date { display: none; }
  .hero { grid-template-columns: 1fr; gap: 64px; padding-top: 40px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta, .ticks { justify-content: center; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .dc-window { transform: none; }
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .why { grid-template-columns: 1fr; padding: 36px; text-align: center; }
  .checklist { text-align: left; }
}
@media (max-width: 600px) {
  .plans { grid-template-columns: 1fr; }
  .extra { padding: 16px 18px; }
  .web-promo { padding: 26px 20px; }
  .browser { transform: none; }
  .w1 { right: 0; } .w2 { left: 0; }
  .tk-msg { max-width: 92%; }
  .tk-new, .tk-view { padding: 18px; }
  .tk-reply .btn { height: auto; }
  .host-steps { grid-template-columns: 1fr; }
  .host-form, .my-bots { padding: 22px; }
  .status-hero { flex-direction: column; text-align: center; padding: 26px 20px; }
  .comp-row { grid-template-columns: auto 1fr auto; }
  .comp-row select { grid-column: 1 / -1; }
  .inc-form { grid-template-columns: 1fr; }
  .status-alert span:last-child { margin-left: 0; }
  .chev { display: none; }
  button.user-chip { padding-right: 4px; }
  .user-menu { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
  .pc-main { flex-direction: column; align-items: center; text-align: center; padding: 0 20px; }
  .pc-since { margin: 0 0 4px; }
  .pc-stats strong { font-size: 1.4rem; }
  .settings { padding: 22px; }
  .settings-foot .btn { width: 100%; }
  .join-btn span { display: none; }
  .join-btn { padding: 9px 11px; }
  .user-name { display: none; }
  .notif { flex-direction: column; gap: 12px; }
  .notif-date { margin-left: 0; width: 100%; }
  .login-gate { padding: 40px 20px; }
  .depts, .exec-row { grid-template-columns: 1fr !important; }
  .team-stats strong { font-size: 1.7rem; }
  .ceo, .person.wide { flex-direction: column; text-align: center; padding: 28px 20px; }
  .ceo::before, .person.wide::before { width: 100%; height: 90px; inset: 0 0 auto 0; }
  .admin-filters, .admin-filters input, .admin-filters select { width: 100%; }
  .app-grid { grid-template-columns: 1fr; }
  .btn.del { margin-left: 0; }
  .wrap { padding: 0 16px; }
  .section { padding-top: 72px; }
  .brand-name { display: none; }
  .tab-pill { display: none; }
  .features, .roles, .roles.two, .row, .pick { grid-template-columns: 1fr; }
  .float-chip { font-size: 0.78rem; padding: 8px 12px; }
  .c1 { left: -4px; } .c2 { right: -4px; }
  .dc-body { min-height: 360px; }
  .banner, .why { padding: 30px 24px; }
  .banner { text-align: center; justify-content: center; }
  .form, .apply-side { padding: 22px; }
  .form-nav .btn { min-width: 0; flex: 1; }
  .lead-role { grid-template-columns: 1fr; }
  .lead-role .role-top { grid-row: auto; flex-direction: row; justify-content: space-between; width: 100%; margin-bottom: 14px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-brand { flex-direction: column; }
  .join-card { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Added: home stats, uptime bars, order form, activity log,
   staff settings, legal pages
   ========================================================= */

/* ---- home stats ---- */
.home-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  overflow: hidden; margin: 8px 0 24px;
}
.home-stats[hidden] { display: none; }
.home-stats div { padding: 22px 12px; text-align: center; border-left: 1px solid var(--line); margin-left: -1px; }
.home-stats strong {
  display: block; font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-stats span { color: var(--muted); font-weight: 600; font-size: 0.9rem; }

/* ---- banner buttons ---- */
.banner-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn.outline-light:hover { background: rgba(255, 255, 255, 0.12); }

/* ---- uptime bars (status page) ---- */
.comp.has-bars { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; }
.comp + .comp { border-top: 1px solid var(--line); }
.uptime-bars { grid-column: 1 / -1; display: flex; gap: 2px; height: 34px; }
.uptime-bars .ub {
  flex: 1; border-radius: 3px; background: var(--bc, var(--line-2)); min-width: 2px; transition: transform 0.15s;
  border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit;
}
.uptime-bars .ub:hover, .uptime-bars .ub:focus-visible { transform: scaleY(1.12); }
.uptime-bars .ub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.uptime-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; color: var(--faint); font-size: 0.8rem; font-weight: 600; }
.uptime-foot b { color: var(--muted); }
@media (max-width: 640px) { .uptime-bars .ub:nth-child(-n+60) { display: none; } }

/* ---- V1.3 Status page: groups, descriptions, checks, day details, incident meta ---- */
.comp-group + .comp-group { margin-top: 16px; }
.comp-group-name { margin: 0 0 8px 4px; font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.comp-info { display: grid; gap: 3px; min-width: 0; }
.comp-name { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comp-desc { color: var(--muted); font-size: 0.88rem; }
.comp-check { color: var(--faint); font-size: 0.8rem; font-weight: 600; }
.comp-flag {
  font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent);
}
.uptime-day {
  grid-column: 1 / -1; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px;
  background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--bc);
}
.uptime-day[hidden] { display: none; }
.ud-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ud-state { font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.ud-close { margin-left: auto; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 0.9rem; padding: 2px 6px; }
.ud-mins, .ud-inc { margin: 0; font-size: 0.88rem; color: var(--muted); }
.inc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.inc-dur { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-right: 4px; }
.inc-chip {
  font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--sc) 12%, transparent); color: var(--text, inherit);
}
.past-month + .past-month { margin-top: 14px; }
.past-more { margin-top: 6px; }
.inc-services { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.inc-affects { margin: 8px 0; font-size: 0.9rem; }
.inc-affects summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.inc-affects .inc-services { margin-top: 8px; }
.comp-row-extra { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
@media (max-width: 640px) { .comp-row-extra { grid-column: 1 / -1; grid-template-columns: 1fr; } }

/* ---- order dialog ---- */
.order-dialog {
  width: min(720px, calc(100% - 24px)); max-height: calc(100vh - 32px); margin: auto;
  border: none; border-radius: 24px; padding: 0; background: var(--card); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.order-dialog::backdrop { background: rgba(20, 22, 45, 0.55); backdrop-filter: blur(3px); }
.order-dialog[open] { animation: inRight 0.35s cubic-bezier(.2, .7, .2, 1); }
.order-dialog form { display: grid; gap: 18px; padding: 26px; }
.od-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.od-head h3 { font-size: 1.4rem; letter-spacing: -0.02em; }
.od-head p { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.od-body { display: grid; gap: 16px; }
.od-body label { display: grid; gap: 7px; font-weight: 700; font-size: 0.9rem; }
.od-body input[type=text], .od-body select, .od-body textarea {
  font: inherit; font-weight: 500; color: var(--text); width: 100%;
  padding: 11px 13px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line-2);
}
.od-body textarea { resize: vertical; }
.od-body input:focus, .od-body select:focus, .od-body textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
.od-body .invalid { border-color: var(--err) !important; }
.od-features { border: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.od-features legend { font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.od-features label, .od-check {
  display: flex !important; align-items: center; gap: 9px; font-weight: 600 !important; cursor: pointer;
  padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--soft);
}
.od-features label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.od-features input, .od-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.od-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.od-foot .form-msg { margin-right: auto; }
.od-foot [hidden] { display: none; }
.od-legal { color: var(--faint); font-size: 0.8rem; text-align: right; }
.row.three { grid-template-columns: repeat(3, 1fr); }

/* ---- staff area: who's logged in, activity, settings ---- */
.who-am-i { margin-left: 6px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.activity-area[hidden], .settings-area[hidden] { display: none; }
.activity-list { display: grid; gap: 8px; }
.act-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
}
.act-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); }
.act-main b { font-weight: 700; }
.act-main p { color: var(--muted); font-size: 0.88rem; word-break: break-word; }
.act-when { color: var(--faint); font-size: 0.8rem; font-weight: 600; text-align: right; white-space: nowrap; }
.act-via { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.settings-area { display: grid; gap: 20px; max-width: 820px; }
.staff-list { display: grid; gap: 8px; }
.staff-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--soft); border: 1px solid var(--line);
}
.staff-row div { flex: 1; min-width: 0; }
.staff-row small { display: block; color: var(--muted); font-size: 0.8rem; }
.staff-tag { padding: 2px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 0.75rem; font-weight: 700; }
.staff-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.staff-add[hidden], .hint-note[hidden] { display: none; }
.hint-note { color: var(--muted); font-size: 0.85rem; }
.empty-note { color: var(--muted); padding: 18px; text-align: center; border: 1.5px dashed var(--line); border-radius: 14px; }

/* staff login: Discord button */
.sl-input { flex-wrap: wrap; justify-content: flex-end; }
.staff-login.unlocked #staffDiscordBtn { display: none; }

/* ---- legal pages ---- */
.legal {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px); display: grid; gap: 12px;
}
.legal h3 { font-size: 1.15rem; margin-top: 12px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 22px; display: grid; gap: 6px; }
.legal a { color: var(--accent); font-weight: 600; }
.legal code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }
.footer-bottom { display: flex; justify-content: center; gap: 8px 18px; flex-wrap: wrap; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .row.three { grid-template-columns: 1fr; }
  .staff-add { grid-template-columns: 1fr; }
  .act-item { grid-template-columns: auto 1fr; }
  .act-when { grid-column: 2; text-align: left; }
  .order-dialog form { padding: 18px; }
}

/* =========================================================
   Profile page (redesign)
   ========================================================= */
.profile-wrap { max-width: 1040px; }
.pc-banner { height: 150px; position: relative; }
.pc-main { align-items: flex-end; }
.pc-names { flex: 1; }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pc-badge {
  font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--soft); color: var(--muted); border: 1px solid var(--line);
}
.pc-badge.ok { background: #ecfdf3; color: #15803d; border-color: #bbf7d0; }
.pc-badge.staff { background: #eef0ff; color: var(--accent-dark); border-color: #d6dafe; }
.pc-badge.lead { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.pc-actions { margin-bottom: 12px; margin-left: auto; }
.pc-stats { grid-template-columns: repeat(4, 1fr); }

.profile-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; scroll-margin-top: 110px; }
.profile-nav {
  position: sticky; top: 110px; display: grid; gap: 4px; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.pn-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--muted);
  padding: 11px 14px; border-radius: 14px; border: none; background: transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pn-item:hover { background: var(--soft); color: var(--text); }
.pn-item.on { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3); }
.profile-panes { min-width: 0; }
.ppane { display: grid; gap: 18px; }
.ppane[hidden] { display: none; }
.ppane.settings { margin-bottom: 0; }

.p-card {
  display: grid; gap: 14px; padding: 24px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.p-card[hidden] { display: none; }
.p-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.p-card-head h3 { font-size: 1.1rem; }
.link-btn { font: inherit; font-weight: 700; font-size: 0.88rem; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* profile completeness */
.complete-card { grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.cc-ring {
  --pct: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line-2) 0);
}
.cc-ring span {
  width: 50px; height: 50px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  font-weight: 800; font-size: 0.85rem;
}
.cc-text p { color: var(--muted); font-size: 0.9rem; }

/* quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.qa {
  display: grid; gap: 2px; justify-items: start; text-align: left; font: inherit; cursor: pointer;
  padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.qa:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.qa span { font-size: 1.4rem; margin-bottom: 4px; }
.qa b { font-size: 0.98rem; color: var(--text); }
.qa small { color: var(--muted); font-size: 0.82rem; }

/* recent lists */
.mini-list { display: grid; gap: 8px; }
.mini-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; cursor: pointer;
  padding: 11px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.mini-item:hover { border-color: var(--accent); background: var(--card); }
.mini-item.unread { border-color: #c7cbfb; }
.mi-icon { font-size: 1.15rem; }
.mi-main { flex: 1; min-width: 0; display: grid; }
.mi-main b { font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-main small { color: var(--muted); font-size: 0.8rem; }
.mi-pill {
  font-size: 0.76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card));
}
.mini-empty { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); padding: 14px; border: 1.5px dashed var(--line); border-radius: 14px; }

/* settings form */
.row.top { align-items: start; }
.settings label > .hint { margin-top: -2px; }
.input-with-btn { display: flex; gap: 8px; }
.input-with-btn input { flex: 1; min-width: 0; }
.settings.dirty { border-color: #c7cbfb; }
.settings select, .settings input[type=search] { font: inherit; }

/* notifications */
.test-dm {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px; border-radius: 16px; background: var(--soft); border: 1px dashed #c7cbfb;
}
.test-dm p { color: var(--muted); font-size: 0.88rem; max-width: 440px; }
.test-dm a { color: var(--accent); font-weight: 700; }

/* privacy & data */
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.data-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.data-row p { color: var(--muted); font-size: 0.88rem; max-width: 460px; }
.p-card .hint-note a { color: var(--accent); font-weight: 700; }
.danger-card { border-color: #f4d4d4; }
.danger-card h3 { color: var(--err); }
.del-confirm { display: grid; gap: 7px; font-weight: 700; font-size: 0.9rem; }
.del-confirm input {
  font: inherit; font-weight: 600; letter-spacing: 0.08em; max-width: 260px;
  padding: 11px 13px; border-radius: 12px; background: #fff7f7; border: 1.5px solid #f4d4d4;
}
.del-confirm input:focus { outline: none; border-color: var(--err); }
.btn.del { background: var(--card); color: var(--err); border-color: #f4d4d4; }
.btn.del:not(:disabled):hover { background: var(--err); color: #fff; border-color: var(--err); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@media (max-width: 860px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .pn-item { width: auto; white-space: nowrap; }
  .pc-stats { grid-template-columns: repeat(2, 1fr); }
  .pc-stats div:nth-child(3) { border-left: none; }
  .pc-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .quick-actions { grid-template-columns: 1fr; }
  .complete-card { grid-template-columns: auto 1fr; }
  .complete-card .btn { grid-column: 1 / -1; }
  .pc-actions { margin-left: 0; }
}

/* ---- clickable team cards + details popup ---- */
[data-person] { cursor: pointer; }
[data-person]:focus-visible { outline: 3px solid var(--c, var(--accent)); outline-offset: 4px; }
/* "View details" hint on each card */
.person[data-person] { padding-bottom: 46px; }
.person.wide[data-person] { padding-bottom: 24px; padding-right: 130px; }
.person[data-person] .more-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 0.78rem; font-weight: 800; white-space: nowrap; color: color-mix(in srgb, var(--c) 85%, #000);
  padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, var(--card));
  opacity: 0.75; transition: opacity 0.2s, transform 0.2s, background 0.2s;
}
.person.wide[data-person] .more-hint { left: auto; right: 22px; bottom: 50%; transform: translateY(50%); }
.person[data-person]:hover .more-hint, .person[data-person]:focus-visible .more-hint {
  opacity: 1; background: color-mix(in srgb, var(--c) 18%, var(--card));
}

.person-dialog {
  --c: #5865f2;
  width: min(600px, calc(100% - 24px)); max-height: calc(100vh - 32px); margin: auto; padding: 0;
  border: none; border-radius: 28px; background: var(--card); color: var(--text);
  box-shadow: 0 30px 80px rgba(20, 22, 60, 0.35); overflow: hidden;
}
.person-dialog[open] { display: flex; flex-direction: column; animation: pdIn 0.35s cubic-bezier(.2, .8, .2, 1); }
@keyframes pdIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.person-dialog::backdrop { background: rgba(20, 22, 45, 0.6); backdrop-filter: blur(4px); }
.pd-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }

/* banner */
.pd-banner {
  position: relative; height: 120px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 120%, rgba(255, 255, 255, 0.35), transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.18) 1.2px, transparent 1.4px) 0 0 / 16px 16px,
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, #8b5cf6));
}
.pd-banner-icon {
  position: absolute; right: 64px; top: -14px; font-size: 7rem; opacity: 0.22;
  transform: rotate(-12deg); filter: saturate(0.6); pointer-events: none;
}
.pd-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 12px;
  border: none; cursor: pointer; font-size: 0.95rem; color: #fff;
  background: rgba(255, 255, 255, 0.22); backdrop-filter: blur(6px); transition: background 0.2s;
}
.pd-close:hover { background: rgba(255, 255, 255, 0.38); }

/* header */
.pd-body { position: relative; z-index: 1; display: grid; gap: 22px; padding: 0 28px 24px; }
.pd-head { display: grid; justify-items: center; text-align: center; margin-top: -56px; }
.pd-avatar-wrap { position: relative; margin-bottom: 12px; }
.pd-avatar {
  width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.7rem; font-weight: 800; color: #fff; border: 6px solid var(--card);
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #14162d));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 40%, transparent);
}
.pd-badge {
  position: absolute; right: -2px; bottom: 4px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.05rem; background: var(--card);
  box-shadow: 0 4px 12px rgba(20, 22, 60, 0.18);
}
.pd-head .p-mention { margin-bottom: 6px; }
.pd-head h3 { font-size: 1.85rem; letter-spacing: -0.03em; line-height: 1.15; }
.pd-titles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.pd-tag {
  font-size: 0.82rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  color: #fff; background: var(--c);
}
.pd-tag.soft { color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.pd-about {
  text-align: center; color: var(--text-2); line-height: 1.7; font-size: 0.98rem;
  max-width: 470px; justify-self: center;
}

/* sections */
.pd-section { display: grid; gap: 12px; }
.pd-section h4 {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
.pd-section h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pd-does { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-does li {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px;
  font-weight: 600; font-size: 0.9rem; line-height: 1.45;
  background: color-mix(in srgb, var(--c) 6%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 14%, transparent);
}
.pd-does i {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 0.72rem; font-weight: 800; color: #fff; background: var(--c);
}

/* ladder */
.pd-ladder {
  display: grid; justify-items: center; gap: 6px; padding: 16px; border-radius: 18px;
  background: var(--soft); border: 1px solid var(--line);
}
.pl-step { display: grid; justify-items: center; gap: 6px; }
.pl-step small { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.pl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pl-arrow { width: 2px; height: 16px; background: #c7cbf5; position: relative; }
.pl-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: -3px; width: 7px; height: 7px; transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid #c7cbf5; border-bottom: 2px solid #c7cbf5;
}
.pd-chip {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 0.85rem; font-weight: 700;
  padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text);
}
.pd-chip:not(:has(i)) { padding-left: 12px; }
.pd-chip i {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 0.75rem; font-weight: 800; color: #fff; background: var(--cc, var(--c));
}
.pd-chip.link { cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.pd-chip.link:hover { border-color: var(--cc); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(40, 50, 120, 0.12); }
.pd-chip.me {
  color: #fff; border: none; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #8b5cf6));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 35%, transparent);
}
.pd-chip.me i { background: rgba(255, 255, 255, 0.25); }
.pd-chip.top { background: #fef3c7; border-color: #fde68a; color: #92400e; }

/* departments */
.pd-depts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pd-dept {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 12px; text-align: left;
  font: inherit; cursor: pointer; padding: 12px 14px; border-radius: 16px; background: var(--card);
  border: 1.5px solid color-mix(in srgb, var(--dc) 25%, var(--line)); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pd-dept:hover { transform: translateY(-2px); border-color: var(--dc); box-shadow: 0 8px 20px rgba(40, 50, 120, 0.1); }
.pd-dept span {
  grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.2rem; background: color-mix(in srgb, var(--dc) 12%, var(--card));
}
.pd-dept b { font-size: 0.92rem; color: var(--text); }
.pd-dept small { font-size: 0.78rem; font-weight: 700; color: var(--dc); }

/* footer */
.pd-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.96);
}
.pd-nav { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.pd-arrow {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--text); transition: border-color 0.2s, color 0.2s;
}
.pd-arrow:hover { border-color: var(--c); color: var(--c); }
.pd-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .pd-body { padding: 0 18px 20px; }
  .pd-does { grid-template-columns: 1fr; }
  .pd-banner-icon { right: 40px; font-size: 5.5rem; }
  .pd-foot { justify-content: center; }
  .pd-actions { width: 100%; }
  .pd-actions .btn { flex: 1; }
  .person.wide[data-person] { padding-right: 28px; padding-bottom: 50px; }
  .person.wide[data-person] .more-hint { right: auto; left: 50%; bottom: 14px; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .person-dialog[open] { animation: none; }
}

/* =========================================================
   Staff Roles page (redesign)
   ========================================================= */
.team-stats { margin-bottom: 22px; }

/* quick-jump buttons */
.jump-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 60px; }
.jump-nav a {
  font-size: 0.9rem; font-weight: 700; color: var(--text); text-decoration: none;
  padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.jump-nav a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
#leadership, #departments, #why-join, #hiring { scroll-margin-top: 100px; }

/* role search */
.role-search {
  display: flex; align-items: center; gap: 10px; max-width: 560px; margin: -18px auto 26px;
  padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.role-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.12); }
.role-search input { flex: 1; min-width: 0; font: inherit; font-weight: 500; border: none; outline: none; background: transparent; padding: 8px 0; }
.role-search small { color: var(--muted); font-weight: 700; padding-right: 8px; white-space: nowrap; }

/* department cards */
.depts { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); align-items: start; }
.dept { cursor: default; position: relative; overflow: hidden; }
.dept[hidden] { display: none; }
.dept::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c);
}
.dept:hover { transform: translateY(-4px); }
.dept p { flex: none; margin-bottom: 4px; }
.dept-top { display: flex; justify-content: space-between; align-items: flex-start; }
.dept-count {
  font-size: 0.76rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 12%, var(--card));
}
button.dept-lead {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font: inherit; font-size: 0.8rem; font-weight: 600;
  color: var(--muted); cursor: pointer; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--soft); border: 1px solid var(--line); transition: border-color 0.2s;
}
button.dept-lead:hover { border-color: var(--lc); }
button.dept-lead i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 0.7rem; font-weight: 800; color: #fff; background: var(--lc);
}
button.dept-lead b { color: var(--text); }
.dept-roles { display: grid; gap: 6px; margin-top: 14px; }
.dept-role {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
  font: inherit; font-size: 0.87rem; font-weight: 600; color: var(--text); cursor: pointer;
  padding: 8px 12px; border-radius: 11px; background: color-mix(in srgb, var(--c) 5%, var(--card));
  border: 1px solid color-mix(in srgb, var(--c) 14%, transparent);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.dept-role[hidden] { display: none; }
.dept-role i { font-style: normal; font-weight: 800; color: var(--c); opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s; }
.dept-role:hover { background: var(--c); border-color: var(--c); color: #fff; }
.dept-role:hover i { opacity: 1; transform: none; color: #fff; }
/* only the first 3 roles until "more" is pressed (all matches show while searching) */
.dept:not(.open):not(.searching) .dept-role:nth-child(n+4) { display: none; }
.dept-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.dept-toggle, .dept-all {
  font: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; border: none; background: none; padding: 4px 0;
}
.dept-toggle { color: var(--muted); }
.dept-toggle:hover { color: var(--text); }
.dept-toggle[hidden] { display: none; }
.dept.searching .dept-toggle { visibility: hidden; }
.dept-all { margin-left: auto; color: var(--c); }
.dept-all:hover { text-decoration: underline; }

/* why join */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.perk {
  padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.perk:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.perk span {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.4rem; border-radius: 14px;
  margin-bottom: 14px; background: color-mix(in srgb, var(--c) 13%, var(--card));
}
.perk h3 { font-size: 1.05rem; margin-bottom: 4px; }
.perk p { color: var(--muted); font-size: 0.9rem; }

/* how hiring works */
.hire-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; margin-bottom: 64px; }
.hire-steps::before {
  content: ""; position: absolute; top: 26px; left: 12.5%; right: 12.5%; height: 3px;
  background: linear-gradient(90deg, #5865f2, #8b5cf6, #ec4899); border-radius: 3px; opacity: 0.35;
}
.hire-steps li { position: relative; text-align: center; padding: 0 6px; }
.hs-num {
  width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%;
  font-size: 1.2rem; font-weight: 800; color: #fff; background: var(--grad); border: 5px solid var(--bg);
  box-shadow: 0 10px 24px rgba(88, 101, 242, 0.3);
}
.hire-steps b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.hire-steps p { color: var(--muted); font-size: 0.9rem; }

/* join banner */
.join-banner { margin-bottom: 20px; }
.join-banner p b { font-size: 1.1em; }

@media (max-width: 980px) {
  .perks { grid-template-columns: repeat(2, 1fr); }
  .hire-steps { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .hire-steps::before { display: none; }
}
@media (max-width: 560px) {
  .perks, .hire-steps { grid-template-columns: 1fr; }
  .role-search { margin-top: -24px; }
  .jump-nav { margin-bottom: 44px; }
}

/* =========================================================
   THEME — light (default) + dark mode
   Colours used by cards, panels and borders all come from
   these variables, so dark mode only has to change them here.
   ========================================================= */
:root {
  --card: #ffffff;
  --soft: #f8f9ff;
  --line-2: #dfe2f4;
  --track: #cfd3ea;
  --text-2: #3b3f5c;
  --faint: #6b7090; /* was #9a9eb8 — too light to read (2.5:1), now 4.5:1 */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1020;
  --card: #171a2c;
  --soft: #1e2237;
  --line: #2a2f4a;
  --line-2: #353b5c;
  --track: #3a4060;
  --text: #e9ebf8;
  --text-2: #c8cbe4;
  --muted: #a1a6c6;
  --faint: #7c81a4;
  --accent: #7b86ff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .blob { opacity: 0.16; }
:root[data-theme="dark"] .grid-lines {
  background-image:
    linear-gradient(rgba(123, 134, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 134, 255, 0.07) 1px, transparent 1px);
}
:root[data-theme="dark"] .topbar { background: rgba(14, 16, 32, 0.78); border-bottom-color: var(--line); }
:root[data-theme="dark"] .tabs { background: rgba(30, 34, 55, 0.9); }
:root[data-theme="dark"] .pd-foot { background: rgba(23, 26, 44, 0.96); }
:root[data-theme="dark"] .btn.light { color: #2a2f7a; }
:root[data-theme="dark"] img[src^="logo.png"] { background: #fff; border-radius: 10px; }
:root[data-theme="dark"] .bot-warn,
:root[data-theme="dark"] .editor-badge,
:root[data-theme="dark"] .pc-badge.lead,
:root[data-theme="dark"] .staff-tag,
:root[data-theme="dark"] .pd-chip.top { background: #3a2f12; border-color: #5c4a1a; color: #fcd34d; }
:root[data-theme="dark"] .pc-badge.ok { background: #10291c; border-color: #1d4d33; color: #6ee7a8; }
:root[data-theme="dark"] .danger-card, :root[data-theme="dark"] .danger { border-color: #4a2330; }
:root[data-theme="dark"] .del-confirm input { background: #241722; border-color: #4a2330; color: var(--text); }
:root[data-theme="dark"] .btn.del { background: transparent; border-color: #5a2a36; }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { color: var(--text); }
:root[data-theme="dark"] ::placeholder { color: var(--faint); }
:root[data-theme="dark"] .legal p, :root[data-theme="dark"] .legal li { color: var(--text-2); }
:root[data-theme="dark"] .hs-num { border-color: var(--bg); }

/* theme button in the top bar */
.theme-btn {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; cursor: pointer; font-size: 1.05rem;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.theme-btn:hover { transform: rotate(-12deg); border-color: var(--accent); }

/* =========================================================
   Home: latest announcement strip + reviews
   ========================================================= */
.news-strip {
  --nc: #5865f2;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px;
  padding: 12px 18px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--nc) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--nc) 25%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.news-strip[hidden] { display: none; }
.news-strip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.news-strip b { flex: 1; min-width: 180px; }
.ns-tag {
  font-size: 0.76rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  color: #fff; background: var(--nc);
}
.ns-more { font-weight: 800; font-size: 0.88rem; color: var(--nc); }

.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.review {
  display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 24px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.rv-stars { color: #f59e0b; letter-spacing: 2px; font-size: 1.05rem; }
.review blockquote { flex: 1; margin: 0; color: var(--text-2); line-height: 1.65; }
.review blockquote::before { content: "“"; font-size: 1.6rem; line-height: 0; vertical-align: -0.35em; margin-right: 2px; color: var(--accent); font-weight: 800; }
.review figcaption { display: flex; align-items: center; gap: 12px; }
.review figcaption small { display: block; color: var(--muted); font-size: 0.82rem; }
.rv-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); }

/* =========================================================
   News page + Help Centre
   ========================================================= */
.news-filter { justify-content: center; margin-bottom: 22px; }
.news-list { display: grid; gap: 16px; }
.news-item {
  --nc: #5865f2; position: relative; padding: 24px 26px 22px 30px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.news-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--nc); }
.ni-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ni-top time { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.news-item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.ni-body { color: var(--text-2); white-space: pre-line; line-height: 1.65; }
.news-item small { display: block; margin-top: 10px; color: var(--muted); font-weight: 600; }

.help-search { margin: -18px auto 18px; }
.help-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 26px; }
.help-list { display: grid; gap: 26px; }
.help-group h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 10px; }
.help-item {
  border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.help-item[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: var(--shadow); }
.help-item summary {
  list-style: none; cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 700; position: relative;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 600; color: var(--accent); transition: transform 0.2s;
}
.help-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.help-answer { display: grid; gap: 8px; padding: 0 18px 16px; color: var(--text-2); line-height: 1.65; }
.help-more {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 34px;
  padding: 22px 26px; border-radius: 20px; background: var(--card); border: 1px dashed var(--line-2);
}
.help-more p { color: var(--muted); }
.help-promo {
  display: flex; align-items: center; gap: 14px; margin: -18px auto 26px; max-width: 760px;
  padding: 14px 18px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.2s, border-color 0.2s;
}
.help-promo:hover { transform: translateY(-2px); border-color: var(--accent); }
.help-promo > span { font-size: 1.6rem; }
.help-promo div { flex: 1; display: grid; }
.help-promo small { color: var(--muted); }
.help-promo em { font-style: normal; font-weight: 800; color: var(--accent); white-space: nowrap; }

/* =========================================================
   Tickets: rating, claim, referral info
   ========================================================= */
.tk-rate {
  display: grid; gap: 10px; justify-items: center; text-align: center; margin: 10px 0;
  padding: 18px; border-radius: 16px; background: var(--soft); border: 1px dashed var(--line-2);
}
.tk-rate[hidden], .tk-rated[hidden] { display: none; }
.tk-rate textarea {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; resize: vertical;
  background: var(--card); border: 1.5px solid var(--line-2);
}
.stars { display: flex; gap: 4px; }
.stars button {
  font-size: 2rem; line-height: 1; padding: 2px 4px; cursor: pointer; background: none; border: none;
  color: var(--track); transition: transform 0.15s, color 0.15s;
}
.stars button:hover { transform: scale(1.15); }
.stars button.on, .stars button.hover { color: #f59e0b; }
.tk-rated { text-align: center; color: #f59e0b; font-weight: 800; letter-spacing: 1px; margin: 10px 0; }
.tk-claim {
  justify-self: start; font-size: 0.74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  color: var(--muted); background: var(--soft); border: 1px solid var(--line);
}
.tk-claim.mine { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tk-ref { display: block; color: var(--muted); }
.tk-head-btns { flex-wrap: wrap; }

/* =========================================================
   Host Your Bot: customer bot cards
   ========================================================= */
.bot-card {
  display: grid; gap: 6px; padding: 14px 16px; margin-bottom: 10px; border-radius: 16px;
  background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--c);
}
.bc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bot-card small { color: var(--muted); }
.bc-note { font-size: 0.9rem; color: var(--text-2); }
.bc-btns { display: flex; gap: 14px; justify-content: flex-end; }
.link-btn.danger { color: var(--err); }
.mini-item.static { cursor: default; }
.mini-item.static:hover { border-color: var(--line); background: var(--soft); }

/* =========================================================
   Staff area: hosting, billing, content
   ========================================================= */
.admin-pane { display: grid; gap: 18px; }
.admin-pane[hidden] { display: none; }
.host-admin-list, .inv-list { display: grid; gap: 14px; }
.host-bot { border-left: 5px solid var(--c); }
.hb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hb-head h3 { font-size: 1.15rem; }
.hb-head small { color: var(--muted); }
.hb-files { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-file {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 0.85rem; cursor: pointer;
  padding: 7px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: var(--text);
}
.hb-file:hover { border-color: var(--accent); }
.hb-file small { color: var(--muted); }
.hb-file i { font-style: normal; color: var(--accent); font-weight: 800; }
.hb-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hb-token:empty { display: none; }
.hb-token { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hb-token code { padding: 8px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); word-break: break-all; font-size: 0.82rem; }
.hb-token small { color: var(--muted); width: 100%; }
.hb-update { display: grid; grid-template-columns: 200px 1fr auto auto; gap: 8px; align-items: center; }
.hb-update select, .hb-update input {
  font: inherit; padding: 9px 11px; border-radius: 11px; background: var(--card); border: 1.5px solid var(--line-2); color: var(--text);
}
.inv-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px;
  background: var(--soft); border: 1px solid var(--line);
}
.inv-amt { font-size: 1rem; white-space: nowrap; }
.inv-btns { display: flex; gap: 6px; margin-left: auto; }
.inv-total { font-weight: 700; color: var(--muted); }
.btn.accept { background: #16a34a; color: #fff; }
.rating-summary { display: grid; grid-template-columns: auto 1fr 1fr; gap: 22px; align-items: center; }
.rs-big { display: grid; justify-items: center; }
.rs-big strong { font-size: 2.4rem; line-height: 1; }
.rs-big span { color: #f59e0b; letter-spacing: 1px; }
.rs-big small { color: var(--muted); }
.rs-bars { display: grid; gap: 4px; }
.rs-bars div { display: grid; grid-template-columns: 28px 1fr 24px; gap: 8px; align-items: center; font-size: 0.82rem; font-weight: 700; }
.rs-bars i { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.rs-bars b { display: block; height: 100%; background: #f59e0b; border-radius: 99px; }
.rs-staff { display: grid; gap: 4px; font-size: 0.88rem; }
.rs-staff small { color: var(--muted); font-weight: 700; }
.rs-staff div { display: flex; justify-content: space-between; gap: 10px; }

/* bot status editor: auto-checks */
.comp-block { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.comp-block:last-child { border-bottom: none; }
.ac-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: 28px; }
.ac-row select, .ac-detail input {
  font: inherit; font-size: 0.88rem; padding: 8px 10px; border-radius: 10px;
  background: var(--card); border: 1.5px solid var(--line-2); color: var(--text);
}
.ac-detail { display: grid; gap: 6px; padding-left: 28px; }
.ac-detail small { color: var(--muted); font-size: 0.8rem; }
.ac-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ac-link code { padding: 6px 10px; border-radius: 9px; background: var(--soft); border: 1px solid var(--line); font-size: 0.78rem; word-break: break-all; }
.ac-flag { font-size: 0.8rem; font-weight: 700; color: var(--err); }

/* =========================================================
   Profile: billing + referrals
   ========================================================= */
.bill-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bill-summary div {
  display: grid; gap: 2px; padding: 18px; border-radius: 18px; background: var(--card);
  border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow);
}
.bill-summary small { color: var(--muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.bill-summary strong { font-size: 1.35rem; }
.bill-summary span { color: var(--muted); font-size: 0.85rem; }
.ref-hero { display: flex; gap: 16px; align-items: center; }
.ref-icon { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, #ec4899 12%, var(--card)); }
.ref-hero p { color: var(--muted); }
.ref-link { display: flex; gap: 8px; }
.ref-link input {
  flex: 1; min-width: 0; font: inherit; font-weight: 600; padding: 11px 13px; border-radius: 12px;
  background: var(--soft); border: 1.5px solid var(--line-2); color: var(--text);
}
.ref-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ref-stats div { padding: 14px; border-radius: 14px; text-align: center; background: var(--soft); border: 1px solid var(--line); }
.ref-stats strong { display: block; font-size: 1.5rem; }
.ref-stats span { color: var(--muted); font-size: 0.85rem; font-weight: 600; }

@media (max-width: 760px) {
  .hb-update { grid-template-columns: 1fr; }
  .rating-summary { grid-template-columns: 1fr; }
  .bill-summary { grid-template-columns: 1fr; }
  .ref-link { flex-direction: column; }
  .inv-btns { margin-left: 0; width: 100%; }
}

/* =========================================================
   ADMIN PANEL
   ========================================================= */
.ap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ap-me { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ap-me-roles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.ap-layout { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.ap-nav {
  position: sticky; top: 100px; display: grid; gap: 4px; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.ap-nav hr { border: none; border-top: 1px solid var(--line); margin: 4px 6px; }
.ap-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 700; font-size: 0.93rem;
  color: var(--muted); padding: 11px 14px; border-radius: 14px; border: none; background: transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ap-item[hidden] { display: none; }
.ap-item:hover { background: var(--soft); color: var(--text); }
.ap-item.on { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3); }
.ap-main { min-width: 0; }
.ap-pane { display: grid; gap: 18px; }
.ap-pane[hidden] { display: none; }
.ap-card { display: grid; gap: 10px; padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ap-card[hidden] { display: none; }
.ap-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-card-head h3 { font-size: 1.08rem; }
.ap-note p { color: var(--muted); font-size: 0.92rem; }
.ap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ap-stat {
  display: grid; gap: 2px; text-align: left; font: inherit; cursor: default; padding: 18px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow); color: var(--text);
}
.ap-stat[data-ap-go] { cursor: pointer; }
.ap-stat[data-ap-go]:hover { transform: translateY(-2px); }
.ap-stat strong { font-size: 1.8rem; line-height: 1.1; }
.ap-stat span { color: var(--muted); font-weight: 600; font-size: 0.88rem; }
.ap-line { font-weight: 600; font-size: 0.92rem; color: var(--text-2); }
.ap-line.ok { color: var(--ok); }
.ap-line.bad { color: #d97706; }
.ap-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-search { margin: 0; flex: 1 1 320px; max-width: 520px; }
.ap-search.small { flex: 0 1 280px; }
.ap-count { color: var(--muted); font-weight: 600; font-size: 0.88rem; }

/* accounts table */
.ap-table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.ap-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ap-table th {
  text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap;
}
.ap-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ap-table tbody tr { cursor: pointer; transition: background 0.15s; }
.ap-table tbody tr:hover, .ap-table tbody tr:focus-visible { background: var(--soft); outline: none; }
.ap-table tbody tr:last-child td { border-bottom: none; }
.ap-table tr.is-suspended td { opacity: 0.7; }
.acc-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.acc-cell small { display: block; color: var(--muted); font-size: 0.8rem; }
.acc-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.acc-av.letter { display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); }
.acc-av.big { width: 64px; height: 64px; font-size: 1.5rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.role-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 700; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; color: var(--text);
  background: color-mix(in srgb, var(--rc) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent);
}
.role-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.role-chip small { color: var(--muted); font-weight: 600; }
.acc-status { font-size: 0.76rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.acc-status.ok { color: var(--ok); }
.acc-status.bad { color: #fff; background: var(--err); }
.acc-status.staff { color: var(--accent); }

/* log rows */
.ap-log { display: grid; gap: 6px; }
.ap-log-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 12px; background: var(--soft); border-left: 3px solid var(--line-2);
}
.ap-log-row.security { border-left-color: #d97706; }
.ap-log-row.admin { border-left-color: #8b5cf6; }
.ap-log-row small { display: block; color: var(--muted); font-size: 0.82rem; word-break: break-word; }
.ap-log-row time { color: var(--faint); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.ap-log-icon { font-size: 1.1rem; }

/* roles */
.ap-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ap-role { display: grid; gap: 10px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--rc); box-shadow: var(--shadow); }
.ap-role-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.ap-role-top h3 { font-size: 1.05rem; }
.ap-role-top small { color: var(--muted); }
.ap-role-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--rc); }
.ap-role-link { font-size: 0.82rem; font-weight: 700; color: var(--accent); }
.perm-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.perm-pill { font-size: 0.74rem; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); color: var(--text-2); }
.perm-pill.all { color: #b45309; border-color: #fcd34d; background: color-mix(in srgb, #f59e0b 12%, var(--card)); font-weight: 800; }

/* staff + sessions */
.ap-people { display: grid; gap: 8px; }
.ap-person {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px;
  background: var(--soft); border: 1px solid var(--line);
}
.ap-person[tabindex] { cursor: pointer; }
.ap-person[tabindex]:hover { border-color: var(--accent); }
.ap-person small { display: block; color: var(--muted); font-size: 0.8rem; }
.ap-person.waiting { opacity: 0.85; border-style: dashed; }
.ap-rules { display: grid; gap: 8px; padding-left: 20px; color: var(--text-2); }

/* dialogs */
.ap-dialog {
  width: min(680px, calc(100% - 24px)); max-height: calc(100vh - 32px); margin: auto; padding: 0;
  border: none; border-radius: 24px; background: var(--card); color: var(--text); box-shadow: var(--shadow-lg);
}
.ap-dialog[open] { display: flex; flex-direction: column; animation: pdIn 0.3s cubic-bezier(.2, .8, .2, 1); }
.ap-dialog > form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 32px); }
.ap-dialog::backdrop { background: rgba(20, 22, 45, 0.6); backdrop-filter: blur(4px); }
.ap-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.ap-dialog-body { display: grid; gap: 16px; padding: 20px 22px; overflow-y: auto; }
.ap-dialog-body label { display: grid; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.ap-dialog-body input:not([type=checkbox]):not([type=color]) {
  font: inherit; font-weight: 500; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line-2); color: var(--text);
}
.ap-dialog-body input[type=color] { width: 100%; height: 42px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--soft); padding: 4px; }
.ap-dialog-foot { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.ap-dialog-foot .form-msg { margin-right: auto; }
.ap-dialog-foot [hidden] { display: none; }
.pd-close.dark { position: static; color: var(--text); background: var(--soft); border: 1px solid var(--line); flex-shrink: 0; }
.acc-who { display: flex; gap: 14px; align-items: center; }
.acc-who h3 { font-size: 1.3rem; }
.acc-who small { color: var(--muted); }
.acc-who .chip-row { margin-top: 6px; }
.acc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.acc-facts div { padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.acc-facts small { display: block; color: var(--muted); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.acc-facts b { font-size: 0.88rem; word-break: break-word; }
.acc-section { display: grid; gap: 10px; }
.acc-section h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.acc-locked { font-size: 0.88rem; font-weight: 600; color: #b45309; }
.role-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.role-opt {
  display: grid !important; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px !important; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1.5px solid var(--line);
}
.role-opt:has(input:checked) { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 10%, var(--card)); }
.role-opt.locked { cursor: not-allowed; opacity: 0.75; }
.role-opt i { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); }
.role-opt small { grid-column: 3; color: var(--muted); font-weight: 600; font-size: 0.75rem; margin-top: -6px; }
.role-opt input, .perm-opt input { accent-color: var(--accent); width: 16px; height: 16px; }
.acc-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-actions input { flex: 1; min-width: 180px; }
.acc-actions .form-msg { margin-right: auto; }
.danger-zone { padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--err) 35%, transparent); background: color-mix(in srgb, var(--err) 5%, var(--card)); }
.danger-zone p { color: var(--text-2); font-size: 0.9rem; }
.sess-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--soft); }
.sess-row small { display: block; color: var(--muted); font-size: 0.78rem; }
.perm-groups { display: grid; gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; display: grid; gap: 4px; }
.perm-group legend { font-weight: 800; font-size: 0.82rem; padding: 0 6px; color: var(--muted); }
.perm-opt { display: grid !important; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px !important; font-weight: 600 !important; cursor: pointer; padding: 4px 0; }
.perm-opt code { font-size: 0.72rem; color: var(--faint); }
.perm-opt.locked { opacity: 0.55; cursor: not-allowed; }

/* toast messages */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0;
  max-width: min(520px, calc(100% - 32px)); padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 0.92rem;
  color: #fff; background: #14162d; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3); transition: transform 0.3s, opacity 0.3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.err { background: var(--err); }

/* staff login card buttons */
.staff-login .sl-input [hidden] { display: none; }
.staff-login.unlocked #staffLoginText { display: block; }

@media (max-width: 900px) {
  .ap-layout { grid-template-columns: 1fr; }
  .ap-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .ap-nav hr { display: none; }
  .ap-item { width: auto; white-space: nowrap; }
}
@media (max-width: 560px) {
  .ap-log-row { grid-template-columns: auto 1fr; }
  .ap-log-row time { grid-column: 2; }
  .ap-person { grid-template-columns: auto 1fr; }
  .ap-person > .chip-row, .ap-person > .btn { grid-column: 1 / -1; }
}

/* =========================================================
   PRICING page (redesign)
   ========================================================= */
.includes {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: -10px 0 56px;
}
.includes li {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.includes span {
  grid-row: span 2; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.25rem;
  border-radius: 13px; background: color-mix(in srgb, var(--accent) 10%, var(--card));
}
.includes b { font-size: 0.95rem; }
.includes small { color: var(--muted); font-size: 0.82rem; }

.plan { padding: 28px 24px; overflow: hidden; }
.plan::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c); opacity: 0.85;
}
.plan.popular { transform: translateY(-8px); }
.plan.popular:hover { transform: translateY(-12px); }
.plan.popular .plan-badge { top: 14px; left: auto; right: 14px; transform: none; }
.plan-top { display: flex; gap: 14px; align-items: center; }
.plan-top h3 { font-size: 1.2rem; line-height: 1.2; }
.plan-top .plan-desc { font-size: 0.9rem; }
.plan-price strong {
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #ec4899));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plan li { font-size: 0.95rem; }

.hosting-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
.host-tier {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-left: 5px solid var(--c); transition: transform 0.25s, box-shadow 0.25s;
}
.host-tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.host-tier b { display: block; font-size: 0.98rem; }
.ht-price strong { font-size: 1.5rem; font-weight: 800; color: var(--c); letter-spacing: -0.02em; }
.ht-price small { color: var(--muted); font-weight: 600; margin-left: 3px; }
.extras { margin-bottom: 20px; }
.extra span { display: inline-flex; align-items: center; gap: 10px; }
.extra span i { font-style: normal; }

.order-steps { margin-top: 0; }
.price-faq { padding: 0; margin: 10px auto 56px; }
.price-faq .price-group { margin-top: 0; }
.price-banner { margin-bottom: 20px; }

/* =========================================================
   SUPPORT page (redesign)
   ========================================================= */
.help-ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: -14px 0 30px; }
.hw {
  display: grid; gap: 4px; align-content: start; padding: 20px; border-radius: 20px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.hw::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 10%, transparent); transition: transform 0.4s;
}
.hw:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.hw:hover::after { transform: scale(1.4); }
.hw > span {
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 8px;
  border-radius: 14px; background: color-mix(in srgb, var(--c) 12%, var(--card));
}
.hw b { font-size: 1.02rem; }
.hw small { color: var(--muted); font-size: 0.86rem; }
.hw em { font-style: normal; font-weight: 800; font-size: 0.85rem; color: var(--c); margin-top: 8px; }

.support-layout { grid-template-columns: 330px 1fr; }
.tk-side, .tk-new, .tk-view, .tk-empty { border-radius: 22px; }
.tk-side-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tk-side-head .tk-side-title { margin: 0; }
.status-tabs.mini { gap: 4px; }
.status-tabs.mini .chip { padding: 4px 10px; font-size: 0.78rem; }
.tk-item { background: var(--soft); border-color: var(--line); }
.tk-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.tk-item.on { background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-color: var(--accent); }
.tk-item.unread { background: color-mix(in srgb, #f59e0b 10%, var(--card)); }

.cat-picker { border: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-picker legend { font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.cat-picker label {
  position: relative; display: grid !important; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 0 !important; align-items: center; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1.5px solid var(--line-2);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.cat-picker label:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.cat-picker input { position: absolute; opacity: 0; pointer-events: none; }
.cat-picker span { grid-row: span 2; font-size: 1.35rem; }
.cat-picker b { font-size: 0.92rem; }
.cat-picker small { color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.cat-picker label:has(input:checked) {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--card));
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.15);
}
.cat-picker label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.char-count { justify-self: end; color: var(--faint); font-size: 0.78rem; font-weight: 600; margin-top: -2px; }
.char-count.near { color: var(--err); }
.tk-tips {
  padding: 12px 16px; border-radius: 14px; font-size: 0.88rem;
  background: color-mix(in srgb, #f59e0b 8%, var(--card)); border: 1px dashed color-mix(in srgb, #f59e0b 40%, transparent);
}
.tk-tips b { font-size: 0.88rem; }
.tk-tips ul { margin: 4px 0 0 18px; color: var(--text-2); display: grid; gap: 2px; }

@media (max-width: 980px) {
  .includes, .help-ways { grid-template-columns: repeat(2, 1fr); }
  .hosting-tiers { grid-template-columns: 1fr; }
  .plan.popular { transform: none; }
}
@media (max-width: 640px) {
  .includes, .help-ways { grid-template-columns: 1fr; }
  .cat-picker { grid-template-columns: 1fr 1fr; }
  .host-tier { grid-template-columns: auto 1fr; }
  .host-tier .btn { grid-column: 1 / -1; }
}

/* ---- scheduled maintenance ---- */
.maint-card .maint-when { font-weight: 700; color: var(--text); }
.maint-card .maint-affects { color: var(--muted); font-size: 0.9rem; }
.maint-services { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; }
.maint-services legend { font-weight: 700; font-size: 0.9rem; padding: 0 6px; }
#maintServices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }

/* =========================================================
   CYBERSECURITY DEPARTMENT (#cyber) + CODE PANEL
   ========================================================= */
.tab[hidden] { display: none; }
/* Cybersecurity button in the staff area (looks like the staff tabs, teal) */
.cy-staff-chip {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; color: #0f766e; border: 1.5px solid color-mix(in srgb, #14b8a6 45%, transparent);
  background: color-mix(in srgb, #14b8a6 12%, var(--card)); transition: background 0.2s, color 0.2s;
}
.cy-staff-chip:hover { background: #14b8a6; color: #fff; }
.cy-staff-chip[hidden] { display: none; }
:root[data-theme="dark"] .cy-staff-chip { color: #5eead4; }
:root[data-theme="dark"] .cy-staff-chip:hover { color: #fff; }
.cy-wrap { max-width: 1320px; }
.cy-head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cy-live { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.cy-live.ok { color: var(--ok); }
.cy-live.bad { color: var(--err); }
.cy-layout.code-mode { grid-template-columns: 200px 1fr; }
.cy-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cy-hint { color: var(--muted); font-size: 0.88rem; }
.cy-empty { color: var(--muted); font-size: 0.9rem; padding: 6px 2px; }
.cy-escalate { border-left: 5px solid #dc2626; }
.cy-escalate p { color: var(--text-2); font-size: 0.93rem; }
.cy-mini-list { display: grid; gap: 6px; }
.cy-mini {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; font: inherit;
  padding: 9px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.cy-mini span:not(.cy-sev) { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cy-mini small { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.cy-mini:hover { border-color: var(--accent); }
.cy-sev {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.cy-state { font-size: 0.74rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.cy-state.investigating, .cy-state.in-progress { color: #2563eb; }
.cy-state.contained { color: #d97706; }
.cy-state.resolved, .cy-state.fixed { color: var(--ok); }
.cy-filter { display: flex; gap: 8px; flex-wrap: wrap; }

/* new incident / vulnerability forms */
.cy-new summary { cursor: pointer; list-style: none; }
.cy-new summary::-webkit-details-marker { display: none; }
.cy-new[open] summary { margin-bottom: 8px; }
.cy-form, .cy-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cy-form label, .cy-edit label { display: grid; gap: 6px; font-weight: 700; font-size: 0.86rem; }
.cy-form .wide, .cy-edit .wide { grid-column: 1 / -1; }
.cy-form input, .cy-form select, .cy-form textarea, .cy-edit input, .cy-edit select, .cy-edit textarea, .cy-tool input[type=text], .cy-tool textarea, .cy-tool select {
  font: inherit; font-weight: 500; font-size: 0.92rem; width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--soft); color: var(--text); resize: vertical;
}
.cy-form :focus, .cy-edit :focus, .cy-tool input:focus, .cy-tool textarea:focus { outline: none; border-color: var(--accent); }
.cy-form .invalid { border-color: var(--err) !important; }
.cy-form-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cy-form-foot .btn.del { margin-left: auto; }
.cy-msg { color: var(--err); font-size: 0.88rem; font-weight: 600; }

/* incident / vulnerability cards */
.cy-list { display: grid; gap: 10px; }
.cy-card { border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); box-shadow: var(--shadow); }
.cy-card summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 18px; cursor: pointer; list-style: none;
}
.cy-card summary::-webkit-details-marker { display: none; }
.cy-card-title { flex: 1 1 240px; font-size: 1rem; }
.cy-card summary small { color: var(--muted); font-size: 0.8rem; }
.cy-card-body { display: grid; gap: 12px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.cy-card-body h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.cy-summary { white-space: pre-wrap; color: var(--text-2); font-size: 0.93rem; }
.cy-timeline { list-style: none; display: grid; gap: 8px; border-left: 2px solid var(--line-2); padding-left: 14px; max-height: 260px; overflow-y: auto; }
.cy-timeline li { display: grid; gap: 1px; position: relative; font-size: 0.9rem; }
.cy-timeline li::before { content: ""; position: absolute; left: -20px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cy-timeline li span { white-space: pre-wrap; }
.cy-timeline small { color: var(--muted); font-size: 0.78rem; }

/* routine checks */
.cy-check-progress { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 0.88rem; }
.cy-bar { display: block; width: 140px; height: 8px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.cy-bar i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #16a34a); transition: width 0.3s; }
.cy-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.cy-check-group { display: grid; gap: 6px; align-content: start; }
.cy-check-group h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 2px; }
.cy-check { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); cursor: pointer; font-size: 0.9rem; }
.cy-check input { margin-top: 4px; width: 17px; height: 17px; accent-color: #14b8a6; }
.cy-check small { grid-column: 2; color: var(--muted); font-size: 0.78rem; }
.cy-check.done span { color: var(--muted); text-decoration: line-through; }

/* playbooks */
.cy-playbooks { display: grid; gap: 12px; }
.cy-playbook summary { display: flex; gap: 14px; align-items: center; cursor: pointer; list-style: none; }
.cy-playbook summary::-webkit-details-marker { display: none; }
.cy-playbook summary small { display: block; color: var(--muted); font-size: 0.86rem; }
.cy-pb-icon { font-size: 1.6rem; }
.cy-playbook ol { padding-left: 22px; display: grid; gap: 6px; color: var(--text-2); font-size: 0.93rem; }
.cy-playbook .btn { justify-self: start; }

/* toolkit */
.cy-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.cy-tool-head { display: flex; gap: 12px; align-items: center; }
.cy-tool-head > span { font-size: 1.5rem; }
.cy-tool-head h3 { font-size: 1.02rem; }
.cy-tool-head small { color: var(--muted); font-size: 0.84rem; }
.cy-out {
  margin: 0; min-height: 40px; max-height: 260px; overflow: auto; padding: 10px 12px; border-radius: 12px; font: 0.82rem/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #0f1222; color: #d6dbff; white-space: pre-wrap; word-break: break-all;
}
.cy-out:empty { display: none; }
.cy-out.bad { color: #fca5a5; }
.cy-btn-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cy-btn-row select { width: auto; }
.cy-inline { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.88rem; }
.cy-inline input[type=range] { flex: 1; accent-color: var(--accent); }
.cy-meter { height: 8px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.cy-meter i { display: block; height: 100%; width: 0; transition: width 0.25s, background 0.25s; }
.cy-headers, .cy-scan { display: grid; gap: 6px; }
.cy-hdr { display: grid; padding: 8px 12px; border-radius: 10px; background: var(--soft); border-left: 3px solid var(--ok); }
.cy-hdr.bad { border-left-color: #d97706; }
.cy-hdr b { font-family: ui-monospace, Consolas, monospace; font-size: 0.84rem; }
.cy-hdr small { color: var(--muted); font-size: 0.8rem; word-break: break-word; }
.cy-find { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--soft); }
.cy-find small { grid-column: 2; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem; word-break: break-all; }
.cy-ok { color: var(--ok); font-weight: 700; font-size: 0.9rem; }

/* ---------- code panel (always dark, like an IDE) ---------- */
.cp {
  --cp-bg: #0f1222; --cp-panel: #151931; --cp-line: #262b4a; --cp-text: #d6dbff; --cp-muted: #7d84ad;
  display: grid; grid-template-rows: auto 1fr auto; height: min(78vh, 860px); min-height: 520px;
  border-radius: 18px; overflow: hidden; background: var(--cp-bg); color: var(--cp-text); border: 1px solid var(--cp-line); box-shadow: var(--shadow-lg);
}
.cp.cp-full { position: fixed; inset: 0; z-index: 200; height: auto; border-radius: 0; }
body.cp-locked { overflow: hidden; }
.cp-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--cp-panel); border-bottom: 1px solid var(--cp-line); }
.cp-file-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cp-file-title b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-lang { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 6px; background: #252a4a; color: var(--cp-muted); }
.cp-lang.javascript { background: #3a3510; color: #fde047; }
.cp-lang.python { background: #10283f; color: #7dd3fc; }
.cp-lang.html { background: #3f1d10; color: #fdba74; }
.cp-lang.css { background: #251846; color: #c4b5fd; }
.cp-lang.json { background: #10301f; color: #86efac; }
.cp-dirty { color: #fbbf24; font-size: 0.8rem; font-weight: 700; }
.cp-dirty[hidden] { display: none; }
.cp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-btn {
  font: inherit; font-size: 0.84rem; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  background: #1f2442; color: var(--cp-text); border: 1px solid var(--cp-line);
}
.cp-btn:hover:not(:disabled) { border-color: #5865f2; }
.cp-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cp-btn[hidden] { display: none; }
.cp-btn.run { background: #16a34a; border-color: #16a34a; color: #fff; }
.cp-btn.run:hover:not(:disabled) { background: #15803d; border-color: #15803d; }
.cp-body { display: grid; grid-template-columns: 210px 1fr; min-height: 0; }
.cp-files { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background: var(--cp-panel); border-right: 1px solid var(--cp-line); }
.cp-files-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cp-muted); }
.cp-files-btns { display: flex; gap: 4px; }
.cp-files-btns button, .cp-files-btns label {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 0.95rem;
  background: #1f2442; color: var(--cp-text); border: 1px solid var(--cp-line);
}
.cp-files-btns button:hover, .cp-files-btns label:hover { border-color: #5865f2; }
.cp-file-list { overflow-y: auto; padding: 0 6px 6px; display: grid; gap: 2px; align-content: start; }
.cp-file {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; text-align: left; font: inherit; font-size: 0.86rem;
  padding: 7px 8px; border-radius: 8px; background: transparent; color: var(--cp-text); border: none; cursor: pointer;
}
.cp-file:hover { background: #1c2140; }
.cp-file.on { background: #2a3163; }
.cp-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-file small { color: var(--cp-muted); font-size: 0.72rem; }
.cp-file-ic { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; width: 26px; text-align: center; padding: 2px 0; border-radius: 4px; background: #252a4a; color: var(--cp-muted); }
.cp-file-ic.javascript { color: #fde047; }
.cp-file-ic.python { color: #7dd3fc; }
.cp-file-ic.html { color: #fdba74; }
.cp-file-ic.css { color: #c4b5fd; }
.cp-file-ic.json { color: #86efac; }
.cp-none { color: var(--cp-muted); font-size: 0.84rem; padding: 8px; }
.cp-file-tools { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--cp-line); }
.cp-file-tools[hidden] { display: none; }
.cp-file-tools button { flex: 1; font: inherit; font-size: 0.8rem; font-weight: 700; padding: 6px; border-radius: 7px; cursor: pointer; background: #1f2442; color: var(--cp-text); border: 1px solid var(--cp-line); }
.cp-file-tools .danger { color: #fca5a5; }
.cp-editor-col { display: grid; grid-template-rows: 1fr minmax(150px, 34%); min-width: 0; min-height: 0; }
.cp-editor { display: grid; grid-template-columns: auto 1fr; min-height: 0; overflow: hidden; }
.cp-gutter, .cp-hl, .cp-code textarea {
  font: 13.5px/21px ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace; tab-size: 2; letter-spacing: 0;
}
.cp-gutter { padding: 12px 10px 12px 14px; text-align: right; color: #4b5280; white-space: pre; overflow: hidden; user-select: none; background: var(--cp-bg); border-right: 1px solid #1b1f38; min-width: 48px; }
.cp-code { position: relative; min-width: 0; min-height: 0; }
.cp-hl, .cp-code textarea { position: absolute; inset: 0; margin: 0; padding: 12px 16px; white-space: pre; overflow: auto; border: none; }
.cp-hl { color: var(--cp-text); pointer-events: none; overflow: hidden; }
.cp-code textarea { background: transparent; color: transparent; caret-color: #fff; resize: none; outline: none; }
.cp-code textarea::selection { background: rgba(88, 101, 242, 0.45); color: transparent; }
.cp-code textarea::placeholder { color: var(--cp-muted); }
.cp-code textarea:disabled { cursor: default; }
.hl-k { color: #c792ea; }
.hl-s { color: #c3e88d; }
.hl-c { color: #676e95; font-style: italic; }
.hl-n { color: #f78c6c; }
.hl-f { color: #82aaff; }
.hl-t { color: #f07178; }
.hl-a { color: #ffcb6b; }
.hl-p { color: #89ddff; }
.cp-out { display: grid; grid-template-rows: auto 1fr; min-height: 0; border-top: 1px solid var(--cp-line); background: #0b0e1c; }
.cp-out-head { display: flex; align-items: center; gap: 10px; padding: 0 10px; background: var(--cp-panel); border-bottom: 1px solid var(--cp-line); }
.cp-out-tabs { display: flex; }
.cp-out-tabs button { font: inherit; font-size: 0.8rem; font-weight: 700; padding: 8px 12px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--cp-muted); cursor: pointer; }
.cp-out-tabs button.on { color: var(--cp-text); border-bottom-color: #5865f2; }
.cp-out-tabs em { font-style: normal; font-size: 0.7rem; padding: 1px 6px; border-radius: 99px; background: #dc2626; color: #fff; margin-left: 4px; }
.cp-out-tabs em[hidden] { display: none; }
.cp-status { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--cp-muted); }
.cp-status.ok { color: #4ade80; }
.cp-status.bad { color: #f87171; }
.cp-status.warn { color: #fbbf24; }
.cp-status.busy { color: #93c5fd; }
.cp-clear { font: inherit; font-size: 0.78rem; background: none; border: none; color: var(--cp-muted); cursor: pointer; }
.cp-console, .cp-problems { overflow: auto; padding: 6px 0; font: 12.5px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; }
.cp-console[hidden], .cp-problems[hidden], .cp-preview[hidden] { display: none; }
.cp-line { display: grid; grid-template-columns: 22px 1fr; padding: 2px 12px 2px 6px; border-bottom: 1px solid #141834; }
.cp-line pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; }
.cp-line-t { color: var(--cp-muted); text-align: center; }
.cp-line.error { background: #2a1219; color: #fca5a5; }
.cp-line.error .cp-line-t { color: #f87171; }
.cp-line.warn { background: #2a2210; color: #fde68a; }
.cp-line.warn .cp-line-t { color: #fbbf24; }
.cp-line.info .cp-line-t, .cp-line.result .cp-line-t { color: #93c5fd; }
.cp-line.sys { color: var(--cp-muted); }
.cp-preview { min-height: 0; background: #fff; }
.cp-preview iframe { width: 100%; height: 100%; border: none; background: #fff; }
.cp-prob { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; width: 100%; text-align: left; font: inherit; padding: 7px 12px; background: none; border: none; border-bottom: 1px solid #141834; color: var(--cp-text); cursor: pointer; }
.cp-prob:hover { background: #161a33; }
.cp-prob small { grid-column: 2; color: var(--cp-muted); word-break: break-all; }
.cp-clean { color: #4ade80; padding: 10px 14px; }
.cp-foot { display: flex; gap: 18px; flex-wrap: wrap; padding: 5px 12px; font-size: 0.74rem; color: var(--cp-muted); background: var(--cp-panel); border-top: 1px solid var(--cp-line); }
.cp-foot span:last-child { margin-left: auto; }
.cp-runner { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

@media (max-width: 900px) {
  .cy-two, .cy-form, .cy-edit { grid-template-columns: 1fr; }
  .cy-layout.code-mode { grid-template-columns: 1fr; }
  .cp-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cp-files { grid-template-rows: auto auto auto; max-height: 150px; border-right: none; border-bottom: 1px solid var(--cp-line); }
  .cp { height: 82vh; }
  .cp-foot span:last-child { display: none; }
}
.cy-check, .cy-check span, .cy-check small { text-align: left; }
.cp-gutter, .cp-hl, .cp-code textarea { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* ---------- Discord lookup (Toolkit) ---------- */
.cy-tool.di { grid-column: 1 / -1; }
.di-single, .di-bulk { display: grid; gap: 12px; }
.di-single[hidden], .di-bulk[hidden] { display: none; }
.di-search { display: flex; gap: 8px; }
.di-search input { flex: 1; }
.di-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.di-recent small { color: var(--muted); font-weight: 700; }
.di-chip { font: inherit; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--text-2); cursor: pointer; }
.di-chip:hover { border-color: var(--accent); color: var(--accent); }
.di-error { color: var(--err); font-weight: 600; }
.di-warn { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #f59e0b 12%, var(--card)); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); font-size: 0.9rem; }
.di-view { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.di-profile { grid-column: 1 / -1; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.di-banner { display: block; width: 100%; height: 110px; object-fit: cover; }
.di-banner.plain { height: 70px; background: var(--accent, var(--grad)); background: linear-gradient(135deg, var(--accent, #5865f2), #8b5cf6); }
.di-profile-main { display: flex; gap: 16px; align-items: flex-end; padding: 0 18px 12px; margin-top: -38px; flex-wrap: wrap; }
.di-avatar { width: 84px; height: 84px; border-radius: 50%; border: 5px solid var(--soft); background: var(--card); object-fit: cover; flex-shrink: 0; }
.di-avatar.letter { display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: #fff; background: var(--grad); }
.di-name { font-size: 1.3rem; display: block; }
.di-handle { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 0.9rem; }
.di-tag { font-size: 0.7rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); }
.di-tag.bot { background: #5865f2; border-color: #5865f2; color: #fff; }
.di-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.di-badge { font-size: 0.74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.di-badge.bad { color: #fff; background: #dc2626; border-color: #dc2626; }
.di-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 18px 14px; }
.di-actions a { font-size: 0.85rem; }
.di-risk { display: grid; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); border-top: 4px solid var(--c); background: var(--card); }
.di-risk-head { display: flex; justify-content: space-between; align-items: baseline; }
.di-risk-head b { color: var(--c); font-size: 1.05rem; }
.di-risk-head small { color: var(--muted); }
.di-flag { display: flex; gap: 8px; align-items: flex-start; font-size: 0.88rem; }
.di-section { display: grid; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.di-section h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px; }
.di-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.89rem; align-items: baseline; }
.di-row:first-of-type { border-top: none; }
.di-row > span { color: var(--muted); font-weight: 600; }
.di-row > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; word-break: break-word; }
.di-row small { color: var(--muted); }
.di-row code { font-size: 0.8rem; padding: 1px 6px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); }
.di-idlink { font: inherit; font-size: 0.86rem; font-weight: 700; color: var(--accent); background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline dotted; }
.di-icon { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.di-pill { display: inline-block; font-size: 0.78rem; padding: 2px 8px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); }
.di-pill.link { font: inherit; font-size: 0.78rem; cursor: pointer; color: var(--accent); }
.di-bad { color: var(--err); }
.di-content { margin: 0; white-space: pre-wrap; word-break: break-word; font: 0.86rem/1.5 ui-monospace, Consolas, monospace; padding: 8px 10px; border-radius: 10px; background: var(--soft); width: 100%; max-height: 220px; overflow: auto; }
.di-events summary { cursor: pointer; font-weight: 700; font-size: 0.88rem; padding: 8px 0 4px; }
.di-events .ap-log { max-height: 300px; overflow-y: auto; }
.di-bulk-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.di-bulk-summary .ap-stat strong { font-size: 1.5rem; }
.di-bulk-table { display: grid; max-height: 460px; overflow-y: auto; border-radius: 14px; border: 1px solid var(--line); }
.di-bulk-table:empty { display: none; }
.di-bulk-row { display: grid; grid-template-columns: 190px 190px 140px 1fr; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: 0.86rem; padding: 8px 12px; border: none; border-bottom: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.di-bulk-row:hover { background: var(--soft); }
.di-bulk-row.head { position: sticky; top: 0; z-index: 1; cursor: default; background: var(--soft); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 800; }
.di-bulk-row.batch { box-shadow: inset 4px 0 0 #dc2626; }
.di-bulk-row code { font-size: 0.82rem; }
@media (max-width: 700px) {
  .di-view { grid-template-columns: 1fr; }
  .di-row { grid-template-columns: 1fr; gap: 2px; }
  .di-bulk-row { grid-template-columns: 1fr 1fr; }
  .di-search { flex-direction: column; }
}

/* ---------- Commands console (#cyber → Commands) ---------- */
.cc { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; min-height: 70vh; }
.cc-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-quick .chip { font-family: ui-monospace, Consolas, monospace; }
.cc-out { display: grid; gap: 14px; align-content: start; }
.cc-block { border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 100px; }
.cc-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #0f1222; color: #d6dbff; }
.cc-head code { font: 700 0.9rem ui-monospace, Consolas, monospace; }
.cc-head code::before { content: "› "; color: #4ade80; }
.cc-head time { font-size: 0.75rem; color: #7d84ad; }
.cc-body { padding: 16px; display: grid; gap: 12px; }
.cc-result { display: grid; gap: 14px; }
.cc-bar { position: sticky; bottom: 16px; display: flex; gap: 8px; padding: 8px; border-radius: 16px; background: #0f1222; border: 1px solid #262b4a; box-shadow: var(--shadow-lg); z-index: 5; }
.cc-bar input { flex: 1; min-width: 0; font: 0.95rem ui-monospace, "Cascadia Code", Consolas, monospace; padding: 10px 12px; border-radius: 10px; border: 1px solid #262b4a; background: #151931; color: #fff; outline: none; }
.cc-bar input:focus { border-color: #5865f2; }
.cc-bar input::placeholder { color: #7d84ad; }
.cc-suggest { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); display: grid; gap: 2px; padding: 6px; border-radius: 14px; background: #151931; border: 1px solid #262b4a; box-shadow: var(--shadow-lg); }
.cc-suggest[hidden] { display: none; }
.cc-sug { display: grid; gap: 2px; text-align: left; font: inherit; padding: 8px 10px; border-radius: 10px; border: none; background: transparent; color: #d6dbff; cursor: pointer; }
.cc-sug code { font: 700 0.88rem ui-monospace, Consolas, monospace; color: #fff; }
.cc-sug small { color: #9aa1c8; font-size: 0.8rem; }
.cc-sug.on, .cc-sug:hover { background: #2a3163; }
.cc-help { display: grid; gap: 6px; }
.cc-help-row { display: grid; grid-template-columns: minmax(200px, auto) 1fr; gap: 14px; align-items: baseline; text-align: left; font: inherit; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.cc-help-row:hover { border-color: var(--accent); }
.cc-help-row code { font: 700 0.86rem ui-monospace, Consolas, monospace; color: var(--accent); }
.cc-help-row span { color: var(--text-2); font-size: 0.9rem; }
.cc-row { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.88rem; }
.cc-row > :nth-child(n + 4) { grid-column: 2 / -1; }
.cc-row:first-of-type { border-top: none; }
.cc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.cc-state { font-size: 0.74rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); white-space: nowrap; }
.cc-muted { color: var(--muted); font-size: 0.82rem; }
.cc-bars { display: inline-flex; gap: 2px; }
.cc-bars i { width: 8px; height: 16px; border-radius: 2px; background: var(--c); }
.cc-note { font-size: 0.85rem; padding: 6px 10px; border-radius: 10px; background: var(--soft); }
.cc-note.bad { background: color-mix(in srgb, #dc2626 10%, var(--card)); }
.cc-findings { display: grid; gap: 6px; }
.cc-finding { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: 0.88rem; padding: 9px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: var(--text); }
button.cc-finding { cursor: pointer; }
button.cc-finding:hover { border-color: var(--accent); }
.cc-area { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cc-go { color: var(--accent); font-weight: 800; }
@media (max-width: 700px) {
  .cc-help-row, .cc-finding { grid-template-columns: 1fr; }
}

/* ---------- Lockdown (home page banner + Cybersecurity page bar) ---------- */
.lockdown-banner {
  display: flex; gap: 14px; align-items: center; margin-top: 24px; padding: 16px 20px; border-radius: 16px;
  background: linear-gradient(135deg, #7f1d1d, #b91c1c); color: #fff; box-shadow: 0 12px 34px rgba(185, 28, 28, 0.35);
  border: 1px solid #ef4444; animation: fadeDown 0.4s ease;
}
.lockdown-banner[hidden] { display: none; }
.lockdown-banner .ld-icon { font-size: 1.8rem; animation: ldPulse 2s ease-in-out infinite; }
.lockdown-banner b { display: block; font-size: 1.1rem; letter-spacing: 0.02em; text-transform: uppercase; }
.lockdown-banner p { margin: 2px 0; color: #fee2e2; }
.lockdown-banner small { color: #fecaca; font-size: 0.8rem; }
@keyframes ldPulse { 50% { transform: scale(1.12); } }
.cy-lockdown {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 18px; padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #7f1d1d, #b91c1c); color: #fff; box-shadow: 0 10px 28px rgba(185, 28, 28, 0.3);
}
.cy-lockdown[hidden] { display: none; }
.cy-lockdown span { color: #fee2e2; font-size: 0.9rem; flex: 1; }
.cy-lockdown .btn { background: #fff; color: #b91c1c; font-family: ui-monospace, Consolas, monospace; }

/* ----- Cybersecurity → Red Alert (staff-only alarm) + alert sounds button ----- */
.cy-redalert {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 18px; padding: 14px 16px; border-radius: 16px;
  color: #fff; border: 2px solid #fca5a5; animation: cyRedFlash 1s steps(1) infinite;
}
.cy-redalert[hidden] { display: none; }
.cy-redalert b { font-size: 1.15rem; letter-spacing: 0.06em; }
.cy-redalert span { color: #fee2e2; font-size: 0.9rem; flex: 1; min-width: 180px; }
.cy-redalert .btn { background: #fff; color: #b91c1c; }
@keyframes cyRedFlash {
  0% { background: #dc2626; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35), 0 10px 32px rgba(220, 38, 38, 0.55); }
  50% { background: #7f1d1d; box-shadow: none; }
}
.cy-redbtn { background: #dc2626; color: #fff; border-color: #dc2626; }
.cy-redbtn:hover { background: #b91c1c; }
.cy-redbtn.on { background: #16a34a; border-color: #16a34a; }
@media (prefers-reduced-motion: reduce) { .cy-redalert { animation: none; background: #b91c1c; } }

/* ----- Cybersecurity → Watchlist · Keys & secrets · Access review · Practice drills ----- */
#cyWatch, #cySecrets, #cyAccess, #cyDrills { display: grid; gap: 14px; }
.cy-check-inline { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; align-self: end; padding-bottom: 10px; }
.cy-check-inline input { width: 17px; height: 17px; accent-color: #5865f2; }
.cy-watch-card summary, .cy-secret-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cy-watch-card summary { padding: 12px 16px; cursor: pointer; list-style: none; }
.cy-watch-card summary code { font-size: 0.95rem; overflow-wrap: anywhere; }
.cy-watch-card.hot { animation: cyWatchHot 1.2s ease-in-out infinite; }
@keyframes cyWatchHot { 50% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.35), var(--shadow); } }
.cy-expired summary { cursor: pointer; color: var(--muted); font-weight: 700; margin: 4px 0 10px; }
.cy-secret { display: grid; gap: 8px; padding: 14px 16px; }
.cy-secret-icon { font-size: 1.3rem; }
.cy-secret-main { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.cy-secret-main small { color: var(--muted); font-size: 0.82rem; }
.cy-leak { border-radius: 12px; padding: 12px 14px; background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.35); display: grid; gap: 8px; }
.cy-leak[hidden] { display: none; }
.cy-leak ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 0.9rem; }
.cy-leak-btn { background: #dc2626; color: #fff; border-color: #dc2626; }
.cy-env .cy-mini { align-items: center; }
.cy-env .cy-mini .btn { margin-left: auto; }
.cy-access-list { display: grid; gap: 8px; }
.cy-access-row {
  display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(200px, 1.4fr) auto; gap: 10px 14px; align-items: center;
  padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); border-left: 5px solid #16a34a;
}
.cy-access-row.warn { border-left-color: #d97706; }
.cy-access-row.bad { border-left-color: #dc2626; }
.cy-access-who { display: grid; gap: 3px; min-width: 0; }
.cy-access-who code { font-size: 0.75rem; color: var(--muted); }
.cy-access-roles, .cy-access-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.cy-access-facts { display: grid; gap: 2px; font-size: 0.82rem; color: var(--muted); }
@media (max-width: 900px) { .cy-access-row { grid-template-columns: 1fr; } }
.cy-drill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cy-drill-card {
  display: grid; gap: 6px; justify-items: start; text-align: left; padding: 14px; border-radius: 16px; cursor: pointer;
  background: var(--soft); border: 1px solid var(--line); color: inherit; font: inherit; transition: transform 0.15s, border-color 0.15s;
}
.cy-drill-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cy-drill-card small { color: var(--muted); font-size: 0.8rem; }
.cy-drill-live { display: grid; gap: 12px; border: 2px solid #dc2626; }
.cy-drill-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cy-drill-time { font: 800 2rem/1 "JetBrains Mono", ui-monospace, Consolas, monospace; }
.cy-drill-scene { font-size: 1rem; font-weight: 600; }
.cy-drill-steps { display: grid; gap: 6px; }
.cy-check.done span { text-decoration: line-through; opacity: 0.7; }
.cy-drill-result { display: flex; align-items: center; gap: 18px; border-left: 6px solid var(--c); }
.cy-drill-result p { color: var(--muted); margin: 2px 0 8px; }
.cy-drill-score { font: 800 2.4rem/1 "JetBrains Mono", ui-monospace, Consolas, monospace; color: var(--c); }
/* ===== Cybersecurity → ⚔️ THE WAR ROOM (warroom.js) — always a dark ops screen ===== */
.cy-warbtn { background: linear-gradient(135deg, #0f172a, #1e293b); color: #e2e8f0; border-color: #334155; }
.cy-warbtn:hover { border-color: #a78bfa; color: #fff; }
body.wr-open { overflow: hidden; }
.warroom {
  --wr-lv: #22c55e; --wr-bg: #04060c; --wr-panel: rgba(13, 19, 33, 0.82); --wr-line: #1c2740; --wr-text: #dbe4f3; --wr-muted: #7d8ba5;
  position: fixed; inset: 0; z-index: 10000; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 12px 14px;
  background: radial-gradient(120% 80% at 50% 0%, #0b1224 0%, var(--wr-bg) 60%); color: var(--wr-text);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif; overflow: hidden;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--wr-lv) 70%, transparent), inset 0 0 60px color-mix(in srgb, var(--wr-lv) 22%, transparent);
  animation: wrIn 0.4s ease-out;
}
@keyframes wrIn { from { opacity: 0; transform: scale(1.02); } }
.warroom[data-level="redalert"], .warroom.lockdown { animation: wrIn 0.4s ease-out, wrAlarm 1s steps(1) infinite; }
@keyframes wrAlarm { 50% { box-shadow: inset 0 0 0 6px #ef4444, inset 0 0 140px rgba(239, 68, 68, 0.45); } }
.wr-grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: linear-gradient(rgba(56, 189, 248, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px); background-size: 40px 40px; }
.warroom > * { position: relative; }
.warroom code, .warroom time, .wr-clock b, .wr-counter b, .wr-tag, .wr-cc, .wr-h { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }

/* top bar */
.wr-top { display: grid; grid-template-columns: auto 1fr auto auto; gap: 18px; align-items: center; padding: 10px 16px; border-radius: 16px; background: var(--wr-panel); border: 1px solid var(--wr-line); }
.wr-brand { display: flex; align-items: center; gap: 12px; }
.wr-brand b { font-size: 1.25rem; letter-spacing: 0.12em; background: linear-gradient(90deg, #e9d5ff, #a78bfa 45%, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wr-live { font: 800 0.75rem "JetBrains Mono", monospace; color: #22c55e; animation: cyBlink 1.6s steps(1) infinite; }
.wr-clock { display: grid; justify-items: center; }
.wr-clock b { font-size: 1.7rem; letter-spacing: 0.06em; }
.wr-clock small { color: var(--wr-muted); font-size: 0.78rem; }
.wr-level { display: grid; justify-items: end; padding: 6px 14px; border-radius: 12px; border: 2px solid var(--wr-lv); background: color-mix(in srgb, var(--wr-lv) 12%, transparent); min-width: 220px; }
.wr-level small { font: 800 0.66rem "JetBrains Mono", monospace; letter-spacing: 0.16em; color: var(--wr-muted); }
.wr-level b { font: 800 1.5rem/1.1 "JetBrains Mono", monospace; color: var(--wr-lv); text-shadow: 0 0 18px var(--wr-lv); }
.wr-level span { font-size: 0.75rem; color: var(--wr-text); max-width: 260px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warroom[data-level="redalert"] .wr-level, .warroom.lockdown .wr-level { animation: cyRedFlash 1s steps(1) infinite; }
.warroom[data-level="redalert"] .wr-level b, .warroom.lockdown .wr-level b { color: #fff; text-shadow: 0 0 16px rgba(255, 255, 255, 0.8); }
.warroom[data-level="redalert"] .wr-level small, .warroom.lockdown .wr-level small { color: #fecaca; }
.wr-tools { display: flex; gap: 6px; }
.wr-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--wr-line); background: #0d1526; color: var(--wr-text); font-size: 1.05rem; cursor: pointer; }
.wr-btn:hover, .wr-btn.on { border-color: #a78bfa; background: #1b1637; }

/* body */
.wr-body { display: grid; grid-template-columns: 270px minmax(0, 1fr) 330px; gap: 10px; min-height: 0; }
.wr-left, .wr-right, .wr-centre { display: grid; gap: 10px; min-height: 0; height: 100%; }
.wr-left { grid-template-rows: auto minmax(0, 1fr); }
.wr-centre { grid-template-rows: auto minmax(0, 1fr); }
.wr-lower > .wr-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 150px; }
.wr-right { grid-template-rows: minmax(0, 1fr) auto auto; }
.wr-left > .wr-panel:last-child { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.wr-panel { border-radius: 16px; background: var(--wr-panel); border: 1px solid var(--wr-line); padding: 12px 14px; min-height: 0; backdrop-filter: blur(4px); }
.wr-h { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #93a4c3; margin: 0 0 10px; }
.wr-h small { font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: var(--wr-muted); }
.wr-empty { color: var(--wr-muted); font-size: 0.85rem; margin: 4px 0; }

/* counters */
.wr-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-counter { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: #0a1120; border: 1px solid var(--wr-line); min-width: 0; }
.wr-counter b { font-size: 1.25rem; color: #f1f5ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-counter span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-counter span { font-size: 0.7rem; color: var(--wr-muted); }
.wr-counter.bump b { animation: wrBump 0.7s ease-out; }
@keyframes wrBump { 30% { color: #a78bfa; text-shadow: 0 0 14px #a78bfa; } }
#wcBlocked b, #wcBanned b { color: #fca5a5; }
.wr-counter.wide { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(167, 139, 250, 0.12)); border-color: rgba(56, 189, 248, 0.35); }
.wr-counter.wide b { font-size: 1.7rem; color: #7dd3fc; grid-row: span 2; }
.wr-counter.wide span { font-size: 0.8rem; color: #e0f2fe; font-weight: 700; }
.wr-counter.wide small { font-size: 0.7rem; color: var(--wr-muted); }
#wcSus b { color: #fdba74; }

/* systems */
#wrSystems { display: grid; gap: 6px; align-content: start; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.wr-sys { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-size: 0.83rem; }
.wr-sys i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.wr-sys.warn i { background: #eab308; box-shadow: 0 0 10px #eab308; }
.wr-sys.bad i { background: #ef4444; box-shadow: 0 0 12px #ef4444; animation: cyBlink 0.8s steps(1) infinite; }
.wr-sys.off i { background: #475569; box-shadow: none; }
.wr-sys small { color: var(--wr-muted); font-size: 0.72rem; }

/* map */
.wr-map-panel { padding: 8px; }
.wr-map { position: relative; width: 100%; aspect-ratio: 1000 / 394; max-height: calc(100vh - 400px); margin: 0 auto; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #0e1a33, #050912 75%); }
.wr-map img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; filter: brightness(1.4) hue-rotate(10deg); pointer-events: none; user-select: none; }
.wr-map canvas { position: absolute; inset: 0; }
.wr-legend { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.7rem; color: var(--wr-muted); background: rgba(4, 6, 12, 0.7); padding: 4px 10px; border-radius: 99px; }
.wr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wr-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }

/* lower centre: timeline + spotlight */
.wr-lower { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; min-height: 0; }
.wr-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; min-height: 90px; }
/* last 60 minutes: slim strip under the map */
.wr-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; margin-top: 8px; padding: 0 4px; }
.wr-strip .wr-h { margin: 0; white-space: nowrap; }
.wr-strip .wr-bars { height: 40px; min-height: 0; }
/* live console in the War Room (same lines + flashing as the Overview monitor) */
.wr-console-body {
  overflow: hidden; min-height: 0; padding: 2px 2px 0;
  font: 0.74rem/1.7 "JetBrains Mono", ui-monospace, Consolas, monospace; color: #d6deea;
  mask-image: linear-gradient(180deg, transparent, #000 18%);
}
.wr-console .wr-h .wr-live { margin-left: 6px; letter-spacing: 0.08em; }

/* War Room click-to-act: clickable rows, details panel, actions, command bar, notices, view-only */
.wr-click { cursor: pointer; transition: background 0.15s, box-shadow 0.15s; border-radius: 10px; }
.wr-click:hover { box-shadow: 0 0 0 1px #a78bfa; background: rgba(167, 139, 250, 0.08); }
.wr-row.sel, .wr-feed-row.sel { box-shadow: 0 0 0 1.5px #fff; }
.warroom.viewonly .wr-click { cursor: default; }
.warroom.viewonly .wr-click:hover { box-shadow: none; background: inherit; }
.warroom.viewonly #wrCmdBtn { opacity: 0.35; }
#wrLock { font-size: 0.95rem; }
.wr-drawer {
  position: absolute; z-index: 4; top: 128px; right: 14px; bottom: 60px; width: min(400px, calc(100% - 28px));
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; padding: 14px 16px;
  border-radius: 18px; background: rgba(9, 14, 26, 0.97); border: 1px solid #a78bfa; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(167, 139, 250, 0.12);
  animation: wrDrawerIn 0.25s ease-out;
}
.wr-drawer[hidden] { display: none; }
@keyframes wrDrawerIn { from { opacity: 0; transform: translateX(30px); } }
.wr-dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wr-dr-head .wr-h { margin: 0 0 2px; display: block; }
.wr-dr-ip { font: 800 1.15rem "JetBrains Mono", monospace; color: #fff; overflow-wrap: anywhere; }
.wr-dr-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; }
.wr-dr-scroll { overflow-y: auto; display: grid; gap: 10px; align-content: start; padding-right: 4px; scrollbar-width: thin; }
.wr-dr-sec { display: grid; gap: 5px; padding: 10px 12px; border-radius: 12px; background: #0a1120; border: 1px solid var(--wr-line); }
.wr-dr-sec .wr-h { margin: 0 0 2px; }
.wr-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 0.84rem; }
.wr-kv span { color: var(--wr-muted); }
.wr-kv b { text-align: right; overflow-wrap: anywhere; }
.wr-dr-line { display: grid; gap: 1px; font-size: 0.8rem; }
.wr-dr-line b { color: #fdba74; font-family: "JetBrains Mono", monospace; font-size: 0.74rem; }
.wr-dr-line span { color: var(--wr-text); overflow-wrap: anywhere; }
.wr-dr-actions { display: grid; gap: 8px; }
.wr-ban-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wr-ban-row > span { font-size: 0.84rem; font-weight: 700; margin-right: 2px; }
.wr-act { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--wr-line); background: #111a2e; color: var(--wr-text); font: 700 0.84rem inherit; font-family: inherit; cursor: pointer; text-align: center; }
.wr-act:hover:not(:disabled) { border-color: #a78bfa; }
.wr-act.bad { border-color: rgba(239, 68, 68, 0.55); color: #fecaca; }
.wr-act.bad:hover:not(:disabled) { background: rgba(239, 68, 68, 0.15); }
.wr-act.ok { border-color: rgba(34, 197, 94, 0.55); color: #bbf7d0; }
.wr-act.armed { background: #dc2626 !important; color: #fff !important; border-color: #fff !important; animation: cyBlink 0.6s steps(1) infinite; }
.wr-act.done { cursor: default; color: #c4b5fd; border-style: dashed; }
.wr-act:disabled { opacity: 0.6; cursor: wait; }
.wr-cmd { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(4px); }
.wr-cmd[hidden] { display: none; }
.wr-cmd-box {
  width: min(960px, 94%); height: min(78vh, 760px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 14px;
  border-radius: 18px; background: var(--card); color: var(--text); border: 1px solid #a78bfa; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.wr-cmd-head { display: flex; align-items: center; gap: 12px; }
.wr-cmd-head small { color: var(--muted); flex: 1; }
.wr-cmd-head .wr-btn { background: var(--soft); color: var(--text); border-color: var(--line); }
.wr-cmd-out { overflow-y: auto; display: grid; gap: 12px; align-content: start; padding: 4px; }
.wr-cmd-block { display: grid; gap: 6px; }
.wr-cmd-echo { font: 700 0.85rem "JetBrains Mono", monospace; color: #7c3aed; }
.wr-cmd-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.wr-cmd-form input { padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--soft); color: var(--text); font: 0.95rem "JetBrains Mono", monospace; }
.wr-cmd-form input:focus { outline: none; border-color: #a78bfa; }
.wr-notice {
  position: absolute; z-index: 8; top: 132px; left: 50%; transform: translateX(-50%); max-width: min(700px, 90%);
  padding: 10px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: wrDrawerIn 0.2s ease-out;
  background: #14532d; color: #dcfce7; border: 1px solid #22c55e;
}
.wr-notice[hidden] { display: none; }
.wr-notice.err { background: #7f1d1d; color: #fee2e2; border-color: #ef4444; }
.wr-notice.info { background: #1e1b4b; color: #e0e7ff; border-color: #a78bfa; }
.wr-bar-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.wr-bar-col i { position: absolute; bottom: 0; left: 0; right: 0; height: var(--h); border-radius: 2px 2px 0 0; }
.wr-bar-col i.req { background: linear-gradient(180deg, #38bdf8, #1d4ed8); opacity: 0.85; }
.wr-bar-col i.blk { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.wr-bar-col b.sus { position: absolute; top: -2px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #f97316; box-shadow: 0 0 6px #f97316; }
.wr-lower > .wr-panel.wr-spot { grid-template-rows: minmax(0, 1fr) auto; }
#wrSpot.in { animation: wrSpotIn 0.5s ease-out; }
@keyframes wrSpotIn { from { opacity: 0; transform: translateX(14px); } }
.wr-spot-body { display: grid; gap: 6px; }
.wr-spot-row { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; min-width: 0; }
.wr-spot-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-spot-note { color: var(--wr-muted); font-size: 0.8rem; margin: 6px 0 0; }
.wr-big-ok { font-size: 1.1rem; font-weight: 700; color: #86efac; margin: 8px 0; }
.wr-big-warn { font-size: 1.1rem; font-weight: 700; color: #fdba74; margin: 8px 0; }
.wr-score { --p: 0; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(closest-side, #0a1120 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #1c2740 0); }
.wr-score b { font: 800 1.5rem/1 "JetBrains Mono", monospace; color: var(--c); margin-top: 22px; }
.wr-score small { font-size: 0.62rem; color: var(--wr-muted); margin-top: -22px; }
.wr-dots { display: flex; gap: 5px; justify-content: center; margin-top: 6px; }
.wr-dots i { width: 6px; height: 6px; border-radius: 50%; background: #1c2740; }
.wr-dots i.on { background: #a78bfa; box-shadow: 0 0 6px #a78bfa; }

/* right: feed, attackers, countries */
.wr-feed-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
#wrFeed { display: grid; gap: 5px; align-content: start; overflow: hidden; mask-image: linear-gradient(180deg, #000 80%, transparent); }
.wr-feed-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: #0a1120; border-left: 3px solid #38bdf8; font-size: 0.8rem; }
.wr-feed-row time { color: var(--wr-muted); font-size: 0.7rem; }
.wr-feed-row b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-feed-row small { display: block; color: var(--wr-muted); font-size: 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-feed-row.blocked { border-left-color: #ef4444; background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), #0a1120 60%); }
.wr-feed-row.suspicious { border-left-color: #f97316; background: linear-gradient(90deg, rgba(249, 115, 22, 0.12), #0a1120 60%); }
.wr-feed-row.info { border-left-color: #a78bfa; }
.wr-feed-row.new { animation: wrFeedIn 0.6s ease-out; }
@keyframes wrFeedIn { from { opacity: 0; transform: translateY(-10px); background: rgba(167, 139, 250, 0.35); } }
.wr-tag { --c: #38bdf8; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 6px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); white-space: nowrap; }
.wr-feed-row.blocked .wr-tag { --c: #f87171; }
.wr-feed-row.suspicious .wr-tag { --c: #fb923c; }
.wr-feed-row.info .wr-tag { --c: #c4b5fd; }
.wr-cc { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 4px; border-radius: 6px; background: #111a2e; border: 1px solid var(--wr-line); font-size: 0.7rem; font-weight: 700; }
#wrAttackers, #wrCountries { display: grid; gap: 5px; }
.wr-feed-panel { min-height: 220px; }
.wr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 0.8rem; }
.wr-row-main { display: grid; gap: 2px; min-width: 0; }
.wr-row-main small, .wr-row-main span { color: var(--wr-muted); font-size: 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-row-main span { color: var(--wr-text); font-size: 0.8rem; }
.wr-bar { display: block; height: 4px; width: var(--w); border-radius: 99px; background: var(--c); box-shadow: 0 0 6px var(--c); }
.wr-row-n { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: #f1f5ff; }

/* ticker */
.wr-ticker { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--wr-panel); border: 1px solid var(--wr-line); overflow: hidden; }
.wr-ticker-tag { font: 800 0.7rem "JetBrains Mono", monospace; padding: 3px 8px; border-radius: 6px; background: #ef4444; color: #fff; letter-spacing: 0.1em; }
.wr-ticker-track { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.wr-ticker-move { display: inline-flex; gap: 60px; animation: wrTicker var(--dur, 40s) linear infinite; font-size: 0.88rem; }
@keyframes wrTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* full-screen takeover */
.wr-takeover { --c: #ef4444; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 30%, #05070d) 0%, #05070d 68%); backdrop-filter: blur(6px); }
.wr-takeover[hidden] { display: none; }
.wr-takeover.show { animation: wrToIn 0.5s ease-out; }
@keyframes wrToIn { from { opacity: 0; } }
.wr-to-inner { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 30px; max-width: 900px; }
.wr-to-icon { font-size: 6rem; filter: drop-shadow(0 0 30px var(--c)); animation: wrToPulse 0.9s ease-in-out infinite; }
@keyframes wrToPulse { 50% { transform: scale(1.12); } }
.wr-to-inner small { font: 800 1.1rem "JetBrains Mono", monospace; letter-spacing: 0.3em; color: var(--c); }
.wr-to-inner h2 { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.1; color: #fff; text-shadow: 0 0 30px var(--c); margin: 0; }
.wr-to-inner p { font-size: 1.2rem; color: #cbd5e1; margin: 0; }

@media (max-width: 1200px) {
  .warroom { overflow-y: auto; grid-template-rows: auto auto auto; }
  .wr-body { grid-template-columns: 1fr; }
  .wr-left, .wr-right, .wr-centre { height: auto; }
  .wr-right, .wr-left { grid-template-rows: auto; }
  #wrFeed { max-height: 360px; }
  .wr-top { grid-template-columns: 1fr auto; }
  .wr-clock { display: none; }
}
@media (max-width: 700px) { .wr-lower { grid-template-columns: 1fr; } .wr-level { min-width: 0; } .wr-brand b { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) {
  .warroom, .warroom[data-level="redalert"], .warroom.lockdown, .wr-level, .wr-live, .wr-ticker-move, .wr-to-icon, .wr-counter.bump b, .wr-feed-row.new, #wrSpot.in { animation: none !important; }
  .wr-ticker-track { overflow-x: auto; }
}
/* public "Report a security problem" form */
.sr-rules { font-size: 0.84rem; color: var(--muted); }
#srBody[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .cy-watch-card.hot { animation: none; } }
.cc-steps { display: grid; gap: 6px; }
.cc-step { display: grid; gap: 1px; padding: 8px 12px; border-radius: 10px; background: var(--soft); border-left: 3px solid var(--ok); }
.cc-step.bad { border-left-color: var(--err); }
.cc-step.bad b { color: var(--err); }
.cc-step small { color: var(--muted); font-size: 0.82rem; }
.cc-report { max-height: 480px; }
.cc-row .cy-btn-row { grid-column: 2 / -1; }

/* ---------- Ban screen (people banned with /ban) ---------- */
.ban-screen {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto;
  background: radial-gradient(ellipse at top, #3b0a0a 0%, #12060a 55%, #07040a 100%);
  animation: banIn 0.5s ease;
}
.ban-screen[hidden] { display: none; }
body.is-banned { overflow: hidden; }
@keyframes banIn { from { opacity: 0; } }
.ban-card {
  width: 100%; max-width: 520px; text-align: center; padding: 40px 32px 32px; border-radius: 28px; color: #fde8e8;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.55), rgba(24, 10, 14, 0.85));
  border: 1px solid rgba(248, 113, 113, 0.35); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(220, 38, 38, 0.08);
  animation: banCard 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes banCard { from { transform: translateY(24px) scale(0.96); opacity: 0; } }
.ban-icon {
  width: 92px; height: 92px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 3rem; border-radius: 50%;
  background: rgba(220, 38, 38, 0.18); border: 2px solid rgba(248, 113, 113, 0.5); box-shadow: 0 0 40px rgba(220, 38, 38, 0.45);
  animation: banPulse 2.4s ease-in-out infinite;
}
@keyframes banPulse { 50% { box-shadow: 0 0 70px rgba(220, 38, 38, 0.7); } }
.ban-eyebrow { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #fca5a5; }
.ban-card h1 { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; margin: 6px 0 10px; color: #fff; }
.ban-lead { color: #fecaca; margin-bottom: 22px; }
.ban-details { display: grid; gap: 1px; text-align: left; border-radius: 16px; overflow: hidden; background: rgba(248, 113, 113, 0.2); margin-bottom: 18px; }
.ban-details div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 16px; background: rgba(15, 6, 9, 0.75); }
.ban-details dt { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #f87171; padding-top: 2px; }
.ban-details dd { color: #fff; font-weight: 600; word-break: break-word; }
#banRef { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.05em; }
.ban-list { list-style: none; display: grid; gap: 6px; text-align: left; margin: 0 auto 18px; max-width: 360px; color: #fecaca; font-size: 0.92rem; }
.ban-list li::before { content: "✕"; color: #f87171; font-weight: 800; margin-right: 10px; }
.ban-appeal { font-size: 0.88rem; color: #fca5a5; padding-top: 16px; border-top: 1px solid rgba(248, 113, 113, 0.2); }
.ban-appeal a { color: #fff; }
@media (max-width: 480px) {
  .ban-card { padding: 32px 20px 24px; }
  .ban-details div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Ban appeal (on the ban screen) + grouped /help ---------- */
.ban-screen { display: flex; }
.ban-screen[hidden] { display: none; }
.ban-card { margin: auto; max-width: 560px; }
.ban-appeal-box { display: grid; gap: 12px; text-align: left; margin: 4px 0 18px; padding-top: 18px; border-top: 1px solid rgba(248, 113, 113, 0.2); }
.ban-appeal-box[hidden] { display: none; }
.ban-appeal-box h3 { color: #fff; font-size: 1.1rem; }
.ban-appeal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ban-small { color: #fecaca; font-size: 0.88rem; }
.ban-btn {
  justify-self: center; font: inherit; font-weight: 800; font-size: 0.98rem; padding: 12px 22px; border-radius: 14px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #dc2626, #b91c1c); border: 1px solid #f87171; box-shadow: 0 10px 26px rgba(220, 38, 38, 0.35);
}
.ban-btn:hover { filter: brightness(1.1); }
.ban-btn:disabled { opacity: 0.6; cursor: wait; }
.ban-btn.ghost { background: transparent; box-shadow: none; }
.ban-form { display: grid; gap: 8px; }
.ban-form textarea {
  width: 100%; font: inherit; font-size: 0.93rem; padding: 12px 14px; border-radius: 14px; resize: vertical;
  background: rgba(15, 6, 9, 0.75); color: #fff; border: 1px solid rgba(248, 113, 113, 0.35); outline: none;
}
.ban-form textarea:focus { border-color: #f87171; }
.ban-form textarea::placeholder { color: #b98a8a; }
.ban-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ban-form-foot small { color: #d6a5a5; font-size: 0.8rem; }
.ban-form .ban-btn { justify-self: auto; padding: 10px 20px; }
.ban-msg { color: #fca5a5; font-size: 0.86rem; font-weight: 700; min-height: 1em; }
.ban-pill { font-size: 0.74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(250, 204, 21, 0.15); color: #fde68a; border: 1px solid rgba(250, 204, 21, 0.35); white-space: nowrap; }
.ban-pill.closed { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.35); }
.appeal-thread { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.appeal-msg { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(15, 6, 9, 0.7); border: 1px solid rgba(248, 113, 113, 0.18); }
.appeal-msg.user { margin-left: 28px; background: rgba(127, 29, 29, 0.45); }
.appeal-msg.staff { margin-right: 28px; border-color: rgba(134, 239, 172, 0.35); }
.appeal-msg.system { background: transparent; border-style: dashed; }
.appeal-msg b { font-size: 0.8rem; color: #fca5a5; }
.appeal-msg.staff b { color: #86efac; }
.appeal-msg p { color: #fff; font-size: 0.92rem; white-space: pre-wrap; word-break: break-word; }
.appeal-msg small { color: #b98a8a; font-size: 0.74rem; }
/* the same thread inside /banref (light/dark site colours) */
.appeal-thread.staff .appeal-msg { background: var(--soft); border-color: var(--line); }
.appeal-thread.staff .appeal-msg.user { background: color-mix(in srgb, #dc2626 8%, var(--card)); }
.appeal-thread.staff .appeal-msg p { color: var(--text); }
.appeal-thread.staff .appeal-msg b { color: var(--muted); }
.appeal-thread.staff .appeal-msg small { color: var(--faint); }
.cc-suggest { max-height: 50vh; overflow-y: auto; }
.cc-help-group { display: grid; gap: 6px; }
.cc-help-group h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 8px 0 2px; }
.cc-row .btn.del.small { padding: 4px 10px; font-size: 0.78rem; justify-self: end; }

/* =============================================================
   V1.2 — attachments, help suggestions, bot controls, promo codes,
   application timeline, status alerts, changelog, version, spam trap
   ============================================================= */

/* spam trap: off-screen for people, still "there" for bots */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- ticket attachments ---- */
.tk-reply, .tk-reply.staff { grid-template-columns: 1fr auto auto; }
.tk-attach { width: 48px; padding: 0; font-size: 1.15rem; }
.tk-msg.has-file { padding-bottom: 10px; }
.tk-file {
  display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; max-width: 340px;
}
.tk-file b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.tk-file small { color: var(--muted); white-space: nowrap; }
.tk-file i { font-style: normal; color: var(--accent); font-weight: 800; }
.tk-file:hover { border-color: var(--accent); }
.tk-file-img { display: block; margin-top: 6px; }
.tk-file-img img { display: block; max-width: min(320px, 100%); max-height: 260px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--soft); }
.tk-files { display: grid; gap: 6px; }
.tk-files input[type="file"] { padding: 10px; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--soft); }

/* ---- help suggestions on the new-ticket form ---- */
.tk-suggest {
  display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, #8b5cf6 8%, var(--card)); border: 1px solid color-mix(in srgb, #8b5cf6 30%, var(--line));
}
.tk-suggest[hidden] { display: none; }
.tk-suggest > small { color: var(--muted); }
.tk-suggest .help-item { background: var(--card); }

/* ---- bot controls (customer) ---- */
.bc-times { font-size: 0.8rem; }
.bc-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-request {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600; background: color-mix(in srgb, #d97706 10%, var(--card)); border: 1px solid color-mix(in srgb, #d97706 35%, var(--line));
}
.bc-events summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.bc-events ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.bc-events li { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; }
/* staff: a customer's request */
.hb-request {
  display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px;
  background: color-mix(in srgb, #d97706 10%, var(--card)); border: 1px solid color-mix(in srgb, #d97706 40%, var(--line));
}
.hb-request p { font-style: italic; color: var(--text-2); }
.hb-request small { color: var(--muted); }
.host-bot.has-request { box-shadow: 0 0 0 2px color-mix(in srgb, #d97706 45%, transparent); }

/* ---- promo codes ---- */
.inv-amt s { color: var(--muted); font-weight: 600; margin-right: 6px; font-size: 0.85rem; }
.inv-promo { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-promo input {
  font: inherit; text-transform: uppercase; width: 160px; padding: 7px 10px; border-radius: 10px;
  background: var(--card); border: 1.5px solid var(--line-2); color: var(--text);
}
.inv-promo.applied span { font-size: 0.85rem; font-weight: 700; color: #16a34a; }
:root[data-theme="dark"] .inv-promo.applied span { color: #6ee7a8; }
#promoForm .input-with-btn select[hidden] { display: none; }
.promo-row { flex-wrap: wrap; }

/* ---- application timeline ---- */
.app-timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 10px; padding: 0; position: relative; }
.at-step { display: grid; justify-items: center; text-align: center; gap: 3px; position: relative; }
.at-step::before { /* the line between dots */
  content: ""; position: absolute; top: 16px; right: 50%; width: 100%; height: 3px; background: var(--track); z-index: 0;
}
.at-step:first-child::before { display: none; }
.at-step.done::before, .at-step.now::before, .at-step.skipped::before { background: var(--accent); }
.at-dot {
  position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem;
  background: var(--soft); border: 2px solid var(--line-2);
}
.at-step.done .at-dot { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-color: var(--accent); }
.at-step.now .at-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.at-step.now.denied .at-dot { background: #dc2626; border-color: #dc2626; box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.2); }
.at-step.todo { opacity: 0.55; }
.at-step.skipped { opacity: 0.6; }
.at-step b { font-size: 0.78rem; line-height: 1.2; }
.at-step small { font-size: 0.72rem; color: var(--muted); min-height: 1em; }
.app-hist { font-size: 0.88rem; color: var(--text-2); }

/* ---- status alerts button ---- */
.status-alert-btn { margin-top: 12px; }
.status-alert-btn.on { border-color: var(--accent); color: var(--accent); }

/* ---- changelog ---- */
.ni-version {
  margin-right: auto; padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
  background: color-mix(in srgb, #8b5cf6 14%, var(--card)); color: #7c3aed; border: 1px solid color-mix(in srgb, #8b5cf6 35%, var(--line));
}
:root[data-theme="dark"] .ni-version { color: #c4b5fd; }
.changelog-group { display: grid; gap: 14px; margin-bottom: 26px; }
.cl-head { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.cl-head em { font-style: normal; font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #16a34a; color: #fff; }

/* ---- version in the footer ---- */
.site-version { margin-left: 8px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.site-version:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 600px) {
  .tk-reply, .tk-reply.staff { grid-template-columns: 1fr auto; }
  .tk-reply textarea { grid-column: 1 / -1; }
  .tk-attach { height: 44px !important; }
  .at-step b { font-size: 0.7rem; }
  .at-dot { width: 28px; height: 28px; font-size: 0.85rem; }
  .at-step::before { top: 13px; }
  .inv-promo input { width: 100%; flex: 1; }
}

/* =========================================================
   V1.3 — Navigation overhaul + phone layout
   Big screens: tab row in the top bar.
   1080px and under: tab row hides, the menu button opens the slide-out menu.
   720px and under: a bottom bar (Home, Host, Status, Support, Menu) like an app.
   ========================================================= */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: 12px; background: var(--accent); color: #fff; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

a.tab { text-decoration: none; }
.tab:focus-visible, .icon-btn:focus-visible, .mnav a:focus-visible, .mnav button:focus-visible,
.drawer-panel a:focus-visible, .drawer-panel button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* round icon buttons (bell, menu, close) */
.icon-btn {
  position: relative; display: grid; place-items: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover, .icon-btn.active { border-color: var(--accent); color: var(--accent); }
.icon-btn svg, .mnav svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn .tab-count { position: absolute; top: -6px; right: -6px; }
.menu-btn { display: none; }

/* ---------- Slide-out menu ---------- */
body.menu-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0; background: rgba(10, 12, 30, 0.45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.25s;
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
  display: flex; flex-direction: column;
  background: var(--card); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(20, 24, 60, 0.25);
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(.3, .8, .3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line);
}
.drawer-head .brand { font-size: 1rem; }
.drawer-head .brand-logo { width: 36px; height: 36px; border-radius: 10px; }
.drawer-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 16px; }
.drawer-account { padding: 10px 4px 14px; border-bottom: 1px solid var(--line); }
.da-hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.da-login { width: 100%; }
.da-head { display: flex; align-items: center; gap: 12px; padding: 4px 8px 10px; min-width: 0; }
.da-head b { display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-head span { color: var(--muted); font-size: 0.85rem; }
.da-head > div { min-width: 0; }
.da-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.da-item {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
  font: inherit; font-size: 0.86rem; font-weight: 700; color: var(--text); text-align: left; cursor: pointer;
}
.da-item:hover { border-color: var(--accent); color: var(--accent); }
.da-item.out { grid-column: 1 / -1; justify-content: center; color: var(--err); background: none; }
.da-item .um-count { margin-left: auto; }
.drawer-group { padding: 14px 0 6px; }
.drawer-group + .drawer-group { border-top: 1px solid var(--line); }
.drawer-group h4 {
  padding: 0 12px 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.drawer-group a {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px; border-radius: 12px;
  color: var(--text); text-decoration: none; font-weight: 650; font-size: 0.98rem;
  transition: background 0.15s, color 0.15s;
}
.drawer-group a > span:first-child { width: 24px; text-align: center; font-size: 1.05rem; }
.drawer-group a:hover { background: var(--soft); color: var(--accent); }
.drawer-group a.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.drawer-group a .tab-count, .drawer-group a .tab-pill, .drawer-group a small { margin-left: auto; font-style: normal; }
.drawer-group a small { color: var(--faint); }
.drawer-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 12px 16px; border-top: 1px solid var(--line); font-size: 0.86rem;
}
.drawer-foot a { color: var(--muted); text-decoration: none; }
.drawer-theme {
  margin-right: auto; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.86rem; color: var(--text);
  background: var(--soft); border: 1px solid var(--line);
}

/* ---------- Phone bottom bar ---------- */
.mnav { display: none; }
.mnav-ic { position: relative; display: grid; place-items: center; }
.mnav-ic .live-dot { position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; }
.mnav-ic .tab-count { position: absolute; top: -7px; left: 12px; min-width: 18px; height: 18px; font-size: 0.66rem; padding: 0 5px; }

/* ---------- Footer columns ---------- */
.footer-inner { align-items: flex-start; }
.footer-brand { align-items: flex-start; }
.footer-brand .btn { margin-top: 12px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(130px, auto)); gap: 12px 48px; }
.footer-col { display: flex; flex-direction: column; gap: 2px; }
.footer-col h4 { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.93rem; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }

/* ---------- Tablets: menu instead of tabs ---------- */
@media (max-width: 1080px) {
  .topbar { display: flex; justify-content: space-between; padding: 10px 20px; }
  .tabs { display: none; }
  .menu-btn { display: grid; }
}

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  :root { --mnav-h: 62px; }
  .topbar { padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); gap: 8px; }
  .brand-logo { width: 38px; height: 38px; border-radius: 11px; }
  .top-right { gap: 8px; }
  .hide-phone, .join-btn, .topbar .menu-btn { display: none !important; }
  .icon-btn, .theme-btn { width: 38px; height: 38px; }
  .login-btn { padding: 8px 14px; }

  .mnav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    height: calc(var(--mnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(40, 50, 120, 0.08);
  }
  .mnav a, .mnav button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: none; font: inherit; cursor: pointer;
    color: var(--muted); text-decoration: none; font-size: 0.7rem; font-weight: 700;
    -webkit-tap-highlight-color: transparent;
  }
  .mnav a.active { color: var(--accent); }
  .mnav a.active svg { stroke-width: 2.4; }
  .mnav a.active::before {
    content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad);
  }

  /* leave room for the bottom bar */
  body { padding-bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(var(--mnav-h) + 14px + env(safe-area-inset-bottom)); right: 14px; width: 44px; height: 44px; }
  .toast { bottom: calc(var(--mnav-h) + 16px + env(safe-area-inset-bottom)); }

  /* footer: three short columns side by side */
  .footer-inner { flex-direction: column; align-items: stretch; gap: 24px; }
  .footer-brand { flex-direction: row; text-align: left; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .footer-col a { font-size: 0.88rem; padding: 6px 0; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 380px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .da-items { grid-template-columns: 1fr; }
}

:root[data-theme="dark"] .mnav { background: rgba(14, 16, 32, 0.9); }
:root[data-theme="dark"] .drawer-panel { box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5); }
:root[data-theme="dark"] .da-item.out { background: none; }

/* the page slide-in animation must never make the page wider than the phone */
main { overflow-x: clip; }
@media (max-width: 880px) { .hero-art { text-align: left; } }
.staff-login-wrap[hidden] { display: none; }
@media (max-width: 720px) {
  .footer-inner, .footer-cols, .footer-col { text-align: left; justify-content: flex-start; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .footer-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .footer-col:last-child h4 { grid-column: 1 / -1; }
  /* iPhones zoom the whole page in when you tap a box with text under 16px */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
}
/* tickets: list on top, conversation underneath on tablets/phones
   (a later "330px 1fr" rule was overriding the old phone rule) */
@media (max-width: 1000px) {
  .support-layout, .support-layout.staff { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* staff tabs: one row you can swipe sideways instead of five rows of buttons */
  .admin-switch {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 -16px 18px; padding: 2px 16px 6px; scroll-padding: 0 16px;
  }
  .admin-switch::-webkit-scrollbar { display: none; }
  .admin-switch .chip { flex-shrink: 0; }
  .admin-actions { width: 100%; }
  .admin-actions .btn { flex: 1; }
  /* staff card: buttons full width */
  .staff-login { grid-template-columns: auto 1fr; padding: 20px; }
  .sl-input { flex-direction: column; align-items: stretch; }
  .sl-input .btn { width: 100%; }
}
/* stop the sticky top bar covering things we scroll to */
.panel [id], .tk-view, .tk-new { scroll-margin-top: 84px; }
/* profile header on phones: centred (a later desktop rule was pushing it to the right) */
.pc-main { position: relative; z-index: 1; }
@media (max-width: 600px) {
  .pc-main { align-items: center; }
  .pc-names { flex: none; }
  .pc-actions { margin: 0 0 12px; }
}
@media (max-width: 720px) { .admin-switch { align-items: center; } .admin-switch .chip { padding: 9px 14px; } }

/* =========================================================
   Pricing page (V1.3): free bots, currency, compare table,
   hosting monthly/yearly, cost calculator, bundles, perks
   ========================================================= */
.free-bots {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 22px;
  padding: 22px 26px; margin-bottom: 26px; border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--card)), color-mix(in srgb, var(--pink) 8%, var(--card)));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: var(--shadow);
}
.fb-icon { font-size: 2.2rem; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.fb-text b { font-size: 1.2rem; }
.fb-text p { color: var(--muted); font-size: 0.95rem; }
.fb-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* segmented switches (currency, monthly/yearly) */
.price-tools { display: flex; align-items: center; justify-content: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 22px; }
.price-tools[hidden] { display: none; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.seg button {
  font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--muted); cursor: pointer;
  padding: 8px 16px; border: none; border-radius: 999px; background: none; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s, color 0.2s;
}
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 3px 10px rgba(40, 50, 120, 0.12); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-save { font-style: normal; font-size: 0.7rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.seg-save:empty { display: none; }
.cur-note { color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.cur-note[hidden] { display: none; }

/* plan cards: "from", delivery + changes */
.plan-price .from { font-size: 0.85rem; font-weight: 700; color: var(--muted); align-self: center; }
.plan-meta {
  display: grid; gap: 6px; margin: -8px 0 18px; padding: 10px 12px; border-radius: 12px;
  background: var(--soft); font-size: 0.85rem; color: var(--muted);
}
.plan-meta b { color: var(--text); font-weight: 700; }

/* comparison table */
.compare-scroll { overflow-x: auto; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); margin-bottom: 56px; }
.compare-scroll[hidden], .price-group[hidden] { display: none; }
.compare-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.93rem; }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }
.compare thead th { font-size: 0.95rem; vertical-align: bottom; background: var(--soft); }
.compare thead th small { display: block; font-size: 0.82rem; font-weight: 800; color: var(--c); }
.compare tbody th { text-align: left; font-weight: 600; color: var(--text-2, var(--text)); position: sticky; left: 0; background: var(--card); }
.compare thead th:first-child { position: sticky; left: 0; z-index: 1; }
.compare td.yes span { color: var(--ok); font-weight: 800; font-size: 1.1rem; }
.compare td.no span { color: var(--faint); }
.compare tbody tr:hover td, .compare tbody tr:hover th { background: color-mix(in srgb, var(--accent) 5%, var(--card)); }

/* hosting cards: now with what's included */
.host-tier { position: relative; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.host-tier.popular { border: 2px solid var(--c); }
.host-tier .plan-badge { top: 12px; right: 12px; left: auto; transform: none; }
.ht-top { display: flex; align-items: center; gap: 14px; }
.ht-was { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.ht-list { list-style: none; display: grid; gap: 8px; flex: 1; font-size: 0.92rem; }
.ht-list li { position: relative; padding-left: 24px; }
.ht-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c); font-weight: 800; }
.host-tier .btn { width: 100%; }

/* cost calculator */
.calc {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; padding: 24px; margin-bottom: 56px;
  border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.calc-fields { display: grid; gap: 14px; align-content: start; }
.calc-fields label { display: grid; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.calc-fields label[hidden] { display: none; }
.calc-fields select {
  font: inherit; font-weight: 600; padding: 11px 14px; border-radius: 12px; color: var(--text);
  background: var(--soft); border: 1.5px solid var(--line-2, var(--line));
}
.calc-fields select:focus { outline: none; border-color: var(--accent); }
.calc-out {
  display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--card)), color-mix(in srgb, var(--purple) 9%, var(--card)));
}
.calc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-line span { color: var(--muted); font-weight: 600; }
.calc-line b { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.calc-sum { color: var(--muted); font-size: 0.86rem; flex: 1; }
.calc-out .btn { width: 100%; }

/* bundles */
.bundles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 56px; }
.bundle {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px;
  border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.bundle h4 { font-size: 1.2rem; }
.bundle ul { list-style: none; display: grid; gap: 8px; flex: 1; margin: 4px 0; }
.bundle li { position: relative; padding-left: 26px; font-weight: 600; }
.bundle li::before { content: "＋"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.bundle-price { display: flex; align-items: baseline; gap: 10px; }
.bundle-price strong { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.bundle-price s { color: var(--faint); font-weight: 700; }
.bundle-save {
  position: absolute; top: 16px; right: 16px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; color: #fff; background: var(--ok);
}

/* promo + referral */
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 56px; }
.perk { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.perk-icon { font-size: 1.6rem; width: 50px; height: 50px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--soft); }
.perk b { display: block; margin-bottom: 2px; }
.perk p { color: var(--muted); font-size: 0.92rem; }
.perk p b { display: inline; color: var(--text); }
#priceReviewsBlock .reviews { margin-bottom: 56px; }

@media (max-width: 900px) {
  .free-bots { grid-template-columns: auto 1fr; }
  .fb-btns { grid-column: 1 / -1; justify-content: stretch; }
  .fb-btns .btn { flex: 1; }
  .calc { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .free-bots { padding: 18px; text-align: left; }
  .fb-icon { width: 50px; height: 50px; font-size: 1.7rem; }
  .compare { font-size: 0.86rem; min-width: 560px; }
  .compare th, .compare td { padding: 11px 12px; }
  .calc { padding: 16px; }
  .calc-line b { font-size: 1.35rem; }
  .seg button { padding: 8px 12px; font-size: 0.86rem; }
  .extra { flex-wrap: wrap; gap: 4px 16px; }
}
/* the "Recommended" ribbon sat on top of the plan name */
.plan.popular { padding-top: 50px; }
/* phones: tell people the comparison table scrolls sideways */
.compare-hint { display: none; }
@media (max-width: 700px) {
  .compare-hint { display: block; text-align: center; color: var(--muted); font-size: 0.84rem; font-weight: 600; margin: -10px 0 10px; }
}
.compare-hint[hidden] { display: none !important; }

/* ---------- Staff → Content → Pricing editor ---------- */
.pe-state { font-size: 0.82rem; font-weight: 700; color: var(--muted); padding: 5px 11px; border-radius: 999px; background: var(--soft); }
.pe { display: grid; gap: 18px; }
.pe-section { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-section > .btn { justify-self: start; }
.pe-section h4 { font-size: 1rem; }
.pe-note { color: var(--muted); font-size: 0.85rem; margin-top: -6px; }
.pe-list { display: grid; gap: 8px; }
.pe-item { border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.pe-item[open] { background: var(--card); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pe-item summary { cursor: pointer; padding: 11px 14px; font-weight: 700; font-size: 0.92rem; list-style: none; display: flex; align-items: center; gap: 8px; }
.pe-item summary::-webkit-details-marker { display: none; }
.pe-item summary::before { content: "▸"; color: var(--muted); transition: transform 0.2s; }
.pe-item[open] summary::before { transform: rotate(90deg); }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 14px 12px; }
.pe-section > .pe-grid { padding: 0; }
.pe-field.wide { grid-column: 1 / -1; }
.ed-card .pe-check { display: flex; align-items: center; gap: 10px; font-weight: 600; align-self: end; padding-bottom: 10px; }
.ed-card .pe-check input { width: 18px; height: 18px; }
.ed-card .pe-field input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.pe-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 14px 14px; }
.pe-tools .pe-del { margin-left: auto; color: var(--err); }
@media (max-width: 640px) {
  .pe-grid { grid-template-columns: 1fr; }
  .pe-tools .btn { flex: 1; }
  .pe-tools .pe-del { margin-left: 0; }
}

/* =========================================================
   Host a Bot (V1.3): perks, smart upload checks, progress,
   bot cards with tabs, monitoring, staff extras
   ========================================================= */
.host-perks { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 22px; }
.host-perks li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.host-perks span { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--soft); font-size: 1.2rem; }
.host-perks b { font-size: 0.95rem; }
.host-perks small { color: var(--muted); font-size: 0.82rem; }

/* layout: no bots → form + "My bots" side by side; with bots → your bots first, form opens from "＋ Host a bot" */
.host-layout { grid-template-columns: 1.3fr 1fr; }
.host-layout .host-form { order: 1; }
.host-layout .my-bots { order: 2; }
.host-layout.has-bots { grid-template-columns: 1fr; }
.host-layout.has-bots .my-bots { order: 1; }
.host-layout.has-bots .host-form { order: 2; }
.host-form[hidden] { display: none; }
.my-bots-head { flex-wrap: wrap; }
.my-bots-head h3 { margin-right: auto; }
.mb-usage { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.mb-usage[hidden] { display: none; }
.mb-usage .up-bar { width: 90px; }
#myBots { display: grid; gap: 14px; }

/* upload checks */
.up-checks { list-style: none; display: grid; gap: 8px; }
.up-checks:empty { display: none; }
.up-check {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px;
  font-size: 0.88rem; background: var(--soft); border: 1px solid var(--line);
}
.up-check p { flex: 1; min-width: 200px; }
.up-check.err { background: color-mix(in srgb, var(--err) 9%, var(--card)); border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.up-check.warn { background: color-mix(in srgb, #d97706 9%, var(--card)); border-color: color-mix(in srgb, #d97706 35%, var(--line)); }
.up-check.ok { background: color-mix(in srgb, var(--ok) 9%, var(--card)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.up-check small { color: var(--ok); font-weight: 700; }
.host-form .hint, .bs .hint, .bm .hint, .bs-envset .hint { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
#detectHint { color: var(--accent); font-weight: 600; }
#detectHint:empty { display: none; }
.up-guide { border-radius: 14px; background: var(--soft); border: 1px solid var(--line); padding: 10px 14px; font-size: 0.9rem; }
.up-guide summary { cursor: pointer; font-weight: 700; }
.up-guide ul { margin: 10px 0 2px 18px; display: grid; gap: 6px; color: var(--text-2, var(--text)); }
.up-guide code, .bs-env code, .bm-url code { font-size: 0.82rem; padding: 1px 6px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }

/* progress bars */
.up-progress { display: grid; gap: 6px; }
.up-progress[hidden] { display: none; }
.up-bar { height: 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width 0.25s; }
.up-progress small { color: var(--muted); font-weight: 600; }

/* bot card */
.bot-card { gap: 12px; padding: 18px; margin: 0; background: var(--card); box-shadow: var(--shadow); border-left-width: 5px; }
.bc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bc-lang { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; background: var(--soft); font-size: 1.3rem; }
.bc-title { flex: 1; min-width: 140px; display: grid; }
.bc-title b { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.bc-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); overflow-x: auto; scrollbar-width: none; }
.bc-tabs::-webkit-scrollbar { display: none; }
.bc-tab {
  flex: 1 0 auto; font: inherit; font-weight: 700; font-size: 0.86rem; color: var(--muted); cursor: pointer;
  padding: 8px 12px; border: none; border-radius: 9px; background: none; white-space: nowrap;
}
.bc-tab:hover { color: var(--text); }
.bc-tab.on { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(40, 50, 120, 0.1); }
.bc-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bc-body { display: grid; gap: 12px; }

/* setup tracker */
.bc-track { list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #d97706 8%, var(--card)); }
.bc-track li { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.bc-track li:nth-child(-n+2)::after { content: "→"; margin-left: 4px; color: var(--faint); }
.bc-track li i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2, var(--line)); }
.bc-track li.bt-done { color: var(--ok); }
.bc-track li.bt-done i { background: var(--ok); }
.bc-track li.bt-now { color: #b45309; }
.bc-track li.bt-now i { background: #d97706; animation: livePulse 1.6s infinite; --dot: #d97706; }
.bc-track-note { width: 100%; font-weight: 500 !important; }
.bc-track-note::after { display: none; }
.bc-changes { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); font-size: 0.88rem; }
.bc-changes summary { cursor: pointer; font-weight: 700; }
.bc-changes ul { margin: 8px 0 0 18px; display: grid; gap: 4px; color: var(--text-2, var(--text)); }

/* overview */
.bo { display: grid; gap: 12px; }
.bo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bo-stat { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--soft); min-width: 0; }
.bo-stat small { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.bo-stat b { font-size: 1.1rem; }
.bo-stat span { font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-tip {
  display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: 0.88rem; color: var(--text); cursor: pointer;
  padding: 10px 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: none;
}
.bo-tip:hover { background: var(--soft); }
.bo-invite { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.bo-invite b { font-size: 0.9rem; }
.bo-invite-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bo-invite select, .bs select, .bs input:not([type=checkbox]), .bf-new > input, .bs-env-row input {
  font: inherit; font-size: 0.9rem; padding: 9px 12px; border-radius: 10px; color: var(--text);
  background: var(--soft); border: 1.5px solid var(--line-2, var(--line)); min-width: 0;
}
.bo-invite select { flex: 1; min-width: 180px; }
.bs input:focus, .bs select:focus, .bf-new > input:focus, .bs-env-row input:focus, .bo-invite select:focus { outline: none; border-color: var(--accent); background: var(--card); }
.bc-btns { align-items: center; justify-content: space-between; }

/* settings */
.bs { display: grid; gap: 12px; }
.bs label { display: grid; gap: 6px; font-weight: 700; font-size: 0.88rem; }
.bs .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-line { display: flex !important; align-items: center; gap: 10px; font-weight: 600 !important; font-size: 0.9rem; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--accent); }
.bs-envset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.bs-envset legend { font-weight: 800; font-size: 0.9rem; padding: 0 6px; }
.bs-env { list-style: none; display: grid; gap: 6px; }
.bs-env li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-size: 0.88rem; }
.bs-env li span { flex: 1; color: var(--muted); letter-spacing: 0.1em; }
.bs-env li.gone { opacity: 0.6; text-decoration: line-through; }
.bs-env li.gone span { letter-spacing: 0; text-decoration: none; }
.bs-env li.env-none span { letter-spacing: 0; }
.bs-env-new { display: grid; gap: 6px; }
.bs-env-new:empty { display: none; }
.bs-env-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; }
.bs-envset > .btn { justify-self: start; }
.bs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bs-foot small { flex: 1; min-width: 200px; font-size: 0.8rem; }

/* files */
.bf { display: grid; gap: 12px; }
.bf-usage { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.bf-list { list-style: none; display: grid; gap: 6px; }
.bf-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--soft); }
.bf-list b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.9rem; }
.bf-list small { color: var(--muted); font-size: 0.8rem; }
.bf-new { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.bf-new > .btn { justify-self: start; }
.dropzone.small { padding: 18px; gap: 4px; }
.dropzone.small .dz-icon { font-size: 1.4rem; }

/* monitoring */
.bm, .bm-off { display: grid; gap: 12px; }
.bm-off { justify-items: center; text-align: center; padding: 10px 6px; }
.bm-off p { color: var(--muted); font-size: 0.92rem; max-width: 460px; }
.bm-health { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); }
.bm-health > div:nth-child(2) { flex: 1; display: grid; }
.bm-health small { color: var(--muted); }
.bm-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); }
.bm-total { display: grid; text-align: right; }
.bm-total b { font-size: 1.3rem; }
.bm-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 30px; }
.bm-bars i, .bm-legend i { display: block; border-radius: 3px; background: var(--ok); }
.bm-bars i.ok, .bm-legend i.ok { background: #f59e0b; }
.bm-bars i.bad, .bm-legend i.bad { background: var(--err); }
.bm-bars i.none, .bm-legend i.none { background: var(--line); }
.bm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.bm-legend span { display: flex; align-items: center; gap: 5px; }
.bm-legend i { width: 10px; height: 10px; }
.bm-step { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.bm-step > .btn { justify-self: start; }
.bm-step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bm-step .seg button { padding: 6px 12px; font-size: 0.82rem; }
.bm-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bm-url code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; }
.bm-code { margin: 0; padding: 12px 14px; border-radius: 12px; background: #14162d; color: #e6e8ff; font-size: 0.8rem; line-height: 1.55; overflow-x: auto; white-space: pre; }
.bm-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* activity */
.ba { list-style: none; display: grid; gap: 0; }
.ba li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0 9px 18px; border-left: 2px solid var(--line); position: relative; font-size: 0.88rem; }
.ba li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.ba time { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

/* "Don't have a bot yet?" + hosting questions */
.host-build {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0 8px; padding: 20px 24px; border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--card)), color-mix(in srgb, var(--pink) 8%, var(--card)));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}
.host-build > span { font-size: 1.8rem; }
.host-build > div { flex: 1; min-width: 220px; }
.host-build p { color: var(--muted); font-size: 0.93rem; }
.host-faq { margin-top: 40px; }

/* staff Hosting tab extras */
.hb-down { border-color: color-mix(in srgb, var(--err) 40%, var(--line)) !important; background: color-mix(in srgb, var(--err) 7%, var(--card)) !important; }
.hb-changes { margin: 4px 0 2px 18px; display: grid; gap: 3px; font-size: 0.88rem; }
.hb-changes small { color: var(--muted); }
.hb-env { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 0.8rem; white-space: pre-wrap; word-break: break-all; width: 100%; }

@media (max-width: 1000px) {
  .host-perks { grid-template-columns: 1fr 1fr; }
  .host-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .host-perks { grid-template-columns: 1fr 1fr; gap: 8px; }
  .host-perks li { padding: 10px 12px; column-gap: 10px; }
  .host-perks span { width: 34px; height: 34px; font-size: 1rem; }
  .host-perks small { display: none; }
  .host-perks span { grid-row: auto; }
  .bot-card { padding: 14px; }
  .bo-stats { grid-template-columns: 1fr 1fr; }
  .bs .row { grid-template-columns: 1fr; }
  .bs-env-row { grid-template-columns: 1fr auto; }
  .bs-env-row input:nth-child(2) { grid-column: 1; }
  .bs-env-row .icon-btn { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .bm-bars { gap: 2px; height: 26px; }
  .host-build { padding: 18px; }
  .host-build .btn { width: 100%; }
  .bc-tab { padding: 8px 10px; font-size: 0.82rem; }
}
/* bot cards must shrink to the screen (long links / code boxes scroll inside instead) */
.host-layout > *, #myBots > *, .bot-card, .bot-card > *, .bc-body, .bc-body > *, .bo > *, .bm > *, .bs > *, .bf > *, .bm-step > * { min-width: 0; }

/* =============================================================
   V1.3 SUPPORT — ticket list, conversation, new-ticket form
   ============================================================= */
/* logged out: how it works */
.sup-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 10px; padding: 0; width: 100%; max-width: 640px; }
.sup-steps li { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 14px 10px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.sup-steps span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 0.85rem; margin-bottom: 4px; }
.sup-steps b { font-size: 0.92rem; }
.sup-steps small { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 640px) { .sup-steps { grid-template-columns: 1fr; } }

/* sidebar list */
.tk-search[hidden] { display: none; }
.tk-list { gap: 8px; max-height: 62vh; grid-template-columns: minmax(0, 1fr); }
.tk-item { gap: 6px; padding: 12px 14px 12px 16px; position: relative; min-width: 0; }
.tk-item > * { min-width: 0; }
.tk-item-top { gap: 8px; }
.tk-item-cat { font-size: 1rem; flex-shrink: 0; }
.tk-item-top .tk-item-sub { flex: 1; font-size: 0.95rem; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-prev { color: var(--muted); font-size: 0.84rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tk-item-foot small { color: var(--faint); font-size: 0.76rem; font-weight: 600; }
.tk-wait-pill { font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.tk-item.w-you .tk-wait-pill { color: #b45309; background: color-mix(in srgb, #f59e0b 14%, var(--card)); border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
.tk-item.w-closed { opacity: 0.8; }
.tk-item.unread::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: #f59e0b; }
.tk-none { display: grid; gap: 4px; justify-items: center; }
.tk-none-icon { font-size: 1.8rem; opacity: 0.8; }
.tk-none small { color: var(--faint); font-size: 0.82rem; max-width: 220px; }

/* new ticket */
.tk-new { gap: 20px; }
.tk-new-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tk-new-head .tk-sub { margin-top: 4px; }
.tk-live {
  font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; text-decoration: none;
  color: var(--text); background: var(--soft); border: 1px solid var(--line);
}
.tk-live.bad { background: color-mix(in srgb, var(--sc) 12%, var(--card)); border-color: color-mix(in srgb, var(--sc) 40%, transparent); }
.tk-step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.75rem; font-weight: 800; margin-right: 8px; flex-shrink: 0; }
.cat-picker legend { display: flex; align-items: center; }
.tk-group { display: grid; gap: 12px; }
.tk-group-title { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; margin: 0; }
.tk-group-title em { font-style: normal; color: var(--faint); font-weight: 600; margin-left: 4px; }
.tk-write { display: grid; grid-template-columns: 1fr 240px; gap: 14px; align-items: start; }
.tk-write .tk-tips { margin-top: 26px; }
@media (max-width: 900px) { .tk-write { grid-template-columns: 1fr; } .tk-write .tk-tips { margin-top: 0; } }
.tk-new label.tk-drop {
  position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer;
  padding: 22px 16px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--soft); transition: border-color 0.2s, background 0.2s;
}
.tk-drop:hover, .tk-drop.over, .tk-drop:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.tk-new .tk-drop-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.tk-drop-icon { font-size: 1.5rem; }
.tk-drop b { font-size: 0.92rem; font-weight: 700; }
.tk-drop u { color: var(--accent); text-underline-offset: 3px; }
.tk-drop small { color: var(--faint); font-weight: 600; }
.tk-chosen { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-chosen:empty { display: none; }
.tk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 0.84rem; max-width: 100%; }
.tk-chip b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.tk-chip small { color: var(--faint); }
.tk-chip button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: 0.8rem; }
.tk-chip button:hover { background: var(--soft); color: var(--err); }

/* conversation */
.tk-view { gap: 14px; }
.tk-back { display: none; justify-self: start; }
.tk-who { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.tk-head-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--soft); border: 1px solid var(--line); }
.tk-handler { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.84rem; color: var(--muted); }
.tk-handler .tk-av { width: 22px; height: 22px; font-size: 0.7rem; }
.tk-handler.muted { font-style: italic; color: var(--faint); }
.tk-progress { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; padding: 0; margin: 2px 0 0; }
.tk-progress li { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; text-align: center; margin: 0; padding: 0; }
.tk-progress li + li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.tk-progress li.done + li.done::before, .tk-progress li.done + li.now::before { background: linear-gradient(90deg, var(--ok), var(--accent)); }
.tk-progress i { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 0.8rem; font-weight: 800; background: var(--card); border: 2px solid var(--line-2); color: var(--faint); }
.tk-progress li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.tk-progress li.now i { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.tk-progress b { font-size: 0.8rem; }
.tk-progress small { color: var(--faint); font-size: 0.74rem; min-height: 1em; }
.tk-wait { padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; font-weight: 600; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.tk-wait[hidden] { display: none; }
.tk-wait.w-you { color: #92400e; background: color-mix(in srgb, #f59e0b 12%, var(--card)); border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
:root[data-theme="dark"] .tk-wait.w-you, :root[data-theme="dark"] .tk-item.w-you .tk-wait-pill { color: #fcd34d; }
.tk-thread { gap: 6px; padding: 8px 4px; }
.tk-day { align-self: stretch; margin: 10px 0 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 10px; }
.tk-day::before, .tk-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* bubbles use theme colours (the old fixed light grey was unreadable in dark mode) */
.tk-msg { margin-top: 6px; background: var(--soft); color: var(--text); }
.tk-msg.cont { margin-top: 0; }
.tk-msg.cont .tk-meta { display: none; }
.tk-msg.mine.cont { border-top-right-radius: 6px; }
.tk-msg.theirs.cont { border-top-left-radius: 6px; }
.tk-msg.mine { color: #fff; }
.tk-msg.staff.theirs { background: color-mix(in srgb, var(--ok) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.tk-sys { background: var(--soft); margin: 4px 0; }
.tk-closed { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; }
.tk-closed > span { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tk-reopen-note { flex-basis: 100%; color: var(--faint); font-size: 0.78rem; text-align: center; }

@media (max-width: 1000px) {
  .tk-back { display: inline-flex; }
}
@media (max-width: 640px) {
  .tk-progress b { font-size: 0.74rem; }
  .tk-head-icon { display: none; }
}

/* =============================================================
   V1.3 TEAM + APPLY
   ============================================================= */
/* departments without a lead */
.dept-lead.open-lead {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 0.8rem; font-weight: 600;
  padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--soft); border: 1px dashed var(--line-2); color: var(--faint);
}
.dept-lead.open-lead i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 0.72rem; font-weight: 800;
  color: var(--faint); border: 1.5px dashed var(--line-2);
}
.dept-lead.open-lead b { color: var(--muted); }

/* your applications (sidebar) */
.my-apps-card { display: grid; gap: 8px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.my-apps-card[hidden] { display: none; }
.mac-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.apply-side .mac-head h3 { margin: 0 0 4px; }
.mac-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.mac-icon { font-size: 1.1rem; }
.mac-main { display: grid; min-width: 0; }
.mac-main b { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mac-main small { color: var(--faint); font-size: 0.76rem; }
.mac-pill { font-size: 0.7rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--card)); white-space: nowrap; }

/* step 1: time zone */
.tz-use {
  justify-self: start; border: 0; background: none; padding: 2px 0; cursor: pointer; font: inherit;
  font-size: 0.8rem; font-weight: 700; color: var(--accent); text-align: left;
}
.tz-use:hover { text-decoration: underline; text-underline-offset: 3px; }
.tz-use[hidden] { display: none; }

/* step 2: search, picked role */
.role-find {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--soft); color: var(--text); font: inherit;
}
.role-find:focus { outline: none; border-color: var(--accent); }
.role-pill[hidden] { display: none !important; }
.role-group[hidden] { display: none; }
.role-list.none::after { content: "No roles match that. Try another word."; color: var(--faint); font-size: 0.9rem; padding: 8px 2px; }
.role-pill.applied span::after { content: " · applied"; font-size: 0.76rem; font-weight: 700; opacity: 0.75; }
.role-picked {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--c) 8%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.role-picked[hidden] { display: none; }
.rp-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--card); border: 1px solid var(--line); }
.rp-main { display: grid; gap: 1px; min-width: 0; }
.rp-main small { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.rp-main b { font-size: 1.05rem; }
.rp-main span { color: var(--muted); font-size: 0.86rem; }
.rp-main .rp-lead { color: var(--faint); font-size: 0.8rem; font-weight: 600; }
.rp-warn { grid-column: 1 / -1; margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 0.86rem; font-weight: 600; color: #92400e; background: color-mix(in srgb, #f59e0b 14%, var(--card)); }
:root[data-theme="dark"] .rp-warn { color: #fcd34d; }

/* step 3: tips + counts */
.q-tips { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.q-tips b { color: var(--text); font-size: 0.88rem; }
.fstep .char-count { justify-self: end; }

/* step 4: review */
.review-intro { color: var(--muted); margin: -8px 0 0; }
.app-review { display: grid; gap: 14px; }
.rv-group { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rv-group h4 { margin: 0; padding: 10px 16px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); }
.rv-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 16px; }
.rv-row + .rv-row { border-top: 1px solid var(--line); }
.rv-label { color: var(--faint); font-size: 0.85rem; font-weight: 700; }
.rv-value { font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow: auto; }
.rv-value.empty { color: var(--faint); font-style: italic; }
@media (max-width: 560px) { .rv-row { grid-template-columns: minmax(0, 1fr) auto; } .rv-label { grid-column: 1 / -1; } }

/* draft note between Back and Next */
.form-nav { align-items: center; }
.draft-note { flex: 1; text-align: center; color: var(--faint); font-size: 0.8rem; font-weight: 600; }
@media (max-width: 640px) { .draft-note { display: none; } .stepper-labels { font-size: 0.72rem; } }
#applyForm .row { align-items: start; }

/* =============================================================
   V1.3 STAFF AREA + ADMIN PANEL — one layout for both
   ============================================================= */
/* compact header (the work starts higher up the page) */
.staff-head, .ap-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.staff-title, .ap-head .page-title { margin: 4px 0 0; font-size: clamp(1.7rem, 3vw, 2.3rem) !important; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.staff-head .admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* sidebar */
.staff-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.staff-main { min-width: 0; display: grid; gap: 18px; align-content: start; scroll-margin-top: 90px; }
.staff-main > [hidden] { display: none !important; }
.admin-switch.staff-nav {
  position: sticky; top: 100px; display: grid; gap: 2px; padding: 8px; margin: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); flex-wrap: nowrap;
}
.staff-nav .chip.big, .staff-nav .sn-link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 700; font-size: 0.93rem;
  color: var(--muted); padding: 10px 12px; border-radius: 14px; border: none; background: transparent; cursor: pointer; box-shadow: none;
  transition: background 0.2s, color 0.2s;
}
.staff-nav .chip.big > span:first-child, .staff-nav .sn-link > span:first-child { width: 22px; text-align: center; flex-shrink: 0; }
.staff-nav .chip.big:hover, .staff-nav .sn-link:hover { background: var(--soft); color: var(--text); }
.staff-nav .chip.big.on { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3); }
.staff-nav .chip.big[hidden], .staff-nav .sn-link[hidden], .staff-nav .sn-title[hidden] { display: none; }
.staff-nav .chip-count { margin-left: auto; }
.staff-nav .chip.big.on .chip-count { background: rgba(255, 255, 255, 0.25); color: #fff; }
.sn-title { margin: 10px 12px 2px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.staff-nav .cy-staff-chip { border: none; }
.staff-nav .cy-staff-chip:hover { background: color-mix(in srgb, #14b8a6 14%, var(--card)); color: var(--text); }

/* overview */
.ov-attn { display: grid; gap: 14px; }
.ov-hello h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.ov-hello p { color: var(--muted); margin-top: 2px; }
.ov-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ov-stat {
  position: relative; display: grid; gap: 2px; justify-items: start; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  padding: 16px 16px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.2s;
}
.ov-stat:hover, .ov-stat:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, transparent); outline: none; }
.ov-stat .ov-icon { font-size: 1.2rem; }
.ov-stat strong { font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: var(--faint); font-variant-numeric: tabular-nums; }
.ov-stat.hot strong { color: var(--c); }
.ov-stat.hot { border-color: color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 5%, var(--card)); }
.ov-label { color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.ov-stat i { position: absolute; top: 14px; right: 16px; font-style: normal; color: var(--faint); transition: transform 0.15s; }
.ov-stat:hover i { transform: translateX(3px); color: var(--c); }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ov-card[hidden] { display: none; }
.ov-list { display: grid; gap: 6px; }
.ov-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid transparent; transition: border-color 0.2s;
}
.ov-row:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ov-row-main { display: grid; min-width: 0; }
.ov-row-main b { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-row-main small { color: var(--faint); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-badge { --c: #dc2626; flex-shrink: 0; font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.ov-badge.calm { --c: var(--muted); }
.ov-empty { color: var(--faint); font-size: 0.9rem; padding: 6px 2px; }

/* the stats row inside Applications sits a little tighter in the narrower column */
.staff-main .admin-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 0; }
.staff-main .astat strong { font-size: 1.6rem; }

/* narrow screens: the sidebar becomes a scrolling row of tabs */
@media (max-width: 1000px) {
  .staff-layout, .ap-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-switch.staff-nav, .ap-nav {
    position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; scrollbar-width: thin;
  }
  .staff-nav .chip.big, .staff-nav .sn-link, .ap-item { width: auto; flex-shrink: 0; white-space: nowrap; padding: 9px 12px; }
  .sn-title, .ap-nav hr { display: none !important; }
  .ov-grid { grid-template-columns: minmax(0, 1fr); }
}

/* V1.3 Admin Panel overview */
.ap-stat.zero strong { color: var(--faint); }
.ap-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ap-qa {
  display: grid; gap: 2px; justify-items: start; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  padding: 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.15s;
}
.ap-qa:hover, .ap-qa:focus-visible { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-2px); outline: none; }
.ap-qa-icon { font-size: 1.2rem; margin-bottom: 4px; }
.ap-qa b { font-size: 0.92rem; }
.ap-qa small { color: var(--faint); font-size: 0.8rem; }
.ap-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.ap-dot.bad { background: #f59e0b; box-shadow: 0 0 0 4px color-mix(in srgb, #f59e0b 20%, transparent); }
#apDiscordCard.warn { border-color: color-mix(in srgb, #f59e0b 40%, transparent); background: color-mix(in srgb, #f59e0b 6%, var(--card)); }
.ap-head .ap-me { box-shadow: none; }
@media (max-width: 640px) { .ov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-stat strong { font-size: 1.5rem; } }
.ap-quick { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* roles: each card is as tall as its own content */
.ap-roles { align-items: start; }
.ap-roles > * { align-self: start; align-content: start; }
.ap-roles > * > * { align-self: start; }

/* =============================================================
   V1.3 JOB LISTINGS EDITOR · PROMO OWNERS · LEADERBOARD
   ============================================================= */
/* job listings (Admin Panel) */
.jobs-bar {
  position: sticky; top: 88px; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.jobs-bar.dirty { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.jobs-sum { font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.jobs-bar .form-msg { margin-right: auto; }
.jobs-list { display: grid; gap: 14px; }
.job-dept {
  display: grid; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--card);
  border: 1px solid var(--line); border-left: 5px solid var(--c); box-shadow: var(--shadow);
}
.job-dept.off { opacity: 0.6; }
.job-dept.off .jd-name { text-decoration: line-through; text-decoration-color: var(--faint); }
.jd-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.jd-icon { font-size: 1.1rem; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--text); }
.jd-color { width: 38px; height: 38px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; }
.jd-name { font: inherit; font-weight: 800; font-size: 1.05rem; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); min-width: 0; }
.jd-name:hover, .jd-name:focus { border-color: var(--line); background: var(--soft); outline: none; }
.jd-hiring { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 700; color: var(--muted); cursor: pointer; padding: 6px 10px; border-radius: 999px; background: var(--soft); }
.jd-hiring input { accent-color: var(--ok); width: 16px; height: 16px; }
.jd-tools { display: inline-flex; gap: 4px; }
.jd-tools .icon-btn { width: 34px; height: 34px; }
.jd-tools .icon-btn:disabled { opacity: 0.35; cursor: default; }
.jd-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.jd-fields label { display: grid; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--faint); }
.jd-fields input, .jd-add input { font: inherit; font-size: 0.9rem; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--text); }
.jd-fields input:focus, .jd-add input:focus { outline: none; border-color: var(--accent); }
.jd-roles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jd-role { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 10px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); font-size: 0.86rem; font-weight: 600; }
.jd-role-name { outline: none; padding: 2px 2px; border-radius: 4px; cursor: text; }
.jd-role-name:focus { background: var(--card); box-shadow: 0 0 0 2px var(--accent); }
.jd-role button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: 0.75rem; }
.jd-role button:hover { color: var(--err); background: var(--card); }
.jd-count { color: var(--faint); font-size: 0.8rem; font-weight: 600; margin-left: 4px; }
.jd-add { display: flex; gap: 8px; }
.jd-add input { flex: 1; min-width: 0; }
.jobs-reset { color: var(--faint); font-size: 0.85rem; }
@media (max-width: 640px) {
  .jd-head { grid-template-columns: auto auto minmax(0, 1fr); }
  .jd-hiring, .jd-tools { grid-column: span 1; }
  .jd-fields { grid-template-columns: 1fr; }
}

/* promo code owners (Staff area → Billing) */
.promo-owner { border: 1px dashed var(--line-2); border-radius: 14px; padding: 10px 14px 12px; display: grid; gap: 8px; }
.promo-owner legend { font-weight: 700; font-size: 0.9rem; padding: 0 6px; }
.promo-owner legend em { font-style: normal; font-weight: 600; color: var(--faint); font-size: 0.82rem; }
.promo-row { flex-wrap: wrap; }
.promo-owner-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px 2px 44px; font-size: 0.86rem; color: var(--muted); }
.po-who b { color: var(--text); }
.po-warn { color: #b45309; font-weight: 600; }
:root[data-theme="dark"] .po-warn { color: #fcd34d; }
.po-none { color: var(--faint); }
.po-btns { display: inline-flex; gap: 12px; margin-left: auto; }
.po-edit { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
.po-edit[hidden] { display: none; }
.po-edit input { flex: 1; min-width: 150px; font: inherit; font-size: 0.88rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--text); }

/* leaderboard (Staff area → Overview) */
.lb-card .ed-head { align-items: center; }
.lb-total { font-size: 0.82rem; font-weight: 700; color: var(--faint); white-space: nowrap; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb-row {
  display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 16px; background: var(--soft); border: 1px solid transparent;
}
.lb-row.lead { background: color-mix(in srgb, #f59e0b 9%, var(--card)); border-color: color-mix(in srgb, #f59e0b 40%, transparent); }
.lb-place { font-size: 1.35rem; text-align: center; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.lb-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); }
.lb-main { display: grid; gap: 5px; min-width: 0; }
.lb-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb-name b { font-size: 1rem; }
.lb-crown { font-size: 0.72rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; color: #92400e; background: color-mix(in srgb, #f59e0b 20%, var(--card)); }
:root[data-theme="dark"] .lb-crown { color: #fcd34d; }
.lb-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.lb-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width 0.6s cubic-bezier(.2, .7, .2, 1); }
.lb-row.lead .lb-bar i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.lb-main small { color: var(--faint); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-points { display: grid; justify-items: end; line-height: 1.1; }
.lb-points strong { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-points small { color: var(--faint); font-size: 0.74rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .lb-bar i { transition: none; } }
.lb-list > li { max-width: none; margin: 0; }
.input-with-btn select { width: auto; flex: 0 0 auto; }
.input-with-btn input { min-width: 70px; }

/* =============================================================
   V1.3 (part 3): content editors · saved replies · wait times · leaderboard tabs
   · application questions + staff review · live logs
   ============================================================= */
/* content editors (Admin Panel → Our team / Help Centre / Saved replies) */
.ce-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ce-field { display: grid; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--faint); min-width: 0; }
.ce-field.wide { grid-column: 1 / -1; }
.ce-stack { display: grid; gap: 10px; align-content: start; }
.ce-field input, .ce-field textarea, .job-dept select, .jd-questions textarea {
  font: inherit; font-size: 0.9rem; font-weight: 400; color: var(--text); padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--soft); width: 100%; resize: vertical;
}
.ce-field input:focus, .ce-field textarea:focus, .job-dept select:focus, .jd-questions textarea:focus { outline: none; border-color: var(--accent); }
.job-dept select { width: auto; font-weight: 600; font-size: 0.84rem; padding: 7px 10px; }
.ce-emoji { width: 52px; text-align: center; font-size: 1.15rem; }
.ce-help-head { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.ce-reply-head { grid-template-columns: minmax(0, 1fr) auto auto; }
.ce-items { display: grid; gap: 8px; }
.ce-item { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: 4px 12px 10px; }
.ce-item[open] { padding-bottom: 12px; }
.ce-item summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-weight: 700; font-size: 0.9rem; padding: 6px 0; }
.ce-item summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-item summary .icon-btn { width: 30px; height: 30px; flex-shrink: 0; }
.ce-item .ce-field { margin-top: 8px; }
.ce-item .ce-field input, .ce-item .ce-field textarea { background: var(--card); }
.jd-questions { display: grid; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--faint); }
@media (max-width: 700px) { .ce-grid { grid-template-columns: minmax(0, 1fr); } }

/* staff tickets: saved replies + how long the customer has waited */
.tk-reply.staff { position: relative; }
.sr-pop {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; width: min(420px, 100%); max-height: 360px; overflow: auto;
  display: grid; gap: 4px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.sr-pop[hidden] { display: none; }
.sr-title { margin: 4px 8px 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.sr-item { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); cursor: pointer; padding: 9px 10px; border-radius: 10px; border: 0; background: transparent; }
.sr-item:hover, .sr-item:focus-visible { background: var(--soft); outline: none; }
.sr-item b { font-size: 0.9rem; }
.sr-item small { color: var(--muted); font-size: 0.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-empty { color: var(--faint); font-size: 0.88rem; padding: 8px 10px; margin: 0; }
.sr-edit { justify-self: start; margin: 4px 10px; font-size: 0.82rem; }
.tk-waiting { justify-self: start; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); }
.tk-waiting.warn { color: #b45309; background: color-mix(in srgb, #f59e0b 14%, var(--card)); border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
.tk-waiting.late { color: #b91c1c; background: color-mix(in srgb, #dc2626 12%, var(--card)); border-color: color-mix(in srgb, #dc2626 35%, transparent); }
:root[data-theme="dark"] .tk-waiting.warn { color: #fcd34d; }
:root[data-theme="dark"] .tk-waiting.late { color: #fca5a5; }
.tk-who small.tk-waiting { display: inline-block; margin-top: 4px; }

/* leaderboard tabs */
.lb-side { display: grid; justify-items: end; gap: 6px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.seg button { font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--muted); border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

/* apply: the department's own questions */
.role-questions { display: grid; gap: 14px; }
.role-questions:empty { display: none; }
.rq-title { margin: 4px 0 0; font-weight: 800; font-size: 0.95rem; }

/* applications: private staff review */
.app-review { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--card)); border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); }
.ar-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-avg { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.ar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-row > small { color: var(--faint); font-weight: 700; font-size: 0.8rem; }
.ar-stars { display: inline-flex; gap: 2px; }
.ar-stars button { border: 0; background: none; cursor: pointer; font-size: 1.35rem; line-height: 1; color: var(--line-2); padding: 2px; transition: transform 0.15s; }
.ar-stars button:hover { transform: scale(1.15); }
.ar-stars button.on { color: #f59e0b; }
.ar-who { color: var(--faint) !important; font-weight: 600 !important; }
.ar-note { padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.ar-note-top { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.ar-note-top time { color: var(--faint); }
.ar-note-top .link-btn { margin-left: auto; font-size: 0.8rem; }
.ar-note p { margin: 4px 0 0; font-size: 0.9rem; white-space: pre-wrap; }
.ar-add { display: flex; gap: 8px; align-items: flex-end; }
.ar-add textarea { flex: 1; min-width: 0; font: inherit; font-size: 0.9rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); resize: vertical; }

/* live logs */
.lv { display: grid; border-radius: 14px; overflow: hidden; border: 1px solid #2a2d3a; background: #0f1117; }
.lv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: #171a23; border-bottom: 1px solid #2a2d3a; }
.lv-live { font-size: 0.76rem; font-weight: 800; color: #4ade80; }
.lv-live.off { color: #9aa0b4; }
.lv-count { color: #9aa0b4; font-size: 0.76rem; font-weight: 600; margin-right: auto; }
.lv-find { font: inherit; font-size: 0.82rem; padding: 5px 10px; border-radius: 8px; border: 1px solid #2a2d3a; background: #0f1117; color: #e5e7ef; width: 140px; }
.lv .btn.ghost { background: #232733; color: #e5e7ef; border-color: #2f3444; }
.lv-out { height: 320px; overflow: auto; padding: 8px 0; font: 0.8rem/1.55 "JetBrains Mono", ui-monospace, Consolas, monospace; color: #d6d9e4; }
.lv-out:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lv-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 0 12px; }
.lv-line:hover { background: #171a23; }
.lv-line time { color: #6b7186; user-select: none; }
.lv-line span { white-space: pre-wrap; overflow-wrap: anywhere; }
.lv-line.warn span { color: #fbbf24; }
.lv-line.error { background: rgba(220, 38, 38, 0.08); }
.lv-line.error span { color: #f87171; }
.lv-empty { color: #6b7186; padding: 20px 14px; margin: 0; font-family: inherit; }
.bl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-setup summary { cursor: pointer; }
.host-bot > .lv { margin-top: 4px; }

/* =============================================================
   V1.3 HOME PAGE — live status badge · Host your own bot · We're hiring
   ============================================================= */
/* the hero badge shows the live status */
a.hero-status { text-decoration: none; transition: border-color 0.2s; }
a.hero-status:hover { border-color: color-mix(in srgb, var(--sc, #22c55e) 45%, transparent); }
a.hero-status.bad { color: var(--text); border-color: color-mix(in srgb, var(--sc) 45%, transparent); background: color-mix(in srgb, var(--sc) 8%, var(--card)); }
a.hero-status.bad .dot { background: var(--sc); animation: none; }

/* Host your own bot */
.host-promo {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center;
  padding: 52px; border-radius: 30px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--card) 0%, color-mix(in srgb, #0ea5e9 7%, var(--card)) 100%);
}
.hp-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 14px; text-wrap: balance; }
.hp-text > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 22px; }
.hp-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.hp-list li { display: flex; gap: 12px; align-items: flex-start; }
.hp-list li > span { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: var(--card); border: 1px solid var(--line); }
.hp-list b { display: block; font-size: 0.95rem; }
.hp-list small { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.hp-text .cta { margin-bottom: 0; }
.hp-art { position: relative; }
.hp-card {
  display: grid; gap: 14px; padding: 18px; border-radius: 20px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-7deg) rotateX(3deg); transition: transform 0.6s;
}
.hp-art:hover .hp-card { transform: none; }
.hp-top { display: flex; align-items: center; gap: 12px; }
.hp-lang { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); }
.hp-top > div { display: grid; flex: 1; min-width: 0; }
.hp-top b { font-size: 1rem; }
.hp-top small { color: var(--faint); font-size: 0.8rem; }
.hp-pill { font-size: 0.74rem; font-weight: 800; color: var(--ok); padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.hp-uptime { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--soft); }
.hp-up-head { display: flex; justify-content: space-between; align-items: baseline; }
.hp-up-head small { color: var(--faint); font-weight: 700; font-size: 0.76rem; }
.hp-up-head b { font-size: 1.05rem; color: var(--ok); }
.hp-bars { display: flex; gap: 3px; height: 26px; }
.hp-bars i { flex: 1; border-radius: 3px; background: #16a34a; }
.hp-bars i.dip { background: #f59e0b; }
.hp-console { padding: 12px 14px; border-radius: 14px; background: #0f1117; font: 0.76rem/1.65 "JetBrains Mono", ui-monospace, Consolas, monospace; color: #d6d9e4; }
.hp-console p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-console i { font-style: normal; color: #6b7186; margin-right: 8px; }
.hp-console .w { color: #fbbf24; }
.hp-console .caret { display: inline-block; width: 7px; height: 13px; margin-left: 4px; background: #d6d9e4; vertical-align: -2px; animation: hpBlink 1s steps(1) infinite; }
@keyframes hpBlink { 50% { opacity: 0; } }
.hp1 { top: -16px; right: 8%; }
.hp2 { bottom: -18px; left: -14px; animation-delay: -2.4s; }

/* We're hiring */
.hire-band {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "text depts" "btns depts"; gap: 18px 40px; align-items: center;
  padding: 40px 44px; border-radius: 30px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: linear-gradient(135deg, color-mix(in srgb, #8b5cf6 7%, var(--card)), var(--card));
}
.hire-band[hidden] { display: none; }
.hb-text { grid-area: text; }
.hb-text h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; letter-spacing: -0.03em; margin: 6px 0 10px; text-wrap: balance; }
.hb-text h2 > span:first-child { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb-text p { color: var(--muted); margin: 0; }
.hb-btns { grid-area: btns; display: flex; gap: 10px; flex-wrap: wrap; }
.hb-depts { grid-area: depts; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hb-chip {
  display: flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--text); text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.15s;
}
.hb-chip:hover, .hb-chip:focus-visible { border-color: color-mix(in srgb, var(--c) 50%, transparent); transform: translateY(-2px); outline: none; }
.hb-chip span { font-size: 1.1rem; }
.hb-chip em { margin-left: auto; font-style: normal; font-size: 0.75rem; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); padding: 2px 8px; border-radius: 999px; }

@media (max-width: 1000px) {
  .host-promo { grid-template-columns: 1fr; padding: 36px; }
  .hp-card { transform: none; }
  .hire-band { grid-template-columns: 1fr; grid-template-areas: "text" "depts" "btns"; padding: 32px; }
}
@media (max-width: 640px) {
  .host-promo { padding: 24px; gap: 30px; }
  .hp-list { grid-template-columns: 1fr; }
  .hire-band { padding: 24px; }
  .hb-depts { grid-template-columns: 1fr; }
  .hp1 { right: 0; }
  .hp2 { left: 0; }
}
@media (prefers-reduced-motion: reduce) { .hp-console .caret { animation: none; } .hp-card { transition: none; } }
/* the Websites box used a fixed light pink, unreadable in dark mode: now it follows the theme */
.web-promo { background: linear-gradient(135deg, var(--card) 0%, color-mix(in srgb, #ec4899 7%, var(--card)) 100%); }
:root[data-theme="dark"] .browser-bar { background: var(--soft); }
:root[data-theme="dark"] .wf-hero { background: linear-gradient(135deg, color-mix(in srgb, #5865f2 18%, var(--card)), color-mix(in srgb, #ec4899 14%, var(--card))); }
:root[data-theme="dark"] .wf-nav span, :root[data-theme="dark"] .wf-p { background: var(--line-2); }
:root[data-theme="dark"] .wf-h { background: color-mix(in srgb, #8b95ff 45%, var(--card)); }
:root[data-theme="dark"] .wf-cards span { background: var(--soft); border-color: var(--line); }
/* the chiefs row fits however many chiefs there are (set by drawOrgChart: --cols, --cols-md) */
.exec-row { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.exec-row::before { left: calc(50% / var(--cols, 3)); right: calc(50% / var(--cols, 3)); }
@media (max-width: 1000px) { .exec-row { grid-template-columns: repeat(var(--cols-md, 3), minmax(0, 1fr)); } }
@media (max-width: 640px) { .exec-row { grid-template-columns: 1fr; } }
.uptime-reset { margin: 6px 0 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.uptime-reset small { color: var(--faint); }

/* =============================================================
   V1.3 CYBERSECURITY OVERVIEW — live console · threat level · score · last 7 days
   ============================================================= */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* hero: threat level + the endless console (always a dark "ops screen", in light mode too) */
.cy-hero {
  --lv: #22c55e;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); border-radius: 22px; overflow: hidden;
  background: #0b0f17; border: 1px solid #1f2a37; box-shadow: var(--shadow-lg); color: #d6deea;
}
.cy-hero[data-level="elevated"] { --lv: #eab308; }
.cy-hero[data-level="high"] { --lv: #f97316; }
.cy-hero[data-level="critical"] { --lv: #ef4444; }
.cy-hero[data-level="redalert"] { --lv: #ef4444; border-color: #ef4444; animation: cyHeroRed 1s steps(1) infinite; }
.cy-hero[data-level="redalert"] .cyh-icon { animation: cyPulse 0.8s ease-in-out infinite; }
@keyframes cyHeroRed { 50% { border-color: #1f2a37; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.45), var(--shadow-lg); } }
.cyh-side {
  display: grid; align-content: center; gap: 6px; padding: 24px 22px; border-right: 1px solid #1f2a37;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--lv) 22%, transparent), transparent 70%);
}
.cyh-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #8ea0b8; }
.cyh-level { display: flex; align-items: center; gap: 10px; }
.cyh-level b { font: 800 1.9rem/1 "JetBrains Mono", ui-monospace, Consolas, monospace; letter-spacing: 0.02em; color: var(--lv); text-shadow: 0 0 18px color-mix(in srgb, var(--lv) 55%, transparent); }
.cyh-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.9rem; color: #0b0f17; background: var(--lv); box-shadow: 0 0 0 5px color-mix(in srgb, var(--lv) 22%, transparent); }
.cy-hero[data-level="critical"] .cyh-icon { animation: cyPulse 1.4s ease-in-out infinite; }
@keyframes cyPulse { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--lv) 8%, transparent); } }
.cyh-text { margin: 0 0 8px; color: #b6c2d3; font-size: 0.9rem; }
.cyh-facts { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid #1f2a37; display: grid; gap: 5px; font-size: 0.84rem; color: #8ea0b8; }
.cyh-facts b { color: #e6edf6; font-weight: 700; }

.cyt { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.cyt-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #1f2a37; background: #0f1520; font: 600 0.75rem "JetBrains Mono", ui-monospace, Consolas, monospace; color: #6b7d95; }
.cyt-dots { display: inline-flex; gap: 6px; }
.cyt-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.cyt-dots i:nth-child(2) { background: #febc2e; }
.cyt-dots i:nth-child(3) { background: #28c840; }
.cyt-rec { margin-left: auto; color: #22c55e; animation: cyBlink 2s steps(1) infinite; }
@keyframes cyBlink { 50% { opacity: 0.35; } }
.cyt-body {
  height: 250px; overflow: hidden; padding: 10px 14px; position: relative;
  font: 0.76rem/1.7 "JetBrains Mono", ui-monospace, Consolas, monospace;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 100%);
}
.cyt-line { display: grid; grid-template-columns: 64px 52px minmax(0, 1fr); gap: 8px; white-space: nowrap; animation: cyIn 0.25s ease-out; }
.cyt-line span { overflow: hidden; text-overflow: ellipsis; }
.cyt-line i { font-style: normal; color: #4b5b70; }
.cyt-line b { font-weight: 700; color: #6b7d95; }
.cyt-line.ok b { color: #22c55e; }
.cyt-line.ok span { color: #b9f6ca; }
.cyt-line.info b { color: #38bdf8; }
.cyt-line.warn b, .cyt-line.warn span { color: #facc15; }
.cyt-line.alert { background: rgba(239, 68, 68, 0.12); }
.cyt-line.alert b, .cyt-line.alert span { color: #f87171; }
/* every yellow (warning) line flashes yellow, every red (alert) line flashes red */
.cyt-line.warn { animation: cyIn 0.25s ease-out, cyFlashWarn 1.1s ease-in-out infinite; }
.cyt-line.alert { animation: cyIn 0.25s ease-out, cyFlashAlert 0.8s ease-in-out infinite; }
@keyframes cyFlashWarn { 0%, 100% { background: rgba(250, 204, 21, 0.28); } 50% { background: rgba(250, 204, 21, 0.02); } }
@keyframes cyFlashAlert { 0%, 100% { background: rgba(239, 68, 68, 0.38); } 50% { background: rgba(239, 68, 68, 0.06); } }
.cyt-line.code b { color: #a78bfa; }
.cyt-line.code span { color: #c4b5fd; }
.cyt-line.dim span { color: #6b7d95; }
@keyframes cyIn { from { opacity: 0; transform: translateY(6px); } }
.cyt-body::after { content: ""; position: absolute; left: 14px; bottom: 12px; width: 8px; height: 14px; background: #22c55e; animation: cyBlink 1s steps(1) infinite; }

/* security score */
.cy-insights { align-items: stretch; }
.cys-body { display: flex; gap: 18px; align-items: center; }
.cys-ring { position: relative; flex-shrink: 0; width: 84px; height: 84px; color: var(--ok); }
.cys-ring.ok { color: #d97706; }
.cys-ring.bad { color: var(--err); }
.cys-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.cys-list { display: grid; gap: 6px; min-width: 0; flex: 1; }
.cys-item { display: flex; gap: 10px; align-items: baseline; text-align: left; font: inherit; font-size: 0.86rem; color: var(--text); background: none; border: 0; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.cys-item:hover, .cys-item:focus-visible { background: var(--soft); outline: none; }
.cys-item em { flex-shrink: 0; min-width: 34px; font-style: normal; font-weight: 800; color: var(--err); font-variant-numeric: tabular-nums; }

/* last 7 days */
.cyw-legend { display: flex; gap: 16px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.cyw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cyw-legend i { width: 10px; height: 10px; border-radius: 3px; }
.cyw-legend .b i { background: #ea580c; }
.cyw-legend .o i { background: var(--accent); }
.cyw-wrap { position: relative; }
.cyw-chart { width: 100%; height: auto; max-height: 190px; display: block; overflow: visible; }
.cyw-base { stroke: var(--line); stroke-width: 1; }
.cyw-other { fill: var(--accent); }
.cyw-blocked { fill: #ea580c; }
.cyw-num { font: 700 10px Inter, system-ui, sans-serif; fill: var(--muted); text-anchor: middle; }
.cyw-lab { font: 600 10px Inter, system-ui, sans-serif; fill: var(--faint); text-anchor: middle; }
.cyw-hit { fill: transparent; }
.cyw-day { outline: none; cursor: default; }
.cyw-day:hover .cyw-hit, .cyw-day:focus .cyw-hit { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.cyw-tip { position: absolute; top: -6px; transform: translateX(-50%); display: grid; gap: 1px; padding: 7px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.78rem; white-space: nowrap; pointer-events: none; color: var(--text); }
.cyw-tip[hidden] { display: none; }
.cyw-tip .b::before, .cyw-tip .o::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.cyw-tip .b::before { background: #ea580c; }
.cyw-tip .o::before { background: var(--accent); }

@media (max-width: 900px) { .cy-hero { grid-template-columns: minmax(0, 1fr); } .cyh-side { border-right: 0; border-bottom: 1px solid #1f2a37; } .cyt-body { height: 200px; } }
@media (max-width: 560px) { .cys-body { flex-direction: column; align-items: flex-start; } .cyt-line { grid-template-columns: 52px minmax(0, 1fr); } .cyt-line i { display: none; } }
@media (prefers-reduced-motion: reduce) { .cy-hero, .cyt-line, .cyt-rec, .cyt-body::after, .cyh-icon { animation: none !important; } }

/* ---------- Live console (#cyber → Live console) ---------- */
.cyc { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 460px; background: #0b0f17; border: 1px solid #1f2a37; border-radius: 16px; overflow: hidden; color: #cbd5e1; }
.cyc:fullscreen, .cyc.cyc-full { height: 100vh; min-height: 0; border-radius: 0; border: 0; }
.cyc.cyc-full { position: fixed; inset: 0; z-index: 200; }
.cyc-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 10px 14px; background: #0f1520; border-bottom: 1px solid #1f2a37; font: 600 0.8rem "JetBrains Mono", ui-monospace, Consolas, monospace; color: #8b9bb3; }
.cyc-bar > b { font-weight: 600; }
.cyc-state { color: #22c55e; animation: cyBlink 2s steps(1) infinite; }
.cyc-state.paused { color: #facc15; animation: none; }
.cyc-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.cyc-btn { font: 600 0.78rem "Plus Jakarta Sans", system-ui, sans-serif; color: #cbd5e1; background: #161e2c; border: 1px solid #263243; border-radius: 8px; padding: 6px 11px; cursor: pointer; }
.cyc-btn:hover { background: #1d2738; color: #fff; }
.cyc-btn:focus-visible, .cyc-chip:focus-visible, .cyc-search:focus-visible, .cyc-jump:focus-visible { outline: 2px solid #5865f2; outline-offset: 2px; }
.cyc-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; border-bottom: 1px solid #1f2a37; background: #0d121b; }
.cyc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cyc-chip { font: 700 0.72rem "JetBrains Mono", ui-monospace, Consolas, monospace; letter-spacing: 0.03em; padding: 4px 10px; border-radius: 999px; border: 1px solid #263243; background: transparent; color: #4b5b70; cursor: pointer; text-decoration: line-through; }
.cyc-chip.on { color: #cbd5e1; background: #161e2c; text-decoration: none; }
.cyc-chip.on[data-tag="SCAN"], .cyc-chip.on[data-tag="FW"] { color: #22c55e; }
.cyc-chip.on[data-tag="AUTH"], .cyc-chip.on[data-tag="TLS"], .cyc-chip.on[data-tag="AUDIT"] { color: #38bdf8; }
.cyc-chip.on[data-tag="CODE"] { color: #a78bfa; }
.cyc-chip.on[data-tag="WARN"] { color: #facc15; }
.cyc-chip.on[data-tag="ALERT"] { color: #f87171; }
.cyc-search { margin-left: auto; min-width: 200px; font: 0.8rem "JetBrains Mono", ui-monospace, Consolas, monospace; color: #e2e8f0; background: #0b0f17; border: 1px solid #263243; border-radius: 8px; padding: 6px 10px; }
.cyc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; font: 0.82rem/1.75 "JetBrains Mono", ui-monospace, Consolas, monospace; scrollbar-color: #263243 transparent; }
.cyc:fullscreen .cyc-body, .cyc.cyc-full .cyc-body { font-size: 0.95rem; }
.cyc-body .cyt-line { grid-template-columns: 76px 60px minmax(0, 1fr); }
.cyc-body .cyt-line span { white-space: pre-wrap; overflow-wrap: anywhere; }
.cyc-body .cyt-line[hidden] { display: none; }
.cyc-foot { display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-top: 1px solid #1f2a37; background: #0f1520; font: 0.74rem "JetBrains Mono", ui-monospace, Consolas, monospace; color: #6b7d95; }
.cyc-keys { margin-left: auto; }
.cyc-jump { font: 700 0.74rem "Plus Jakarta Sans", system-ui, sans-serif; color: #fff; background: #5865f2; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
@media (max-width: 700px) { .cyc { height: calc(100vh - 160px); } .cyc-search { margin-left: 0; width: 100%; } .cyc-keys { display: none; } .cyc-body .cyt-line { grid-template-columns: 54px minmax(0, 1fr); } .cyc-body .cyt-line i { display: none; } }
@media (prefers-reduced-motion: reduce) { .cyc-state, .cyc-body .cyt-line { animation: none !important; } }
.cy-insights > .ap-card { align-content: start; }
.cyw-chart { max-height: 150px; }

/* V1.3 Cybersecurity → Auto-protection card */
.cy-auto { gap: 12px; }
.cya-state { font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.cya-state.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.cya-state.off { color: var(--err); background: color-mix(in srgb, var(--err) 12%, var(--card)); }
.cya-how { margin: 0; font-size: 0.86rem; }
.cya-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cya-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); cursor: pointer; }
.cya-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ok); flex-shrink: 0; }
.cya-toggle span { display: grid; }
.cya-toggle small { color: var(--muted); font-size: 0.8rem; }
.cya-sub { margin-top: 4px; font-size: 0.9rem; }
.cya-people { display: flex; flex-wrap: wrap; gap: 8px; }
.cya-person { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: 0.86rem; }
.cya-person small { color: var(--faint); font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 0.74rem; }
.cya-person button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 6px; border-radius: 999px; }
.cya-person button:hover { color: var(--err); background: var(--card); }
.cya-add { display: flex; gap: 8px; flex-wrap: wrap; }
.cya-add input { flex: 1; min-width: 200px; font: inherit; font-size: 0.88rem; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--text); }
.cya-list { display: grid; gap: 6px; }
.cya-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--soft); font-size: 0.84rem; }
.cya-row.bad { border-left: 3px solid var(--err); }
.cya-row code { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.cya-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cya-row small { color: var(--faint); }
.cya-watch summary { cursor: pointer; color: var(--muted); font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
@media (max-width: 640px) { .cya-toggles { grid-template-columns: 1fr; } .cya-row { grid-template-columns: 1fr auto; } .cya-row span { grid-column: 1 / -1; } }

/* =============================================================
   V1.3 Status page polish
   ============================================================= */
/* banner: live "checked … ago" line */
.status-hero { position: relative; overflow: hidden; }
.status-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); pointer-events: none; }
.sh-live { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.sh-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); animation: shPulse 2s infinite; flex-shrink: 0; }
@keyframes shPulse { 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }

/* four numbers under the banner */
.status-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: -10px 0 28px; }
.ss-tile { display: grid; gap: 2px; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ss-tile strong { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.ss-tile.great strong { color: var(--ok); }
.ss-tile.ok strong { color: #d97706; }
.ss-tile.poor strong { color: var(--err); }
.ss-tile span { color: var(--muted); font-size: 0.84rem; font-weight: 600; }
@media (max-width: 760px) { .status-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* thin, even bars over the full 90 days */
.uptime-bars { gap: 3px; height: 38px; }
.uptime-bars .ub { flex: 1 1 0; min-width: 2px; border-radius: 2px; }
.uptime-bars .ub.none { background: color-mix(in srgb, var(--line-2) 55%, transparent); }
.uptime-bars .ub:not(.none):hover { filter: brightness(1.1); }
.up-pct.great { color: var(--ok) !important; }
.up-pct.ok { color: #d97706 !important; }
.up-pct.poor { color: var(--err) !important; }

/* colour key */
.uptime-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; padding: 0 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.uptime-legend span { display: inline-flex; align-items: center; gap: 6px; }
.uptime-legend i { width: 10px; height: 14px; border-radius: 2px; background: var(--bc); }
.uptime-legend i.none { background: color-mix(in srgb, var(--line-2) 55%, transparent); }
.uptime-legend small { margin-left: auto; color: var(--faint); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .sh-dot { animation: none; } }
.uptime-foot .d30 { display: none; }
@media (max-width: 640px) { .uptime-foot .d90 { display: none; } .uptime-foot .d30 { display: inline; } }

/* V1.3 Staff area → Billing */
.bill-lock { font-size: 0.84rem; font-weight: 600; color: var(--muted); padding: 8px 14px; border-radius: 12px; background: var(--soft); border: 1px dashed var(--line-2); }
.bill-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bill-stat { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); cursor: pointer; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.2s; }
.bill-stat:hover, .bill-stat:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); outline: none; }
.bs-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.bill-stat strong { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bill-stat small { color: var(--faint); font-size: 0.78rem; }
.bill-stat.good strong { color: var(--ok); }
.bill-stat.bad strong { color: var(--err); }
.bill-stat.bad { border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.inv-pay { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 12px; background: var(--soft); flex-basis: 100%; }
.inv-pay[hidden] { display: none; }
.inv-pay select, .inv-pay input { font: inherit; font-size: 0.88rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.inv-pay input { flex: 1; min-width: 180px; }
.inv-paid-info { flex-basis: 100%; font-size: 0.82rem; color: var(--muted); padding: 0 4px 0 44px; }
#invTotal { color: var(--muted); font-weight: 600; font-size: 0.86rem; margin: -6px 0 0 2px; }
@media (max-width: 860px) { .bill-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inv-row .inv-pay { background: var(--card); }

/* online payments (Stripe): Pay now on invoices, Buy now on hosting plans */
.inv-paybtns { display: flex; gap: 8px; flex-wrap: wrap; flex-basis: 100%; padding: 0 4px 0 44px; }
.ht-buy { display: grid; gap: 6px; margin-top: auto; }
.ht-buy .btn { width: 100%; justify-content: center; }
.ht-buy-note { color: var(--muted); font-size: 0.76rem; text-align: center; }
.ht-buy .link-btn { justify-self: center; font-size: 0.84rem; }
@media (max-width: 560px) { .inv-paybtns { padding-left: 0; } .inv-paybtns .btn { flex: 1 1 100%; justify-content: center; } }
.buy-promo { display: flex; align-items: center; justify-content: center; gap: 8px 10px; flex-wrap: wrap; margin: 14px auto 0; }
.buy-promo[hidden] { display: none; }
.buy-promo label { font-weight: 700; font-size: 0.9rem; }
.buy-promo input { font: inherit; font-size: 0.9rem; text-transform: uppercase; width: 150px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.buy-promo small { color: var(--muted); font-size: 0.78rem; flex-basis: 100%; text-align: center; }
.plan .ht-buy, .bundle .ht-buy { margin-top: auto; }

/* Billing department page (#finance, finance.js) */
.fin-wrap .bill-lock { margin-bottom: 18px; }
.fin-stripe-state { font-weight: 700; font-size: 0.9rem; padding: 10px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.fin-stripe-state.live { color: var(--ok); }
.fin-stripe-state.test { color: #8b5cf6; }
.fin-stripe-state.off { color: #d97706; }
.fin-sub { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.fin-muted { color: var(--muted); }
.fin-pos { color: var(--ok); }
.fin-neg { color: var(--err); }
.fin-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.fin-two h4 { margin-bottom: 8px; }
.fin-chart { display: grid; gap: 10px; }
.fin-svg { width: 100%; height: auto; display: block; }
.fin-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.fin-axis { stroke: var(--line-2); }
.fin-bar.in { fill: var(--ok); }
.fin-bar.out { fill: #f97316; }
.fin-bar:hover { opacity: 0.8; }
.fin-lbl { fill: var(--muted); font-size: 12px; font-weight: 600; }
.fin-lbl.now { fill: var(--text); font-weight: 800; }
.fin-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 0.86rem; font-weight: 600; color: var(--text-2); }
.fin-legend b { margin-left: auto; }
.fin-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.fin-key.in::before { background: var(--ok); }
.fin-key.out::before { background: #f97316; }
.fin-list { display: grid; gap: 8px; }
.fin-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; text-align: left; font: inherit; color: var(--text); padding: 10px 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
button.fin-row { cursor: pointer; transition: border-color 0.2s; }
button.fin-row:hover, button.fin-row:focus-visible { border-color: var(--accent); outline: none; }
.fin-ic { font-size: 1.15rem; width: 26px; text-align: center; }
.fin-main { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.fin-main b { font-size: 0.92rem; overflow-wrap: anywhere; }
.fin-main small { color: var(--muted); font-size: 0.8rem; }
.fin-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fin-every { font: inherit; font-size: 0.84rem; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.fin-table td small { font-size: 0.8rem; }
.fin-report-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fin-report-tools input, .fin-report-tools select { font: inherit; font-size: 0.88rem; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.fin-report-tools [hidden] { display: none; }
#finReport { display: grid; gap: 16px; }
.fin-rep-title { font-size: 1.05rem; }
.fin-rep-table tbody tr { cursor: default; }
.fin-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fin-fact { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.fin-fact span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.fin-fact strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.fin-export { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .fin-two { grid-template-columns: minmax(0, 1fr); } .fin-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =========================================================
   V1.4 EXTRAS — order tracker, referral rewards, giveaways, plan quiz
   (colours come from the theme variables, so light and dark both work)
   ========================================================= */

/* ---- order tracker ---- */
.tk-progress.order { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.order-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.os-label { font-weight: 700; font-size: 0.85rem; margin-right: 2px; }
.os-step { font: inherit; font-size: 0.8rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; cursor: pointer; background: var(--soft); color: var(--muted); border: 1.5px solid var(--line-2); }
.os-step:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.os-step.os-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line-2)); }
.os-step.os-now { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; opacity: 1; }

/* ---- referral rewards ---- */
.ref-stats:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); }
.ref-goal { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, #ec4899 7%, var(--card)); border: 1px solid var(--line); }
.ref-goal[hidden], .ref-rewards[hidden], .ref-board[hidden] { display: none; }
.ref-goal-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.ref-goal-top span { font-weight: 800; }
.ref-goal small { color: var(--muted); }
.ref-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ref-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 0.6s ease; }
.ref-rewards h4 { margin: 0 0 8px; }
.ref-code-text { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.04em; }
.mini-item.used { opacity: 0.65; }
.ref-board { margin-top: 18px; }
.ref-board h3 { margin: 0 0 4px; }
.ref-board .muted { color: var(--muted); font-size: 0.88rem; margin: 0 0 12px; }
.ref-board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ref-board-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.ref-board-list li.you { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.rb-place { width: 28px; text-align: center; font-weight: 800; }
.rb-count { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 0.88rem; }

/* ---- giveaways (home page) ---- */
.give-list { display: grid; gap: 14px; margin: 18px 0 6px; }
.give-list[hidden] { display: none; }
.gw-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, #ec4899 10%, var(--card)), color-mix(in srgb, #8b5cf6 10%, var(--card)));
  border: 1.5px solid color-mix(in srgb, #8b5cf6 30%, var(--line)); box-shadow: var(--shadow);
}
.gw-card.ended { background: var(--card); border-color: var(--line); }
.gw-icon { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.gw-main { min-width: 0; }
.gw-main h3 { margin: 2px 0 4px; }
.gw-prize, .gw-desc { margin: 0 0 4px; }
.gw-desc { color: var(--muted); font-size: 0.92rem; white-space: pre-line; }
.gw-meta { color: var(--muted); font-weight: 600; }
.gw-side { display: grid; gap: 6px; justify-items: end; text-align: right; max-width: 260px; }
.gw-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.gw-in { font-weight: 700; color: var(--ok); }
.gw-result { display: grid; gap: 4px; font-weight: 600; }
.gw-won { color: var(--ok); }
@media (max-width: 760px) {
  .gw-card { grid-template-columns: auto 1fr; }
  .gw-side { grid-column: 1 / -1; justify-items: stretch; text-align: left; max-width: none; }
  .gw-side .btn { width: 100%; }
  .gw-actions { justify-content: flex-start; }
}

/* ---- giveaways (Admin Panel) ---- */
.gw-form h3 { margin: 0 0 12px; }
.gw-admin-list { display: grid; gap: 12px; margin-top: 14px; }
.gw-admin { display: grid; gap: 8px; }
.gw-admin.ended { opacity: 0.85; }
.gw-admin-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gw-admin-head small { display: block; color: var(--muted); }
.gw-state { font-weight: 700; font-size: 0.88rem; }
.gw-winners { margin: 0; }
.gw-entries summary { cursor: pointer; font-weight: 600; }
.gw-entries ol { margin: 6px 0 0; max-height: 220px; overflow: auto; font-size: 0.88rem; color: var(--muted); }
.gw-admin-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- plan quiz ---- */
.quiz-cta {
  display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 20px 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.quiz-cta h3 { margin: 0 0 2px; }
.quiz-cta p { margin: 0; color: var(--muted); }
.quiz-cta .btn { margin-left: auto; white-space: nowrap; }
.quiz-cta-icon { font-size: 2.2rem; }
.quiz-wrap { display: grid; gap: 16px; padding: 26px; }
.quiz-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.35s ease; }
.quiz-body { display: grid; gap: 12px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--soft); border: 1.5px solid var(--line-2); border-radius: 16px; transition: border-color 0.15s, transform 0.15s;
}
.quiz-opt:hover, .quiz-opt:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.quiz-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.qo-icon { font-size: 1.6rem; width: 40px; text-align: center; }
.qo-text { display: grid; gap: 2px; }
.qo-text small { color: var(--muted); }
.quiz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-hint { margin: 0; color: var(--muted); font-size: 0.9rem; }
.quiz-next { display: flex; justify-content: flex-end; }
.quiz-foot { display: flex; }
.quiz-foot [hidden] { display: none; }
.quiz-pick { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, var(--line)); background: color-mix(in srgb, var(--c) 6%, var(--card)); }
.qp-head { display: flex; align-items: center; gap: 12px; }
.qp-head h4 { margin: 0; }
.qp-head p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.qp-icon { font-size: 1.8rem; }
.qp-price { margin-left: auto; font-size: 1.4rem; white-space: nowrap; }
.qp-price small { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.qp-list { margin: 0; padding-left: 20px; columns: 2; gap: 18px; font-size: 0.9rem; }
.qp-note, .qp-deal { margin: 0; font-size: 0.92rem; }
.qp-deal { padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.qp-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .quiz-cta { flex-direction: column; align-items: flex-start; }
  .quiz-cta .btn { margin-left: 0; width: 100%; }
  .qp-list { columns: 1; }
  .quiz-wrap { padding: 20px 16px; }
}

/* ticket statuses — dark theme */
:root[data-theme="dark"] .tk-status.lbl-wait { color: #fbbf24; }
:root[data-theme="dark"] .tk-status.lbl-work { color: #93c5fd; }
:root[data-theme="dark"] .tk-status.lbl-hold,
:root[data-theme="dark"] .tk-status-pick.lbl-hold { background-color: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
:root[data-theme="dark"] .tk-status.lbl-alert { color: #fca5a5; }

/* ---------- Site lock screen (/sitelock) ---------- */
.sitelock-screen {
  position: fixed; inset: 0; z-index: 999; display: flex; padding: 24px 16px; overflow-y: auto;
  background: radial-gradient(ellipse at top, #2a0d14 0%, #120814 55%, #07050c 100%);
  animation: banIn 0.5s ease;
}
.sitelock-screen[hidden] { display: none; }
body.is-sitelocked { overflow: hidden; }
.sitelock-card {
  margin: auto; box-sizing: border-box; width: 100%; max-width: 540px; text-align: center; padding: 40px 32px 30px; border-radius: 28px; color: #fde8e8;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.5), rgba(20, 10, 18, 0.88));
  border: 1px solid rgba(248, 113, 113, 0.35); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(220, 38, 38, 0.08);
  animation: banCard 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.sitelock-icon {
  width: 92px; height: 92px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 3rem; border-radius: 50%;
  background: rgba(220, 38, 38, 0.18); border: 2px solid rgba(248, 113, 113, 0.5); box-shadow: 0 0 40px rgba(220, 38, 38, 0.45);
  animation: banPulse 2.4s ease-in-out infinite;
}
.sitelock-eyebrow { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #fca5a5; }
.sitelock-card h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); line-height: 1.1; margin: 6px 0 12px; color: #fff; }
.sitelock-lead { color: #fecaca; margin: 0 0 22px; line-height: 1.55; }
.sitelock-timer {
  display: grid; gap: 2px; padding: 16px; margin: 0 auto 18px; max-width: 280px; border-radius: 18px;
  background: rgba(15, 6, 9, 0.7); border: 1px solid rgba(248, 113, 113, 0.25);
}
.sitelock-timer small { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #f87171; }
.sitelock-timer b { font-size: 2.6rem; font-variant-numeric: tabular-nums; color: #fff; letter-spacing: 0.03em; }
.sitelock-timer span { font-size: 0.85rem; color: #fca5a5; }
.sitelock-note { font-size: 0.9rem; color: #fecaca; margin: 0 0 16px; }
.sitelock-links { font-size: 0.85rem; color: #fca5a5; padding-top: 16px; margin: 0; border-top: 1px solid rgba(248, 113, 113, 0.2); }
.sitelock-links a { color: #fff; }
.sitelock-staffbar {
  position: sticky; top: 0; z-index: 998; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: center;
  padding: 10px 16px; background: #b91c1c; color: #fff; font-size: 0.9rem; text-align: center;
}
.sitelock-staffbar[hidden] { display: none; }
.sitelock-staffbar span { color: #fee2e2; }
@media (max-width: 480px) { .sitelock-card { padding: 32px 20px 24px; } .sitelock-timer b { font-size: 2.2rem; } }

/* ----- Cybersecurity → IP tracker ----- */
.it-result { display: grid; gap: 12px; }
.it-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.it-head > div { flex: 1; min-width: 0; }
.it-head h3 { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; word-break: break-all; }
.it-head small { color: var(--muted); }
.it-flag { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--soft, #eef0fc); color: var(--accent); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em; }
.it-result .btn.it-ban { margin-left: 0; }
.it-result .btn.it-ban:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* ----- Cybersecurity → Live map ----- */
.cy-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; margin-left: auto; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); animation: lm-pulse 2s infinite; }
.lm-updated { margin-left: auto; color: #16a34a; font-size: 0.85rem; font-weight: 700; }
.lm-map { position: relative; width: 100%; aspect-ratio: 1000 / 394; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, var(--soft), var(--card)); border: 1px solid var(--line); }
.lm-map img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; }
.lm-dots { position: absolute; inset: 0; }
.lm-dot { position: absolute; width: var(--s); height: var(--s); transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid #fff; background: var(--c); opacity: 0.9; cursor: pointer; padding: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.lm-dot:hover, .lm-dot:focus-visible { transform: translate(-50%, -50%) scale(1.35); z-index: 2; outline: none; }
.lm-dot.hot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c); animation: lm-ring 1.6s ease-out infinite; }
@keyframes lm-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes lm-pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.lm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
.lm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lm-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.lm-legend small { margin-left: auto; }
.lm-legend-inline { margin: 0 0 0 auto; }
.lm-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-top: 10px; }
.lm-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.lm-bar i { position: absolute; left: 0; right: 0; bottom: 0; height: max(var(--h), 2px); border-radius: 3px 3px 0 0; }
.lm-bar i.req { background: #5865f2; opacity: 0.75; }
.lm-bar i.blk { background: #dc2626; }
.lm-bar b.sus { position: absolute; left: 50%; top: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #ea580c; }
.lm-bar:hover i.req { opacity: 1; }
.lm-ips, .lm-countries { display: grid; gap: 4px; }
.lm-ip { display: grid; grid-template-columns: 44px 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.lm-ip:first-child, .lm-country:first-child { border-top: none; }
.lm-ip > div { display: grid; min-width: 0; }
.lm-ip code { font-size: 0.88rem; overflow-wrap: anywhere; }
.lm-ip small, .lm-country small { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-cc { display: grid; place-items: center; height: 28px; border-radius: 8px; background: var(--soft); color: var(--accent); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em; }
.lm-country { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.lm-country > div { display: grid; gap: 4px; font-weight: 600; font-size: 0.9rem; }
.lm-cbar { display: block; height: 6px; width: var(--w); min-width: 4px; border-radius: 3px; background: var(--c); }
@media (max-width: 700px) {
  .lm-ip { grid-template-columns: 40px 1fr auto; }
  .lm-ip > .cy-sev, .lm-ip > span:empty { display: none; }
  .lm-legend small { margin-left: 0; width: 100%; }
  .lm-bars { height: 80px; gap: 1px; }
}

/* ----- Cybersecurity → Website health + weekly report (Overview) ----- */
.hl { display: grid; gap: 14px; }
.hl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.hl-tile { display: grid; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--soft); min-width: 0; }
.hl-tile span { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-tile strong { font-size: 1.3rem; color: var(--c); }
.hl-tile small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.wr { display: grid; gap: 12px; }
.wr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.wr-cell { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.wr-cell strong { font-size: 1.25rem; color: var(--c); }
.wr-cell span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
#cy-map .cy-two > .ap-card { align-content: start; align-self: start; }

/* the "Cyber website" link in the Cybersecurity header: only once /api/config gives its address */
.cy-site-link[hidden] { display: none; }

/* ===== Staff area: assign a ticket to someone (the 👤 Assign pop-up) ===== */
.assign-intro { color: var(--text-2); margin: 0; }
.assign-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px; }
.assign-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-2);
  background: var(--card); cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, background .15s, transform .15s;
}
.assign-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.assign-row.on { border-color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent); }
.assign-who { display: grid; gap: 2px; min-width: 0; flex: 1; }
.assign-who b { font-size: 0.95rem; }
.assign-who small { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-tags { display: flex; gap: 6px; flex-shrink: 0; }
.assign-tag {
  font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--soft); color: var(--muted); border: 1px solid var(--line-2);
}
.assign-tag.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-color: transparent; }
