/* TMS mgmt — dark storm / radar aesthetic */
:root {
  --bg0: #070b10;
  --bg1: #0c1219;
  --bg2: #121a24;
  --panel: rgba(14, 22, 32, 0.88);
  --line: rgba(120, 160, 140, 0.18);
  --text: #e6edf2;
  --muted: #8a9aa8;
  --amber: #f0a202;
  --amber-dim: #b87900;
  --radar: #3dcf8e;
  --radar-dim: #1f7a52;
  --danger: #e4572e;
  --ok: #3dcf8e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --mono: "Cascadia Code", "Consolas", "IBM Plex Mono", monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg0);
  line-height: 1.45;
}
a { color: var(--radar); text-decoration: none; }
a:hover { color: var(--amber); }

.storm-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  overflow: hidden;
  background: #081018;
}
.storm-bg-canvas {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  object-fit: cover;
  image-rendering: auto;
  filter: blur(7px) saturate(1.08) brightness(0.88) contrast(1.12);
  transform: translateZ(0);
  opacity: 1;
}
.storm-bg-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(1000px 600px at 50% 28%, rgba(6, 12, 20, 0.22), rgba(3, 6, 10, 0.52) 75%),
    linear-gradient(180deg, rgba(4, 8, 14, 0.28), rgba(2, 4, 8, 0.55));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .storm-bg-canvas { filter: blur(8px) saturate(1.0) brightness(0.85) contrast(1.08); }
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(120, 160, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 16, 24, 0.92), rgba(7, 11, 16, 0.82));
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(61, 207, 142, 0.35) 18%,
    rgba(240, 162, 2, 0.55) 50%,
    rgba(61, 207, 142, 0.35) 82%,
    transparent 100%);
  pointer-events: none;
}
.topbar-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 80px at 12% 0%, rgba(61, 207, 142, 0.1), transparent 70%),
    radial-gradient(420px 70px at 88% 0%, rgba(240, 162, 2, 0.08), transparent 70%);
  opacity: 0.9;
}
.topbar-inner {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex; align-items: center; gap: 1.1rem;
  min-height: 3.4rem;
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--text);
  flex-shrink: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.brand:hover { color: var(--text); transform: translateY(-1px); }
.brand-lockup {
  display: block;
  line-height: 1;
}
.brand-lockup-row {
  display: flex;
  align-items: flex-start;
  gap: 0.18rem;
}
.brand-lockup-t {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  line-height: 1;
  padding-top: 0.22rem;
  color: var(--text);
}
.brand-vortex {
  display: block;
  flex-shrink: 0;
  width: 1.85rem;
  height: auto;
  aspect-ratio: 63 / 97;
  margin: 0;
  object-fit: contain;
  object-position: center top;
}
.brand-lockup-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.06rem;
  min-width: 0;
  padding-top: 0.2rem;
}
.brand-lockup-map {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.05;
}
.brand-lockup-mgmt {
  font-weight: 850;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(90deg, #2a5a6e 0%, #4a9a7a 48%, #9fd4a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-lockup-sub {
  font-size: 0.54rem;
  font-weight: 550;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(230, 237, 242, 0.78);
  line-height: 1.25;
  margin-top: 0.04rem;
}
.nav {
  display: flex; align-items: center; gap: 0.25rem; flex: 1;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(120, 160, 140, 0.14);
  width: max-content;
  max-width: 100%;
}
.nav-link {
  position: relative;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav-link.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(61, 207, 142, 0.18), rgba(61, 207, 142, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(61, 207, 142, 0.28),
    0 0 18px rgba(61, 207, 142, 0.12);
}
.nav-link.is-active::after {
  content: "";
  position: absolute; left: 22%; right: 22%; bottom: 0.22rem;
  height: 2px; border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.85;
}
.topbar-meta { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; flex-shrink: 0; }
.user-chip {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.28rem 0.7rem 0.28rem 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(120, 160, 140, 0.16);
}
.user-chip-btn {
  cursor: pointer;
  color: inherit;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.user-chip-btn:hover,
.user-menu.is-open .user-chip-btn {
  border-color: rgba(61, 207, 142, 0.35);
  background: rgba(61, 207, 142, 0.08);
}
.user-menu { position: relative; }
.user-menu-caret {
  width: 0; height: 0; margin-right: 0.2rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  opacity: 0.8;
}
.user-menu-panel {
  position: absolute;
  right: 0; top: calc(100% + 0.45rem);
  min-width: 12.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: rgba(12, 18, 16, 0.96);
  border: 1px solid rgba(120, 160, 140, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 80;
  display: grid;
  gap: 0.15rem;
}
.user-menu-panel[hidden] { display: none !important; }
.user-menu-item {
  display: block; width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit; font-size: 0.86rem;
  cursor: pointer;
}
.user-menu-item:hover {
  background: rgba(61, 207, 142, 0.12);
  color: #fff;
}
.user-avatar {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
  color: #0b1210;
  background: linear-gradient(145deg, #57df9f, var(--radar-dim));
  box-shadow: 0 0 0 1px rgba(61, 207, 142, 0.25), 0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  flex-shrink: 0;
}
.user-avatar-img { padding: 0; }
.user-info { display: flex; flex-direction: column; gap: 0.05rem; line-height: 1.15; padding-right: 0.15rem; }
.user-name { font-size: 0.84rem; color: var(--text); font-weight: 600; }
.user-role {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.9;
}
.btn-logout {
  background: transparent;
  border-color: rgba(120, 160, 140, 0.22);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.btn-logout:hover {
  color: var(--text);
  border-color: rgba(228, 87, 46, 0.45);
  background: rgba(228, 87, 46, 0.1);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .brand, .btn-logout, .nav-link { transition: none; }
}

.shell { width: min(1180px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.shell-narrow { width: min(460px, calc(100% - 2rem)); margin-top: 8vh; }
.shell-wide { width: min(1180px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.site-foot {
  text-align: center; color: var(--muted); font-size: 0.8rem;
  padding: 1.5rem; opacity: 0.7;
}
.site-foot .sep { margin: 0 0.4rem; }
.site-foot-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-foot-link:hover {
  color: var(--text);
  border-bottom-color: rgba(125, 211, 252, 0.45);
}
body.is-authed .site-foot { opacity: 0.85; }
.site-foot-auth {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  opacity: 1;
  padding: 2rem 1.5rem 2.4rem;
}
.site-foot-auth .site-foot-meta { opacity: 0.7; }
.auth-seal {
  width: 180px;
  height: 180px;
  line-height: 0;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}
.auth-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}
.auth-seal:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
}
@media (prefers-reduced-motion: reduce) {
  .auth-seal { transition: none; }
  .auth-seal:hover { transform: none; }
}

.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0 0 0.35rem; font-size: 1.75rem; letter-spacing: 0.02em; }
.lede { margin: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; color: var(--amber); font-size: 0.72rem; margin: 0 0 0.5rem; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }

.auth-panel .auth-hero { margin-bottom: 1.25rem; }
.auth-panel h1 { margin: 0; font-size: 2.4rem; letter-spacing: 0.06em; }

/* Auth boot / loading bridge */
.auth-boot .boot-card {
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem 1.35rem;
}
.boot-spinner {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0.15rem auto 0.25rem;
}
.boot-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(61, 207, 142, 0.18);
  border-top-color: var(--radar);
  border-right-color: rgba(240, 162, 2, 0.65);
  animation: boot-spin 0.9s linear infinite;
}
.boot-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 16px rgba(240, 162, 2, 0.55);
  animation: boot-pulse 1.4s ease-in-out infinite;
}
@keyframes boot-spin {
  to { transform: rotate(360deg); }
}
@keyframes boot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; }
}
.boot-status {
  margin: 0;
  color: var(--radar);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  min-height: 1.4em;
}
.boot-log {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.85;
  max-height: 5.2em;
  overflow: hidden;
}
.boot-log li {
  padding: 0.15rem 0;
  opacity: 0;
  animation: boot-fade 0.35s ease forwards;
}
.boot-log li.is-done { color: rgba(182, 240, 210, 0.9); }
@keyframes boot-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.boot-bar {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(61, 207, 142, 0.16);
  overflow: hidden;
}
.boot-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--radar-dim), var(--radar) 55%, var(--amber));
  box-shadow: 0 0 12px rgba(61, 207, 142, 0.35);
  transition: width 0.12s linear;
}
@media (prefers-reduced-motion: reduce) {
  .boot-ring, .boot-core { animation: none; }
  .boot-log li { animation: none; opacity: 1; }
}

.auth-wide { width: min(820px, 100%); margin-inline: auto; }

.card-form, .editor-shell, .upload-zone, .stat-card, .audit-block, .table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-form { display: grid; gap: 0.9rem; padding: 1.25rem; min-width: 0; }
.card-form.narrow { max-width: 480px; }
.card-form label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
input, select, textarea, button {
  font: inherit; color: var(--text);
}
input, select, textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(61, 207, 142, 0.35);
  border-color: var(--radar-dim);
}
.otp-input { letter-spacing: 0.35em; font-size: 1.35rem; text-align: center; font-family: var(--mono); }
.mono { font-family: var(--mono); font-size: 0.9rem; }
.mono.small { font-size: 0.75rem; }
.hint { color: var(--muted); font-size: 0.8rem; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; border-radius: 8px; border: 1px solid transparent;
  padding: 0.55rem 0.95rem; cursor: pointer; background: var(--bg2); color: var(--text);
}
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.82rem; }
.btn-primary { background: linear-gradient(135deg, var(--amber-dim), #8a5a00); border-color: rgba(240,162,2,0.4); color: #fff; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--radar-dim); }
.btn-danger { background: rgba(228, 87, 46, 0.15); border-color: rgba(228, 87, 46, 0.45); color: #ffb4a2; }

/* Login CTA — refined hover */
.btn-login {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  padding: 0.75rem 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.88rem;
  border-color: rgba(240, 162, 2, 0.45);
  background:
    linear-gradient(135deg, #c98a08 0%, var(--amber-dim) 42%, #7a4e00 100%);
  box-shadow:
    0 1px 0 rgba(255, 220, 140, 0.18) inset,
    0 8px 22px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    filter 0.28s ease;
}
.btn-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 245, 210, 0.35) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-120%) skewX(-12deg);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
  pointer-events: none;
}
.btn-login:hover {
  filter: brightness(1.06) saturate(1.05);
  border-color: rgba(255, 200, 90, 0.7);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 230, 170, 0.28) inset,
    0 0 0 1px rgba(240, 162, 2, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(240, 162, 2, 0.22);
}
.btn-login:hover::before {
  transform: translateX(120%) skewX(-12deg);
}
.btn-login:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow:
    0 1px 0 rgba(255, 220, 140, 0.12) inset,
    0 4px 12px rgba(0, 0, 0, 0.3);
  transition-duration: 0.12s;
}
.btn-login:focus-visible {
  outline: 2px solid rgba(240, 162, 2, 0.65);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .btn-login,
  .btn-login::before {
    transition: none;
  }
  .btn-login:hover {
    transform: none;
  }
  .btn-login:hover::before {
    transform: none;
    opacity: 0.2;
  }
}
.inline { display: inline; }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.alert-error { background: rgba(228,87,46,0.12); border-color: rgba(228,87,46,0.4); color: #ffc2b3; }
.alert-ok { background: rgba(61,207,142,0.1); border-color: rgba(61,207,142,0.35); color: #b6f0d2; }

.toast-stack {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 80;
  display: grid;
  gap: 0.6rem;
  width: min(420px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast.is-hiding {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}
.toast-welcome {
  background: linear-gradient(145deg, rgba(35, 120, 78, 0.96), rgba(20, 90, 58, 0.94));
  border: 1px solid rgba(182, 240, 210, 0.35);
  color: #e8fff3;
}
.toast-stack-tickets {
  top: auto;
  bottom: 1.25rem;
  right: 1.1rem;
  z-index: 85;
}
.toast-stack-mail {
  top: auto;
  bottom: 1.25rem;
  right: 1.1rem;
  z-index: 86;
}
.toast-stack-mail.has-tickets-toast {
  bottom: 5.35rem;
}
.toast-tickets {
  pointer-events: auto;
  text-decoration: none;
  color: #ffe4dc;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 120, 80, 0.28), transparent 55%),
    linear-gradient(145deg, rgba(150, 36, 28, 0.97), rgba(88, 18, 16, 0.96));
  border: 1px solid rgba(255, 170, 150, 0.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(228, 87, 46, 0.2),
    0 0 28px rgba(228, 87, 46, 0.28);
  animation: tickets-toast-pulse 2.4s ease-in-out infinite;
}
.toast-tickets:hover {
  filter: brightness(1.06);
  border-color: rgba(255, 190, 170, 0.65);
  color: #fff;
}
.toast-tickets strong {
  color: #fff;
  font-weight: 700;
}
.toast-mail {
  pointer-events: auto;
  text-decoration: none;
  color: #e4f4ff;
  background:
    radial-gradient(circle at 12% 20%, rgba(80, 160, 255, 0.28), transparent 55%),
    linear-gradient(145deg, rgba(28, 72, 140, 0.97), rgba(16, 40, 88, 0.96));
  border: 1px solid rgba(150, 190, 255, 0.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(70, 140, 230, 0.2),
    0 0 28px rgba(70, 140, 230, 0.28);
  animation: mail-toast-pulse 2.4s ease-in-out infinite;
}
.toast-mail:hover {
  filter: brightness(1.06);
  border-color: rgba(180, 210, 255, 0.65);
  color: #fff;
}
.toast-mail strong {
  color: #fff;
  font-weight: 700;
}
.toast-icon-alert {
  color: #fff;
  background: #e4572e;
  box-shadow: 0 0 14px rgba(228, 87, 46, 0.55);
}
.toast-icon-mail {
  color: #fff;
  background: #3d8cf0;
  box-shadow: 0 0 14px rgba(61, 140, 240, 0.55);
}
@keyframes tickets-toast-pulse {
  0%, 100% {
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(228, 87, 46, 0.2),
      0 0 22px rgba(228, 87, 46, 0.22);
  }
  50% {
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(228, 87, 46, 0.35),
      0 0 36px rgba(228, 87, 46, 0.45);
  }
}
@keyframes mail-toast-pulse {
  0%, 100% {
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(70, 140, 230, 0.2),
      0 0 22px rgba(70, 140, 230, 0.22);
  }
  50% {
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(70, 140, 230, 0.35),
      0 0 36px rgba(70, 140, 230, 0.45);
  }
}
.toast-icon {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0b1210;
  background: var(--radar);
  box-shadow: 0 0 12px rgba(61, 207, 142, 0.45);
}
.toast-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
  .toast-tickets,
  .toast-mail { animation: none; }
}


.fleet-node { margin-bottom: 1.35rem; }
.fleet-node-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.fleet-node.is-stale .fleet-node-title { color: var(--amber); }
.fleet-node.is-stale .stat-grid,
.stat-grid.is-stale { opacity: 0.55; }

.page-head-main { min-width: 0; }
.page-head-main h1 { margin: 0 0 0.35rem; }
.page-head-main .lede { margin: 0; }
.fleet-sparks-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 160, 140, 0.28);
  background: rgba(14, 22, 32, 0.88);
  color: rgba(182, 240, 210, 0.88);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.fleet-sparks-toggle:hover {
  border-color: rgba(61, 207, 142, 0.45);
  color: #dff8ea;
}
.fleet-sparks-toggle-icon {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.15rem;
}
.fleet-sparks-toggle[aria-pressed="false"] .fleet-sparks-toggle-icon {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}
.fleet-sparks-toggle[aria-pressed="false"] {
  border-color: rgba(240, 162, 2, 0.35);
  color: rgba(240, 200, 120, 0.9);
}
#fleet-stats.is-compact .stat-grid {
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 0.85rem;
}
#fleet-stats.is-compact .stat-spark,
#fleet-stats.is-compact .stat-tag,
#fleet-stats.is-compact .stat-hw,
#fleet-stats.is-compact .meter,
#fleet-stats.is-compact .stat-sub,
#fleet-stats.is-compact .stat-note {
  display: none !important;
}
#fleet-stats.is-compact .stat-card {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  min-height: 0;
}
#fleet-stats.is-compact .stat-body {
  min-height: 0;
  padding: 0.55rem 0.7rem 0.6rem;
  gap: 0.15rem;
  background: rgba(8, 12, 18, 0.55);
  justify-content: center;
}
#fleet-stats.is-compact .stat-head {
  margin-bottom: 0.1rem;
}
#fleet-stats.is-compact .stat-card h2 {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}
#fleet-stats.is-compact .stat-value {
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0;
}
#fleet-stats.is-compact .stat-value.dual {
  font-size: 0.95rem;
  margin: 0;
  gap: 0.35rem;
}
#fleet-stats.is-compact .stat-value.dual + .stat-value.dual {
  margin-top: 0.1rem;
}
#fleet-stats.is-compact .stat-value.system-os {
  font-size: 0.95rem;
}
#fleet-stats.is-compact .fleet-node {
  margin-bottom: 0.85rem;
}
#fleet-stats.is-compact .fleet-node-title {
  margin-bottom: 0.4rem;
}
/* Top-of-page unreachable banner (above Verwaltung) */
.fleet-down-alert {
  position: relative;
  margin: 0 0 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  border: 2px solid rgba(232, 72, 72, 0.85);
  background:
    linear-gradient(135deg, rgba(90, 12, 18, 0.95), rgba(42, 8, 12, 0.92));
  color: #ffd0d0;
  box-shadow:
    0 0 0 1px rgba(255, 80, 80, 0.25),
    0 0 28px rgba(220, 40, 40, 0.45),
    0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 5;
  animation: fleet-down-alert-in 0.45s ease-out both, fleet-down-alert-pulse 1.8s ease-in-out infinite;
}
.fleet-down-alert.is-flash {
  animation: fleet-down-alert-flash 0.55s ease-out both, fleet-down-alert-pulse 1.8s ease-in-out 0.55s infinite;
}
@keyframes fleet-down-alert-flash {
  0% { opacity: 0.35; transform: translateY(-8px) scale(0.985); filter: brightness(1.4); }
  40% { opacity: 1; transform: translateY(2px) scale(1.015); filter: brightness(1.15); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}
.fleet-down-alert-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.fleet-down-alert-icon {
  flex: 0 0 auto;
  font-size: 1.55rem;
  line-height: 1.1;
  color: #ff6b6b;
  text-shadow: 0 0 14px rgba(255, 80, 80, 0.7);
  animation: fleet-down-icon-shake 2.4s ease-in-out infinite;
}
.fleet-down-alert-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.fleet-down-alert-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  text-transform: uppercase;
}
.fleet-down-alert-msg {
  font-size: 0.95rem;
  font-weight: 650;
  color: #ffc4c4;
  line-height: 1.35;
}
@keyframes fleet-down-alert-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fleet-down-alert-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 80, 80, 0.25),
      0 0 22px rgba(220, 40, 40, 0.4),
      0 12px 32px rgba(0, 0, 0, 0.45);
    border-color: rgba(232, 72, 72, 0.85);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(255, 100, 100, 0.45),
      0 0 40px rgba(255, 50, 50, 0.65),
      0 14px 36px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 110, 110, 1);
  }
}
@keyframes fleet-down-icon-shake {
  0%, 86%, 100% { transform: translateX(0); }
  88% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
  92% { transform: translateX(-2px); }
  94% { transform: translateX(2px); }
  96% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fleet-down-alert,
  .fleet-down-alert-icon,
  .fleet-hb-chip.is-down {
    animation: none !important;
  }
}

.fleet-heartbeat-block { margin: 0.25rem 0 1.35rem; }
.fleet-hb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.fleet-hb-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 6.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(120, 160, 140, 0.18);
  background: rgba(8, 12, 18, 0.45);
}
.fleet-hb-chip.is-up { border-color: rgba(61, 207, 142, 0.28); }
.fleet-hb-chip.is-down {
  border-color: rgba(232, 72, 72, 0.75);
  background: rgba(70, 10, 14, 0.55);
  box-shadow: 0 0 0 1px rgba(220, 50, 50, 0.25), 0 0 16px rgba(220, 40, 40, 0.35);
  animation: fleet-hb-down-pulse 1.4s ease-in-out infinite;
}
.fleet-hb-chip.rtt-green { border-color: rgba(61, 207, 142, 0.4); }
.fleet-hb-chip.rtt-yellow { border-color: rgba(240, 162, 2, 0.42); }
.fleet-hb-chip.rtt-red { border-color: rgba(220, 80, 80, 0.42); }
.fleet-hb-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.fleet-hb-rtt {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--radar);
}
.fleet-hb-chip.rtt-green .fleet-hb-rtt { color: #3dcf8e; }
.fleet-hb-chip.rtt-yellow .fleet-hb-rtt { color: #f0a202; }
.fleet-hb-chip.rtt-red .fleet-hb-rtt { color: #e07070; }
.fleet-hb-chip.is-down .fleet-hb-rtt {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 80, 80, 0.45);
}
.fleet-hb-loss {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.fleet-hb-chip.is-down .fleet-hb-loss { color: #e88a8a; }
@keyframes fleet-hb-down-pulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(220, 50, 50, 0.25), 0 0 12px rgba(220, 40, 40, 0.3);
    border-color: rgba(232, 72, 72, 0.7);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(255, 90, 90, 0.5), 0 0 22px rgba(255, 50, 50, 0.55);
    border-color: rgba(255, 110, 110, 1);
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  background: transparent; border: 0; box-shadow: none;
}
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  isolation: isolate;
  min-height: 0;
  background:
    linear-gradient(165deg, rgba(18, 28, 40, 0.92), rgba(10, 16, 24, 0.88));
  border: 1px solid rgba(120, 160, 140, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
  border-color: rgba(61, 207, 142, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}
.stat-spark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.85));
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.85));
}
.stat-body {
  position: relative;
  z-index: 1;
  padding: 0.95rem 1.05rem 1rem;
  min-height: 7.6rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.18), rgba(8, 12, 18, 0.42) 70%, rgba(8, 12, 18, 0.55));
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.stat-card h2 {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.2;
  min-width: 0;
}
.stat-hw {
  margin: 0 0 0.2rem;
  font-size: 0.55rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  color: rgba(182, 240, 210, 0.62);
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-hw:empty { display: none; }
/* CPU model: slightly larger + wrap so long Xeon strings stay readable */
.stat-card[data-key="cpu"] .stat-hw {
  font-size: 0.65rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.stat-tag {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(182, 240, 210, 0.72);
  border: 1px solid rgba(61, 207, 142, 0.22);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  background: rgba(61, 207, 142, 0.08);
  flex-shrink: 0;
}
.stat-value {
  margin: 0;
  font-size: 1.72rem;
  font-weight: 700;
  color: var(--radar);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.stat-value.system-os {
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 650;
  word-break: break-word;
}
.stat-value.dual {
  font-size: 1.12rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.18rem 0;
}
.stat-value.dual small { color: var(--muted); font-size: 0.7rem; font-weight: 500; }
.stat-sub { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.85rem; }
.stat-note { margin: 0.35rem 0 0; color: var(--amber); font-size: 0.75rem; line-height: 1.35; }
.meter {
  margin-top: 0.55rem;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  border: 1px solid rgba(61, 207, 142, 0.1);
}
.meter span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--radar-dim), var(--amber));
  transition: width 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
  .stat-card { transition: none; }
  .stat-card:hover { transform: none; }
  .stat-spark { display: none; }
}

.action-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.action-row:last-child { margin: 0.25rem 0 0; }
.btn-dash {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-dim), #8a5a00);
  border-color: rgba(240,162,2,0.4);
  color: #fff;
  font-weight: 600;
  gap: 0.45rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.btn-dash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 48%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn-dash-icon {
  display: grid;
  place-items: center;
  opacity: 0.92;
  transition: transform 0.28s ease, filter 0.28s ease;
}
.btn-dash:hover {
  filter: none;
  border-color: rgba(255, 210, 122, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(240, 162, 2, 0.25), 0 0 18px rgba(240, 162, 2, 0.35);
}
.btn-dash:hover::after {
  animation: dash-btn-sheen 0.7s ease-out;
}
.btn-dash:hover .btn-dash-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px rgba(255, 210, 122, 0.75));
}
.btn-dash:hover .btn-dash-icon-spin {
  transform: rotate(-12deg) scale(1.12);
}
@keyframes dash-btn-sheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-dash:hover { transform: none; }
  .btn-dash:hover::after { animation: none; }
  .btn-dash:hover .btn-dash-icon { transform: none; filter: none; }
}

/* Full-screen popup overlay (not inside tables) */
body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(3, 8, 14, 0.82);
  box-sizing: border-box;
}
.modal-overlay[hidden] {
  display: none !important;
}
.modal-card {
  width: min(400px, 100%);
  max-width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.modal-form {
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem 1.25rem 1.25rem;
  margin: 0;
  min-width: 0;
}
.modal-form h3 {
  margin: 0;
  font-size: 1.15rem;
}
.modal-form .confirm-name {
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 8px;
  word-break: break-all;
}
.modal-form .confirm-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 0;
}
.modal-form input[type="text"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.app-dialog-card { width: min(440px, 100%); }
.app-dialog-body { text-align: left; }
.app-dialog-badge {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 1rem;
  margin-bottom: 0.15rem;
  background: rgba(61, 207, 142, 0.15);
  color: var(--radar);
  border: 1px solid rgba(61, 207, 142, 0.3);
}
#app-dialog.is-error .app-dialog-badge {
  background: rgba(228, 87, 46, 0.16);
  color: #ffb4a2;
  border-color: rgba(228, 87, 46, 0.4);
}
#app-dialog.is-warn .app-dialog-badge {
  background: rgba(240, 162, 2, 0.14);
  color: var(--amber);
  border-color: rgba(240, 162, 2, 0.4);
}
#app-dialog.is-error .app-dialog-card {
  border-color: rgba(228, 87, 46, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(228, 87, 46, 0.12);
}
#app-dialog.is-warn .app-dialog-card {
  border-color: rgba(240, 162, 2, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(240, 162, 2, 0.12);
}
.app-dialog-msg {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.92;
}
#app-dialog.is-warn #app-dialog-ok {
  background: linear-gradient(180deg, #f0b429, var(--amber-dim));
  border-color: rgba(240, 162, 2, 0.55);
  color: #1a1205;
}
#app-dialog.is-error #app-dialog-ok {
  background: linear-gradient(180deg, #e86a45, #c44728);
  border-color: rgba(228, 87, 46, 0.55);
}

.audit-block { padding: 1rem; margin-top: 1.5rem; }
.audit-block h2 { margin: 0 0 0.75rem; font-size: 1rem; }
.presence-block { padding: 1.1rem 1.15rem 1.2rem; }
.presence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.presence-block h2 { margin: 0 0 0.25rem; }
.presence-lede { margin: 0; font-size: 0.88rem; color: var(--muted); }
.presence-metrics {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.presence-metric {
  min-width: 3.6rem;
  padding: 0.32rem 0.5rem;
  border-radius: 8px;
  text-align: center;
  background: rgba(61, 207, 142, 0.08);
  border: 1px solid rgba(61, 207, 142, 0.2);
}
.presence-metric-sec {
  background: rgba(240, 162, 2, 0.08);
  border-color: rgba(240, 162, 2, 0.28);
  min-width: 3.35rem;
}
.presence-metric-sec .presence-metric-value { color: var(--amber); }
.presence-metric-value {
  display: block;
  font-size: 1.12rem;
  font-weight: 750;
  color: var(--radar);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.presence-metric-label {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.presence-metric-label.is-stack {
  line-height: 1.25;
}
.presence-metric-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.presence-metric-link:hover {
  color: inherit;
  transform: translateY(-1px);
  border-color: rgba(240, 162, 2, 0.55);
  background: rgba(240, 162, 2, 0.14);
}
a.presence-metric-link .presence-metric-value { color: var(--amber); }

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.page-head .eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.ufw-node-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(120, 160, 140, 0.28);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(14, 22, 32, 0.88);
}
.ufw-node-link {
  display: inline-block;
  padding: 0.32rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 650;
  color: rgba(182, 240, 210, 0.72);
  text-decoration: none;
  border-right: 1px solid rgba(120, 160, 140, 0.22);
  transition: background 0.15s ease, color 0.15s ease;
}
.ufw-node-link:last-child { border-right: 0; }
.ufw-node-link:hover {
  color: #dff8ea;
  background: rgba(61, 207, 142, 0.1);
}
.ufw-node-link.is-active {
  color: #0b1218;
  background: rgba(61, 207, 142, 0.88);
}

.ufw-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.ufw-kpi {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  background: rgba(14, 22, 32, 0.88);
  border: 1px solid rgba(240, 162, 2, 0.22);
  text-align: center;
}
.ufw-kpi-muted { border-color: var(--line); }
.ufw-kpi-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 750;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.ufw-kpi-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ufw-panel {
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ufw-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.ufw-panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.ufw-panel-head .hint { margin: 0; }
.ufw-chart-wrap {
  width: 100%;
  min-height: 260px;
}
.ufw-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: start;
}
.ufw-split-3 {
  grid-template-columns: 1.1fr 0.95fr 1fr;
}
@media (max-width: 1100px) {
  .ufw-split-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .ufw-split,
  .ufw-split-3 { grid-template-columns: 1fr; }
}
.ufw-port-num {
  min-width: 3.4rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.02em;
}
.ufw-port-meta {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr) 3.2rem 3.4rem 3.4rem;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.25rem;
}
.ufw-port-svc {
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ufw-port-proto {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.35rem;
  justify-self: center;
}
.ufw-port-count {
  color: var(--amber);
  font-weight: 650;
  text-align: right;
}
.ufw-port-share {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
  min-width: 3.2rem;
}
.ufw-country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.ufw-country-meta {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.25rem;
}
.ufw-country-name { font-size: 0.9rem; }
.ufw-country-code { color: var(--muted); font-size: 0.75rem; }
.ufw-country-count { color: var(--amber); font-weight: 650; }
.ufw-country-share { color: var(--muted); font-size: 0.75rem; min-width: 3.2rem; text-align: right; }
.ufw-country-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.ufw-country-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(240,162,2,0.35), var(--amber));
}
.presence-sub {
  margin: 1rem 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.presence-audit-meta { margin: -0.15rem 0 0.65rem; }
.audit-pager {
  display: flex; gap: 0.55rem; justify-content: flex-end; align-items: center;
  margin-top: 0.75rem;
}
.btn.is-disabled,
a.btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.presence-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.presence-sub-row .presence-sub { margin: 0; }
.presence-actions {
  text-align: right;
  white-space: normal;
}
.presence-table td.presence-actions .inline {
  display: inline-flex;
  margin: 0.14rem 0 0.14rem 0.35rem;
  vertical-align: top;
}
.presence-table td.presence-actions .btn {
  white-space: nowrap;
}
.map-access-keys-table td.presence-actions {
  text-align: right;
  white-space: nowrap;
}
.map-access-keys-table .map-access-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.24rem;
}
.map-access-keys-table .map-access-actions .inline {
  margin: 0;
}
.map-access-keys-table .map-access-actions .btn.btn-sm {
  padding: 0.24rem 0.48rem;
  font-size: 0.75rem;
}
.map-access-keys-table td:nth-child(4) {
  min-width: 0;
}
.map-access-keys-table .map-key-plain {
  display: inline-block;
  max-width: 100%;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.presence-block .table-wrap {
  background: rgba(0, 0, 0, 0.16);
  box-shadow: none;
  border-color: rgba(120, 160, 140, 0.14);
}
.geo-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.geo-flag {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.geo-label {
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
}
.host-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  line-height: 1.25;
}
.host-name { color: var(--text); }
.host-ip { color: var(--muted); font-size: 0.75rem; }
.host-stack--solo .host-ip {
  font-size: 0.9rem;
  color: var(--muted);
}
.pill-you {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0b1210;
  background: linear-gradient(135deg, #57df9f, var(--amber));
  vertical-align: middle;
}
.user-protected-pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(240, 162, 2, 0.35);
  background: rgba(240, 162, 2, 0.1);
  vertical-align: middle;
}
tr.is-current-session td {
  background: rgba(61, 207, 142, 0.06);
}

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }

.map-owner-link {
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
}
.map-owner-link:hover { text-decoration: underline; }
.map-owner-sid {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 1rem; }
.bc-sep { color: var(--muted); }
.file-link { color: var(--text); }
.file-link.dir { color: var(--amber); }

.upload-zone {
  padding: 1rem; margin-bottom: 1rem;
  border-style: dashed; border-color: rgba(61,207,142,0.35);
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone.dragover {
  border-color: var(--amber);
  background: rgba(240,162,2,0.08);
}
.upload-progress {
  width: 100%;
  margin-top: 0.75rem;
  display: grid;
  gap: 0.45rem;
}
.upload-progress[hidden] {
  display: none !important;
}
.upload-progress-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
}
.upload-progress-title {
  font-size: 0.88rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.upload-progress-pct {
  flex: 0 0 auto; color: var(--radar); font-size: 0.85rem; letter-spacing: 0.02em;
}
.upload-progress-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(61,207,142,0.18);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}
.upload-progress-bar {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--radar-dim), var(--radar) 55%, #7dffc0);
  box-shadow: 0 0 12px rgba(61,207,142,0.35);
  transition: width 0.15s ease-out;
  position: relative;
}
.upload-progress-bar::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.28) 48%, transparent 66%);
  background-size: 220% 100%;
  animation: upload-sheen 1.4s linear infinite;
}
@keyframes upload-sheen {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.upload-progress-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  font-size: 0.78rem; color: var(--muted);
}
.upload-progress-rate { color: var(--amber); }
.upload-progress-eta { margin-left: auto; color: var(--text); opacity: 0.9; }

/* —— File browser —— */
.fb {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}
.fb-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
}
.fb-hero h1 { margin: 0 0 0.35rem; font-size: 1.85rem; letter-spacing: 0.02em; }
.fb-hero-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.fb-chip {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.35rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: rgba(0,0,0,0.2);
}
.fb-chip-write {
  color: #b6f0d2; border-color: rgba(61,207,142,0.35); background: rgba(61,207,142,0.08);
}
.fb-chip-vault {
  color: #ffd58a; border-color: rgba(240,162,2,0.4); background: rgba(240,162,2,0.1);
  font-variant-numeric: tabular-nums;
}
.fb-lock-form { display: inline-flex; align-items: center; }
.fb-lock-btn {
  border-color: rgba(228, 87, 46, 0.4);
  color: #ffb4a2;
}
.fb-lock-btn:hover {
  border-color: rgba(228, 87, 46, 0.65);
  color: #ffd0c4;
  background: rgba(228, 87, 46, 0.1);
}
.fb-shell {
  background: linear-gradient(180deg, rgba(16, 24, 34, 0.95), rgba(10, 16, 24, 0.92));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: visible;
  min-width: 0;
}
.fb-toolbar {
  display: grid; gap: 0.55rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.fb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.fb-crumb {
  color: var(--muted); font-size: 0.9rem; padding: 0.2rem 0.45rem; border-radius: 6px;
}
.fb-crumb:hover { color: var(--text); background: rgba(61,207,142,0.08); }
.fb-crumb.is-current { color: var(--amber); font-weight: 600; }
.fb-crumb-sep {
  width: 0.35rem; height: 0.35rem; border-radius: 50%;
  background: rgba(138,154,168,0.45); margin: 0 0.15rem;
}
.fb-path {
  font-size: 0.78rem; color: var(--muted); opacity: 0.9;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.fb-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
}
.fb-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .fb-toolbar-right { flex-direction: column; align-items: stretch; }
  .fb-toolbar-actions { justify-content: flex-start; }
}

.fb-upload {
  position: relative;
  z-index: 2;
  margin: 0.9rem 1rem 0;
  padding: 1rem 1.1rem;
  min-height: 4.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border: 1px dashed rgba(61,207,142,0.35);
  border-radius: 12px;
  background:
    radial-gradient(500px 120px at 10% 0%, rgba(61,207,142,0.08), transparent 60%),
    rgba(0,0,0,0.18);
  overflow: visible;
  isolation: isolate;
  transition:
    min-height 0.55s cubic-bezier(0.22, 1.4, 0.36, 1),
    padding 0.55s cubic-bezier(0.22, 1.4, 0.36, 1),
    margin 0.45s cubic-bezier(0.22, 1.2, 0.36, 1),
    border-color 0.35s ease,
    border-width 0.35s ease,
    border-radius 0.45s ease,
    background 0.45s ease,
    box-shadow 0.45s ease,
    transform 0.55s cubic-bezier(0.22, 1.55, 0.36, 1),
    filter 0.4s ease;
}
.fb-upload:has(.fb-allowlist:hover),
.fb-upload:has(.fb-allowlist:focus-within) {
  z-index: 40;
}
.fb-upload-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  border-radius: inherit;
  transition: opacity 0.35s ease;
}
.fb-upload-visual,
.fb-upload-copy,
.fb-upload-form,
.upload-progress {
  position: relative;
  z-index: 2;
}
.fb-upload.dragover {
  z-index: 30;
  overflow: hidden;
  min-height: 17rem;
  padding: 3.4rem 2rem 3.6rem;
  margin: 1.35rem 0.35rem 0.55rem;
  border-width: 3px;
  border-style: dashed;
  border-color: rgba(240, 162, 2, 0.95);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(240,162,2,0.28), transparent 55%),
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(61,207,142,0.22), transparent 50%),
    radial-gradient(ellipse 55% 45% at 85% 75%, rgba(125,211,252,0.16), transparent 48%),
    linear-gradient(145deg, rgba(18, 28, 22, 0.96), rgba(8, 12, 18, 0.98));
  box-shadow:
    0 0 0 1px rgba(240,162,2,0.35),
    0 0 40px rgba(240,162,2,0.45),
    0 0 90px rgba(61,207,142,0.28),
    0 0 160px rgba(240,162,2,0.18),
    0 28px 80px rgba(0,0,0,0.55),
    inset 0 0 60px rgba(240,162,2,0.08);
  transform: scale(1.045) translateY(-6px) rotate(-0.4deg);
  animation:
    fb-drop-breathe 1.05s ease-in-out infinite alternate,
    fb-drop-dash 0.7s linear infinite,
    fb-drop-shake 0.12s linear infinite;
  filter: saturate(1.35) brightness(1.08);
}
.fb-upload.dragover .fb-upload-fx { opacity: 1; }
.fb-upload-fx-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 18rem; height: 18rem;
  margin: -9rem 0 0 -9rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(240,162,2,0.55) 0%, rgba(61,207,142,0.22) 35%, transparent 68%);
  animation: fb-drop-core-pulse 0.9s ease-in-out infinite alternate;
  filter: blur(2px);
}
.fb-upload-fx-ring {
  position: absolute;
  left: 50%; top: 50%;
  border-radius: 50%;
  border: 2px solid rgba(240,162,2,0.55);
  box-shadow: 0 0 24px rgba(240,162,2,0.35), inset 0 0 18px rgba(61,207,142,0.15);
}
.fb-upload-fx-ring--a {
  width: 9rem; height: 9rem; margin: -4.5rem 0 0 -4.5rem;
  animation: fb-drop-spin 2.4s linear infinite;
  border-top-color: transparent;
  border-left-color: rgba(61,207,142,0.85);
}
.fb-upload-fx-ring--b {
  width: 13.5rem; height: 13.5rem; margin: -6.75rem 0 0 -6.75rem;
  animation: fb-drop-spin-rev 3.2s linear infinite;
  border-color: rgba(61,207,142,0.35);
  border-right-color: rgba(240,162,2,0.9);
  border-bottom-color: transparent;
}
.fb-upload-fx-ring--c {
  width: 18.5rem; height: 18.5rem; margin: -9.25rem 0 0 -9.25rem;
  animation: fb-drop-spin 4.6s linear infinite;
  border-style: dashed;
  border-width: 3px;
  border-color: rgba(125,211,252,0.45);
  opacity: 0.85;
}
.fb-upload-fx-bolt,
.fb-upload-fx-spark {
  position: absolute;
  left: 50%; top: 50%;
  pointer-events: none;
}
.fb-upload-fx-bolt {
  width: 3px; height: 4.5rem;
  margin: -2.25rem 0 0 -1.5px;
  background: linear-gradient(180deg, transparent, #fff 20%, var(--amber) 55%, transparent);
  box-shadow: 0 0 18px rgba(240,162,2,0.9), 0 0 40px rgba(255,255,255,0.35);
  animation: fb-drop-bolt 0.55s ease-in-out infinite;
  transform-origin: center bottom;
}
.fb-upload-fx-bolt--2 {
  height: 3.2rem;
  margin-top: -1.6rem;
  animation-delay: 0.18s;
  transform: rotate(28deg);
  opacity: 0.75;
}
.fb-upload-fx-spark {
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 4px rgba(240,162,2,0.85), 0 0 28px rgba(61,207,142,0.55);
  animation: fb-drop-spark 1.1s ease-out infinite;
}
.fb-upload-fx-spark--2 { animation-delay: 0.25s; animation-name: fb-drop-spark-2; }
.fb-upload-fx-spark--3 { animation-delay: 0.48s; animation-name: fb-drop-spark-3; }
.fb-upload-fx-scan {
  position: absolute;
  left: -10%; right: -10%;
  height: 38%;
  top: -40%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255,255,255,0.04) 35%,
    rgba(240,162,2,0.18) 50%,
    rgba(61,207,142,0.12) 62%,
    transparent 100%
  );
  animation: fb-drop-scan 1.35s ease-in-out infinite;
  mix-blend-mode: screen;
}
html.fb-file-dragging .fb-list,
html.fb-file-dragging .fb-toolbar {
  filter: blur(2.5px) brightness(0.55) saturate(0.7);
  opacity: 0.55;
  transition: filter 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}
.fb-list,
.fb-toolbar {
  transition: filter 0.35s ease, opacity 0.35s ease;
}
html.fb-file-dragging .fb-shell {
  box-shadow: 0 0 0 1px rgba(240,162,2,0.2), 0 0 80px rgba(240,162,2,0.12);
}
.fb-upload-visual {
  position: relative; width: 44px; height: 44px; flex: 0 0 auto;
  transition: width 0.45s cubic-bezier(0.22, 1.4, 0.36, 1), height 0.45s cubic-bezier(0.22, 1.4, 0.36, 1);
}
.fb-upload.dragover .fb-upload-visual {
  width: 88px; height: 88px;
  margin: 0 auto;
}
.fb-upload.dragover {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 1.1rem;
}
.fb-upload.dragover .fb-upload-form,
.fb-upload.dragover .upload-progress {
  display: none !important;
}
.fb-upload-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(61,207,142,0.35);
  box-shadow: 0 0 0 4px rgba(61,207,142,0.06);
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.45s ease;
}
.fb-upload-ring--outer {
  inset: -10px;
  opacity: 0;
  border-style: dashed;
  border-color: rgba(240,162,2,0.55);
  box-shadow: none;
  pointer-events: none;
}
.fb-upload.dragover .fb-upload-ring {
  border-color: var(--amber);
  box-shadow:
    0 0 0 6px rgba(240,162,2,0.12),
    0 0 28px rgba(240,162,2,0.55),
    0 0 48px rgba(61,207,142,0.35);
  animation: fb-drop-ring-pulse 0.7s ease-in-out infinite alternate;
}
.fb-upload.dragover .fb-upload-ring--outer {
  opacity: 1;
  animation: fb-drop-spin-rev 1.8s linear infinite, fb-drop-ring-pulse 0.7s ease-in-out infinite alternate;
}
.fb-upload-icon {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px;
  transform: translate(-50%, -58%);
  border: 2px solid var(--radar); border-top: 0; border-radius: 0 0 3px 3px;
  transition: transform 0.35s ease, border-color 0.35s ease, width 0.35s ease, height 0.35s ease;
}
.fb-upload-icon::before {
  content: ""; position: absolute; left: 50%; top: -7px; width: 2px; height: 10px;
  background: var(--radar); transform: translateX(-50%);
  transition: background 0.35s ease, height 0.35s ease, top 0.35s ease;
}
.fb-upload-icon::after {
  content: ""; position: absolute; left: 50%; top: -8px; width: 8px; height: 8px;
  border-left: 2px solid var(--radar); border-top: 2px solid var(--radar);
  transform: translateX(-50%) rotate(45deg);
  transition: border-color 0.35s ease, width 0.35s ease, height 0.35s ease, top 0.35s ease;
}
.fb-upload.dragover .fb-upload-icon {
  width: 28px; height: 28px;
  border-color: #fff;
  border-width: 3px;
  filter: drop-shadow(0 0 12px rgba(240,162,2,0.95)) drop-shadow(0 0 24px rgba(61,207,142,0.7));
  animation: fb-drop-icon-bounce 0.55s cubic-bezier(0.22, 1.6, 0.36, 1) infinite alternate;
}
.fb-upload.dragover .fb-upload-icon::before {
  background: #fff;
  height: 16px;
  top: -12px;
  width: 3px;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.fb-upload.dragover .fb-upload-icon::after {
  border-color: #fff;
  border-width: 3px;
  width: 14px; height: 14px;
  top: -14px;
}
.fb-upload-copy { flex: 1 1 180px; min-width: 0; }
.fb-upload.dragover .fb-upload-copy {
  flex: 0 1 auto;
  width: 100%;
}
.fb-upload-copy strong { display: block; font-size: 0.95rem; }
.fb-upload.dragover .fb-upload-copy strong {
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 0 0 18px rgba(240,162,2,0.55);
}
.fb-upload.dragover .fb-upload-copy p {
  color: rgba(255, 236, 190, 0.92);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  animation: fb-drop-hint-pulse 1s ease-in-out infinite alternate;
}
.fb-upload-drop-hint {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em !important;
  text-shadow: 0 0 18px rgba(240,162,2,0.55);
}
.fb-upload-copy p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }

@keyframes fb-drop-breathe {
  from { transform: scale(1.04) translateY(-4px) rotate(-0.35deg); }
  to { transform: scale(1.065) translateY(-10px) rotate(0.45deg); }
}
@keyframes fb-drop-dash {
  0%, 100% { border-color: rgba(240, 162, 2, 0.98); }
  50% { border-color: rgba(61, 207, 142, 0.98); }
}
@keyframes fb-drop-shake {
  0%, 100% { filter: saturate(1.35) brightness(1.08); }
  50% { filter: saturate(1.55) brightness(1.2); }
}
@keyframes fb-drop-core-pulse {
  from { transform: scale(0.72); opacity: 0.55; }
  to { transform: scale(1.18); opacity: 1; }
}
@keyframes fb-drop-spin {
  to { transform: rotate(360deg); }
}
@keyframes fb-drop-spin-rev {
  to { transform: rotate(-360deg); }
}
@keyframes fb-drop-bolt {
  0%, 100% { opacity: 0.15; transform: scaleY(0.55) rotate(-8deg); }
  40% { opacity: 1; transform: scaleY(1.15) rotate(4deg); }
  70% { opacity: 0.4; transform: scaleY(0.8) rotate(-2deg); }
}
@keyframes fb-drop-spark {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(-7rem, -5.5rem) scale(0); opacity: 0; }
}
@keyframes fb-drop-spark-2 {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(8rem, -4rem) scale(0); opacity: 0; }
}
@keyframes fb-drop-spark-3 {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(1.5rem, 7rem) scale(0); opacity: 0; }
}
@keyframes fb-drop-scan {
  0% { top: -45%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 0.85; }
  100% { top: 110%; opacity: 0; }
}
@keyframes fb-drop-ring-pulse {
  from { transform: scale(0.92); }
  to { transform: scale(1.08); }
}
@keyframes fb-drop-icon-bounce {
  from { transform: translate(-50%, -72%) scale(1); }
  to { transform: translate(-50%, -110%) scale(1.18); }
}
@keyframes fb-drop-hint-pulse {
  from { opacity: 0.7; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .fb-upload,
  .fb-upload.dragover,
  .fb-upload.dragover .fb-upload-icon,
  .fb-upload.dragover .fb-upload-ring,
  .fb-upload.dragover .fb-upload-ring--outer,
  .fb-upload-fx-core,
  .fb-upload-fx-ring,
  .fb-upload-fx-bolt,
  .fb-upload-fx-spark,
  .fb-upload-fx-scan,
  .fb-upload.dragover .fb-upload-copy p {
    animation: none !important;
  }
  .fb-upload.dragover {
    transform: none;
    min-height: 10rem;
  }
  html.fb-file-dragging .fb-list,
  html.fb-file-dragging .fb-toolbar {
    filter: none;
    opacity: 0.75;
  }
}
.fb-allowlist {
  position: relative;
  display: inline-block;
  color: #9fdcff;
  border-bottom: 1px dashed rgba(125, 211, 252, 0.45);
  cursor: help;
  outline: none;
}
.fb-allowlist:hover,
.fb-allowlist:focus-visible {
  color: #dff3ff;
  border-bottom-color: rgba(125, 211, 252, 0.85);
}
.fb-allowlist-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 60;
  width: min(22rem, calc(100vw - 2.5rem));
  padding: 0.7rem 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.98), rgba(16, 20, 28, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(125, 211, 252, 0.06);
  backdrop-filter: blur(12px);
  transform: translateY(-4px) scale(0.97);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.2, 0.9, 0.2, 1), visibility 0.16s;
}
.fb-allowlist:not(:hover):not(:focus-within) .fb-allowlist-pop {
  /* closed: must not expand page scroll width */
  display: none;
}
.fb-allowlist-pop::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: -5px;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(24, 30, 40, 0.98);
  transform: rotate(45deg);
}
.fb-allowlist:hover .fb-allowlist-pop,
.fb-allowlist:focus-visible .fb-allowlist-pop,
.fb-allowlist:focus-within .fb-allowlist-pop {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.fb-allowlist-pop-title {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.fb-allowlist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.fb-allowlist-chip {
  display: inline-block;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(125, 211, 252, 0.08);
  color: #dff3ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.2;
}
.fb-upload-form { margin-left: auto; }
.fb-upload-btn { cursor: pointer; }
.fb-upload.is-uploading {
  flex-direction: column;
  align-items: stretch;
  border-style: solid;
  border-color: rgba(61,207,142,0.45);
  background:
    radial-gradient(600px 140px at 0% 0%, rgba(61,207,142,0.12), transparent 55%),
    rgba(0,0,0,0.28);
  padding-bottom: 1rem;
}
.fb-upload.is-uploading .fb-upload-visual,
.fb-upload.is-uploading .fb-upload-copy,
.fb-upload.is-uploading .fb-upload-form {
  display: none;
}
.fb-upload .upload-progress {
  position: static;
  margin: 0;
  width: 100%;
}
@media (max-width: 720px) {
  .upload-progress-eta { margin-left: 0; width: 100%; }
}

.fb-list { padding: 0.35rem 0 0.5rem; min-width: 0; overflow-x: auto; }
.fb-list-head, .fb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 72px 130px max-content;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 1rem;
  min-width: 0;
}
.fb-list-head {
  color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.15rem;
}
.fb-list-head span:last-child, .fb-actions { text-align: right; }
.fb-row {
  margin: 0 0.45rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  animation: fbRowIn 0.35s ease both;
}
.fb-row:nth-child(n+3) { animation-delay: calc((var(--i, 0)) * 12ms); }
@keyframes fbRowIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.fb-row:hover {
  background: rgba(61, 207, 142, 0.05);
  border-color: rgba(61, 207, 142, 0.14);
}
.fb-name { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.fb-link {
  color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fb-link:hover { color: var(--amber); }
.fb-link.is-static { color: var(--muted); font-weight: 500; }
.fb-ext {
  flex: 0 0 auto; font-size: 0.65rem; letter-spacing: 0.08em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.4rem;
}
.fb-size, .fb-mtime { color: var(--muted); font-size: 0.84rem; }
.fb-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
}
.fb-menu-trigger {
  appearance: none;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.fb-menu-trigger:hover,
.fb-menu-trigger[aria-expanded="true"] {
  color: var(--text);
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(125, 211, 252, 0.08);
}
.fb-menu-trigger:active { transform: scale(0.96); }
.fb-menu-dots {
  width: 1rem;
  height: 1rem;
  position: relative;
  display: block;
}
.fb-menu-dots::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.fb-float-menu {
  position: fixed;
  z-index: 80;
  min-width: 11.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.98), rgba(16, 20, 28, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(125, 211, 252, 0.06);
  backdrop-filter: blur(12px);
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: none;
}
.fb-float-menu.opens-up { transform-origin: bottom right; }
.fb-float-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fb-float-item {
  appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.fb-float-item:hover,
.fb-float-item:focus-visible {
  outline: none;
  background: rgba(125, 211, 252, 0.1);
  color: #dff3ff;
}
.fb-float-item.is-danger { color: #ffb4a2; }
.fb-float-item.is-danger:hover,
.fb-float-item.is-danger:focus-visible {
  background: rgba(228, 87, 46, 0.14);
  color: #ffcfc3;
}
.fb-float-item[hidden] { display: none !important; }

.fb-action {
  appearance: none; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 0.75rem; padding: 0.26rem 0.4rem; border-radius: 7px; cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.fb-action.is-spacer {
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
}
.fb-action:hover { color: var(--text); border-color: var(--radar-dim); }
.fb-action.is-danger { color: #ffb4a2; border-color: rgba(228,87,46,0.35); }
.fb-action.is-danger:hover { background: rgba(228,87,46,0.12); }

.fb-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  position: relative; background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}
.fb-icon::before, .fb-icon::after { content: ""; position: absolute; box-sizing: border-box; }
.fb-icon-folder { border-color: rgba(240,162,2,0.35); background: rgba(240,162,2,0.08); }
.fb-icon-folder::before {
  left: 7px; top: 10px; width: 20px; height: 14px; border-radius: 2px 3px 3px 3px;
  background: linear-gradient(180deg, #f0a202, #b87900);
}
.fb-icon-folder::after {
  left: 7px; top: 7px; width: 10px; height: 5px; border-radius: 2px 2px 0 0; background: #f0a202;
}
.fb-icon-php { border-color: rgba(120,140,220,0.35); background: rgba(120,140,220,0.08); }
.fb-icon-php::before {
  inset: 9px; border-radius: 10px; border: 2px solid #8ea0ff;
}
.fb-icon-js { border-color: rgba(240,162,2,0.3); background: rgba(240,162,2,0.07); }
.fb-icon-js::before {
  left: 9px; top: 9px; right: 9px; bottom: 9px; border-radius: 3px; background: #f0a202;
}
.fb-icon-css { border-color: rgba(61,207,142,0.3); background: rgba(61,207,142,0.07); }
.fb-icon-css::before {
  left: 10px; top: 8px; width: 14px; height: 18px; border-radius: 2px; background: var(--radar);
  clip-path: polygon(50% 0, 100% 20%, 85% 100%, 15% 100%, 0 20%);
}
.fb-icon-code { border-color: rgba(61,207,142,0.28); background: rgba(61,207,142,0.06); }
.fb-icon-code::before {
  left: 11px; top: 12px; width: 7px; height: 10px; border-left: 2px solid var(--radar); border-bottom: 2px solid var(--radar);
  transform: rotate(45deg);
}
.fb-icon-code::after {
  right: 11px; top: 12px; width: 7px; height: 10px; border-right: 2px solid var(--radar); border-bottom: 2px solid var(--radar);
  transform: rotate(-45deg);
}
.fb-icon-image { border-color: rgba(240,162,2,0.25); background: rgba(240,162,2,0.06); }
.fb-icon-image::before {
  left: 8px; top: 10px; width: 18px; height: 14px; border: 2px solid var(--amber); border-radius: 3px;
}
.fb-icon-image::after {
  left: 12px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
}
.fb-icon-text, .fb-icon-file { border-color: rgba(138,154,168,0.3); }
.fb-icon-text::before, .fb-icon-file::before {
  left: 11px; top: 8px; width: 12px; height: 16px; border: 2px solid var(--muted); border-radius: 2px;
}
.fb-icon-text::after {
  left: 14px; top: 13px; width: 6px; height: 2px; background: var(--muted);
  box-shadow: 0 3px 0 var(--muted), 0 6px 0 var(--muted);
}

.fb-empty {
  padding: 2.5rem 1rem; text-align: center; color: var(--muted);
}
.fb-empty-icon {
  width: 48px; height: 48px; margin: 0 auto 0.75rem; border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.02);
}

@media (max-width: 860px) {
  .fb-list-head { display: none; }
  .fb-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name actions"
      "meta meta";
    gap: 0.35rem 0.75rem;
    padding: 0.75rem 0.85rem;
  }
  .fb-name { grid-area: name; }
  .fb-actions { grid-area: actions; }
  .fb-size, .fb-mode, .fb-mtime {
    grid-area: meta; display: inline;
  }
  .fb-size::after, .fb-mode::after { content: " · "; }
  .fb-mtime { padding-left: 2.5rem; }
}
.fb-mode { color: var(--radar); font-variant-numeric: tabular-nums; }
.chmod-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.25rem;
}

td.actions {
  position: relative;
  white-space: nowrap;
}

.editor-shell { overflow: hidden; }
.editor-head-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
}
.editor-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--line);
}
.badge {
  font-size: 0.7rem; letter-spacing: 0.1em; padding: 0.2rem 0.45rem;
  border-radius: 999px; border: 1px solid var(--line); color: var(--amber);
}
#code-editor {
  width: 100%; min-height: 65vh; resize: vertical;
  border: 0; border-radius: 0; background: #0a1016;
  font-family: var(--mono); font-size: 0.92rem; line-height: 1.5;
  tab-size: 4; white-space: pre; overflow: auto;
}

.enroll-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 720px) {
  .enroll-grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
.qr-panel {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  min-width: 0;
}
.qr-box {
  background: #fff;
  color: #000;
  border-radius: 12px;
  padding: 0.85rem;
  width: 200px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  overflow: hidden;
}
#qrcode, #qrcode img, #qrcode canvas, #qrcode table {
  width: 168px !important;
  height: 168px !important;
  max-width: 100%;
}
.qr-panel .hint { text-align: center; margin: 0; }
.enroll-form { min-width: 0; }
.field-block {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.copy-block {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.7rem 0.8rem;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  user-select: all;
}
.copy-block-uri {
  font-size: 0.78rem;
  max-height: 7.5rem;
  overflow: auto;
}
.uri-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}
.uri-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  user-select: none;
}
.uri-details[open] summary { margin-bottom: 0.65rem; color: var(--text); }
.uri-details .field-block { margin-top: 0.25rem; }

@media (max-width: 720px) {
  .topbar { padding: 0.65rem 0.75rem; }
  .topbar-inner { flex-wrap: wrap; gap: 0.75rem; }
  .nav { order: 3; width: 100%; max-width: none; justify-content: stretch; }
  .nav-link { flex: 1; text-align: center; padding: 0.5rem 0.55rem; }
  .brand-lockup-t { font-size: 0.98rem; padding-top: 0.18rem; }
  .brand-vortex { width: 1.55rem; }
  .brand-lockup-map { font-size: 0.68rem; letter-spacing: 0.08em; }
  .brand-lockup-mgmt { font-size: 1.12rem; }
  .brand-lockup-sub { display: none; }
  .user-info { display: none; }
  .user-chip { padding: 0.2rem; }
  .row-between { flex-direction: column; }
  .shell-narrow { margin-top: 4vh; }
}

/* Changelog page */
.cl-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.cl-hero h1 { margin: 0.15rem 0 0.35rem; font-size: 1.85rem; letter-spacing: 0.02em; }
.cl-hero-meta { display: flex; gap: 0.45rem; }
.cl-chip {
  display: inline-flex; align-items: center;
  padding: 0.28rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--muted); font-size: 0.78rem; font-weight: 600;
}
.cl-empty {
  padding: 2rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 14px;
}
.cl-timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
}
.cl-release {
  position: relative;
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.85rem;
  align-items: start;
}
.cl-rail {
  position: relative;
  width: 0.7rem;
  margin-top: 1.15rem;
  justify-self: center;
}
.cl-rail::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: -1.85rem;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(125,211,252,0.45), rgba(255,255,255,0.08));
}
.cl-release:last-child .cl-rail::before { bottom: 0.4rem; }
.cl-rail::after {
  content: "";
  position: absolute;
  left: 50%; top: -0.15rem;
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(16, 22, 30, 1);
  border: 2px solid rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.08);
}
.cl-release.is-current .cl-rail::after {
  border-color: var(--radar);
  box-shadow: 0 0 0 4px rgba(61, 207, 142, 0.14);
  background: rgba(61, 207, 142, 0.35);
}
.cl-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(28, 34, 44, 0.72), rgba(12, 16, 24, 0.88));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  padding: 0.95rem 1.05rem 1.05rem;
  animation: fbRowIn 0.35s ease both;
}
.cl-release.is-current .cl-card {
  border-color: rgba(61, 207, 142, 0.28);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(61, 207, 142, 0.08);
}
.cl-card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.75rem;
  margin-bottom: 0.75rem;
}
.cl-version {
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; color: var(--text);
}
.cl-date { color: var(--muted); font-size: 0.82rem; }
.cl-badge {
  margin-left: auto;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.22rem 0.5rem; border-radius: 999px;
  color: #b6f0d2; border: 1px solid rgba(61,207,142,0.35); background: rgba(61,207,142,0.1);
}
.cl-section { margin-top: 0.7rem; }
.cl-section + .cl-section { margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.06); }
.cl-section-title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.cl-section-title::before {
  content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: currentColor; opacity: 0.9;
}
.cl-section.is-added .cl-section-title { color: #8fe0b5; }
.cl-section.is-changed .cl-section-title { color: #9fdcff; }
.cl-section.is-fixed .cl-section-title { color: #f0c36a; }
.cl-section.is-security .cl-section-title { color: #ffb4a2; }
.cl-section.is-removed .cl-section-title { color: #ff9aa2; }
.cl-section.is-other .cl-section-title { color: var(--muted); }
.cl-items {
  margin: 0; padding-left: 1.05rem;
  display: grid; gap: 0.35rem;
  color: rgba(235, 242, 250, 0.9);
  font-size: 0.9rem; line-height: 1.45;
}
.cl-items li::marker { color: rgba(125, 211, 252, 0.45); }
@media (max-width: 720px) {
  .cl-release { grid-template-columns: 0.85rem 1fr; gap: 0.65rem; }
  .cl-badge { margin-left: 0; }
}

/* Pastes */
.paste-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem;
}
.paste-hero h1 { margin: 0.15rem 0 0.35rem; font-size: 1.75rem; letter-spacing: 0.02em; }
.paste-hero-compact h1 { font-size: 1.45rem; }
.paste-hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.paste-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.72), rgba(12, 16, 24, 0.88));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  padding: 1rem 1.1rem 1.15rem;
}
.paste-create {
  display: grid;
  gap: 1.15rem;
  padding: 1.25rem 1.35rem 1.3rem;
}
.paste-create-section { display: grid; gap: 0.65rem; }
.paste-create-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  align-items: start;
}
.paste-password-section {
  max-width: 22rem;
}
.paste-password-slot {
  position: relative;
  z-index: 2;
}
.paste-password-slot input {
  pointer-events: auto !important;
}
@media (max-width: 900px) {
  .paste-create-options { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .paste-create-options { grid-template-columns: 1fr; }
  .paste-password-section { max-width: none; }
}
.paste-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 0.25rem;
}
@media (max-width: 720px) {
  .paste-form-grid { grid-template-columns: 1fr; }
}
.paste-form .field,
.paste-pw-form .field,
.paste-created .field {
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  min-width: 0;
}
.paste-form .field-label,
.paste-form .field > span:first-child {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.2;
}
.paste-form .field .opt {
  font-weight: 500;
  opacity: 0.7;
  font-size: 0.75rem;
  text-transform: lowercase;
}
.paste-form input[type="text"],
.paste-form input[type="password"],
.paste-form textarea,
.paste-pw-form input,
.paste-link-row input {
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
}
.paste-form select {
  /* Native fallback; enhanced via .oui-select */
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
}
.paste-form textarea {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.5;
  min-height: 16rem;
  resize: vertical;
  tab-size: 4;
}
.paste-create-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.paste-check {
  display: inline-flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.45rem 0.55rem 0.45rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(240, 162, 2, 0.22);
  background: rgba(240, 162, 2, 0.06);
  cursor: pointer;
  max-width: 28rem;
  user-select: none;
}
.paste-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem;
  max-width: 1rem;
  margin: 0.18rem 0 0;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 4px;
  border: 1px solid rgba(240, 162, 2, 0.55);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: none;
  cursor: pointer;
  position: relative;
}
.paste-check input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #f0b429, var(--amber-dim));
  border-color: rgba(240, 162, 2, 0.75);
}
.paste-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.08rem;
  width: 0.28rem;
  height: 0.5rem;
  border: solid #1a1205;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.paste-check input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(240, 162, 2, 0.45);
  outline-offset: 2px;
}
.paste-check-copy,
.paste-check span:not(.paste-check-copy) {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.paste-check strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.25;
}
.paste-check small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  font-weight: 500;
}
.paste-form-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }

/* TMS custom select */
.oui-select {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 1;
}
.oui-select.is-open {
  z-index: 60;
}
.oui-select-native {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  overflow: hidden !important;
}
.oui-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 61;
  max-height: 16rem;
  overflow: auto;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.98), rgba(16, 20, 28, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(125, 211, 252, 0.06);
  backdrop-filter: blur(12px);
  transform-origin: top center;
  display: none !important;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none !important;
  transition: opacity 0.14s ease, transform 0.16s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.oui-select.is-open .oui-select-menu {
  display: block !important;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto !important;
}
.oui-select-trigger {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  font: inherit;
  font-weight: 550;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.oui-select-trigger:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(0, 0, 0, 0.36);
}
.oui-select.is-open .oui-select-trigger,
.oui-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(61, 207, 142, 0.45);
  box-shadow: 0 0 0 3px rgba(61, 207, 142, 0.12);
}
.oui-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oui-select-caret {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease, border-color 0.15s ease;
  flex: 0 0 auto;
}
.oui-select.is-open .oui-select-caret {
  transform: rotate(225deg) translateY(-1px);
  border-color: var(--radar);
}
.paste-password-slot {
  position: relative;
  z-index: 5;
}
.paste-password-slot input[type="password"],
.paste-password-slot input[type="text"] {
  position: relative;
  z-index: 6;
  pointer-events: auto !important;
}
.oui-select-option {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.oui-select-option:hover,
.oui-select-option:focus-visible {
  outline: none;
  background: rgba(125, 211, 252, 0.1);
  color: #dff3ff;
}
.oui-select-option.is-active {
  background: rgba(61, 207, 142, 0.12);
  color: #b6f0d2;
}
.paste-meta-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.paste-chip {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--muted); font-size: 0.72rem; font-weight: 650;
}
.paste-chip.is-warn { color: #f0c36a; border-color: rgba(240,162,2,0.35); background: rgba(240,162,2,0.08); }
.paste-chip.is-lock { color: #9fdcff; border-color: rgba(125,211,252,0.3); background: rgba(125,211,252,0.08); }
.paste-title { margin: 0 0 0.85rem; font-size: 1.15rem; }
.paste-link-row { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; align-items: center; }
.paste-link-row-sm { margin-top: 0.65rem; }
.paste-toolbar { margin-bottom: 0.85rem; }
.paste-code-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.92), rgba(6, 10, 16, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.paste-code {
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.5;
  color: #d7e3ec;
  white-space: pre;
  tab-size: 4;
  min-width: min-content;
}
.paste-code code { font: inherit; color: inherit; background: none; padding: 0; }
.paste-foot-link { margin-top: 1rem; font-size: 0.88rem; }
.btn.is-danger-text { color: #ffb4a2; border-color: rgba(228,87,46,0.35); }
.btn.is-copied { border-color: rgba(61,207,142,0.45); color: #b6f0d2; }
.btn.is-copy-fail { border-color: rgba(228,87,46,0.45); color: #ffb4a2; }
.inline { display: inline; }

.paste-empty {
  text-align: center;
  padding: 2rem 1.25rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  color: var(--muted);
}
.paste-chip.is-members {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.1);
}
.paste-chip.is-public {
  color: #8fe0b5;
  border-color: rgba(61, 207, 142, 0.35);
  background: rgba(61, 207, 142, 0.08);
}
.paste-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.72), rgba(12, 16, 24, 0.88));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.paste-table { min-width: 860px; }
.paste-table-head,
.paste-table-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1.6fr) 7.5rem 9.5rem 8.5rem 8.5rem minmax(14rem, auto);
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
}
.paste-table-head {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.paste-table-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.paste-table-row:last-child { border-bottom: 0; }
.paste-table-row:hover { background: rgba(125, 211, 252, 0.04); }
.paste-row-title {
  display: block;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.paste-row-title:hover { color: #dff3ff; }
.paste-row-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.paste-owner { font-weight: 600; color: var(--text); }
.paste-td-status { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.paste-td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .paste-table { min-width: 720px; }
}

/* —— Tickets / Support —— */
.ticket-page { display: grid; gap: 1rem; }
.ticket-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.25rem;
}
.ticket-hero h1 { margin: 0.15rem 0 0.35rem; font-size: 1.75rem; letter-spacing: 0.02em; }
.ticket-hero-compact h1 { font-size: 1.4rem; }
.ticket-hero-actions, .ticket-hero-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.ticket-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.72), rgba(12, 16, 24, 0.88));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  padding: 1.15rem 1.25rem 1.25rem;
}
.ticket-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}
.ticket-field-span { grid-column: 1 / -1; }
.ticket-form-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.85rem; margin-top: 1.15rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ticket-form-hint { margin: 0; color: var(--muted); font-size: 0.82rem; max-width: 36rem; line-height: 1.4; }
.ticket-form .field-label .req { color: var(--amber); margin-left: 0.15rem; }
.ticket-form-footer .ticket-submit-btn {
  width: auto;
  min-width: 12rem;
  flex: 0 0 auto;
}
.ticket-form textarea {
  min-height: 11rem; resize: vertical; font-family: var(--font);
}
@media (max-width: 720px) {
  .ticket-form-grid { grid-template-columns: 1fr; }
}

.ticket-sent { text-align: center; padding: 2rem 1.5rem; }
.ticket-page-sent {
  position: relative;
  isolation: isolate;
}
.ticket-sent-fx {
  position: absolute;
  inset: -2rem -1rem 40%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ticket-sent-hero,
.ticket-page-sent .ticket-sent {
  position: relative;
  z-index: 1;
}
.ticket-sent-burst {
  position: absolute;
  left: 50%; top: 42%;
  width: 8rem; height: 8rem;
  margin: -4rem 0 0 -4rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,162,2,0.55) 0%, rgba(61,207,142,0.2) 40%, transparent 70%);
  animation: ticket-sent-burst 1.1s cubic-bezier(0.22, 1.4, 0.36, 1) both;
  filter: blur(1px);
}
.ticket-sent-burst--2 {
  width: 14rem; height: 14rem;
  margin: -7rem 0 0 -7rem;
  animation-delay: 0.08s;
  background: radial-gradient(circle, rgba(61,207,142,0.35) 0%, rgba(125,211,252,0.12) 45%, transparent 70%);
}
.ticket-sent-ring {
  position: absolute;
  left: 50%; top: 42%;
  width: 5rem; height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(240,162,2,0.65);
  animation: ticket-sent-ring 1.35s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.ticket-sent-ring--2 {
  border-color: rgba(61,207,142,0.55);
  animation-delay: 0.12s;
}
.ticket-sent-ring--3 {
  border-color: rgba(125,211,252,0.45);
  animation-delay: 0.22s;
}
.ticket-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ticket-confetti-piece {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 8px; height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: ticket-confetti-fall 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  box-shadow: 0 0 10px currentColor;
}
.ticket-sent {
  text-align: center;
  padding: 2.2rem 1.5rem 2rem;
  animation:
    ticket-sent-card-in 0.75s cubic-bezier(0.22, 1.55, 0.36, 1) 0.15s both,
    ticket-sent-card-glow 1.8s ease-in-out 0.9s infinite alternate;
  border-color: rgba(61,207,142,0.35);
  box-shadow:
    0 0 0 1px rgba(240,162,2,0.18),
    0 0 40px rgba(240,162,2,0.18),
    0 0 80px rgba(61,207,142,0.12),
    0 18px 48px rgba(0,0,0,0.4);
}
.ticket-sent-badge {
  position: relative;
  width: 4.4rem; height: 4.4rem; margin: 0 auto 0.85rem; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), transparent 45%),
    linear-gradient(145deg, rgba(61,207,142,0.35), rgba(240,162,2,0.28));
  border: 2px solid rgba(61,207,142,0.55);
  color: #fff; font-size: 1.85rem;
  box-shadow: 0 0 28px rgba(61,207,142,0.45), 0 0 48px rgba(240,162,2,0.25);
  animation: ticket-sent-badge-pop 0.85s cubic-bezier(0.22, 1.8, 0.36, 1) 0.2s both;
}
.ticket-sent-check {
  display: block;
  animation: ticket-sent-check 0.55s cubic-bezier(0.22, 1.6, 0.36, 1) 0.45s both;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.65));
}
.ticket-sent-flash {
  margin: 0 0 0.45rem;
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 12px rgba(240,162,2,0.85),
    0 0 28px rgba(61,207,142,0.55);
  animation: ticket-sent-flash 0.7s cubic-bezier(0.22, 1.7, 0.36, 1) 0.35s both;
}
.ticket-sent-heading {
  animation: ticket-sent-title-in 0.65s cubic-bezier(0.22, 1.4, 0.36, 1) 0.1s both;
}
.ticket-sent-title {
  margin: 0 0 0.35rem; font-size: 1.25rem;
  animation: ticket-sent-title-in 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) 0.4s both;
}
.ticket-sent-meta {
  margin: 0 0 1.25rem; color: var(--muted);
  animation: ticket-sent-title-in 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) 0.48s both;
}
.ticket-sent .ticket-copy-row,
.ticket-sent .field-label,
.ticket-sent .ticket-form-hint {
  animation: ticket-sent-title-in 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) 0.58s both;
}
.ticket-sent-open {
  width: auto !important;
  min-width: 9rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
@keyframes ticket-sent-burst {
  from { transform: scale(0.2); opacity: 0; }
  45% { opacity: 1; }
  to { transform: scale(1.35); opacity: 0; }
}
@keyframes ticket-sent-ring {
  from { transform: scale(0.35); opacity: 0.95; }
  to { transform: scale(3.2); opacity: 0; }
}
@keyframes ticket-sent-badge-pop {
  0% { transform: scale(0.2) rotate(-18deg); opacity: 0; }
  60% { transform: scale(1.18) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes ticket-sent-check {
  from { transform: scale(0) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes ticket-sent-flash {
  from { transform: scale(0.4) translateY(16px); opacity: 0; letter-spacing: 0.4em; filter: blur(4px); }
  to { transform: scale(1) translateY(0); opacity: 1; letter-spacing: 0.12em; filter: blur(0); }
}
@keyframes ticket-sent-title-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes ticket-sent-card-in {
  from { transform: translateY(28px) scale(0.92); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes ticket-sent-card-glow {
  from {
    box-shadow:
      0 0 0 1px rgba(240,162,2,0.14),
      0 0 28px rgba(240,162,2,0.12),
      0 0 60px rgba(61,207,142,0.08),
      0 18px 48px rgba(0,0,0,0.4);
  }
  to {
    box-shadow:
      0 0 0 1px rgba(61,207,142,0.28),
      0 0 48px rgba(240,162,2,0.28),
      0 0 100px rgba(61,207,142,0.18),
      0 22px 56px rgba(0,0,0,0.45);
  }
}
@keyframes ticket-confetti-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(0.6); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(var(--dx), 420px, 0) rotate(var(--rot)) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket-sent,
  .ticket-sent-badge,
  .ticket-sent-check,
  .ticket-sent-flash,
  .ticket-sent-heading,
  .ticket-sent-title,
  .ticket-sent-meta,
  .ticket-sent .ticket-copy-row,
  .ticket-sent .field-label,
  .ticket-sent .ticket-form-hint,
  .ticket-sent-burst,
  .ticket-sent-ring,
  .ticket-confetti-piece {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ticket-sent-fx { display: none; }
}

.ticket-copy-row {
  display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; justify-content: center;
  margin: 0.35rem 0 0.85rem;
}
.ticket-copy-row input {
  flex: 1 1 16rem; min-width: 0; max-width: 36rem; text-align: left;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem; align-items: start;
}
@media (max-width: 960px) {
  .ticket-layout { grid-template-columns: 1fr; }
}
.ticket-thread { display: grid; gap: 0.85rem; padding: 1rem; }
.ticket-msg {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: rgba(0,0,0,0.18);
}
.ticket-msg.is-staff {
  border-color: rgba(61,207,142,0.22);
  background: rgba(61,207,142,0.06);
}
.ticket-msg.is-opener {
  border-color: rgba(240,162,2,0.22);
  background: rgba(240,162,2,0.05);
}
.ticket-msg-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem; font-size: 0.82rem;
}
.ticket-msg-head span { color: var(--muted); }
.ticket-msg-body { font-size: 0.95rem; line-height: 1.55; color: rgba(235,242,250,0.94); }
.ticket-msg-plain { white-space: pre-wrap; }
.ticket-rich p { margin: 0 0 0.55rem; }
.ticket-rich p:last-child { margin-bottom: 0; }
.ticket-rich ul, .ticket-rich ol { margin: 0.35rem 0 0.55rem; padding-left: 1.2rem; }
.ticket-rich a { color: #9fdcff; text-decoration: underline; }

.ticket-side { display: grid; gap: 1rem; }
.ticket-side-title {
  margin: 0 0 0.75rem; font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.ticket-dl { margin: 0; display: grid; gap: 0.55rem; }
.ticket-dl > div {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.5rem; align-items: baseline;
}
.ticket-dl dt { margin: 0; color: var(--muted); font-size: 0.78rem; }
.ticket-dl dd { margin: 0; font-size: 0.9rem; }
.ticket-status-form { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.06); }
.ticket-status-row { display: flex; gap: 0.45rem; align-items: center; }
.ticket-status-row .oui-select { flex: 1 1 auto; min-width: 0; }

.ticket-chip {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.72rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); background: rgba(0,0,0,0.2);
}
.ticket-chip.is-urgency-low { color: #b7c4d0; }
.ticket-chip.is-urgency-medium {
  color: #f0c36a; border-color: rgba(240,162,2,0.35); background: rgba(240,162,2,0.08);
}
.ticket-chip.is-urgency-high {
  color: #ffb4a2; border-color: rgba(228,87,46,0.4); background: rgba(228,87,46,0.1);
}
.ticket-chip.is-status-open {
  color: #9fdcff; border-color: rgba(125,211,252,0.35); background: rgba(125,211,252,0.08);
}
.ticket-chip.is-status-in_progress {
  color: #f0c36a; border-color: rgba(240,162,2,0.35); background: rgba(240,162,2,0.08);
}
.ticket-chip.is-status-resolved {
  color: #8fe0b5; border-color: rgba(61,207,142,0.35); background: rgba(61,207,142,0.08);
}
.ticket-chip.is-status-closed { color: var(--muted); opacity: 0.9; }

.ticket-filters {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) minmax(12rem, 1.4fr) auto;
  gap: 0.75rem 0.85rem; align-items: end;
}
.ticket-filter-actions { padding-bottom: 0.15rem; }
@media (max-width: 900px) {
  .ticket-filters { grid-template-columns: 1fr 1fr; }
  .ticket-filter-search { grid-column: 1 / -1; }
}

.ticket-table-wrap { padding: 0.35rem 0.25rem 0.55rem; overflow-x: auto; }
.ticket-table { display: grid; gap: 0.2rem; min-width: 780px; }
.ticket-table-head, .ticket-table-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.6fr) 6.2rem 5.5rem 7.2rem minmax(8rem, 1fr) 8.5rem 4.2rem;
  gap: 0.55rem; align-items: center;
  padding: 0.65rem 0.85rem;
}
.ticket-table-head {
  color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line); margin: 0 0.35rem 0.2rem;
}
.ticket-table-row {
  color: inherit; text-decoration: none;
  margin: 0 0.35rem; border-radius: 10px; border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ticket-table-row:hover {
  background: rgba(61, 207, 142, 0.05);
  border-color: rgba(61, 207, 142, 0.14);
}
.ticket-td-title { display: grid; gap: 0.12rem; min-width: 0; }
.ticket-td-title strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;
}
.ticket-td-sub { font-size: 0.72rem; color: var(--muted); }
.ticket-empty { text-align: center; color: var(--muted); padding: 2rem; }

.ticket-reply-form { display: grid; gap: 0.75rem; }
.ticket-reply-submit { justify-self: start; }

.rte {
  border: 1px solid rgba(120, 160, 140, 0.22);
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  overflow: hidden;
}
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.rte-btn {
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--text); border-radius: 7px; padding: 0.28rem 0.48rem;
  font: inherit; font-size: 0.82rem; cursor: pointer; line-height: 1;
}
.rte-btn:hover { background: rgba(61,207,142,0.1); border-color: rgba(61,207,142,0.25); }
.rte-emoji { position: relative; }
.rte-emoji-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1.8rem); gap: 0.2rem;
  padding: 0.45rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(18, 22, 30, 0.98);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}
.rte-emoji-panel[hidden] { display: none !important; }
.rte-emoji-item {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 1.05rem; width: 1.8rem; height: 1.8rem; border-radius: 6px;
}
.rte-emoji-item:hover { background: rgba(255,255,255,0.08); }
.rte-editor {
  min-height: 8.5rem; max-height: 18rem; overflow: auto;
  padding: 0.75rem 0.85rem; outline: none;
  font-size: 0.95rem; line-height: 1.5;
}
.rte-editor.is-empty:before {
  content: attr(data-placeholder);
  color: var(--muted); opacity: 0.75; pointer-events: none;
}
.rte-editor.is-invalid {
  box-shadow: inset 0 0 0 1px rgba(228,87,46,0.55);
}
.rte-editor:focus {
  box-shadow: inset 0 0 0 1px rgba(61,207,142,0.28);
}
.ticket-gone { text-align: center; padding: 2.2rem 1.4rem; }

/* —— Tasks (Post-it board) —— */
.tasks-page.shell-wide,
.shell-wide:has(.tasks-page) {
  width: min(1400px, calc(100% - 1.5rem));
}
.tasks-page { display: grid; gap: 1rem; }
.tasks-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem;
}
.tasks-hero h1 { margin: 0.15rem 0 0.35rem; font-size: 1.75rem; letter-spacing: 0.02em; }
.tasks-hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.tasks-board {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 1.25rem;
  min-height: 28rem;
}
.tasks-column {
  flex: 0 0 280px;
  width: 280px;
  max-width: 86vw;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 16rem;
}
.tasks-column-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(28, 34, 44, 0.88), rgba(12, 16, 24, 0.92));
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.tasks-column-title-wrap { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.tasks-column-title {
  margin: 0; font-size: 0.92rem; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tasks-column-count {
  flex: 0 0 auto;
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
  border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 0.72rem; color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.25);
}
.tasks-column-menu { display: flex; gap: 0.15rem; }
.tasks-icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  width: 1.7rem; height: 1.7rem; border-radius: 7px; cursor: pointer; font: inherit;
}
.tasks-icon-btn:hover { color: var(--text); background: rgba(61,207,142,0.1); }
.tasks-icon-btn.is-danger:hover { color: #ffb4a2; background: rgba(228,87,46,0.12); }

.tasks-column-body {
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 8rem; padding: 0.25rem 0.15rem 0.5rem;
  border-radius: 12px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.tasks-column-body.is-drop-target {
  background: rgba(61,207,142,0.06);
  box-shadow: inset 0 0 0 1px rgba(61,207,142,0.22);
}

.tasks-note {
  position: relative;
  padding: 0.95rem 0.9rem 0.8rem;
  border-radius: 3px 3px 4px 4px;
  cursor: grab;
  transform: rotate(var(--note-rot, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 10px 22px rgba(0,0,0,0.28);
  color: #1a140c;
  outline: none;
  animation: tasks-note-in 0.4s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}
.tasks-note:hover,
.tasks-note:focus-visible {
  transform: rotate(0deg) translateY(-3px) scale(1.02);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 16px 32px rgba(0,0,0,0.35);
  z-index: 2;
}
.tasks-note.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
  transform: rotate(-2deg) scale(1.04);
}
.tasks-note-pin {
  position: absolute; left: 50%; top: -7px;
  width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6, transparent 45%), #3a4550;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.tasks-note-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.4rem;
}
.tasks-note-title {
  flex: 1;
  margin: 0;
  font-size: 0.98rem; font-weight: 700;
  letter-spacing: 0.01em; line-height: 1.25;
  min-width: 0;
}
.tasks-note-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.tasks-note-flag {
  display: inline-block;
  width: 0.72rem;
  height: 0.95rem;
  position: relative;
  flex-shrink: 0;
}
.tasks-note-flag::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 100%;
  background: #6b0f0f;
  border-radius: 1px;
}
.tasks-note-flag::after {
  content: '';
  position: absolute;
  left: 2px; top: 1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.38rem 0 0.38rem 0.55rem;
  border-color: transparent transparent transparent #d62828;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}
.tasks-note-collapse {
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 6px;
  background: rgba(0,0,0,0.12);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  padding: 0;
  color: inherit;
}
.tasks-note-collapse::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0.75;
}
.tasks-note.is-collapsed .tasks-note-collapse::before {
  transform: translateY(2px) rotate(-135deg);
}
.tasks-note-collapse:hover {
  background: rgba(0,0,0,0.2);
}
.tasks-note.is-collapsed {
  padding-bottom: 0.55rem;
}
.tasks-note.is-collapsed .tasks-note-body {
  display: none;
}
.tasks-note.is-collapsed .tasks-note-title-row {
  margin-bottom: 0;
}
.tasks-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin: 0.15rem 0 0.35rem;
}
.tasks-flag-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  cursor: pointer;
  user-select: none;
}
.tasks-flag-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #d62828;
}
.tasks-note-preview {
  margin: 0 0 0.65rem; font-size: 0.82rem; line-height: 1.4;
  opacity: 0.82; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tasks-note-progress {
  display: flex; align-items: center; gap: 0.45rem;
  margin: 0 0 0.55rem;
}
.tasks-note-progress-track {
  flex: 1 1 auto; min-width: 0; height: 7px;
  border-radius: 99px;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(0,0,0,0.12);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}
.tasks-note-progress-bar {
  display: block; height: 100%; width: calc(var(--note-progress, 0) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(20,20,20,0.35), rgba(20,20,20,0.55));
  box-shadow: 0 0 8px rgba(0,0,0,0.15);
  transition: width 0.25s ease;
}
.tasks-note-progress-label {
  flex: 0 0 auto;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.75;
  min-width: 2.2rem; text-align: right;
}
.tasks-note-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  margin-top: 0.25rem; font-size: 0.72rem;
}
.tasks-note-assignees {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  max-width: 75%;
}
.tasks-note-assignee {
  display: inline-flex; align-items: center; gap: 0.35rem;
  max-width: 100%; overflow: hidden;
}
.tasks-note-avatar {
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 0.65rem; font-weight: 700;
  background: rgba(0,0,0,0.18); color: inherit;
}
.tasks-note-unassigned { opacity: 0.55; font-style: italic; }
.tasks-note-comments { opacity: 0.7; white-space: nowrap; }

.tasks-comments { margin-top: 0.35rem; }
.tasks-comments-list {
  display: grid; gap: 0.55rem;
  max-height: 12rem; overflow: auto;
  margin: 0.4rem 0 0.6rem;
  padding-right: 0.2rem;
}
.tasks-comment {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120, 160, 140, 0.14);
}
.tasks-comment header {
  display: flex; justify-content: space-between; gap: 0.5rem;
  margin-bottom: 0.25rem; font-size: 0.78rem;
}
.tasks-comment header time { opacity: 0.65; }
.tasks-comment p {
  margin: 0; white-space: pre-wrap; font-size: 0.86rem; line-height: 1.35;
}
.tasks-comment-compose {
  display: grid; gap: 0.45rem;
}
.tasks-comment-compose textarea {
  width: 100%; resize: vertical; min-height: 2.6rem;
}

.tasks-note.is-amber { background: linear-gradient(160deg, #ffe08a, #f0c36a 55%, #e0a84a); color: #2a1c05; }
.tasks-note.is-lemon { background: linear-gradient(160deg, #fff6a0, #f0e66a 55%, #d9cc45); color: #24200a; }
.tasks-note.is-honey { background: linear-gradient(160deg, #ffd078, #e8b04a 55%, #d09430); color: #2a1a05; }
.tasks-note.is-peach { background: linear-gradient(160deg, #ffdcb8, #ffc89a 55%, #f0a870); color: #2a180a; }
.tasks-note.is-coral { background: linear-gradient(160deg, #ffb4a0, #ff8f7a 55%, #e86a55); color: #2a0e0a; }
.tasks-note.is-rose { background: linear-gradient(160deg, #ffd2c6, #ffb4a2 55%, #f08a72); color: #2a100a; }
.tasks-note.is-blush { background: linear-gradient(160deg, #ffd6e4, #ffc0d4 55%, #f098b4); color: #2a1018; }
.tasks-note.is-berry { background: linear-gradient(160deg, #efc4e8, #e0a0d8 55%, #c878c0); color: #241018; }
.tasks-note.is-lilac { background: linear-gradient(160deg, #e8d8ff, #d4b8ff 55%, #b894f0); color: #1a0f2a; }
.tasks-note.is-indigo { background: linear-gradient(160deg, #c8d0ff, #a8b8ff 55%, #8898e8); color: #101428; }
.tasks-note.is-sky { background: linear-gradient(160deg, #c9ecff, #9fdcff 55%, #6ec4f0); color: #0a1c2a; }
.tasks-note.is-mint { background: linear-gradient(160deg, #b8ffe0, #7dffc0 55%, #4fd9a0); color: #0a2a1c; }
.tasks-note.is-seafoam { background: linear-gradient(160deg, #c4fff4, #9ef0e0 55%, #6fd8c4); color: #0a2420; }
.tasks-note.is-olive { background: linear-gradient(160deg, #e0eaa0, #c8d47a 55%, #a8b858); color: #1c220a; }
.tasks-note.is-sand { background: linear-gradient(160deg, #f3e6d0, #e8d5b5 55%, #d4bc94); color: #2a2210; }
.tasks-note.is-fog { background: linear-gradient(160deg, #f4f7fb, #e8eef5 55%, #d0d8e4); color: #1a2028; }
.tasks-note.is-slate { background: linear-gradient(160deg, #dce5ee, #c5d0db 55%, #a8b6c4); color: #121820; }

.tasks-card-modal { width: min(560px, 100%); max-width: 100%; }
.tasks-card-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 0.85rem;
}
.tasks-card-meta-grid .field:first-child { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .tasks-card-meta-grid { grid-template-columns: 1fr; }
  .tasks-card-meta-grid .field:first-child { grid-column: auto; }
}
.tasks-color-swatches {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.tasks-swatch { position: relative; cursor: pointer; }
.tasks-swatch input {
  position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer;
}
.tasks-swatch-face {
  display: block; width: 1.7rem; height: 1.7rem; border-radius: 6px;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transform: rotate(-3deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tasks-swatch input:checked + .tasks-swatch-face,
.tasks-swatch:hover .tasks-swatch-face {
  transform: rotate(0deg) scale(1.08);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35), 0 4px 10px rgba(0,0,0,0.3);
}
.tasks-swatch.is-amber .tasks-swatch-face { background: #f0c36a; }
.tasks-swatch.is-lemon .tasks-swatch-face { background: #f0e66a; }
.tasks-swatch.is-honey .tasks-swatch-face { background: #e8b04a; }
.tasks-swatch.is-peach .tasks-swatch-face { background: #ffc89a; }
.tasks-swatch.is-coral .tasks-swatch-face { background: #ff8f7a; }
.tasks-swatch.is-rose .tasks-swatch-face { background: #ffb4a2; }
.tasks-swatch.is-blush .tasks-swatch-face { background: #ffc0d4; }
.tasks-swatch.is-berry .tasks-swatch-face { background: #e0a0d8; }
.tasks-swatch.is-lilac .tasks-swatch-face { background: #d4b8ff; }
.tasks-swatch.is-indigo .tasks-swatch-face { background: #a8b8ff; }
.tasks-swatch.is-sky .tasks-swatch-face { background: #9fdcff; }
.tasks-swatch.is-mint .tasks-swatch-face { background: #7dffc0; }
.tasks-swatch.is-seafoam .tasks-swatch-face { background: #9ef0e0; }
.tasks-swatch.is-olive .tasks-swatch-face { background: #c8d47a; }
.tasks-swatch.is-sand .tasks-swatch-face { background: #e8d5b5; }
.tasks-swatch.is-fog .tasks-swatch-face { background: #e8eef5; }
.tasks-swatch.is-slate .tasks-swatch-face { background: #c5d0db; }

.tasks-progress-control { display: grid; gap: 0.55rem; }
.tasks-progress-value {
  float: right; color: var(--amber); font-weight: 650; font-size: 0.85rem;
}
.field-label .tasks-progress-value { float: right; }
#tasks-card-progress {
  width: 100%;
  accent-color: var(--amber);
  cursor: pointer;
}
.tasks-progress-presets {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.tasks-progress-chip {
  appearance: none; border: 1px solid var(--line); background: rgba(0,0,0,0.2);
  color: var(--muted); border-radius: 999px; padding: 0.22rem 0.55rem;
  font: inherit; font-size: 0.75rem; cursor: pointer;
}
.tasks-progress-chip:hover {
  color: var(--text); border-color: rgba(240,162,2,0.4);
}
.tasks-progress-chip.is-active {
  color: #fff;
  border-color: rgba(240,162,2,0.55);
  background: rgba(240,162,2,0.22);
}

.tasks-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.tasks-card-actions-spacer { flex: 1 1 auto; }

@keyframes tasks-note-in {
  from { opacity: 0; transform: translateY(10px) rotate(calc(var(--note-rot, 0deg) - 4deg)) scale(0.94); }
  to { opacity: 1; transform: translateY(0) rotate(var(--note-rot, 0deg)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tasks-note { animation: none; transform: none; }
  .tasks-note:hover, .tasks-note:focus-visible { transform: none; }
}

/* Files vault unlock (secondary TOTP) */
.files-vault {
  width: min(440px, 100%);
  margin: 1.5rem auto 0;
  text-align: center;
}
.files-vault .auth-hero { margin-top: 0.35rem; }
.files-vault .card-form { text-align: left; }
.files-vault-orb {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
}
.files-vault-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(240, 162, 2, 0.22);
  box-shadow: 0 0 24px rgba(240, 162, 2, 0.12);
  pointer-events: none;
}
.files-vault-ring--a {
  animation: vault-spin 10s linear infinite;
  border-top-color: rgba(240, 162, 2, 0.75);
  border-right-color: rgba(61, 207, 142, 0.35);
}
.files-vault-ring--b {
  inset: 18px;
  animation: vault-spin 7s linear infinite reverse;
  border-bottom-color: rgba(61, 207, 142, 0.55);
  border-left-color: rgba(240, 162, 2, 0.25);
  opacity: 0.85;
}
.files-vault-ring--c {
  inset: 0;
  opacity: 0;
  border-color: transparent;
  border-top-color: rgba(61, 207, 142, 0.7);
  border-right-color: rgba(240, 162, 2, 0.35);
}
.files-vault-burst {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 2px solid rgba(61, 207, 142, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.55);
}
.files-vault-burst--2 {
  border-color: rgba(240, 162, 2, 0.45);
}
.files-vault-lock {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--amber);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 220, 140, 0.18), transparent 55%),
    rgba(12, 18, 28, 0.92);
  border: 1px solid rgba(240, 162, 2, 0.4);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(240, 162, 2, 0.18);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.files-vault-lock svg { display: block; overflow: visible; }
.files-vault-shackle {
  transform-origin: 24px 16px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.files-vault-check {
  opacity: 0;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transform-origin: 24px 30px;
}
.files-vault-keyhole {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.files-vault-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.files-vault-sparks i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2px;
  border-radius: 50%;
  background: #b6f0d2;
  box-shadow: 0 0 10px rgba(61, 207, 142, 0.8);
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
}
.files-vault-sparks i:nth-child(odd) { background: #ffd58a; box-shadow: 0 0 10px rgba(240, 162, 2, 0.75); }
.files-vault.is-armed .files-vault-lock {
  color: #b6f0d2;
  border-color: rgba(61, 207, 142, 0.5);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 32px rgba(61, 207, 142, 0.28);
  transform: translateY(-2px) scale(1.04);
}
.files-vault.is-armed .files-vault-shackle {
  transform: translateY(-3px) rotate(-18deg);
}
.files-vault.is-submitting .files-vault-lock {
  animation: vault-pulse 0.7s ease-in-out infinite;
}
.files-vault.is-submitting .files-vault-form {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.files-vault-hint { margin: -0.25rem 0 0; text-align: center; }
.files-vault-form .otp-input {
  letter-spacing: 0.45em;
  font-size: 1.5rem;
  padding-block: 0.85rem;
}
.files-vault-status {
  min-height: 1.4em;
  color: var(--radar) !important;
}
.files-vault-progress {
  width: min(320px, 100%);
  margin: 1rem auto 0;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(61, 207, 142, 0.16);
  overflow: hidden;
}
.files-vault-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--radar-dim), var(--radar) 55%, var(--amber));
  box-shadow: 0 0 12px rgba(61, 207, 142, 0.35);
  transition: width 0.08s linear;
}

/* Reveal / unlock success sequence */
.files-vault.is-reveal .files-vault-form { display: none; }
.files-vault.is-unlocking .files-vault-ring--a {
  animation: vault-spin 1.1s linear infinite;
  border-color: rgba(61, 207, 142, 0.25);
  border-top-color: rgba(61, 207, 142, 0.95);
}
.files-vault.is-unlocking .files-vault-ring--b {
  animation: vault-spin 0.85s linear infinite reverse;
  border-bottom-color: rgba(240, 162, 2, 0.8);
}
.files-vault.is-unlocking .files-vault-ring--c {
  opacity: 1;
  animation: vault-spin 1.6s linear infinite;
}
.files-vault.is-unlocking .files-vault-lock {
  color: #b6f0d2;
  border-color: rgba(61, 207, 142, 0.65);
  transform: scale(1.08);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 42px rgba(61, 207, 142, 0.4);
  animation: vault-glow 1.2s ease-in-out infinite alternate;
}
.files-vault.is-unlocking .files-vault-shackle {
  transform: translateY(-7px) rotate(-32deg);
  transition-duration: 0.7s;
}
.files-vault.is-unlocking .files-vault-keyhole {
  opacity: 0;
  transform: scale(0.4);
}
.files-vault.is-unlocking .files-vault-check {
  opacity: 1;
  animation: vault-check 0.55s 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.files-vault.is-unlocking .files-vault-burst {
  animation: vault-burst 1.1s 0.2s ease-out forwards;
}
.files-vault.is-unlocking .files-vault-burst--2 {
  animation-delay: 0.38s;
  animation-duration: 1.25s;
}
.files-vault.is-unlocking .files-vault-sparks i {
  animation: vault-spark 0.95s ease-out forwards;
}
.files-vault.is-unlocking .files-vault-sparks i:nth-child(1) { --dx: 42px; --dy: -28px; animation-delay: 0.28s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(2) { --dx: -38px; --dy: -24px; animation-delay: 0.32s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(3) { --dx: 48px; --dy: 10px; animation-delay: 0.36s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(4) { --dx: -46px; --dy: 14px; animation-delay: 0.4s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(5) { --dx: 18px; --dy: 40px; animation-delay: 0.34s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(6) { --dx: -16px; --dy: 38px; animation-delay: 0.38s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(7) { --dx: 0px; --dy: -46px; animation-delay: 0.3s; }
.files-vault.is-unlocking .files-vault-sparks i:nth-child(8) { --dx: 30px; --dy: -40px; animation-delay: 0.42s; }
.files-vault.is-done .files-vault-lock {
  animation: none;
  transform: scale(1.1);
}
.files-vault.is-done .files-vault-reveal-copy h1 {
  color: #b6f0d2;
  text-shadow: 0 0 28px rgba(61, 207, 142, 0.25);
}

@keyframes vault-spin {
  to { transform: rotate(360deg); }
}
@keyframes vault-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}
@keyframes vault-glow {
  from { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 12px 32px rgba(0,0,0,0.4), 0 0 28px rgba(61,207,142,0.28); }
  to { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 12px 32px rgba(0,0,0,0.4), 0 0 48px rgba(61,207,142,0.55); }
}
@keyframes vault-check {
  to { stroke-dashoffset: 0; }
}
@keyframes vault-burst {
  0% { opacity: 0.85; transform: scale(0.55); }
  70% { opacity: 0.35; }
  100% { opacity: 0; transform: scale(2.15); }
}
@keyframes vault-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.15); }
}
@media (prefers-reduced-motion: reduce) {
  .files-vault-ring--a,
  .files-vault-ring--b,
  .files-vault-ring--c,
  .files-vault.is-submitting .files-vault-lock,
  .files-vault.is-unlocking .files-vault-lock,
  .files-vault.is-unlocking .files-vault-burst,
  .files-vault.is-unlocking .files-vault-sparks i { animation: none; }
  .files-vault.is-armed .files-vault-lock,
  .files-vault.is-armed .files-vault-shackle,
  .files-vault.is-unlocking .files-vault-shackle { transition: none; transform: none; }
  .files-vault.is-unlocking .files-vault-check {
    opacity: 1;
    stroke-dashoffset: 0;
    animation: none;
  }
}

/* —— Server Reboot vault + console —— */
.reboot-vault {
  text-align: center;
  max-width: 28rem;
  margin-inline: auto;
}
.reboot-vault .auth-hero { margin-top: 0.35rem; }
.reboot-vault .card-form { text-align: left; }
.reboot-vault-orb {
  position: relative;
  width: 7.5rem; height: 7.5rem;
  margin: 0.4rem auto 1rem;
  display: grid; place-items: center;
}
.reboot-vault-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(240, 162, 2, 0.22);
  pointer-events: none;
}
.reboot-vault-ring--a {
  inset: -4px;
  border-color: rgba(240, 162, 2, 0.18);
  border-top-color: rgba(240, 162, 2, 0.75);
  animation: vault-spin 4.8s linear infinite;
}
.reboot-vault-ring--b {
  inset: 8px;
  border-color: rgba(228, 87, 46, 0.12);
  border-bottom-color: rgba(228, 87, 46, 0.55);
  animation: vault-spin 3.6s linear infinite reverse;
}
.reboot-vault-ring--c {
  inset: -14px;
  opacity: 0.45;
  border-style: dashed;
  border-color: rgba(240, 162, 2, 0.14);
}
.reboot-vault-burst {
  position: absolute; inset: 8%;
  border-radius: 50%;
  border: 2px solid rgba(240, 162, 2, 0.45);
  opacity: 0;
  pointer-events: none;
}
.reboot-vault-burst--2 { inset: 0; border-color: rgba(228, 87, 46, 0.35); }
.reboot-vault-power {
  position: relative; z-index: 2;
  width: 4.4rem; height: 4.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #ffd27a;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 210, 122, 0.16), transparent 55%),
    linear-gradient(160deg, rgba(48, 24, 12, 0.98), rgba(16, 10, 10, 0.96));
  border: 1px solid rgba(240, 162, 2, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(240, 162, 2, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.reboot-vault-power svg { display: block; overflow: visible; }
.reboot-vault-power-stem { transition: transform 0.45s ease; transform-origin: 24px 19px; }
.reboot-vault-sparks {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 3;
}
.reboot-vault-sparks i {
  position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; margin: -2.5px;
  border-radius: 50%;
  background: #ffd27a;
  opacity: 0;
  box-shadow: 0 0 10px rgba(240, 162, 2, 0.75);
}
.reboot-vault-sparks i:nth-child(odd) {
  background: #ff8f6b;
  box-shadow: 0 0 10px rgba(228, 87, 46, 0.7);
}
.reboot-vault.is-armed .reboot-vault-power {
  color: #ffe2a8;
  border-color: rgba(240, 162, 2, 0.75);
  transform: scale(1.04);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(240, 162, 2, 0.32);
  animation: vault-pulse 1.4s ease-in-out infinite;
}
.reboot-vault.is-submitting .reboot-vault-power {
  animation: vault-pulse 0.55s ease-in-out infinite;
}
.reboot-vault.is-submitting .reboot-vault-form {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.reboot-vault-hint { margin: -0.25rem 0 0; text-align: center; }
.reboot-vault-form .otp-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.25rem;
}
.reboot-vault-status { min-height: 1.4em; }
.reboot-vault-progress {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(240, 162, 2, 0.18);
  overflow: hidden;
  margin: 1rem auto 0;
  max-width: 16rem;
}
.reboot-vault-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e4572e, var(--amber) 55%, #ffd27a);
  box-shadow: 0 0 12px rgba(240, 162, 2, 0.4);
  transition: width 0.08s linear;
}
.reboot-vault.is-reveal .reboot-vault-form { display: none; }
.reboot-vault.is-unlocking .reboot-vault-ring--a {
  animation: vault-spin 1.05s linear infinite;
  border-top-color: rgba(240, 162, 2, 0.95);
}
.reboot-vault.is-unlocking .reboot-vault-ring--b {
  animation: vault-spin 0.8s linear infinite reverse;
  border-bottom-color: rgba(228, 87, 46, 0.85);
}
.reboot-vault.is-unlocking .reboot-vault-ring--c { opacity: 1; animation: vault-spin 1.5s linear infinite; }
.reboot-vault.is-unlocking .reboot-vault-power {
  color: #ffe2a8;
  border-color: rgba(240, 162, 2, 0.8);
  transform: scale(1.1);
  animation: vault-glow-amber 1.15s ease-in-out infinite alternate;
}
.reboot-vault.is-unlocking .reboot-vault-power-stem {
  transform: translateY(-2px) scaleY(1.08);
}
.reboot-vault.is-unlocking .reboot-vault-burst {
  animation: vault-burst 1.1s 0.2s ease-out forwards;
}
.reboot-vault.is-unlocking .reboot-vault-burst--2 {
  animation-delay: 0.38s;
  animation-duration: 1.25s;
}
.reboot-vault.is-unlocking .reboot-vault-sparks i {
  animation: vault-spark 0.95s ease-out forwards;
}
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(1) { --dx: 42px; --dy: -28px; animation-delay: 0.28s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(2) { --dx: -38px; --dy: -24px; animation-delay: 0.32s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(3) { --dx: 48px; --dy: 10px; animation-delay: 0.36s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(4) { --dx: -46px; --dy: 14px; animation-delay: 0.4s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(5) { --dx: 18px; --dy: 40px; animation-delay: 0.34s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(6) { --dx: -16px; --dy: 38px; animation-delay: 0.38s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(7) { --dx: 0px; --dy: -46px; animation-delay: 0.3s; }
.reboot-vault.is-unlocking .reboot-vault-sparks i:nth-child(8) { --dx: 30px; --dy: -40px; animation-delay: 0.42s; }
.reboot-vault.is-done .reboot-vault-power { animation: none; transform: scale(1.12); }
.reboot-vault.is-done .reboot-vault-reveal-copy h1 {
  color: #ffd27a;
  text-shadow: 0 0 28px rgba(240, 162, 2, 0.28);
}
@keyframes vault-glow-amber {
  from { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 12px 32px rgba(0,0,0,0.4), 0 0 28px rgba(240,162,2,0.28); }
  to { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 12px 32px rgba(0,0,0,0.4), 0 0 52px rgba(240,162,2,0.55); }
}

.reboot-console {
  max-width: 34rem;
  margin: 0.5rem auto 2rem;
  text-align: center;
}
.reboot-console-hero { margin-bottom: 1.4rem; }
.reboot-uptime-card {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  padding: 1rem 1.2rem;
  margin: 0 auto 1.6rem;
  max-width: 18rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(240, 162, 2, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.reboot-uptime-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.reboot-uptime-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffd27a;
}
.reboot-uptime-sub { font-size: 0.78rem; color: var(--muted); opacity: 0.9; }

.reboot-power-stage {
  position: relative;
  width: min(100%, 26rem);
  margin: 0 auto;
  padding: 2.4rem 0.5rem 0.6rem;
}
.reboot-power-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.reboot-power-fx-core {
  position: absolute;
  left: 50%; top: 52%;
  width: 11rem; height: 11rem;
  margin: -5.5rem 0 0 -5.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 162, 2, 0.22), transparent 68%);
  filter: blur(4px);
  animation: reboot-core-pulse 2.8s ease-in-out infinite;
}
.reboot-power-fx-ring {
  position: absolute;
  left: 50%; top: 52%;
  border-radius: 50%;
  border: 1px solid rgba(240, 162, 2, 0.22);
  transform: translate(-50%, -50%);
}
.reboot-power-fx-ring--a {
  width: 14rem; height: 14rem;
  border-top-color: rgba(240, 162, 2, 0.7);
  animation: vault-spin 6s linear infinite;
}
.reboot-power-fx-ring--b {
  width: 17rem; height: 17rem;
  border-bottom-color: rgba(228, 87, 46, 0.55);
  border-style: dashed;
  animation: vault-spin 9s linear infinite reverse;
  opacity: 0.7;
}
.reboot-power-fx-ring--c {
  width: 20rem; height: 20rem;
  border-color: rgba(240, 162, 2, 0.12);
  animation: reboot-ring-breathe 3.4s ease-in-out infinite;
}
.reboot-power-fx-scan {
  position: absolute;
  left: 12%; right: 12%;
  top: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 122, 0.75), transparent);
  box-shadow: 0 0 12px rgba(240, 162, 2, 0.45);
  animation: reboot-scan 2.6s ease-in-out infinite;
  opacity: 0.55;
}
.reboot-power-fx-bolt,
.reboot-power-fx-spark {
  position: absolute;
  left: 50%; top: 52%;
  opacity: 0;
}
.reboot-power-fx-bolt {
  width: 3px; height: 2.2rem;
  margin: -1.1rem 0 0 -1.5px;
  background: linear-gradient(180deg, #ffe2a8, transparent);
  transform-origin: center top;
  animation: reboot-bolt 2.4s ease-in-out infinite;
}
.reboot-power-fx-bolt--2 {
  animation-delay: 1.1s;
  transform: rotate(28deg);
  height: 1.7rem;
}
.reboot-power-fx-spark {
  width: 6px; height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: #ffd27a;
  box-shadow: 0 0 10px rgba(240, 162, 2, 0.8);
  animation: reboot-spark-orbit 3.2s linear infinite;
}
.reboot-power-fx-spark--2 { animation-duration: 4s; animation-delay: -1s; background: #ff8f6b; }
.reboot-power-fx-spark--3 { animation-duration: 2.6s; animation-delay: -0.4s; }
.reboot-power-fx-burst {
  position: absolute;
  left: 50%; top: 52%;
  width: 8rem; height: 8rem;
  margin: -4rem 0 0 -4rem;
  border-radius: 50%;
  border: 2px solid rgba(240, 162, 2, 0.45);
  opacity: 0;
  pointer-events: none;
}
.reboot-power-fx-burst--2 { width: 11rem; height: 11rem; margin: -5.5rem 0 0 -5.5rem; border-color: rgba(228, 87, 46, 0.35); }

.reboot-power-stage:hover .reboot-power-fx-ring--a { animation-duration: 2.2s; border-top-color: #ffd27a; }
.reboot-power-stage:hover .reboot-power-fx-ring--b { animation-duration: 3s; opacity: 1; }
.reboot-power-stage:hover .reboot-power-fx-core { opacity: 1; filter: blur(2px); }
.reboot-power-stage:hover .reboot-power-fx-scan { opacity: 1; animation-duration: 1.4s; }
.reboot-power-stage:hover .reboot-power-fx-spark { opacity: 1; }

.reboot-power-stage.is-arming .reboot-power-fx-burst {
  animation: vault-burst 0.95s ease-out forwards;
}
.reboot-power-stage.is-arming .reboot-power-fx-burst--2 {
  animation: vault-burst 1.15s 0.12s ease-out forwards;
}
.reboot-power-stage.is-arming .reboot-power-fx-ring--a,
.reboot-power-stage.is-arming .reboot-power-fx-ring--b {
  animation-duration: 0.55s;
}
.reboot-power-stage.is-arming .reboot-power-fx-core {
  animation: reboot-core-pulse 0.45s ease-in-out infinite;
  background: radial-gradient(circle, rgba(228, 87, 46, 0.35), transparent 70%);
}

.reboot-power-btn {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border-radius: 22px;
  border: 1px solid rgba(240, 162, 2, 0.5);
  color: #ffe2a8;
  background:
    radial-gradient(120% 160% at 10% 0%, rgba(240, 162, 2, 0.28), transparent 50%),
    linear-gradient(165deg, rgba(58, 26, 12, 0.98), rgba(14, 10, 10, 0.96));
  box-shadow:
    0 0 0 1px rgba(228, 87, 46, 0.16),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 210, 122, 0.16);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.reboot-power-btn-glow {
  position: absolute; inset: -35%;
  background: conic-gradient(from 90deg, transparent 55%, rgba(240, 162, 2, 0.24), transparent 72%);
  animation: reboot-btn-spin 7s linear infinite;
  opacity: 0.55;
  pointer-events: none;
}
.reboot-power-btn-sheen {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.16) 48%, transparent 66%);
  transform: translateX(-130%);
  pointer-events: none;
}
.reboot-power-btn-ring {
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.1);
  pointer-events: none;
}
.reboot-power-btn-icon,
.reboot-power-btn-copy { position: relative; z-index: 1; }
.reboot-power-btn-icon {
  width: 3.6rem; height: 3.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(240, 162, 2, 0.14);
  box-shadow: 0 0 0 1px rgba(240, 162, 2, 0.4), 0 0 22px rgba(228, 87, 46, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.reboot-power-svg-stem {
  transform-origin: 32px 26px;
  transition: transform 0.25s ease;
}
.reboot-power-btn-copy { display: grid; gap: 0.15rem; }
.reboot-power-btn-copy strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}
.reboot-power-btn-copy em {
  font-style: normal;
  font-size: 0.78rem;
  color: rgba(255, 210, 122, 0.72);
}
.reboot-power-stage:hover .reboot-power-btn,
.reboot-power-btn:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(255, 210, 122, 0.85);
  box-shadow:
    0 0 0 1px rgba(228, 87, 46, 0.28),
    0 26px 52px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(240, 162, 2, 0.28);
}
.reboot-power-stage:hover .reboot-power-btn-sheen {
  animation: reboot-dash-sheen 0.85s ease-out;
}
.reboot-power-stage:hover .reboot-power-btn-icon {
  transform: scale(1.08);
  box-shadow: 0 0 0 1px rgba(255, 210, 122, 0.55), 0 0 28px rgba(240, 162, 2, 0.55);
}
.reboot-power-stage:hover .reboot-power-svg-stem {
  transform: translateY(-2px) scaleY(1.08);
}
.reboot-power-btn:active,
.reboot-power-stage.is-arming .reboot-power-btn {
  transform: translateY(0) scale(0.985);
}
.reboot-power-stage.is-arming .reboot-power-btn {
  border-color: rgba(228, 87, 46, 0.75);
  box-shadow:
    0 0 0 1px rgba(228, 87, 46, 0.35),
    0 0 48px rgba(228, 87, 46, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.5);
}
.reboot-power-btn:disabled { cursor: wait; opacity: 0.9; }
.reboot-console .hint { margin-top: 1.15rem; }

.reboot-loading {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  background: rgba(4, 8, 10, 0.78);
  backdrop-filter: blur(10px);
}
.reboot-loading[hidden] { display: none !important; }
.reboot-loading-card {
  width: min(92vw, 22rem);
  padding: 1.75rem 1.45rem;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(165deg, rgba(28, 18, 14, 0.98), rgba(10, 10, 12, 0.96));
  border: 1px solid rgba(240, 162, 2, 0.32);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(240, 162, 2, 0.12);
}
.reboot-loading-orb {
  position: relative;
  width: 3.4rem; height: 3.4rem;
  margin: 0 auto 1.05rem;
}
.reboot-loading-spinner {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(240, 162, 2, 0.18);
  border-top-color: #ffd27a;
  animation: vault-spin 0.75s linear infinite;
}
.reboot-loading-pulse {
  position: absolute; inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 162, 2, 0.45), transparent 70%);
  animation: reboot-core-pulse 1s ease-in-out infinite;
}
.reboot-loading-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: #ffe2a8;
}
.reboot-loading-sub { margin: 0; min-height: 1.2em; }

@keyframes reboot-btn-spin {
  to { transform: rotate(360deg); }
}
@keyframes reboot-core-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes reboot-ring-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.35; }
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: 0.7; }
}
@keyframes reboot-scan {
  0%, 100% { transform: translateY(0); opacity: 0.25; }
  50% { transform: translateY(9rem); opacity: 0.85; }
}
@keyframes reboot-bolt {
  0%, 70%, 100% { opacity: 0; transform: scaleY(0.4); }
  78% { opacity: 1; transform: scaleY(1); }
  88% { opacity: 0.2; }
}
@keyframes reboot-spark-orbit {
  0% { transform: rotate(0deg) translateX(7.2rem) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: rotate(360deg) translateX(7.2rem) scale(0.6); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .reboot-vault-ring--a,
  .reboot-vault-ring--b,
  .reboot-vault-ring--c,
  .reboot-vault.is-armed .reboot-vault-power,
  .reboot-vault.is-unlocking .reboot-vault-power,
  .reboot-vault.is-unlocking .reboot-vault-burst,
  .reboot-vault.is-unlocking .reboot-vault-sparks i,
  .reboot-power-btn-glow,
  .reboot-power-fx-core,
  .reboot-power-fx-ring--a,
  .reboot-power-fx-ring--b,
  .reboot-power-fx-ring--c,
  .reboot-power-fx-scan,
  .reboot-power-fx-bolt,
  .reboot-power-fx-spark,
  .reboot-loading-spinner,
  .reboot-loading-pulse { animation: none; }
  .reboot-power-stage:hover .reboot-power-btn,
  .reboot-power-btn:hover { transform: none; }
}

/* —— Map key / Steam portal (/key) —— */
.map-key-page {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}
.map-key-hero {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
  margin-bottom: 1.75rem;
}
.map-key-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  letter-spacing: 0.02em;
}
.map-key-lede {
  margin: 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #b8c0c8;
  text-align: center;
}
.map-key-lede strong {
  color: #e8eef4;
  letter-spacing: 0.04em;
}
.map-key-back { margin-top: 0.35rem; }
.map-key-panel {
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 1.5rem 1.25rem 1.75rem;
  background: rgba(18, 22, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.map-key-cta-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0.5rem 0 0.25rem;
}
.btn-steam-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 22rem);
  padding: 1.05rem 2.1rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(102, 192, 244, 0.55);
  border-radius: 12px;
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 48%, #66c0f4 160%);
  box-shadow:
    0 0 0 1px rgba(102, 192, 244, 0.15),
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(102, 192, 244, 0.18);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: map-key-steam-breathe 2.8s ease-in-out infinite;
}
.btn-steam-cta-glow {
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 65%
  );
  transform: translateX(-60%);
  animation: map-key-steam-sheen 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.btn-steam-cta-label {
  position: relative;
  z-index: 1;
}
.btn-steam-cta:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(102, 192, 244, 0.35),
    0 14px 34px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(102, 192, 244, 0.32);
  animation-play-state: paused;
}
.btn-steam-cta:active {
  transform: translateY(0) scale(0.99);
}
.map-key-note {
  margin: 0;
  max-width: 28rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #8b949e;
}
.map-key-input {
  width: min(100%, 28rem);
  padding: 0.7rem 0.85rem;
  background: #12161c;
  border: 1px solid #3a424c;
  color: #eee;
  border-radius: 8px;
  text-align: center;
}
.map-key-logout { margin-top: 0.35rem; }

@keyframes map-key-steam-breathe {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(102, 192, 244, 0.15),
      0 10px 28px rgba(0, 0, 0, 0.35),
      0 0 18px rgba(102, 192, 244, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(102, 192, 244, 0.35),
      0 12px 32px rgba(0, 0, 0, 0.38),
      0 0 34px rgba(102, 192, 244, 0.35);
  }
}
@keyframes map-key-steam-sheen {
  0%, 30% { transform: translateX(-70%); opacity: 0; }
  45% { opacity: 1; }
  70%, 100% { transform: translateX(70%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-steam-cta,
  .btn-steam-cta-glow { animation: none; }
  .btn-steam-cta:hover { transform: none; }
}

/* —— Anon Upload proxy (v1.2.64) —— */
.anon-upload-page .anon-upload-zone {
  margin: 0 0 1rem;
}
.anon-upload-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
  margin-left: auto;
}
.anon-expiry-field {
  display: grid;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.anon-expiry-field .oui-select {
  min-width: 11.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  color: var(--text);
}
.anon-expiry-field .oui-select-menu {
  min-width: 100%;
}
.anon-expiry-field .oui-select-option {
  white-space: nowrap;
}
.anon-expiry-field select.oui-select-native {
  /* Visually hidden; kept for form value / a11y fallback */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.anon-queue,
.anon-results {
  margin: 0 0 1rem;
}
.anon-queue-head,
.anon-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.anon-queue-list,
.anon-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.anon-queue-item,
.anon-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(0,0,0,0.16);
}
.anon-queue-item.is-active {
  border-color: rgba(61,207,142,0.35);
  background: rgba(61,207,142,0.08);
}
.anon-queue-item.is-ok { border-color: rgba(61,207,142,0.22); }
.anon-queue-item.is-fail {
  border-color: rgba(220,80,80,0.35);
  background: rgba(220,80,80,0.08);
}
.anon-queue-name,
.anon-result-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 560;
}
.anon-queue-status { font-size: 0.78rem; color: var(--muted); }
.anon-queue-item.is-ok .anon-queue-status { color: var(--accent, #3dcf8e); }
.anon-queue-item.is-fail .anon-queue-status { color: #e07070; }
.anon-result-url {
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.anon-history-head {
  margin: 1.25rem 0 0.65rem;
}
.anon-history-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}
.anon-upload-table .paste-table-head,
.anon-upload-table .paste-table-row {
  grid-template-columns: minmax(0, 1.4fr) 0.7fr 0.9fr 0.9fr max-content;
}
.anon-batch-chip {
  display: inline-block;
  margin-bottom: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
}
.anon-upload-table .paste-table-row.is-expired {
  opacity: 0.62;
}
@media (max-width: 900px) {
  .anon-upload-table .paste-table-head,
  .anon-upload-table .paste-table-row {
    grid-template-columns: 1fr;
  }
  .anon-result-item {
    grid-template-columns: 1fr;
  }
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.shot-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot-thumb {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: #05080c;
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.shot-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot-meta {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem 0.75rem;
}
.shot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}
.shot-sub {
  color: var(--muted);
  font-size: 0.75rem;
}
.shot-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}
.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 11000;
}
.shot-lightbox[hidden] { display: none !important; }
.shot-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 8, 14, 0.88);
  cursor: zoom-out;
}
.shot-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 1.5rem;
  pointer-events: none;
}
.shot-lightbox-figure img {
  max-width: min(96vw, 1400px);
  max-height: 82vh;
  object-fit: contain;
  pointer-events: auto;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.shot-lightbox-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.shot-lightbox-x {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
