:root {
  --navy: #0b3a52;
  --navy-dark: #071923;
  --navy-mid: #0d2c3d;
  --accent: #c45c28;
  --amber: #f4b63f;
  --paper: #eef2f5;
  --white: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #cbd5e1;
  --teal: #1e5f8a;
  --body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ops-border: #0b3a52;
  --ops-shadow: 0 4px 6px rgba(11, 58, 82, 0.12);
  --ops-shadow-hover: 0 8px 16px rgba(11, 58, 82, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
}

.admin-shell {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--paper);
}

body.classified-mode.admin-shell {
  height: 100vh;
  overflow: hidden;
}

body.classified-mode .shell-main {
  min-height: 0;
}

/* Sidebar — US911S structure, GES colours */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  height: 100%;
  max-height: 100vh;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.12);
  z-index: 40;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1.35rem 1.15rem;
  border-bottom: 1px solid rgba(244, 182, 63, 0.25);
  flex-shrink: 0;
}

.sidebar-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-brand h1 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.25;
}

.sidebar-brand p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 0.65rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 182, 63, 0.45) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(244, 182, 63, 0.45);
  border-radius: 99px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-label {
  margin: 0.85rem 0.75rem 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
  margin: 2px 4px;
  border-radius: 8px;
  border-left: 4px solid transparent;
  position: relative;
}

.sidebar-item-label {
  flex: 1;
  min-width: 0;
}

.sidebar-item i {
  width: 1.1rem;
  text-align: center;
  opacity: 0.9;
  flex-shrink: 0;
}

.sidebar-item:hover {
  background: rgba(226, 117, 56, 0.22);
}

.sidebar-item.active {
  background: rgba(226, 117, 56, 0.32);
  border-left-color: var(--amber);
}

.nav-wip {
  flex: 0 0 auto;
  margin-left: auto;
  color: #f4d03f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 2px #0f2a38;
  flex-shrink: 0;
}

.nav-badge[hidden] {
  display: none !important;
}

.nav-badge-sm {
  min-width: 1rem;
  height: 1rem;
  font-size: 0.62rem;
  margin-left: 0.25rem;
  box-shadow: none;
  vertical-align: middle;
}

/* —— In-game messages (tabbed) —— */
.mail-ops .ops-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.msg-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.mail-tabs {
  margin-bottom: 1rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}
.mail-ops .ops-head {
  flex-shrink: 0;
}
.mail-tabs .nav-badge-sm {
  margin-left: 0.35rem;
}
.mail-tabs.ops-underline-tabs .dar-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.mail-tabs.ops-underline-tabs .dar-tab i {
  font-size: 0.9rem;
  opacity: 0.85;
}
.mail-tabs.ops-underline-tabs .dar-tab.is-active {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid var(--navy) !important;
  color: var(--navy) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.mail-tabs.ops-underline-tabs .dar-tab.is-active i {
  opacity: 1;
}

#msg-list-pane[hidden] {
  display: none !important;
}
body.mail-mode .mail-ops {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: auto;
}
body.mail-mode .mail-ops .mail-client {
  flex: 1;
  min-height: 0;
}

.mail-compose-card {
  width: 100%;
  max-width: none;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #d7e2e9;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(11, 58, 82, 0.08);
  padding: 1.35rem 1.5rem 1.5rem;
  box-sizing: border-box;
}

.mail-compose-card[hidden] {
  display: none !important;
}

.mail-compose-intro {
  margin: 0 0 1.15rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.mail-compose-fields {
  display: grid;
  gap: 1rem;
}

.mail-field-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1.45fr);
  gap: 0.85rem;
}

.mail-compose-fields .mail-field {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  font: inherit;
  color: inherit;
}

.mail-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #64748b;
}

.mail-field-label i {
  width: 0.95rem;
  text-align: center;
  color: var(--navy);
  opacity: 0.75;
}

.mail-input-wrap {
  display: block;
}

.mail-compose-fields .mail-field input,
.mail-compose-fields .mail-field select,
.mail-compose-fields .mail-field textarea {
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.mail-compose-fields .mail-field input:hover,
.mail-compose-fields .mail-field select:hover,
.mail-compose-fields .mail-field textarea:hover {
  border-color: #94a3b8;
  background: #fff;
}

.mail-compose-fields .mail-field input:focus,
.mail-compose-fields .mail-field select:focus,
.mail-compose-fields .mail-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 58, 82, 0.12);
}

.mail-compose-fields .mail-field textarea {
  min-height: 12.5rem;
  resize: vertical;
  line-height: 1.5;
}

.mail-compose-fields .msg-template-label {
  margin: 0;
}

.mail-compose-fields .msg-sig {
  margin: 0.15rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid #c5d4de;
  border-left: 3px solid var(--navy);
  border-radius: 8px;
  background: linear-gradient(180deg, #f3f7f9 0%, #eef3f6 100%);
}

.mail-compose-fields .msg-sig-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.mail-compose-fields .mail-actions {
  margin-top: 0.15rem;
  padding-top: 0.15rem;
}

.mail-compose-fields .mail-actions .admin-btn.primary {
  padding: 0.55rem 1.1rem;
  font-weight: 650;
}

@media (max-width: 720px) {
  .mail-field-row {
    grid-template-columns: 1fr;
  }
}

#msg-mail-client[hidden] {
  display: none !important;
}

.mail-folder .nav-badge-sm {
  display: inline-grid;
}

.shell-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  background: var(--white);
  border-bottom: 2px solid var(--navy);
  box-shadow: 0 2px 10px rgba(11, 58, 82, 0.08);
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  flex-shrink: 0;
}

.top-bar h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy-dark);
  flex: 0 0 auto;
  white-space: nowrap;
}


.dev-work-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.dev-work-modal[hidden] {
  display: none !important;
}

.dev-work-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(4, 14, 22, 0.78);
  cursor: pointer;
}

.dev-work-card {
  --dw-amber: #f4b63f;
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  padding: 0.75rem 0.9rem 0.8rem;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at top, rgba(244, 182, 63, 0.08), transparent 55%),
    linear-gradient(180deg, #0d2c3d 0%, #071923 100%);
  border: 1px solid rgba(244, 182, 63, 0.28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  color: #e8eef2;
}

.dev-work-hazard {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.5rem;
  background: repeating-linear-gradient(
    -45deg,
    #111 0 6px,
    var(--dw-amber) 6px 12px
  );
  opacity: 0.95;
}

.dev-work-hazard.is-left { left: 0; }
.dev-work-hazard.is-right { right: 0; }

.dev-work-frame {
  position: relative;
  margin: 0.2rem 0.35rem;
  padding: 0.9rem 0.75rem 0.8rem;
  border: 1px dashed rgba(244, 182, 63, 0.45);
  border-radius: 10px;
  text-align: center;
}

.dev-work-cross {
  position: absolute;
  color: var(--dw-amber);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}
.dev-work-cross.is-tl { top: -0.4rem; left: -0.3rem; }
.dev-work-cross.is-tr { top: -0.4rem; right: -0.3rem; }
.dev-work-cross.is-bl { bottom: -0.4rem; left: -0.3rem; }
.dev-work-cross.is-br { bottom: -0.4rem; right: -0.3rem; }

.dev-work-crane {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--dw-amber);
  background: radial-gradient(circle, rgba(244, 182, 63, 0.22) 0%, transparent 70%);
  filter: drop-shadow(0 0 8px rgba(244, 182, 63, 0.3));
}

.dev-work-crane svg {
  width: 1.7rem;
  height: 1.7rem;
}

.dev-work-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dw-amber);
}

.dev-work-title {
  margin: 0 0 0.45rem;
  display: grid;
  gap: 0.05rem;
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.dev-work-title-accent {
  color: var(--dw-amber);
}

.dev-work-lead {
  margin: 0 auto 0.75rem;
  max-width: 22rem;
  color: rgba(232, 238, 242, 0.72);
  font-size: 0.8rem;
  line-height: 1.4;
}

.dev-work-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.dev-work-stat {
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  padding: 0.45rem 0.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(244, 182, 63, 0.12);
}

.dev-work-stat i {
  color: var(--dw-amber);
  font-size: 0.82rem;
  margin-bottom: 0.08rem;
}

.dev-work-stat strong {
  font-size: 0.68rem;
  font-weight: 750;
  color: #fff;
}

.dev-work-stat span {
  font-size: 0.6rem;
  color: rgba(232, 238, 242, 0.55);
}

.dev-work-foot {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(244, 182, 63, 0.14);
}

.dev-work-foot p {
  margin: 0;
  max-width: 22rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(232, 238, 242, 0.62);
}

.dev-work-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 1.05rem;
  min-width: 6.5rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  color: #071923;
  background: linear-gradient(180deg, #ffd36a 0%, var(--dw-amber) 100%);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(244, 182, 63, 0.25);
}

.dev-work-btn:hover {
  filter: brightness(1.05);
}

.dev-float {
  --dw-amber: #f4b63f;
  position: fixed;
  z-index: 12000;
  display: inline-flex;
  align-items: stretch;
  max-width: min(20rem, calc(100vw - 1rem));
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d2c3d 0%, #071923 100%);
  border: 1px solid rgba(244, 182, 63, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 12px rgba(244, 182, 63, 0.18);
  user-select: none;
  animation: dev-float-glow 2.8s ease-in-out infinite;
}

.dev-float[hidden] {
  display: none !important;
}

.dev-float.is-dragging {
  animation: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 16px rgba(244, 182, 63, 0.28);
}

.dev-float-grip,
.dev-float-body {
  appearance: none;
  border: 0;
  margin: 0;
  font: inherit;
  color: inherit;
}

.dev-float-grip {
  width: 1.35rem;
  min-width: 1.35rem;
  padding: 0;
  background: repeating-linear-gradient(
    -45deg,
    #111 0 6px,
    var(--dw-amber) 6px 12px
  );
  cursor: grab;
  touch-action: none;
}

.dev-float.is-dragging .dev-float-grip {
  cursor: grabbing;
}

.dev-float-body {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem 0.42rem 0.55rem;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: #e8eef2;
}

.dev-float-body:hover {
  background: rgba(244, 182, 63, 0.08);
}

.dev-float-icon {
  display: inline-flex;
  color: var(--dw-amber);
}

.dev-float-text {
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.dev-float-text strong {
  color: var(--dw-amber);
  letter-spacing: 0.02em;
}

@keyframes dev-float-glow {
  0%, 100% {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32), 0 0 8px rgba(244, 182, 63, 0.16);
  }
  50% {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4), 0 0 16px rgba(244, 182, 63, 0.35);
  }
}

/* Emergency hot-zone float — hazard card + fire-engine lightbar */
.emergency-float {
  --ef-orange: #ff6a00;
  --ef-orange-hot: #ff8a2b;
  --ef-red: #ff1a1a;
  --ef-blue: #2b7bff;
  position: fixed;
  z-index: 11950;
  display: flex;
  align-items: stretch;
  width: min(22.5rem, calc(100vw - 1rem));
  user-select: none;
}

.emergency-float[hidden] {
  display: none !important;
}

.emergency-float.is-dragging {
  opacity: 0.95;
}

.emergency-float-grip {
  appearance: none;
  border: 0;
  margin: 0;
  width: 1.05rem;
  min-width: 1.05rem;
  padding: 0;
  border-radius: 14px 0 0 14px;
  background: repeating-linear-gradient(
    -45deg,
    #050505 0 8px,
    var(--ef-orange) 8px 16px
  );
  cursor: grab;
  touch-action: none;
  z-index: 2;
}

.emergency-float.is-dragging .emergency-float-grip {
  cursor: grabbing;
}

.emergency-float-card {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 0 14px 14px 0;
  border: 2px solid var(--ef-orange);
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(255, 106, 0, 0.08), transparent 42%),
    #070707;
  animation: emergency-float-shell 0.7s steps(1, end) infinite;
}

.emergency-float-lightbar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 3;
  display: flex;
  pointer-events: none;
}
.emergency-float-lightbar::before,
.emergency-float-lightbar::after {
  content: "";
  flex: 1;
  height: 100%;
}
.emergency-float-lightbar::before {
  background: linear-gradient(90deg, var(--ef-red), transparent);
  animation: emergency-sweep-red 0.7s steps(1, end) infinite;
}
.emergency-float-lightbar::after {
  background: linear-gradient(270deg, var(--ef-blue), transparent);
  animation: emergency-sweep-blue 0.7s steps(1, end) infinite;
}

.emergency-float-beacon {
  position: absolute;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
}
.emergency-float-beacon.is-red {
  left: 0.45rem;
  background: var(--ef-red);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 0 12px 4px rgba(255, 26, 26, 0.85);
  animation: emergency-beacon-red 0.7s steps(1, end) infinite;
}
.emergency-float-beacon.is-blue {
  right: 4.5rem;
  background: var(--ef-blue);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 0 12px 4px rgba(43, 123, 255, 0.85);
  animation: emergency-beacon-blue 0.7s steps(1, end) infinite;
}

.emergency-float-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-height: 2.2rem;
  background: linear-gradient(180deg, var(--ef-orange-hot), var(--ef-orange));
  color: #050505;
}

.emergency-float-title {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.7rem 0.45rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
}

.emergency-float-hazard {
  width: 3.9rem;
  border-left: 2px solid #050505;
  background: repeating-linear-gradient(
    -45deg,
    #050505 0 8px,
    var(--ef-orange) 8px 16px
  );
  background-size: 22.6px 22.6px;
  animation: emergency-hazard-march 0.9s linear infinite;
}

.emergency-float-body {
  display: grid;
  gap: 0.3rem;
  padding: 0.65rem 0.8rem 0.75rem;
}

.emergency-float-place {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff4ec;
}

.emergency-float-meta {
  margin: 0;
  justify-self: start;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 106, 0, 0.45);
  background: rgba(255, 106, 0, 0.12);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ef-orange-hot);
}

@keyframes emergency-float-shell {
  0%, 49% {
    border-color: var(--ef-red);
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.5),
      -12px 0 24px rgba(255, 26, 26, 0.4);
  }
  50%, 100% {
    border-color: var(--ef-blue);
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.5),
      12px 0 24px rgba(43, 123, 255, 0.4);
  }
}
@keyframes emergency-beacon-red {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}
@keyframes emergency-beacon-blue {
  0%, 49% { opacity: 0.2; }
  50%, 100% { opacity: 1; }
}
@keyframes emergency-sweep-red {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}
@keyframes emergency-sweep-blue {
  0%, 49% { opacity: 0.15; }
  50%, 100% { opacity: 1; }
}
@keyframes emergency-hazard-march {
  to { background-position: 22.6px 0; }
}

/* Feature toggles page */
.ftog-page {
  display: grid;
  gap: 1.25rem;
}

.ftog-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ftog-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 238, 242, 0.55);
}

.ftog-hero h2 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
}

.ftog-lede {
  margin: 0;
  max-width: 40rem;
  color: rgba(232, 238, 242, 0.72);
  line-height: 1.45;
}

.ftog-list {
  display: grid;
  gap: 0.85rem;
}

.ftog-card {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(13, 44, 61, 0.55), rgba(7, 25, 35, 0.85));
}

.ftog-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ftog-card-title {
  margin: 0;
  font-size: 1.05rem;
}

.ftog-card-id {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  opacity: 0.65;
}

.ftog-card-summary {
  margin: 0.75rem 0 0;
  line-height: 1.45;
  color: rgba(232, 238, 242, 0.82);
}

.ftog-card-foot {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
}

.ftog-children {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 0.65rem;
}

.ftog-child-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.ftog-child-title {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.ftog-switch.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.ftog-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
}

.ftog-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ftog-switch-ui {
  width: 2.6rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  transition: background 0.15s ease;
}

.ftog-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #e8eef2;
  transition: transform 0.15s ease;
}

.ftog-switch input:checked + .ftog-switch-ui {
  background: rgba(46, 160, 120, 0.55);
  border-color: rgba(90, 200, 150, 0.55);
}

.ftog-switch input:checked + .ftog-switch-ui::after {
  transform: translateX(1.15rem);
}

.ftog-switch-label {
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 1.6rem;
}

.ftog-hz {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 93, 76, 0.25);
  background: rgba(58, 18, 16, 0.35);
}

.ftog-hz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.ftog-hz-head h3 {
  margin: 0;
  font-size: 1rem;
}

.ftog-hz-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.ftog-hz-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.ftog-hz-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.ftog-hz-title {
  margin: 0;
  font-weight: 650;
  font-size: 0.9rem;
}

.ftog-hz-meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  opacity: 0.75;
}

@media (max-width: 640px) {
  .dev-work-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dev-work-card {
    padding: 0.65rem 0.75rem;
  }
  .dev-work-frame {
    margin: 0.15rem 0.25rem;
    padding: 0.75rem 0.55rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dev-float,
  .emergency-float,
  .emergency-float-beacon.is-red,
  .emergency-float-beacon.is-blue,
  .emergency-float-card {
    animation: none;
  }
}

.impersonate-banner {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
}

.impersonate-banner.is-on {
  display: flex;
}

.impersonate-banner[hidden] {
  display: none !important;
}

.impersonate-banner-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  max-width: 100%;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(30, 95, 138, 0.12);
  border: 1px solid rgba(11, 58, 82, 0.35);
  color: var(--navy-dark);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.impersonate-banner-inner strong {
  color: #0b3a52;
  font-weight: 800;
}

.impersonate-banner-meta {
  color: #4a6678;
  font-weight: 500;
}

.impersonate-banner .admin-btn {
  flex-shrink: 0;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
}

.notify-mute-btn {
  min-width: 2.1rem;
  padding: 0.35rem 0.45rem;
  color: var(--navy);
}

.notify-mute-btn.is-muted {
  color: #8a2a22;
  opacity: 0.9;
}

.ges-notify-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.ges-notify-modal[hidden] {
  display: none !important;
}

.ges-notify-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(11, 58, 82, 0.45);
  cursor: pointer;
}

.ges-notify-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1.25rem 1.2rem;
  box-shadow: 0 12px 40px rgba(11, 58, 82, 0.22);
}

.ges-notify-card h3 {
  margin: 0 0 0.45rem;
  color: var(--navy);
  font-size: 1.1rem;
}

.ges-notify-card p {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ges-notify-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.top-bar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.world-status-bar {
  background: #f4f7f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  margin: 0 0 0.9rem;
}

.world-status-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.28rem;
}

.world-status-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e8eef2;
  padding: 0.18rem 0.15rem 0.2rem;
  min-width: 0;
}

.world-status-chip .ws-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy-dark);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.flag-img {
  width: 20px;
  height: 14px;
  object-fit: contain;
  object-position: center;
  border-radius: 2px;
  flex: 0 0 auto;
  image-rendering: auto;
  background: #d5dee5;
  box-shadow: 0 0 0 1px rgba(11, 58, 82, 0.12);
}

.world-status-chip .ws-state {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.05rem 0.32rem;
}
.world-status-chip .ws-event {
  margin-top: 0.08rem;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  padding: 0.1rem 0.28rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  white-space: nowrap;
}
.world-status-chip .ws-event.is-credits-x2 {
  background: #fee2e2;
  color: #991b1b;
}
.world-status-chip .ws-event.is-alliance-event {
  background: #dbeafe;
  color: #1e40af;
}
.world-status-chip.has-event {
  border-color: rgba(197, 48, 48, 0.35);
  box-shadow: 0 0 0 1px rgba(197, 48, 48, 0.08);
}

.world-status-chip.is-online .ws-state {
  background: #e6f6ec;
  color: #157a3c;
}

.world-status-chip.is-offline .ws-state {
  background: #fde8e8;
  color: #b42318;
}

.world-status-chip.is-offline {
  border-color: #f2b8b5;
  background: #fff7f7;
}

.world-status-chip.is-checking .ws-state {
  background: #eef2f4;
  color: var(--muted);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem 1.75rem;
}

.boot-loader {
  min-height: calc(100vh - 5.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--navy);
}
.boot-loader i {
  font-size: 2.4rem;
  color: #1e5f8a;
}
.boot-loader p {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}
.boot-loader[hidden] {
  display: none !important;
}

#app-panel:not([hidden]) {
  display: block;
}

html.is-booting .panel-section {
  display: none !important;
}

.page-intro {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
}

.info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  max-width: none;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  background: #e8f2fb;
  border: 1px solid #9ec5e8;
  color: #0b3a52;
}

.info-box-icon {
  flex-shrink: 0;
  margin-top: 0.12rem;
  font-size: 1.05rem;
  color: #1e6fba;
}

.info-box p {
  margin: 0;
  color: #0b3a52;
  max-width: none;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mem-intro {
  align-items: flex-start;
}
.mem-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 16rem;
  flex: 1 1 18rem;
}
.mem-intro-copy .admin-muted {
  margin: 0;
}
.mem-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}
.mem-toolbar #mem-search {
  min-width: 11rem;
  flex: 1 1 11rem;
}

.stat-card {
  background: var(--white);
  border: 2px solid var(--ops-border);
  border-radius: 8px;
  box-shadow: var(--ops-shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover {
  box-shadow: var(--ops-shadow-hover);
}

.inner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.inner-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.inner-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.bhub {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem 0.7rem;
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
}
.bhub-lead {
  margin: 0 0 0.45rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.3;
}
.bhub-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.4rem;
}
.bhub-tab {
  appearance: none;
  text-align: left;
  border: 1px solid #d7dee8;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  min-width: 0;
}
.bhub-tab strong {
  display: block;
  color: var(--navy);
  font-size: 0.88rem;
  line-height: 1.2;
}
.bhub-tab span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.25;
}
.bhub-tab:hover {
  border-color: #b07a12;
}
.bhub-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
}
.bhub-tab.is-active strong,
.bhub-tab.is-active span {
  color: #fff;
}
@media (max-width: 900px) {
  .bhub-tabs {
    grid-template-columns: 1fr 1fr;
  }
}
body.bhub-mode.abuild-mode #buildings-hub,
body.bhub-mode.mail-mode #disciplinary-hub {
  flex: 0 0 auto;
}

body.mail-mode #section-alliance_appeals:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.board-world-tabs {
  flex-wrap: wrap;
  margin: 0.85rem 0;
}

.news-articles {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.news-article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #f8fbfd;
}

.news-article h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  color: var(--navy-dark);
}

.news-article p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.news-article-meta {
  margin: 0 0 0.45rem !important;
  color: var(--muted);
  font-size: 0.82rem;
}

.news-public-label {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
  margin-top: 0.85rem;
}

.news-public-label input {
  width: auto;
  margin: 0;
}

.stat-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  color: var(--navy-dark);
}

.stat-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--navy);
}

.stat-card h3 small {
  color: var(--muted);
  font-weight: 500;
}

.admin-muted {
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}

.notice-fields {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 0.5rem;
}

.notice-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.notice-fields input,
.notice-fields textarea,
.notice-fields select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
}

.notice-fields textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.45;
}

.message-option-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.message-option-current {
  margin-top: 0.35rem;
}

.message-option-chip.is-admins {
  background: #fff3d6;
  color: #8a5a00;
}

.message-option-chip.is-members {
  background: #d7ebf7;
  color: var(--teal);
}

.message-option-chip.is-unknown {
  background: #e8eef2;
  color: var(--muted);
}

@media (max-width: 720px) {
  .message-option-fields {
    grid-template-columns: 1fr;
  }
}

.field-hint {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
}

.settings-stack {
  display: grid;
  gap: 1.15rem;
}

.version-saves {
  display: grid;
  grid-template-columns: minmax(12rem, 1.4fr) minmax(10rem, 1fr);
  gap: 0.75rem;
  margin: 0 0 0.5rem;
}

.version-saves label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.version-saves select,
.version-saves input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
}

#pretext-save-hint,
#rules-save-hint {
  margin-bottom: 0.85rem;
}

@media (max-width: 720px) {
  .version-saves {
    grid-template-columns: 1fr;
  }
}

.admin-btn {
  appearance: none;
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.admin-btn:hover {
  background: #eef5f8;
}

.admin-btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.admin-btn.primary:hover {
  background: var(--navy-mid);
}

.admin-btn.ghost {
  background: transparent;
  border-color: var(--line);
}

.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.infra-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.infra-table th,
.infra-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.infra-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card input[type="file"] {
  width: 100%;
}

.admin-avatar-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

#avatar-preview {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--navy);
}

.branding-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.85rem;
  margin: 0.25rem 0 0.5rem;
}

.branding-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
}

.branding-card:hover {
  border-color: var(--teal);
}

.branding-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(30, 95, 138, 0.22);
}

.branding-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  display: block;
}

.branding-card-label {
  font-weight: 600;
  font-size: 0.88rem;
}

.branding-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.push-progress {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: #f4f7f9;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.push-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.push-progress-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.push-progress-pct {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.push-progress-track {
  height: 12px;
  background: #d7e2e8;
  border-radius: 999px;
  overflow: hidden;
}

.push-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), #2d7aad);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.push-progress-worlds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.push-world {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e8eef2;
  color: var(--muted);
}

.push-world.is-running {
  background: #d7ebf7;
  color: var(--teal);
}

.push-world.is-ok {
  background: #d7f0e0;
  color: #1b6b3a;
}

.push-world.is-queued,
.push-world.is-retrying {
  background: #fff3d6;
  color: #8a5a00;
}

.push-world.is-failed,
.push-world.is-gave_up {
  background: #f8d7d7;
  color: #a32626;
}

.admin-status,
.push-log {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: #f4f7f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 0.88rem;
  color: var(--ink);
}

.admin-error {
  color: #a32626;
  margin-top: 0.75rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}
#log-kpi-row {
  margin-top: -0.25rem;
}

/* Dashboard widgets + staff online */
[data-dash-widget].dash-widget-off {
  display: none !important;
}
.dash-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.dash-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem 1.3rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  color: #f2f6f7;
  background:
    radial-gradient(ellipse 70% 80% at 0% -10%, rgba(244, 182, 63, 0.2), transparent 50%),
    linear-gradient(135deg, #0b1f2c, #123044 60%, #16425a);
  border: 1px solid rgba(234, 245, 246, 0.12);
  box-shadow: 0 16px 36px rgba(7, 25, 35, 0.18);
}
.dash-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #f4b63f, #59c6ba, transparent);
}
.dash-eyebrow {
  margin: 0 0 0.3rem;
  color: #f4b63f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dash-hero .dash-title {
  margin: 0;
  font: 2.6rem/0.9 "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
  color: #f2f6f7;
}
.dash-lede {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  color: #c9d6da;
  font-size: 0.92rem;
  line-height: 1.4;
}
.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.8rem;
}
.dash-updated {
  color: #8fa6ae;
  font-size: 0.78rem;
  margin-right: 0.15rem;
}
.dash-hero-mark {
  position: relative;
  width: 4.2rem;
  height: 4.2rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #f4b63f;
  font-size: 1.65rem;
}
.dash-hero-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 182, 63, 0.4), transparent 70%);
  filter: blur(6px);
  animation: t100-pulse 2.8s ease-in-out infinite;
}
.dash-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dash-kpi-grid {
  margin-bottom: 0;
}
.dash-chart-card h3 small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
}
.dash-hero-charts .chart-wrap-tall {
  height: 300px;
}
.chart-wrap-levels {
  height: min(420px, 55vh);
  min-height: 280px;
}
.chart-wrap-sm {
  height: 200px;
}
.chart-wrap-md {
  height: 240px;
}
.dash-levels-card {
  min-height: 0;
}
.dash-toolbar {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.dash-edit-panel {
  background: var(--white);
  border: 1px solid #c5d4dc;
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 1rem;
}
.dash-edit-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
}
.dash-edit-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d7e2e8;
  border-radius: 8px;
  background: #f7fafb;
  cursor: pointer;
}
.dash-edit-item input {
  margin-top: 0.2rem;
}
.dash-edit-item strong {
  display: block;
  font-size: 0.88rem;
}
.dash-edit-item small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}
.dash-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.staff-online-card {
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid #d5e2ea;
  background: linear-gradient(180deg, #fff, #f6fafb);
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.04);
}
.staff-online-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e8eef2;
}
.staff-online-card h3 {
  margin: 0;
  font-size: 0.98rem;
}
.staff-online-card h3 small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.76rem;
}
.staff-online-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.staff-online-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2ebf0;
  border-left: 3px solid #2f9e44;
  font-size: 0.88rem;
}
.staff-online-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #2f9e44;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.15);
  flex-shrink: 0;
}
.site-visitors-count {
  margin: 0 0 0.65rem;
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.1;
}
.site-visitors-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}
.site-visitors-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: #f3f7f9;
  border: 1px solid #e2ebf0;
  font-size: 0.9rem;
}
.site-visitors-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.site-visitors-bar {
  flex: 1;
  height: 0.35rem;
  border-radius: 999px;
  background: #e2ebf0;
  overflow: hidden;
  min-width: 3rem;
  max-width: 6rem;
}
.site-visitors-bar > span {
  display: block;
  height: 100%;
  background: #2a8f9e;
  border-radius: inherit;
}
.staff-online-name {
  font-weight: 650;
  color: var(--navy);
}
.staff-online-rank {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: capitalize;
}
.staff-online-section {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.kpi-card {
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  box-shadow: 0 4px 15px rgba(11, 58, 82, 0.08);
}

.kpi-card .kpi-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-card .kpi-value {
  margin: 0.4rem 0 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
}

.kpi-card.is-warn {
  border-color: var(--accent);
}
.kpi-card.is-warn .kpi-value {
  color: var(--accent);
}
.kpi-card.is-drop {
  border-color: #a32626;
}
.kpi-card.is-drop .kpi-value {
  color: #a32626;
}
.kpi-card.is-btn,
button.kpi-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
}
button.kpi-card.is-active {
  background: #eef5f8;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.report-grid-wide {
  margin-bottom: 0.85rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.card-head h3 { margin: 0; }

.chart-world {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-world select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.msg-sig {
  margin: 0.45rem 0 0.55rem;
  padding: 0.45rem 0.6rem;
  border: 1px dashed #9bb0bc;
  border-radius: 8px;
  background: #eef3f6;
}

.msg-sig-label {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a6f7a;
}

.msg-sig-body {
  margin: 0;
  font: 0.82rem/1.35 Consolas, "Courier New", monospace;
  color: var(--navy);
  white-space: pre-wrap;
  user-select: none;
  pointer-events: none;
}

.msg-sent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.2rem;
}

.msg-sent-head em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
}

.msg-sent-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.msg-sent-body {
  margin: 0.35rem 0 0.4rem;
  white-space: pre-wrap;
  font-size: 0.82rem;
  color: var(--navy);
}

.msg-sent-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.msg-sent-badge.is-ok {
  background: #d7f0e0;
  color: #146338;
}

.msg-sent-badge.is-recalled {
  background: #ece7d8;
  color: #7a5b12;
}

.msg-sent-badge.is-fail {
  background: #ead7d4;
  color: #8a2a22;
}

.msg-recall-btn {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}

.compose-grid input,
#msg-new-body,
#msg-reply,
#msg-to,
#msg-subject {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.compose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.compose-grid label:first-child {
  grid-column: 1 / -1;
}

.msg-template-label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--navy);
}
.msg-template-label select {
  font: inherit;
  font-weight: 550;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.mail-compose-footer .msg-template-label {
  margin: 0 0 0.45rem;
}

.mail-scan-status {
  margin-left: auto;
  font-size: 0.75rem;
}

.msg-item-world {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.msg-item-world .flag-img {
  vertical-align: middle;
}

.compose-grid label,
.mail-body-label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.compose-grid input,
#msg-new-body,
#msg-reply {
  width: 100%;
}

/* In-game messages — mail client */
body.mail-mode .world-status-bar {
  display: none !important;
}

body.mail-mode .content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem 1rem 1rem;
}

body.mail-mode #app-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

body.mail-mode #section-messages:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.mail-shell {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
}

.mail-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  flex-shrink: 0;
}

.mail-world {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--navy);
}

.mail-unread-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: #9a3412;
}

.mail-unread-hint button {
  margin: 0 0.15rem;
  padding: 0.12rem 0.4rem;
  border: 0;
  border-radius: 4px;
  background: #fde68a;
  color: #7c2d12;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.mail-world select {
  font: inherit;
  font-weight: 550;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mail-hint {
  margin-left: auto;
  font-size: 0.76rem;
}

.mail-client {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  flex: 1;
  min-height: min(68vh, 640px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 58, 82, 0.04);
}

body.mail-mode .mail-client {
  min-height: 0;
}

.mail-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #f3f7f9;
}

.mail-sidebar [hidden] {
  display: none !important;
}

.mail-folders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.55rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.mail-folder {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5a6b75;
  cursor: pointer;
}

.mail-folder:hover {
  background: #e8eef2;
}

.mail-folder.is-active {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(11, 58, 82, 0.06);
}

.msg-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.2rem 0;
}

.msg-list.msg-sent-list {
  max-height: none;
}

.msg-item {
  appearance: none;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #e6eef2;
  background: transparent;
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
}

.msg-item:last-child {
  border-bottom: 0;
}

.msg-item:hover {
  background: #eef4f7;
}

.msg-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #d7e4ec;
  color: #0b3a52;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.msg-item-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.msg-item strong {
  color: var(--navy);
  font-size: 0.86rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-item span,
.msg-item em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-item.unread {
  background: #fff8f0;
}

.msg-item.unread .msg-avatar {
  background: #f0c9a0;
}

.msg-item.unread strong {
  font-weight: 800;
}

.msg-new-tag {
  color: #c0392b !important;
  font-weight: 750 !important;
  font-size: 0.68rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.msg-item.active {
  background: #e4eef4;
  box-shadow: inset 3px 0 0 var(--navy);
}

.msg-item.is-recalled {
  opacity: 0.65;
}

.mail-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.mail-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.mail-pane[hidden] {
  display: none !important;
}

.mail-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: #fafcfd;
}

.mail-pane-head h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--navy);
}

.msg-thread {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  background:
    linear-gradient(180deg, #f7fafb 0%, #fff 48px);
}

.mail-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem 1rem;
  max-width: 16rem;
  line-height: 1.45;
}

.msg-bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  max-width: min(42rem, 100%);
  align-self: flex-start;
}

.msg-bubble.is-mine {
  background: #e8f1f6;
  border-color: #c5d6e0;
  align-self: flex-end;
}

.msg-bubble pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.4;
}

.msg-meta {
  margin: 0 0 0.28rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 650;
}

.mail-compose-footer {
  border-top: 1px solid var(--line);
  padding: 0.65rem 1rem 0.75rem;
  background: #f5f8fa;
  flex-shrink: 0;
}

.mail-compose-footer .msg-sig {
  margin: 0.4rem 0 0.45rem;
  padding: 0.35rem 0.55rem;
}

.mail-compose-footer .msg-sig-body {
  font-size: 0.74rem;
  line-height: 1.3;
  max-height: 2.6rem;
  overflow: hidden;
}

.mail-compose-body {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
}

.mail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .mail-client {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mail-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 280px;
  }

  .mail-hint {
    margin-left: 0;
    width: 100%;
  }
}

.chart-wrap {
  position: relative;
  height: 220px;
}

.chart-wrap-tall { height: 280px; }

.stat-card > label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.log-feed {
  display: grid;
  gap: 0.45rem;
  max-height: 22rem;
  overflow: auto;
}
.log-feed-row {
  display: grid;
  grid-template-columns: 2.4rem 6.2rem 1fr;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid #eef3f6;
  padding-top: 0.4rem;
}
.log-feed-row:first-child { border-top: 0; padding-top: 0; }
.log-feed-world {
  font-weight: 700;
  color: var(--navy);
}
.log-feed-body b { color: var(--ink); }

.app-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid #eef3f6;
  padding-top: 0.35rem;
}
.app-summary {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.msg-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.msg-layout .msg-list {
  max-height: 520px;
  display: grid;
  gap: 0.35rem;
  padding: 0;
}

.msg-layout .msg-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  border-bottom: 1px solid var(--line);
}

.msg-layout .msg-item.active {
  box-shadow: none;
  border-color: var(--navy);
  background: #f4f8fb;
}

.msg-layout .msg-thread {
  max-height: 420px;
  display: grid;
}

.mem-kpis {
  grid-template-columns: repeat(6, 1fr);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

#funds-ledger {
  overflow-x: auto;
  margin-top: 0.6rem;
}

#funds-ledger h4 {
  margin: 0.9rem 0 0.35rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #e6eef2;
  vertical-align: top;
}

.data-table th { color: var(--muted); font-weight: 600; }

.credits-table .credits-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.credits-table td .flag-img {
  vertical-align: -3px;
  margin-right: 0.35rem;
}

.discord-col {
  width: 2.4rem;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}
.seen-col {
  width: 6.5rem;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
.seen-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.seen-ago {
  font-size: 0.75rem;
  color: var(--muted);
}
.seen-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  image-rendering: pixelated;
}
.discord-mark,
.discord-logo {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  object-fit: contain;
}
.discord-logo {
  display: block;
  margin: 0 auto;
}
.data-table .admin-muted {
  display: block;
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
}
.names-btn {
  margin: 0.3rem 0.28rem 0 0;
  padding: 0.18rem 0.5rem;
  min-height: 0;
  font-size: 0.72rem;
}
.ab-confirm-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr));
  gap: 0.35rem;
  max-height: min(16rem, 50vh);
  overflow: auto;
}
.ab-confirm-list[hidden] {
  display: none !important;
}
.ab-confirm-list li {
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
  color: #0d2c3d;
  font-size: 0.8rem;
  font-weight: 600;
  word-break: break-word;
}

.world-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.12rem 0.28rem;
  margin: 0.12rem 0.12rem 0.12rem 0;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.world-chip.is-more {
  background: #1e5f8a;
  min-width: auto;
  padding: 0.12rem 0.45rem;
}

.world-chip.dot-online { background: #22a45a; }
.world-chip.dot-d7 { background: #6b7280; }
.world-chip.dot-d30 { background: #2b6cb0; }
.world-chip.dot-d60 { background: #d4a017; color: #1a1404; }
.world-chip.dot-red { background: #c53030; }
.world-chip.mismatch { outline: 2px solid #c53030; outline-offset: 1px; }

.chip-cell { max-width: 28rem; }
.role-pill {
  display: inline-block;
  margin: 0 0.25rem 0.2rem 0;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e8eef2;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
}
.role-pill.is-chief {
  background: #f4e4b0;
  color: #6b5208;
}
.role-pill.is-command {
  background: #d6e4ee;
  color: #0b3a52;
}
.role-pill.is-operations {
  background: #c5d8e8;
  color: #1b3f58;
}
.role-pill.is-treasurer {
  background: #efe0b8;
  color: #6b5208;
}
.role-pill.is-education {
  background: #cde8e6;
  color: #0e4f4a;
}
.role-pill.is-logistics {
  background: #dceee4;
  color: #1b5c38;
}
.role-pill.is-reception {
  background: #e8e0f2;
  color: #4a2d73;
}
.role-pill.is-dispatcher {
  background: #dde3f5;
  color: #2c3a7a;
}
.role-pill.is-excepted {
  background: #f4e4b0;
  color: #6b5208;
}
.except-btn {
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
}
.link-btn,
.msg-btn {
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
}
.member-name-btn {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.member-name-btn strong {
  display: block;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
}
.member-name-btn:hover strong,
.member-name-btn:focus-visible strong {
  text-decoration-color: var(--navy);
}
.kick-btn {
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  color: #8a1f1f;
  border-color: #d9a0a0;
}
.warn { color: #a32626; font-weight: 700; }
.data-table td strong { display: block; color: var(--navy); }
.data-table td:last-child {
  white-space: nowrap;
}
#mem-search, #mem-filter, #mem-world {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font: inherit;
}

.vbar {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 180px;
  overflow-x: auto;
}

.vbar-col {
  flex: 1 0 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 1.6rem;
  height: 180px;
  justify-content: flex-end;
}

.vbar-fill {
  width: 100%;
  max-width: 22px;
  background: linear-gradient(180deg, var(--amber), var(--accent));
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.vbar-col.alt .vbar-fill {
  background: linear-gradient(180deg, #59c6ba, var(--teal));
}

.vbar-label {
  margin-top: 0.3rem;
  font-size: 0.65rem;
  color: var(--muted);
}

.hbar {
  display: grid;
  gap: 0.55rem;
}

.hbar-row .hbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.hbar-track {
  height: 8px;
  border-radius: 99px;
  background: #e6eef2;
  overflow: hidden;
}

.hbar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--navy);
}

.rank-board-card {
  max-width: none;
}

.rank-board .rank-chase {
  padding: 0.55rem 0 0.65rem;
  border-bottom: 1px solid var(--line);
}

.rank-board .rank-chase:last-child {
  border-bottom: 0;
}

.rank-board .rank-chase-line {
  font-size: 0.82rem;
}

.rank-eta {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(30, 111, 186, 0.12);
  color: #0b3a52;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.rank-eta.is-muted {
  background: rgba(74, 102, 120, 0.12);
  color: #4a6678;
  font-weight: 600;
}

.rank-eta.is-warn {
  background: rgba(181, 71, 8, 0.14);
  color: #8a3b08;
}

.rank-chase {
  padding-bottom: 0.15rem;
}

.rank-chase.is-drop .hbar-fill {
  background: #b42318;
}

.rank-chase.is-drop .hbar-meta {
  color: #b42318;
  font-weight: 700;
}

.rank-chase.is-slip .hbar-fill {
  background: #b54708;
}

.rank-chase-line {
  margin: 0.2rem 0 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.rank-race-tag {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5a6f7a;
  min-width: 3.6rem;
}

.rank-chase-rival {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-chase-rival.is-gaining {
  color: #17663a;
  font-weight: 600;
}

.rank-chase-rival.is-holding {
  color: #a15c07;
  font-weight: 600;
}

.rank-chase-rival.is-slipping {
  color: #b42318;
  font-weight: 600;
}

.rank-chase-sep {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  min-height: 0.95em;
  background: #8aa0ab;
}

.rank-chase-pace {
  flex: 0 0 auto;
  white-space: nowrap;
}

.rank-chase-pace.is-gaining {
  color: #17663a;
  font-weight: 600;
}

.rank-chase-pace.is-slipping,
.rank-chase.is-drop .rank-chase-pace.is-slipping {
  color: #b42318;
  font-weight: 600;
}

.infra-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.infra-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  background: #f7fafb;
}

.infra-tile b {
  display: block;
  color: var(--navy);
  font-size: 1.1rem;
}

.infra-tile span {
  color: var(--muted);
  font-size: 0.75rem;
}

.empty-chart {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.bb-editor {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin: 0.35rem 0;
}

.bb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  background: #f4f7f9;
}

.bb-toolbar-group {
  display: flex;
  gap: 0.25rem;
  padding-right: 0.45rem;
  border-right: 1px solid var(--line);
}

.bb-toolbar-spacer { flex: 1; }

.bb-toolbar button,
.bb-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 0.28rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.bb-mode {
  font-size: 0.75rem;
  color: var(--muted);
}

.bb-surface {
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
  padding: 0.85rem 1rem;
  outline: none;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
}

.bb-surface a { color: var(--teal); }

.bb-code {
  width: 100%;
  min-height: 220px;
  border: 0;
  padding: 0.85rem 1rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
  resize: vertical;
  color: var(--ink);
  background: #f8fafb;
}

/* Login */
.login-page {
  background: #1a1f24;
  color: #fff;
}

.portal-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.portal-login-card {
  width: 100%;
  max-width: 24rem;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  border-top: 4px solid var(--amber);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.login-brand img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.login-eyebrow {
  text-align: center;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.login-title {
  text-align: center;
  margin: 0 0 0.65rem;
  font-size: 1.7rem;
  color: var(--navy-dark);
}

.login-access {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.login-meta {
  margin: 1.1rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid #d8dee3;
  display: grid;
  gap: 0.28rem;
}

.login-meta > div {
  display: grid;
  grid-template-columns: 6.75rem 1fr;
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.8rem;
  line-height: 1.35;
}

.login-meta dt {
  margin: 0;
  color: #3a4650;
  font-weight: 700;
}

.login-meta dd {
  margin: 0;
  color: #4a5560;
  word-break: break-word;
}

.portal-login-card label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-login-card input {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f7fafb;
  color: var(--ink);
  font: inherit;
}

.login-submit { width: 100%; }

.login-foot {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.login-foot a { color: var(--muted); }

/* Wynyard-style split gate (login only) */
.login-gate-page {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

.login-gate {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 0;
  background: #eceff1;
  color: #1a1f24;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid #0d1216;
  overflow: hidden;
}

.login-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.35rem 1rem;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(7, 25, 35, 0.35), rgba(7, 25, 35, 0.55)),
    repeating-linear-gradient(
      135deg,
      #0a4a58 0 10px,
      #0c5565 10px 20px
    );
  border-right: 1px solid #072028;
}

.login-gate-logo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(244, 182, 63, 0.65);
}

.login-gate-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.login-gate-short {
  margin: 0;
  color: var(--amber);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-gate-panel {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem 0;
  background: #f3f5f6;
  min-width: 0;
}

.login-gate-head,
.login-gate-form,
.login-gate-error,
.login-gate-info,
.login-gate .login-meta {
  max-width: none;
  width: 100%;
}

.login-gate-head {
  margin-bottom: 0.85rem;
}

.login-gate-head h1 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1f24;
  letter-spacing: -0.01em;
}

.login-gate-sub {
  margin: 0.2rem 0 0;
  color: #9a7b3a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-gate-error {
  margin: 0 0 0.55rem;
}

.login-gate-form label {
  display: block;
  margin: 0 0 0.2rem;
  color: #3a4650;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-gate-form input {
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0;
  border: 1px solid #b7c0c7;
  background: #fff;
  color: #1a1f24;
  font: inherit;
  font-size: 0.92rem;
}

.login-gate-form input:focus {
  outline: 2px solid rgba(244, 182, 63, 0.55);
  outline-offset: 1px;
  border-color: #8a7040;
}

.login-gate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin: 0.05rem 0 0.15rem;
}

.login-gate-actions .login-gate-forgot {
  margin-right: auto;
}

.login-gate-abort,
.login-gate-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.login-gate-abort {
  background: #6b757c;
  color: #fff;
}

.login-gate-abort:hover {
  background: #5a6369;
}

.login-gate-ok {
  background: #c9a227;
  color: #1a1f24;
}

.login-gate-ok:hover {
  background: #d4ae32;
}

.login-gate-ok:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-invite-hint {
  margin: 0.35rem 0 0;
  color: #6b757c;
  font-size: 0.72rem;
  line-height: 1.35;
  word-break: break-all;
}

.mfa-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 0.85rem 0 0.65rem;
}

.mfa-qr {
  width: min(220px, 70vw);
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid rgba(30, 95, 138, 0.28);
  background: #fff;
  box-shadow: 0 10px 28px rgba(7, 25, 35, 0.12);
  padding: 0.55rem;
}

.account-card .mfa-qr {
  border-color: rgba(244, 182, 63, 0.45);
}

.account-mfa-card .account-mfa-blurb {
  margin: 0.15rem 0 0.65rem;
  font-size: 0.86rem;
  line-height: 1.4;
}

.account-mfa-card .account-mfa-blurb strong {
  color: #0d2c3d;
  font-weight: 650;
}

.mfa-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 95, 138, 0.22);
  background: rgba(30, 95, 138, 0.08);
  color: #1e5f8a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mfa-badge.is-on {
  border-color: rgba(46, 125, 50, 0.35);
  background: rgba(46, 125, 50, 0.12);
  color: #1b5e20;
}

.mfa-badge.is-grace {
  border-color: rgba(244, 182, 63, 0.5);
  background: rgba(244, 182, 63, 0.16);
  color: #8a5a00;
}

.mfa-badge.is-off,
.mfa-badge.is-loading {
  border-color: rgba(107, 117, 124, 0.35);
  background: rgba(107, 117, 124, 0.1);
  color: #5c656c;
}

.mfa-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 0.85rem;
  color: #5c656c;
  font-size: 0.86rem;
  line-height: 1.4;
}

.mfa-meta strong {
  color: #0d2c3d;
  font-weight: 650;
}

.mfa-setup {
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(30, 95, 138, 0.16);
  background: rgba(7, 25, 35, 0.03);
}

.mfa-setup-lead {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
}

.mfa-confirm-row {
  margin-top: 0.75rem;
}

.mfa-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.mfa-confirm-actions input {
  flex: 1 1 8rem;
  max-width: 12rem;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.mfa-actions {
  margin-top: 0.35rem;
}

.mfa-backups {
  margin-top: 0.9rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(244, 182, 63, 0.4);
  background: rgba(244, 182, 63, 0.08);
}

.mfa-backups-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.mfa-backups-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mfa-backups-head strong {
  font-size: 0.92rem;
  color: #0d2c3d;
}

.mfa-backups-note {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
}

.mfa-backups-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.4rem;
}

.mfa-backups-list li code {
  display: block;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(30, 95, 138, 0.16);
  background: #fff;
  text-align: center;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  user-select: all;
}

.mfa-secret-row {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(30, 95, 138, 0.18);
  background: rgba(7, 25, 35, 0.04);
}

.mfa-secret-label {
  display: block;
  margin: 0 0 0.45rem;
  color: #6b757c;
  font-size: 0.78rem;
  font-weight: 600;
}

.mfa-secret-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.mfa-secret-value {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(30, 95, 138, 0.2);
  color: #0d2c3d;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-all;
  user-select: all;
}

.mfa-secret-copy {
  flex: 0 0 auto;
  min-width: 7.5rem;
}

.login-gate-form .mfa-secret-row {
  background: rgba(255, 255, 255, 0.55);
}

.login-gate-form .mfa-secret-copy {
  min-height: 2.2rem;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  border: 1px solid rgba(30, 95, 138, 0.35);
  border-radius: 8px;
  background: #1e5f8a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
}

.login-gate-forgot {
  border: 0;
  background: transparent;
  color: #6b757c;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  min-width: 0;
}

.login-gate-forgot:hover {
  color: #1a1f24;
}

.login-forgot-copy {
  margin: 0 0 0.65rem;
  color: #4a5560;
  font-size: 0.8rem;
  line-height: 1.35;
}

.login-gate-info {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.6rem;
  background: #e8f5ec;
  color: #1f5c38;
  font-size: 0.82rem;
  line-height: 1.3;
}

.login-gate .login-meta {
  margin-top: 0.85rem;
  border-top: 1px solid #d0d6db;
  padding-top: 0.55rem;
  margin-bottom: 0.65rem;
  gap: 0.18rem;
}

.login-gate .login-meta > div {
  grid-template-columns: 6.25rem 1fr;
  font-size: 0.76rem;
}

.login-gate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1.25rem;
  padding: 0.35rem 0.75rem;
  background: #3a4248;
  color: #c5cbd0;
}

.login-gate-clock {
  display: inline-block;
  min-width: 5.6rem;
  padding: 0.2rem 0.45rem;
  background: #050607;
  color: #39ff6a;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.login-gate-bar-brand {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #c5cbd0;
}

.login-gate-bar-brand a {
  color: #9ec8ff;
  text-decoration: underline;
  text-transform: lowercase;
}

.login-gate-bar-brand a:hover {
  color: #cfe4ff;
}

@media (max-width: 720px) {
  .login-gate {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-gate-brand {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-right: 0;
    border-bottom: 1px solid #072028;
  }

  .login-gate-logo {
    width: 56px;
    height: 56px;
  }

  .login-gate-name {
    font-size: 0.72rem;
    text-align: left;
    line-height: 1.25;
  }

  .login-gate-name br { display: none; }

  .login-gate-short {
    margin-left: auto;
    font-size: 1rem;
  }

  .login-gate-panel {
    padding: 1.25rem 1.15rem 0;
  }

  .login-gate-bar {
    margin: 0 -1.15rem;
  }

  .login-gate-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .login-gate-actions .login-gate-forgot {
    flex: 1 0 100%;
    margin: 0 0 0.35rem;
    text-align: left;
  }

  .login-gate-abort,
  .login-gate-ok {
    flex: 1;
  }
}

.account-card {
  margin-bottom: 0.65rem;
  padding: 0.85rem 1rem;
}

#section-account .page-intro,
#section-account .account-intro {
  margin-bottom: 0.55rem;
}

#section-account .info-box {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  gap: 0.5rem;
}

#section-account .info-box p {
  font-size: 0.86rem;
  line-height: 1.35;
}

.account-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.account-field {
  display: block;
  margin: 0.35rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.account-display-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}

.account-display-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
}

.account-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.account-select,
.account-card input[type="text"],
.account-card input[type="password"] {
  width: 100%;
  max-width: none;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
}

.account-date-preview {
  margin: 0;
  font-size: 0.8rem;
}

.account-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.account-grid .admin-btn {
  margin-top: 0.45rem;
}

.account-ip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.account-ip-head h2 {
  margin: 0;
}

.account-ip-hint {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
}

.account-ip-table {
  width: 100%;
}

#section-account .admin-muted[hidden],
#section-account .admin-error[hidden] {
  display: none;
}

.roster-panel-card {
  padding: 0;
  overflow: hidden;
}
.roster-frame {
  display: block;
  width: 100%;
  min-height: min(78vh, 920px);
  border: 0;
  background: transparent;
}

.admin-roster-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.admin-roster-label {
  margin: 0;
  min-width: 10rem;
  text-align: center;
  font-size: 1.15rem;
  color: var(--ink);
}
.admin-roster-live,
.admin-roster-staff {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.admin-roster-live-card,
.admin-roster-pill {
  background: #f4f7f9;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  padding: 0.65rem 0.75rem;
  min-width: 10.5rem;
  color: var(--ink);
}
.admin-roster-live-card strong,
.admin-roster-pill strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
}
.admin-roster-live-card span,
.admin-roster-pill span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.admin-roster-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.admin-roster-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.admin-roster-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aadb6;
}
.admin-roster-dot.on { color: var(--ink) }
.admin-roster-dot.panel.on::before { background: #c45c28 }
.admin-roster-dot.game.on::before { background: #1e8a6a }

.admin-roster-grid-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  border: 1px solid var(--line);
  background: #fff;
}
.admin-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  min-width: 760px;
}
.admin-month-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.5rem 0.35rem;
  background: #e8eef2;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.admin-month-day {
  min-height: 104px;
  padding: 0.4rem;
  border-right: 1px solid #e4ebef;
  border-bottom: 1px solid #e4ebef;
  background: #fff;
  color: var(--ink);
}
.admin-month-day.is-pad {
  background: #f3f6f8;
  min-height: 72px;
}
.admin-month-day.is-today {
  background: #fff8ee;
  box-shadow: inset 0 0 0 2px var(--amber);
}
.admin-month-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.admin-month-events {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.admin-roster-chip {
  display: block;
  padding: 0.22rem 0.32rem;
  font-size: 0.68rem;
  line-height: 1.25;
  border-left: 3px solid transparent;
  color: #102433;
}
.admin-roster-chip b { display: block; font-weight: 700 }
.admin-roster-chip em {
  display: block;
  font-style: normal;
  color: #355064;
  font-size: 0.64rem;
}
.admin-roster-chip.kind-free { background: #e4f4ea; border-color: #2f8a55 }
.admin-roster-chip.kind-away { background: #f7ecdc; border-color: #b7792f }
.admin-roster-chip.kind-holiday { background: #e4eef8; border-color: #3d6f9e }
.admin-roster-chip.kind-on_call { background: #efe8f8; border-color: #6b4c9a }
.admin-roster-chip.kind-unavailable { background: #f6e4e4; border-color: #a84a4a }
.admin-month-more {
  font-size: 0.65rem;
  color: var(--accent);
  font-weight: 700;
}
.admin-roster-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-roster-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-roster-lg {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-left: 3px solid;
}
.admin-roster-lg.lg-free { border-color: #2f8a55; background: #e4f4ea }
.admin-roster-lg.lg-away { border-color: #b7792f; background: #f7ecdc }
.admin-roster-lg.lg-holiday { border-color: #3d6f9e; background: #e4eef8 }
.admin-roster-lg.lg-on_call { border-color: #6b4c9a; background: #efe8f8 }
.admin-roster-lg.lg-unavailable { border-color: #a84a4a; background: #f6e4e4 }

#section-account #account-prefs-status,
#section-account #account-creds-status,
#section-account #account-ip-status {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
}

.duty-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.duty-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-top: 1.55rem;
}
.duty-block-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.duty-block-row:last-child { border-bottom: 0 }
.duty-block-row .admin-muted { display: block; margin-top: 0.2rem; font-size: 0.82rem }
.duty-block-row .duty-note { display: block; margin-top: 0.25rem; font-size: 0.85rem }
.duty-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}
.duty-block-row.is-past {
  opacity: 0.72;
}
.duty-past-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  vertical-align: middle;
}
.duty-past-panel {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.duty-past-panel > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}
.duty-past-panel > summary::-webkit-details-marker { display: none }
.duty-past-panel > summary::before {
  content: "▸ ";
  color: var(--muted);
}
.duty-past-panel[open] > summary::before { content: "▾ " }
.duty-past-count {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.72rem;
  background: #e8eef2;
  color: var(--muted);
  border-radius: 999px;
}
.duty-past-hint {
  margin: 0.45rem 0 0.55rem;
  font-size: 0.82rem;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}
.profile-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.profile-side-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.profile-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.profile-badge-card {
  padding: 0.85rem;
  background: #e8eef2;
  margin: 0;
}
.ges-id-badge {
  width: 100%;
  background: #fff;
  border: 1px solid #c5d2da;
  box-shadow: 0 10px 28px rgba(7, 25, 35, 0.12);
  overflow: hidden;
  color: #122838;
}
.ges-id-badge.is-landscape {
  max-width: none;
  margin: 0;
}
.ges-id-badge-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #0b3a52;
  color: #f2f6f7;
}
.ges-id-badge-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ges-id-badge-org {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ges-id-badge-tag {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  opacity: 0.8;
}
.ges-id-badge-main {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}
.ges-id-badge-photo-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  background: #edf2f5;
  border-right: 4px solid #1e5f8a;
  overflow: hidden;
  flex-shrink: 0;
  align-self: start;
}
.ges-id-badge[data-rank="chief"] .ges-id-badge-photo-wrap { border-right-color: #c45c28 }
.ges-id-badge[data-rank="command"] .ges-id-badge-photo-wrap { border-right-color: #1e5f8a }
.ges-id-badge[data-rank="education"] .ges-id-badge-photo-wrap { border-right-color: #2f7a4e }
.ges-id-badge[data-rank="operations"] .ges-id-badge-photo-wrap { border-right-color: #6b4c9a }
.ges-id-badge-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: none;
  position: absolute;
  inset: 0;
  background: #edf2f5;
}
.ges-id-badge-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #6a8290;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #edf2f5;
  z-index: 1;
}
.ges-id-badge[data-has-photo="1"] .ges-id-badge-photo {
  display: block;
  z-index: 2;
}
.ges-id-badge[data-has-photo="1"] .ges-id-badge-placeholder {
  display: none;
}
.ges-id-badge-placeholder i {
  font-size: 2.4rem;
  opacity: 0.55;
}
.ges-id-badge-body {
  padding: 0.75rem 0.9rem 0.65rem;
  min-width: 0;
}
.ges-id-badge-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0d2433;
}
.ges-id-badge-title {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #4d6573;
  font-weight: 600;
}
.ges-id-badge-rank {
  margin: 0.4rem 0 0.65rem;
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #e8eef2;
  color: #1e5f8a;
}
.ges-id-badge[data-rank="chief"] .ges-id-badge-rank { background: #f7e8df; color: #c45c28 }
.ges-id-badge[data-rank="education"] .ges-id-badge-rank { background: #e4f1e8; color: #2f7a4e }
.ges-id-badge[data-rank="operations"] .ges-id-badge-rank { background: #efe8f8; color: #6b4c9a }
.ges-id-badge-meta,
.ges-id-badge-extra {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.ges-id-badge-extra {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e4ebef;
}
.ges-id-badge-meta div,
.ges-id-badge-extra div {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.35rem;
  align-items: baseline;
}
.ges-id-badge-meta dt,
.ges-id-badge-extra dt {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a8290;
}
.ges-id-badge-meta dd,
.ges-id-badge-extra dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #163044;
  word-break: break-word;
}
.ges-id-badge-foot {
  padding: 0.4rem 0.9rem 0.5rem;
  border-top: 1px solid #e0e8ed;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8290;
  background: #f7f9fb;
}
.profile-extra-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0 0.35rem;
}
.profile-extra-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.profile-extra-list {
  display: grid;
  gap: 0.45rem;
}
.profile-extra-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 0.4rem;
  align-items: center;
}
.profile-extra-row input {
  width: 100%;
}
.admin-month-day.is-clickable {
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}
.admin-month-day.is-clickable:hover {
  background: #f3f8fb;
}
.roster-day-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.roster-day-modal[hidden] { display: none !important }
.roster-day-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 25, 35, 0.45);
  cursor: pointer;
}
.roster-day-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 22px 55px rgba(7, 25, 35, 0.28);
  padding: 1rem 1.1rem 1.2rem;
}
.roster-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.roster-day-head h3 { margin: 0 }
.roster-day-body {
  display: grid;
  gap: 0.9rem;
}
.roster-day-badge { max-width: none }
.roster-day-events {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.85rem 0.75rem;
  border-top: 1px solid #e4ebef;
  display: grid;
  gap: 0.35rem;
}
.roster-day-event {
  padding: 0.35rem 0.45rem;
  border-left: 3px solid #9aadb6;
  background: #f4f7f9;
  font-size: 0.82rem;
}
.roster-day-event strong { display: block }
.roster-day-event span,
.roster-day-event em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 0.75rem;
}
.roster-day-event.kind-free { border-color: #2f8a55; background: #e4f4ea }
.roster-day-event.kind-away { border-color: #b7792f; background: #f7ecdc }
.roster-day-event.kind-holiday { border-color: #3d6f9e; background: #e4eef8 }
.roster-day-event.kind-on_call { border-color: #6b4c9a; background: #efe8f8 }
.roster-day-event.kind-unavailable { border-color: #a84a4a; background: #f6e4e4 }
.roster-day-none {
  margin: 0;
  padding: 0.55rem 0.85rem 0.75rem;
  border-top: 1px solid #e4ebef;
}
@media (max-width: 900px) {
  .profile-workspace { grid-template-columns: 1fr }
}
@media (max-width: 720px) {
  .profile-edit-grid { grid-template-columns: 1fr }
  .ges-id-badge-main { grid-template-columns: 120px minmax(0, 1fr) }
  .ges-id-badge-photo-wrap { width: 120px; height: 120px }
  .profile-extra-row { grid-template-columns: 1fr }
}

.duty-kind-free { border-left: 3px solid #5fd08a; padding-left: 0.65rem }
.duty-kind-away { border-left: 3px solid #e0a45a; padding-left: 0.65rem }
.duty-kind-holiday { border-left: 3px solid #7eb0e0; padding-left: 0.65rem }
.duty-kind-on_call { border-left: 3px solid #b794f6; padding-left: 0.65rem }
.duty-kind-unavailable { border-left: 3px solid #e08080; padding-left: 0.65rem }
#section-duty .account-card input[type="datetime-local"],
#section-duty .account-card input[type="time"],
#section-duty .account-card input[type="text"] {
  width: 100%;
}
@media (max-width: 720px) {
  .duty-form-grid { grid-template-columns: 1fr }
  .duty-mode-row { padding-top: 0 }
}

@media (max-width: 720px) {
  .account-grid,
  .account-display-grid {
    grid-template-columns: 1fr;
  }
}
.users-panel {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(11, 58, 82, 0.08);
  overflow: hidden;
}
.users-table-wrap {
  overflow-x: auto;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.users-table thead th {
  background: #1e5f8a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.75rem 0.85rem;
  white-space: nowrap;
}
.users-table tbody td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e6eef2;
  vertical-align: middle;
}
.users-table tbody tr:hover {
  background: #f5f9fb;
}
.users-table tbody tr.is-revoked,
.users-table tbody tr.is-deactivated {
  background: #fbf6f6;
}
.users-table tbody tr.is-not_granted {
  background: #fffaf3;
}
.users-table .mono-cell {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.8rem;
}
.users-table td strong {
  display: block;
  color: var(--navy);
}
.pw-mask {
  width: 7.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f7f9;
  color: var(--muted);
  padding: 0.28rem 0.5rem;
  letter-spacing: 0.16em;
  font: inherit;
  font-size: 0.85rem;
}
.user-actions {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
}
.app-action-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.app-history-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}
.app-accepted {
  font-weight: 700;
  color: #146338;
}
.app-denied {
  font-weight: 700;
  color: #8a2a22;
}

/* Alliance applications — compact inbox */
body.apps-mode .world-status-bar {
  display: none !important;
}

body.apps-mode .content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem 1rem 1rem;
}

body.apps-mode #app-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

body.apps-mode #section-applications:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.apps-shell {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
}

.apps-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex-shrink: 0;
}

.apps-folders {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f3f7f9;
}

.apps-folder {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  padding: 0.38rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5a6b75;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.apps-folder:hover {
  background: #e8eef2;
}

.apps-folder.is-active {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(11, 58, 82, 0.06);
}

.apps-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 750;
}

.apps-folder.is-active .apps-count {
  color: var(--navy);
}

.apps-status {
  margin-left: auto;
  font-size: 0.8rem;
}

.apps-hint {
  margin: 0;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.apps-client {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(11, 58, 82, 0.04);
}

.apps-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.apps-list[hidden] {
  display: none !important;
}

.apps-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2.5rem 1rem;
  line-height: 1.45;
}

.apps-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem 0.7rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.apps-row:last-child {
  border-bottom: 0;
}

.apps-row.is-pending {
  background: #fff;
}

.apps-row.is-soup-blocked {
  background: #fff9f2;
}

.apps-row.is-accepted {
  background: #f7fbf8;
}

.apps-row.is-denied {
  background: #fcf8f7;
}

.apps-flag {
  width: 22px;
  display: flex;
  align-items: center;
}

.apps-flag img {
  display: block;
  border-radius: 2px;
}

.apps-row-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.apps-name {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.25;
}

.apps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.apps-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid #d7e0e6;
  background: #f4f7f9;
  color: #4d5d68;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.apps-chip.is-warn {
  border-color: #f0c48a;
  background: #fff3e4;
  color: #9a5b12;
}

.apps-chip.is-danger {
  border-color: #e8a09a;
  background: #fdecea;
  color: #a1281f;
}

.apps-chip.is-ok {
  border-color: #b7ddc4;
  background: #eaf7ef;
  color: #1f6b3a;
}

.apps-deny-reason {
  display: block;
  font-size: 0.78rem;
  color: #8a3b2b;
  line-height: 1.35;
}

.apps-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
  justify-content: flex-end;
  max-width: 22rem;
}

.apps-row-actions .admin-btn {
  padding: 0.32rem 0.55rem;
  font-size: 0.78rem;
}

.apps-mail-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.apps-mail-dialog[hidden] {
  display: none !important;
}

.apps-mail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 30, 42, 0.45);
  cursor: pointer;
}

.apps-mail-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(11, 30, 42, 0.22);
  padding: 1rem 1.05rem 1.05rem;
  display: grid;
  gap: 0.65rem;
}

.apps-mail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.apps-mail-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.apps-mail-head h3 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  color: var(--navy);
}

.apps-mail-to {
  margin: 0;
  font-size: 0.82rem;
}

.apps-mail-label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #5a6b75;
}

.apps-mail-label input,
.apps-mail-label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  background: #f7fafb;
  resize: vertical;
}

.apps-mail-label textarea {
  line-height: 1.45;
  white-space: pre-wrap;
}

.apps-mail-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  padding-top: 0.15rem;
}

.apps-flag-fallback {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--navy);
}

.apps-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}

.apps-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.apps-status-pill.is-accepted {
  background: #d7f0e0;
  color: #146338;
}

.apps-status-pill.is-denied {
  background: #ead7d4;
  color: #8a2a22;
}

@media (max-width: 720px) {
  .apps-row {
    grid-template-columns: auto 1fr;
  }

  .apps-row-actions,
  .apps-row-meta {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .apps-status {
    margin-left: 0;
    width: 100%;
  }
}

.staff-app-status {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.staff-app-status.is-pending { color: #1e5f8a; }
.staff-app-status.is-deferred { color: #c45c28; }
.staff-app-status.is-offered { color: #9a6b12; }
.staff-app-status.is-approved { color: #146338; }
.staff-app-status.is-denied,
.staff-app-status.is-expired { color: #8a2a22; }
.staff-app-flags { color: #8a5a12; margin: 0.4rem 0 0; padding-left: 1.1rem; }

.staff-recruit-panel {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f7f9;
}

.staff-recruit-panel.is-open {
  background: #e8f5ee;
  border-color: #b7d9c4;
}

.staff-recruit-panel.is-closed {
  background: #f6f4ef;
  border-color: #e2d8c4;
}

.staff-recruit-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}

.staff-recruit-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.65rem;
  min-width: 0;
}

.staff-recruit-copy strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.staff-recruit-state {
  font-size: 0.8rem;
  font-weight: 650;
  color: #5a6b75;
}

.staff-recruit-state.is-open {
  color: #146338;
}

.staff-recruit-state.is-closed {
  color: #7a5b12;
}

.staff-recruit-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.staff-recruit-flash {
  font-size: 0.76rem;
  font-weight: 600;
  color: #146338;
}

.staff-recruit-panel.is-closed .staff-recruit-flash {
  color: #8a2a22;
}

.staff-recruit-btn-open {
  background: #1f9d55 !important;
  border-color: #1f9d55 !important;
  color: #fff !important;
}

.staff-recruit-btn-open:hover {
  background: #188a49 !important;
  border-color: #188a49 !important;
}

.staff-recruit-btn-close {
  background: #e74c3c !important;
  border-color: #e74c3c !important;
  color: #fff !important;
}

.staff-recruit-btn-close:hover {
  background: #c0392b !important;
  border-color: #c0392b !important;
}

.staff-recruit-reason-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.45rem;
}

.staff-recruit-reason-field span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a5560;
}

.staff-recruit-reason-field input {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.38rem 0.5rem;
}

.staff-recruit-log {
  margin-top: 0.45rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(28, 36, 40, 0.12);
  background: rgba(255, 255, 255, 0.55);
}

.staff-recruit-log-title {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a5560;
}

.staff-recruit-log-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  max-height: 9rem;
  overflow: auto;
}

.staff-recruit-log-list li {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #1c2428;
}

.staff-recruit-log-list li span {
  color: #4a5560;
}

.staff-recruit-override {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto;
  gap: 0.3rem 0.5rem;
  align-items: end;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(28, 36, 40, 0.1);
}

.staff-invite-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.staff-invite-field span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a5a3a;
}

.staff-invite-field input {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.38rem 0.5rem;
}

.staff-invite-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.3;
}

.staff-invite-list {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: -0.05rem;
}

.staff-invite-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.85rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #3a4a52;
}

.staff-invite-row span {
  min-width: 0;
  flex: 1 1 auto;
}

.staff-invite-row strong {
  color: var(--navy);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.3;
}

.staff-invite-row button {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .staff-recruit-override {
    grid-template-columns: 1fr;
  }
}

.staff-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.staff-invite-modal[hidden] {
  display: none !important;
}

.staff-invite-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(11, 58, 82, 0.5);
  cursor: pointer;
}

.staff-invite-card {
  position: relative;
  z-index: 1;
  width: min(34rem, 100%);
  max-height: min(90vh, 40rem);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem 1.1rem;
  box-shadow: 0 14px 44px rgba(11, 58, 82, 0.24);
}

.staff-invite-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
}

.staff-invite-card-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.staff-invite-letter {
  width: 100%;
  margin: 0.55rem 0 0.75rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid #d5dde3;
  border-radius: 8px;
  background: #f7f9fa;
  color: #1c2428;
  font: 0.92rem/1.5 ui-monospace, Consolas, monospace;
  resize: vertical;
  min-height: 16rem;
}

.staff-invite-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.staff-invite-copy-flash {
  font-size: 0.82rem;
  font-weight: 650;
  color: #146338;
}

.staff-mail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 0.85rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .staff-mail-layout { grid-template-columns: 1fr; }
}

.staff-mail-folders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.staff-folder {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  align-items: center;
}
.staff-folder span {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 700;
}
.staff-folder.is-active {
  border-color: var(--navy);
  background: #f4f8fb;
}

.staff-mail-search {
  width: 100%;
  margin-bottom: 0.55rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.staff-mail-list {
  max-height: 620px;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}

.staff-mail-item {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
}
.staff-mail-item strong { color: var(--navy); font-size: 0.88rem; }
.staff-mail-item span { color: var(--muted); font-size: 0.75rem; }
.staff-mail-item.active { border-color: var(--navy); background: #f4f8fb; }
.staff-mail-item.is-offered { border-left: 4px solid #c9a227; }
.staff-mail-item.is-pending { border-left: 4px solid #1e5f8a; }
.staff-mail-item.is-deferred { border-left: 4px solid #c45c28; }

.staff-mail-preview {
  min-height: 420px;
}
.staff-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.staff-preview-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
}
.staff-preview-meta {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  font-size: 0.86rem;
}
.staff-preview-block {
  margin: 0 0 0.85rem;
}
.staff-preview-block h3 {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.staff-preview-block p { margin: 0; white-space: pre-wrap; }

.staff-decide {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
}
.staff-decide h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--navy);
}
.staff-decide-help {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.staff-decide-row {
  display: grid;
  gap: 0.45rem;
}
.staff-decide-row label {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--navy);
}
.staff-decide-row input,
.staff-decide-row select,
.staff-decide-row textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.staff-decide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.staff-decide-actions .admin-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.staff-action-note {
  flex: 1 1 100%;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.admin-ok {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #e8f6ee;
  color: #146338;
  border: 1px solid #b7dfc6;
  font-size: 0.88rem;
}
.user-action {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem;
  line-height: 1;
}
.user-action.is-grant { color: #1e6fba; }
.user-action.is-grant:hover { color: #0b3a52; }
.user-action.is-reset { color: #1e5f8a; }
.user-action.is-reset:hover { color: #0b3a52; }
.user-action.is-revoke { color: #c53030; }
.user-action.is-revoke:hover { color: #8a1c1c; }
.user-action.is-impersonate { color: #6b4f2a; }
.user-action.is-impersonate:hover { color: #3d2c14; }
.user-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.status-pill {
  display: inline-block;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.is-active {
  background: #d7f0e0;
  color: #1b6b3a;
}
.status-pill.is-pending {
  background: #fde9c9;
  color: #8a5a12;
}
.status-pill.is-revoked {
  background: #f8d7d7;
  color: #a32626;
}
.status-pill.is-deactivated {
  background: #e8eef2;
  color: #4b6270;
}
.status-pill.is-owner {
  background: #f4e4b0;
  color: #6b5208;
}

.ges-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.ges-password-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.ges-password-modal[hidden] {
  display: none !important;
}
.ges-password-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 25, 35, 0.62);
  cursor: pointer;
}
.ges-password-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  padding: 1.35rem 1.35rem 1.2rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(244, 182, 63, 0.35);
  box-shadow: 0 24px 60px rgba(7, 25, 35, 0.35);
  text-align: left;
}
.ges-password-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.ges-password-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(244, 182, 63, 0.45);
  flex: 0 0 auto;
}
.ges-password-eyebrow {
  margin: 0;
  color: #b07a12;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ges-password-card h3 {
  margin: 0.15rem 0 0;
  color: #0d2c3d;
  font-size: 1.15rem;
}
.ges-password-body {
  margin: 0 0 0.85rem;
  color: #5c656c;
  font-size: 0.9rem;
  line-height: 1.45;
}
.ges-password-form label {
  display: block;
  margin: 0 0 0.35rem;
  color: #0d2c3d;
  font-size: 0.82rem;
  font-weight: 650;
}
.ges-password-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.6rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(30, 95, 138, 0.28);
  font: inherit;
}
.ges-password-form input[type="password"]:focus {
  outline: 2px solid rgba(244, 182, 63, 0.55);
  outline-offset: 1px;
  border-color: rgba(30, 95, 138, 0.55);
}
.ges-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.ges-lightbox[hidden] {
  display: none !important;
}
.ges-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 25, 35, 0.58);
  cursor: pointer;
}
.ges-lightbox-card {
  position: relative;
  z-index: 1;
  width: min(26.5rem, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 1.7rem 1.45rem 1.3rem;
  box-shadow: 0 22px 55px rgba(7, 25, 35, 0.3);
  text-align: center;
}
.ges-lightbox-mark {
  width: 3.35rem;
  height: 3.35rem;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}
.ges-lightbox-mark.is-send {
  background: #e8f2fb;
  color: #1e6fba;
}
.ges-lightbox-mark.is-ok {
  background: #e6f6ec;
  color: #157a3c;
}
.ges-lightbox-mark.is-warn {
  background: #fff4e5;
  color: #c45c28;
}
.ges-lightbox-mark.is-send i {
  animation: ges-fly 1.1s ease-in-out infinite;
}
@keyframes ges-fly {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -3px); }
}
.ges-lightbox-card h3 {
  margin: 0 0 0.45rem;
  color: var(--navy-dark);
  font-size: 1.15rem;
}
.ges-lightbox-card p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}
.ges-lightbox-extra {
  margin: -0.35rem 0 1.1rem;
  text-align: left;
}
.ges-lightbox-link {
  width: 100%;
  display: block;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
  color: var(--navy-dark);
  font-size: 0.78rem;
  word-break: break-all;
}
.ges-lightbox.is-busy .ges-lightbox-backdrop,
.ges-lightbox.is-busy #ges-lightbox-ok {
  pointer-events: none;
}
.ges-lightbox.is-busy #ges-lightbox-ok {
  opacity: 0.45;
}

html:not(.is-booting) [data-perm][hidden] {
  display: none !important;
}

.perm-roles {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.perm-role {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.perm-role-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem;
  border: 0;
  background: var(--navy-dark);
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.perm-role-head strong {
  display: block;
  font-size: 1rem;
}
.perm-role-head em {
  font-style: normal;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}
.perm-role-head i {
  transition: transform 0.15s ease;
}
.perm-role.is-open .perm-role-head i {
  transform: rotate(180deg);
}
.perm-role-body {
  display: none;
  padding: 1rem 1.05rem 1.15rem;
}
.perm-role.is-open .perm-role-body {
  display: block;
}
.perm-group {
  margin-bottom: 1.05rem;
}
.perm-group h4 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.5rem;
}
.perm-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f7f8;
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--ink);
}
.perm-tile input {
  margin-top: 0.12rem;
  accent-color: var(--accent);
}
.perm-tile.is-on {
  background: #fff7ee;
  border-color: #e0b48a;
}
.perm-tile.is-locked {
  opacity: 0.72;
  cursor: default;
}
.perm-role-actions {
  margin-top: 0.35rem;
}

@media (max-width: 980px) {
  .kpi-grid,
  .report-grid,
  .msg-layout,
  .compose-grid,
  .mem-kpis,
  .users-kpis {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .admin-shell.nav-open .sidebar {
    transform: none;
  }
  .menu-btn { display: inline-flex; }
  .top-bar {
    flex-wrap: wrap;
    row-gap: 0.4rem;
    padding: 0.55rem 1rem;
  }
  .impersonate-banner {
    order: 4;
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .world-status-bar {
    padding: 0.4rem 0.85rem 0.5rem;
  }
  .world-status-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body.classified-mode .world-status-bar {
  display: none !important;
}

body.classified-mode .content {
  padding: 0;
  overflow: hidden;
  min-height: 0;
}

body.classified-mode #app-panel,
body.classified-mode .classified-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.classified-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.classified-status-text {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: auto;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classified-toolbar .admin-btn {
  flex: 0 0 auto;
}

.classified-error {
  margin: 0;
  padding: 0.4rem 0.75rem;
}

.classified-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 5.6rem;
  min-height: 2.1rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #d7e2e8;
  color: var(--navy);
}

.classified-pill[data-state="running"],
.classified-pill[data-state="starting"] {
  background: #d7f0e0;
  color: #146338;
}

.classified-pill[data-state="disabled"],
.classified-pill[data-state="stopped"],
.classified-pill[data-state="offline"],
.classified-pill[data-state="unknown"] {
  background: #ead7d4;
  color: #8a2a22;
}

.classified-frame {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #071923;
}

/* GES Handbook — book reader */
body.handbook-mode .content {
  padding: 0.75rem 1rem 1rem;
  min-height: 0;
}

body.handbook-mode .shell-main {
  min-height: 0;
}

body.handbook-mode #app-panel,
body.handbook-mode #section-handbook {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.handbook-shell {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1rem;
  min-height: calc(100vh - 8.5rem);
}

.handbook-toc-panel {
  background: linear-gradient(180deg, #102a3a 0%, #071923 100%);
  color: #eef4f7;
  border-radius: 12px;
  padding: 1rem 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(244, 182, 63, 0.18);
  overflow: auto;
  max-height: calc(100vh - 8.5rem);
}

.handbook-toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--amber);
}

.handbook-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.handbook-toc-chapter {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 182, 63, 0.85);
}

.handbook-toc-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #dce8ee;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.handbook-toc-link:hover,
.handbook-toc-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.handbook-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 8.5rem);
}

.handbook-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.handbook-jump-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.handbook-jump {
  min-width: 16rem;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.handbook-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.handbook-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.25);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}

.handbook-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.handbook-spread {
  display: grid;
  grid-template-columns: 1fr 10px 1fr;
  gap: 0;
  width: min(100%, 980px);
  min-height: 520px;
  filter: drop-shadow(0 18px 28px rgba(7, 25, 35, 0.22));
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.handbook-spread.is-turning {
  transform: rotateY(-4deg) translateX(-4px);
  opacity: 0.92;
}

.handbook-spread.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.handbook-spread.is-single .handbook-spine,
.handbook-spread.is-single #handbook-page-right {
  display: none;
}

.handbook-spine {
  background: linear-gradient(90deg, #5a3d22 0%, #2f1d10 45%, #120a05 50%, #2f1d10 55%, #5a3d22 100%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.45);
}

.handbook-page {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.04), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.05)),
    linear-gradient(180deg, #faf6eb 0%, #f3ead6 100%);
  border: 1px solid #d8ccb0;
  border-radius: 4px 10px 10px 4px;
  padding: 1.35rem 1.5rem 1rem;
  color: #2b2418;
  font-family: Georgia, "Times New Roman", serif;
  overflow: auto;
  position: relative;
}

.handbook-page-left.is-clickable {
  cursor: w-resize;
}

.handbook-page-right.is-clickable {
  cursor: e-resize;
}

#handbook-page-right {
  border-radius: 10px 4px 4px 10px;
}

.handbook-page[data-kind="cover"] {
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(244, 182, 63, 0.16), transparent 52%),
    linear-gradient(180deg, #102a3a 0%, #071923 100%);
  color: #f7f2e8;
  border-color: rgba(244, 182, 63, 0.35);
}

.handbook-page[data-kind="cover"] .handbook-page-head {
  display: none;
}

.handbook-cover-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.handbook-cover-mark {
  width: min(220px, 58%);
  height: auto;
  aspect-ratio: 1;
  margin: 0 0 1.15rem;
  border-radius: 50%;
  border: 2px solid rgba(244, 182, 63, 0.55);
  background: #071923;
  object-fit: cover;
}

.handbook-cover-inner h1 {
  margin: 0.5rem 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--amber);
}

.handbook-cover-kicker,
.handbook-cover-sub,
.handbook-cover-note {
  margin: 0.35rem 0;
}

.handbook-cover-kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  opacity: 0.85;
}

.handbook-cover-note {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  opacity: 0.75;
}

.handbook-page-head {
  border-bottom: 1px solid rgba(43, 36, 24, 0.12);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
}

.handbook-page-chapter {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6548;
}

.handbook-page-title {
  margin: 0.25rem 0 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.handbook-page-body {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.55;
}

.handbook-page-body h2,
.handbook-page-body h3 {
  margin: 1rem 0 0.5rem;
  line-height: 1.25;
}

.handbook-page-body p {
  margin: 0.55rem 0;
}

.handbook-page-body ul,
.handbook-page-body ol {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

.handbook-page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.86rem;
}

.handbook-page-body th,
.handbook-page-body td {
  border: 1px solid rgba(43, 36, 24, 0.18);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
}

.handbook-page-body th {
  background: rgba(11, 58, 82, 0.08);
}

.handbook-page-body code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88em;
  background: rgba(11, 58, 82, 0.08);
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
}

.handbook-page-body a {
  color: var(--teal);
}

.handbook-draft {
  color: #c62828;
  font-weight: 600;
}

.handbook-page-body .handbook-draft code {
  color: #c62828;
  background: rgba(198, 40, 40, 0.08);
}

.handbook-page-foot {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: #7a6548;
}

.handbook-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 0.85rem;
}

.handbook-page-label {
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}

.handbook-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 979px) {
  .handbook-shell {
    grid-template-columns: 1fr;
  }

  .handbook-toc-panel {
    max-height: 220px;
  }
}

@media (max-width: 720px) {
  .handbook-footer {
    grid-template-columns: 1fr 1fr;
  }

  .handbook-page-label {
    grid-column: 1 / -1;
  }

  .handbook-nav {
    width: 100%;
  }

  .handbook-page {
    padding: 1rem;
    min-height: 420px;
  }
}

/* Education setup flow — compact single-stage wizard */
.edu-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.edu-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.edu-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.edu-path-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6a7a84;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.edu-path-step:disabled {
  opacity: 0.45;
  cursor: default;
}

.edu-path-step.is-active {
  background: #0b3a52;
  color: #fff;
}

.edu-path-step.is-done {
  color: #0b3a52;
}

.edu-path-n {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(11, 58, 82, 0.12);
  font-size: 0.7rem;
  font-weight: 800;
}

.edu-path-step.is-active .edu-path-n {
  background: rgba(255, 255, 255, 0.22);
}

.edu-path-sep {
  width: 1rem;
  height: 1px;
  background: #c5d0d7;
}

.edu-top-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.edu-crumb {
  font-size: 0.82rem;
  color: #5a6b75;
  font-weight: 600;
}

.edu-defaults-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f8;
}

.edu-defaults-label {
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a6b75;
  margin-right: 0.15rem;
}

.edu-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #3d4f59;
}

.edu-inline input,
.edu-inline select {
  width: auto;
  min-width: 0;
  font: inherit;
  font-weight: 550;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--navy-dark);
}

.edu-inline input[type="number"] {
  width: 3.4rem;
}

.edu-defaults-meta {
  font-size: 0.74rem;
  color: #5a6b75;
  margin-left: auto;
}

.edu-flash {
  margin: 0;
}

.edu-stage {
  padding: 0.15rem 0 0;
}

.edu-stage-bar {
  margin: 0 0 0.65rem;
}

.edu-world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.4rem;
}

.edu-kind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.edu-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  color: var(--navy-dark);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.edu-pick:hover:not(:disabled) {
  border-color: #7aa0b4;
  background: #f4f8fa;
}

.edu-pick.is-selected {
  border-color: #0b3a52;
  background: #e8f0f5;
  box-shadow: inset 0 0 0 1px #0b3a52;
}

.edu-pick:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.edu-world.is-empty {
  opacity: 0.5;
}

.edu-world-flag {
  display: block;
  line-height: 0;
}

.edu-world-code {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.edu-world-meta,
.edu-kind-meta {
  font-size: 0.68rem;
  color: #5a6b75;
}

.edu-kind-label {
  font-weight: 750;
  font-size: 0.95rem;
}

.edu-building-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.edu-building {
  width: auto;
  flex-direction: row;
  align-items: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.edu-course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.edu-course-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.edu-course-table-wrap {
  overflow-x: auto;
}

.edu-course-table code {
  font-size: 0.78rem;
}

.edu-custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
}

.edu-field {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--navy-dark);
}

.edu-field input,
.edu-field select {
  font: inherit;
  font-weight: 500;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--navy-dark);
}

.edu-start-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
}

/* —— Alliance chat (homepage-style world tabs) —— */
body.achat-mode .content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.achat-mode #app-panel:not([hidden]),
body.achat-mode #section-alliance_chat:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.achat-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #0a1f2b;
  border: 1px solid #163044;
  overflow: hidden;
}

.achat-tabs {
  display: grid;
  grid-template-columns: repeat(25, minmax(0, 1fr));
  gap: 0;
  background: #081a24;
  border-bottom: 1px solid #163044;
  overflow-x: auto;
}

.achat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  margin: 0;
  min-width: 2.4rem;
  border: 0;
  border-right: 1px solid #163044;
  background: #0a1f2b;
  color: #8aa3ab;
  padding: 0.65rem 0.12rem 0.72rem;
  font: 700 0.68rem/1 var(--body);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.achat-tab:last-child { border-right: 0; }
.achat-tab img { width: 24px; height: 16px; object-fit: cover; display: block; }
.achat-tab .achat-tab-mark { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.achat-tab:hover { color: #e8eef0; background: #0c2734; }
.achat-tab.is-on {
  background: #0d2c3d;
  color: #e8eef0;
  box-shadow: inset 0 -3px 0 #2bb7a9;
}

.achat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #dedede;
  color: var(--ink);
}

.achat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.85rem;
  background: #e8ecee;
  border-bottom: 1px solid var(--line);
}

.achat-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.achat-head-copy .admin-muted {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
}

.achat-head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.achat-live.is-live { color: #1a7a4c; font-weight: 650; }

.achat-banner {
  margin: 0.5rem 0.85rem 0;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  background: #d9edf7;
  border: 1px solid #bce8f1;
  color: #31708f;
  font-size: 0.84rem;
}

.achat-compose {
  display: flex;
  align-items: stretch;
  margin: 0.5rem 0.85rem 0;
  border: 1px solid #9ec5d8;
  background: #fff;
}

.achat-compose-label {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  background: #eee;
  border-right: 1px solid #ccc;
  font-size: 0.8rem;
  color: #555;
  display: flex;
  align-items: center;
}

.achat-compose input,
.achat-compose textarea {
  flex: 1;
  border: 0;
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
  resize: vertical;
  min-height: 2.2rem;
}

.achat-compose input:disabled,
.achat-compose textarea:disabled {
  background: #f7f7f7;
  color: #888;
}

.achat-compose input:focus,
.achat-compose textarea:focus {
  outline: none;
}

.achat-add-xlate {
  flex: 0 0 auto;
  border: 0;
  border-left: 1px solid #9ec5d8;
  background: #eef6fb;
  color: #1e5f8a;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  white-space: nowrap;
}

.achat-add-xlate:hover:not(:disabled) {
  background: #dceef8;
  color: #0b3a52;
}

.achat-add-xlate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.achat-xlate-status {
  margin: 0.25rem 0.85rem 0;
  font-size: 0.78rem;
}

.achat-messages {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0.15rem 0.75rem 0.85rem;
  overflow: auto;
  flex: 1;
  min-height: 12rem;
  background: #fff;
}

.achat-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.12rem 0;
  font-size: 0.86rem;
  line-height: 1.3;
  border-bottom: 0;
}

.achat-time {
  flex: 0 0 auto;
  color: #555;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.achat-world {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1e5f8a;
  background: #e6f0f5;
  padding: 0.02rem 0.28rem;
  border-radius: 2px;
}
.achat-user {
  flex: 0 0 auto;
  display: inline-block;
  padding: 0.02rem 0.32rem;
  border-radius: 2px;
  background: #5bc0de;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}
.achat-body {
  flex: 1 1 auto;
  min-width: 0;
  color: #222;
  word-break: break-word;
}
.achat-body.is-en { color: #163044; }
.achat-xlate,
.msg-xlate {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #1e5f8a;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.achat-xlate:hover,
.msg-xlate:hover { color: #0b3a52; }
.achat-xlate:disabled,
.msg-xlate:disabled { opacity: 0.5; cursor: wait; text-decoration: none; }

.msg-bubble .msg-xlate {
  display: inline-block;
  margin: 0.2rem 0 0.15rem;
}
.msg-bubble pre.msg-body.is-en {
  color: #163044;
}
.achat-mod {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: 0.15rem;
}
.achat-del {
  margin: 0;
  padding: 0.08rem 0.28rem;
  border: 0;
  border-radius: 2px;
  background: #d9534f;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 0.68rem;
}
.achat-del:hover { background: #c9302c; }
.achat-del:disabled { opacity: 0.5; cursor: wait; }
.achat-ban { position: relative; }
.achat-ban-toggle {
  margin: 0;
  padding: 0.08rem 0.35rem;
  border: 0;
  border-radius: 2px;
  background: #d9534f;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.achat-ban-toggle:hover { background: #c9302c; }
.achat-unban {
  margin: 0;
  padding: 0.08rem 0.35rem;
  border: 0;
  border-radius: 2px;
  background: #5cb85c;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.achat-unban:hover { background: #449d44; }
.achat-ban-toggle::after {
  content: "";
  display: inline-block;
  margin-left: 0.28rem;
  vertical-align: middle;
  border-top: 0.28rem solid #fff;
  border-right: 0.22rem solid transparent;
  border-left: 0.22rem solid transparent;
}
.achat-ban-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.12rem);
  z-index: 40;
  min-width: 8.5rem;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 3px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.14);
}
.achat-ban.is-open .achat-ban-menu { display: block; }
.achat-ban-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.32rem 0.7rem;
  border: 0;
  background: none;
  color: #222;
  text-align: left;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.achat-ban-menu button:hover { background: #f5f7f9; }
.achat-ban-menu [data-achat-unban] {
  color: #3c763d;
  font-weight: 700;
  border-top: 1px solid #e6ebe8;
}
.achat-ban-menu [data-achat-unban]:hover { background: #eef8ee; }
.achat-deleted { color: #808080; font-style: italic; }
.achat-empty { padding: 0.75rem 0.85rem; font-size: 0.88rem; }

/* —— GES ops modules (DIS / Personnel) — friend-parity layout, GES tokens —— */
.ops-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ops-head {
  margin: 0 0 0.25rem;
}
.ops-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}
.ops-head p {
  margin: 0.45rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
}
.ops-card {
  background: var(--white);
  border: 2px solid var(--ops-border);
  border-radius: 8px;
  box-shadow: var(--ops-shadow);
  padding: 1.5rem;
  margin-bottom: 0;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.ops-card:hover {
  box-shadow: var(--ops-shadow-hover);
}
.ops-card h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
}
.ops-underline-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--white);
  border: 2px solid var(--ops-border);
  border-radius: 8px;
  box-shadow: var(--ops-shadow);
  padding: 0 0.5rem;
  border-bottom-width: 2px;
  /* overflow-x:auto alone computes overflow-y to auto and shows a bogus
     vertical scrollbar when tabs are ~1–2px taller than the box. */
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
}
.ops-underline-tabs .dar-tab,
.ops-underline-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  border-radius: 0;
  padding: 1rem 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -2px;
}
.ops-underline-tabs .dar-tab:hover {
  color: #334155;
  border-bottom-color: #cbd5e1;
}
.ops-underline-tabs .dar-tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  background: transparent;
  box-shadow: none;
}
.dar-tab[hidden],
.ops-underline-tabs .dar-tab[hidden] {
  display: none !important;
}

.dar-workspace {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dar-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.dar-stats[hidden],
.dar-panel[hidden],
.ops-card[hidden],
.stat-card[hidden] {
  display: none !important;
}
.dar-stat {
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ops-border);
  box-shadow: var(--ops-shadow);
}
.dar-stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.dar-stat strong {
  font-size: 1.35rem;
  color: var(--navy-dark);
  font-weight: 700;
}
.dar-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dar-tab {
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy-dark);
  border-radius: 8px;
  padding: 0.48rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dar-tab:hover { background: #eef5f8; }
.dar-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.dar-submit-card { padding: 1.5rem; }
.dar-form-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}
.dar-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.15rem;
  margin-bottom: 1rem;
}
.dar-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dar-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
.dar-field label,
.ops-card .dar-field label {
  margin: 0;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
}
.dar-field-narrow { max-width: 12rem; }

/* Friend-parity controls: white inputs, gray border, comfortable padding */
.ops-card .dar-field input[type="text"],
.ops-card .dar-field input[type="number"],
.ops-card .dar-field input[type="search"],
.ops-card .dar-field input[type="date"],
.ops-card .dar-field input[type="password"],
.ops-card .dar-field select,
.ops-card .dar-field textarea,
.dar-submit-card .dar-field input[type="text"],
.dar-submit-card .dar-field input[type="number"],
.dar-submit-card .dar-field input[type="search"],
.dar-submit-card .dar-field input[type="date"],
.dar-submit-card .dar-field select,
.dar-submit-card .dar-field textarea,
.dar-filters input,
.dar-filters select {
  width: 100%;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.925rem;
  padding: 0.55rem 0.9rem;
  box-shadow: none;
}
.ops-card .dar-field textarea,
.dar-submit-card .dar-field textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}
.ops-card .dar-field input:focus,
.ops-card .dar-field select:focus,
.ops-card .dar-field textarea:focus,
.dar-submit-card .dar-field input:focus,
.dar-submit-card .dar-field select:focus,
.dar-submit-card .dar-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 58, 82, 0.15);
}
.ops-card .dar-field input[type="file"],
.dar-submit-card .dar-field input[type="file"] {
  width: 100%;
  padding: 0.4rem 0;
  background: transparent;
  border: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.dar-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}
.dar-form-actions .admin-btn.primary {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
}
.dar-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.dar-filters .admin-btn { align-self: end; }
.dar-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Data tables (friend list pattern) */
.ops-table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
}
.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.ops-table th {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 2px solid #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ops-table td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid #eef2f6;
  color: #1e293b;
  vertical-align: middle;
}
.ops-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}
.ops-table tbody tr:hover {
  background: #f8fafc;
}
.ops-table .ops-empty td {
  text-align: center;
  color: #94a3b8;
  padding: 2rem 1rem;
  cursor: default;
}
.ops-table .ops-empty:hover { background: transparent; }

.dar-case-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.dar-case-card:hover {
  border-color: var(--navy);
  background: #fff;
}
.dar-case-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.dar-case-subject { font-weight: 600; color: #0f172a; }
.dar-case-summary {
  color: #475569;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dar-case-meta { font-size: 0.78rem; color: #64748b; }
.dar-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0d2c3d;
  white-space: nowrap;
}
.dar-badge-submitted { background: #fef3c7; color: #92400e; }
.dar-badge-under_review { background: #dbeafe; color: #1e40af; }
.dar-badge-escalated { background: #ffedd5; color: #9a3412; }
.dar-badge-closed_action { background: #dcfce7; color: #166534; }
.dar-badge-closed_not_sustained { background: #e2e8f0; color: #475569; }
.dar-badge-voided { background: #fee2e2; color: #991b1b; }
.dar-detail-card { margin-top: 0.25rem; }
.dar-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.dar-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.dar-meta-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}
.dar-meta-item span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.dar-meta-item strong {
  font-size: 0.88rem;
  color: #0f172a;
  word-break: break-word;
}
.dar-pre {
  white-space: pre-wrap;
  margin: 0;
  font: inherit;
  color: #334155;
}
.dar-evidence-list,
.dar-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.dar-evidence-item,
.dar-timeline-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  background: #fff;
}
.dar-evidence-upload,
.dar-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.dar-review-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}
.dar-points-block { margin-top: 1rem; }

/* RLM build sync */
.rbs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.rbs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.rbs-folders {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.rbs-folder {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: #0f2740;
  cursor: pointer;
}
.rbs-folder.is-active {
  border-color: #1e5f8a;
  background: #f4f8fb;
}
.rbs-scan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-end;
}
.rbs-scan-row label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
}
.rbs-scan-row select {
  min-width: 6rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.rbs-list {
  display: grid;
  gap: 0.55rem;
}
.rbs-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.55rem;
}
.rbs-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.rbs-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.82rem;
  color: #475569;
}
.rbs-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.rbs-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.rbs-badge-missing { background: #fee2e2; color: #991b1b; }
.rbs-badge-tbc { background: #fef3c7; color: #92400e; }
.rbs-rename {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.65rem 0.75rem;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
}
.rbs-recommend {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.88rem;
  color: #78350f;
}
.rbs-recommend strong { color: #0f172a; }
.rbs-rename label {
  display: grid;
  gap: 0.2rem;
  flex: 1 1 14rem;
  font-size: 0.78rem;
}
.rbs-rename input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

/* Case Management */
.cm-page .cm-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}
.cm-stat {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cm-stat:hover,
.cm-stat.is-active,
.cm-stat[aria-pressed="true"] {
  border-color: #1e5f8a;
  background: #f4f8fb;
}
.cm-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}
@media (max-width: 980px) {
  .cm-workspace { grid-template-columns: 1fr; }
  .cm-page .cm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cm-queue {
  position: sticky;
  top: 0.75rem;
  display: grid;
  gap: 0.65rem;
  max-height: calc(100vh - 8rem);
}
.cm-queue-folders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
.cm-folder {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #0f2740;
  cursor: pointer;
}
.cm-folder.is-active {
  border-color: #1e5f8a;
  background: #f4f8fb;
}
.cm-queue-search input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.cm-queue-more {
  margin-top: 0.45rem;
}
.cm-queue-more summary {
  cursor: pointer;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
}
.cm-queue-filters {
  margin-top: 0.55rem;
}
.cm-queue-list {
  overflow: auto;
  max-height: calc(100vh - 16rem);
  display: grid;
  gap: 0.4rem;
  padding-right: 0.15rem;
}
.cm-queue-empty {
  padding: 0.75rem 0.25rem;
}
.cm-queue-item {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  display: grid;
  gap: 0.28rem;
}
.cm-queue-item:hover { background: #f8fafc; }
.cm-queue-item.is-active {
  border-color: #1e5f8a;
  background: #f4f8fb;
  box-shadow: inset 3px 0 0 #1e5f8a;
}
.cm-queue-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.cm-queue-title {
  font-size: 0.88rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.3;
}
.cm-queue-meta {
  font-size: 0.75rem;
  color: #64748b;
}
.cm-empty {
  min-height: 420px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
  color: #334155;
}
.cm-empty i {
  font-size: 1.8rem;
  color: #1e5f8a;
}
.cm-empty h3 { margin: 0; }
.cm-detail-header {
  align-items: flex-start;
}
.cm-detail-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cm-detail-sub {
  margin: 0.25rem 0 0;
  max-width: 42rem;
}
.cm-detail-tabs {
  margin: 0.85rem 0 0.35rem;
}
.cm-meta-wide {
  grid-column: 1 / -1;
}
.cm-meta-wide strong {
  white-space: pre-wrap;
  font-weight: 500;
}
.cm-details-block {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #fafbfc;
}
.cm-details-block > summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f2740;
  list-style: none;
}
.cm-details-block > summary::-webkit-details-marker { display: none; }
.cm-details-block > summary i { margin-right: 0.35rem; color: #1e5f8a; }
.cm-detail .cm-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.cm-section {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
.cm-section-head {
  margin-bottom: 0.75rem;
}
.cm-section-head h3 {
  margin: 0 0 0.2rem;
}
.cm-section-head .admin-muted {
  margin: 0;
}
.cm-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.55rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.cm-row { cursor: pointer; }
.cm-row:hover { background: #f1f5f9; }
.cm-priority {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
}
.cm-priority-urgent { background: #fee2e2; color: #991b1b; }
.cm-priority-high { background: #ffedd5; color: #9a3412; }
.cm-priority-medium { background: #e0f2fe; color: #075985; }
.cm-priority-low { background: #f1f5f9; color: #475569; }
.dar-badge-open { background: #dbeafe; color: #1e40af; }
.dar-badge-investigating { background: #ffedd5; color: #9a3412; }
.dar-badge-pending_meeting { background: #fef3c7; color: #92400e; }
.dar-badge-closed { background: #dcfce7; color: #166534; }
.dar-badge-archived { background: #e2e8f0; color: #475569; }
.cm-paste-zone {
  border: 1.5px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  padding: 1.1rem 1rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-top: 0.65rem;
}
.cm-paste-zone:hover,
.cm-paste-zone:focus,
.cm-paste-zone.is-drag {
  border-color: #1e5f8a;
  background: #eff6ff;
}
.cm-paste-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  color: #334155;
}
.cm-paste-zone-inner i {
  font-size: 1.35rem;
  color: #1e5f8a;
  margin-bottom: 0.2rem;
}
.cm-paste-zone-inner span {
  font-size: 0.82rem;
  color: #64748b;
}
.cm-paste-zone kbd,
.cm-section-head kbd {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dar-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
}
.dar-check input {
  margin-top: 0.2rem;
}
#cm-notice-apply-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}
.cm-paste-preview {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.cm-pending-item,
.cm-evidence-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.cm-pending-item img,
.cm-ev-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #e2e8f0;
}
.cm-log-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  margin-bottom: 0.25rem;
}
.cm-log-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
}
.cm-log-body {
  word-break: break-word;
  color: #0f172a;
}
.cm-log-body.gai-md p {
  margin: 0 0 0.55rem;
}
.cm-log-body.gai-md p:last-child {
  margin-bottom: 0;
}
.cm-log-body.gai-md strong {
  font-weight: 700;
  color: #0f172a;
}
.cm-log-body.gai-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #0f172a;
}

.ops-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 960px) {
  .ops-split { grid-template-columns: 1fr; }
  .dar-filters { grid-template-columns: 1fr 1fr; }
}

.wstats-scroll {
  max-height: 22rem;
  overflow: auto;
}
.wstats-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wstats-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(234, 245, 246, 0.08);
  font-size: 0.92rem;
}
.wstats-list li:last-child { border-bottom: 0; }
.wstats-clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.wstats-geo-row { margin: 0 0 0.85rem; }
.wstats-geo-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.wstats-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(234, 245, 246, 0.12);
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.wstats-bar > span {
  display: block;
  height: 100%;
  background: var(--amber, #f4b63f);
  border-radius: inherit;
}

/* —— Website stats traffic desk —— */
#section-website_stats {
  --wdesk-navy: #063544;
  --wdesk-deep: #0a4a58;
  --wdesk-cyan: #3ec8e0;
  --wdesk-sea: #1aa3b5;
  --wdesk-ink: #eaf6f8;
  --wdesk-copy: #c5dce0;
  --wdesk-muted: #8fb0b6;
  --wdesk-line: rgba(62, 200, 224, 0.28);
  --wdesk-display: "Bebas Neue", Impact, sans-serif;
}
#section-website_stats > .wdesk-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: t100-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.wdesk-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1.35rem;
  border-radius: 16px;
  color: var(--wdesk-ink);
  background:
    radial-gradient(ellipse 72% 80% at 0% -12%, rgba(62, 200, 224, 0.28), transparent 52%),
    radial-gradient(ellipse 50% 50% at 100% 0%, rgba(26, 163, 181, 0.18), transparent 48%),
    linear-gradient(135deg, var(--wdesk-navy), var(--wdesk-deep) 62%, #0d5a62);
  border: 1px solid var(--wdesk-line);
  box-shadow: 0 16px 36px rgba(7, 25, 35, 0.22);
}
.wdesk-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wdesk-cyan), #7ee0c8, transparent);
}
.wdesk-hero-copy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.wdesk-eyebrow {
  margin: 0 0 0.3rem;
  color: var(--wdesk-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.wdesk-hero h2 {
  margin: 0;
  font: 2.8rem/0.9 var(--wdesk-display);
  letter-spacing: 0.04em;
}
.wdesk-lede {
  margin: 0.5rem 0 0;
  max-width: 38rem;
  color: var(--wdesk-copy);
  font-size: 0.94rem;
  line-height: 1.4;
}
.wdesk-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.95rem;
}
.wdesk-window {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--wdesk-line);
  color: var(--wdesk-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wdesk-window select {
  border: 0;
  background: transparent;
  color: var(--wdesk-ink);
  font: inherit;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.wdesk-window select option { color: #1e293b; }
.wdesk-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 200, 224, 0.45);
  background: rgba(62, 200, 224, 0.14);
  color: var(--wdesk-cyan);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.wdesk-refresh:hover {
  background: var(--wdesk-cyan);
  color: var(--wdesk-navy);
}
.wdesk-updated {
  color: var(--wdesk-muted);
  font-size: 0.78rem;
}
.wdesk-hero-mark {
  position: relative;
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--wdesk-cyan);
  font-size: 1.8rem;
}
.wdesk-hero-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 200, 224, 0.42), transparent 70%);
  filter: blur(6px);
  animation: t100-pulse 2.8s ease-in-out infinite;
}
.wdesk-pulse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  border: 1px solid #d5e2ea;
  background: linear-gradient(90deg, rgba(62, 200, 224, 0.14), transparent 46%), #fff;
}
.wdesk-pulse[data-mood="hot"] {
  background: linear-gradient(90deg, rgba(244, 182, 63, 0.2), transparent 50%), #fff;
}
.wdesk-pulse[data-mood="cold"] {
  background: linear-gradient(90deg, rgba(15, 47, 64, 0.08), transparent 50%), #fff;
}
.wdesk-pulse-mood {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wdesk-sea);
}
.wdesk-pulse[data-mood="hot"] .wdesk-pulse-mood { color: #b07a12; }
.wdesk-pulse[data-mood="cold"] .wdesk-pulse-mood { color: #64748b; }
.wdesk-pulse-copy h3 {
  margin: 0.12rem 0 0;
  font: 1.65rem/1 var(--wdesk-display);
  letter-spacing: 0.04em;
  color: var(--navy-dark);
}
.wdesk-pulse-copy p:last-child {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 38rem;
}
.wdesk-pulse-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.wdesk-delta {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(62, 200, 224, 0.18);
  color: #0b6b78;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}
.wdesk-pulse[data-mood="hot"] .wdesk-delta {
  background: rgba(244, 182, 63, 0.2);
  color: #8a5a08;
}
.wdesk-spark {
  width: 8.75rem;
  height: 2.25rem;
  color: var(--wdesk-sea);
  display: block;
}
.wdesk-pulse[data-mood="hot"] .wdesk-spark { color: #d39a22; }
.wdesk-maint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px dashed #c5d4dc;
  background: #f7fbfc;
}
.wdesk-maint strong {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy-dark);
}
.wdesk-maint p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.wdesk-maint p.is-on { color: #b42318; font-weight: 700; }
.wdesk-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.wdesk-kpi {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d5e2ea;
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.05);
}
.wdesk-kpi-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.wdesk-kpi-value {
  margin: 0.25rem 0 0;
  font: 1.85rem/1 var(--wdesk-display);
  letter-spacing: 0.03em;
  color: var(--navy-dark);
}
.wdesk-kpi-meta {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}
.wdesk-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
}
.wdesk-panel-wide { grid-column: auto; }
.wdesk-panel {
  background: #fff;
  border: 1px solid #d5e2ea;
  border-radius: 14px;
  padding: 0.95rem 1rem 1.1rem;
  min-width: 0;
}
.wdesk-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e8eef2;
}
.wdesk-panel-head h3 {
  margin: 0;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wdesk-panel-head h3 i { color: var(--wdesk-sea); }
.wdesk-panel-head span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.wdesk-daily { min-height: 12rem; }
.wdesk-chart {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  height: 14rem;
}
.wdesk-chart.is-compact { gap: 0.16rem; }
.wdesk-chart.is-ultra { gap: 0.08rem; }
.wdesk-day {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  animation: wdesk-rise 0.45s ease both;
}
.wdesk-day-plot {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}
.wdesk-day-col {
  width: 100%;
  max-width: 1.55rem;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--wdesk-cyan), var(--wdesk-sea));
  box-shadow: 0 6px 12px rgba(26, 163, 181, 0.18);
}
.wdesk-day.is-peak .wdesk-day-col {
  background: linear-gradient(180deg, #f4b63f, #d39a22);
  box-shadow: 0 6px 12px rgba(211, 154, 34, 0.22);
}
.wdesk-chart.is-ultra .wdesk-day-col { max-width: none; border-radius: 3px 3px 1px 1px; }
.wdesk-day-lbl {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  min-height: 0.9em;
}
.wdesk-empty {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.wdesk-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.wdesk-bar { animation: wdesk-rise 0.4s ease both; }
.wdesk-bar-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
}
.wdesk-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy-dark);
  font-weight: 650;
}
.wdesk-bar-track {
  height: 0.38rem;
  border-radius: 999px;
  background: #e6eef2;
  overflow: hidden;
  margin: 0.3rem 0 0;
}
.wdesk-bar-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wdesk-sea), var(--wdesk-cyan));
}
.wdesk-bar-meta {
  margin: 0.22rem 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}
.wdesk-pages { display: flex; flex-direction: column; gap: 0.7rem; }
.wdesk-hit {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: 0.65rem;
  align-items: start;
  animation: wdesk-rise 0.4s ease both;
}
.wdesk-page-rank {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f6f8;
  color: #0b6b78;
  font-size: 0.7rem;
  font-weight: 800;
}
.wdesk-page-path {
  margin: 0;
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wdesk-page-n {
  font: 1.15rem/1 var(--wdesk-display);
  letter-spacing: 0.03em;
  color: var(--navy-dark);
}
@keyframes wdesk-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 960px) {
  .wdesk-kpis, .wdesk-split { grid-template-columns: 1fr 1fr; }
  .wdesk-pulse { flex-direction: column; align-items: stretch; }
  .wdesk-pulse-side { align-items: flex-start; }
}
@media (max-width: 640px) {
  .wdesk-kpis, .wdesk-split { grid-template-columns: 1fr; }
  .wdesk-hero h2 { font-size: 2.15rem; }
  .wdesk-hero-mark { display: none; }
}

/* —— Notifications —— */
.notify-bell-wrap {
  position: relative;
}
.notify-bell {
  position: relative;
  min-width: 2.4rem;
}
.notify-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  font-size: 0.68rem;
  line-height: 1.1rem;
}
.notify-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  width: min(24rem, 92vw);
  background: var(--navy-mid);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(7, 25, 35, 0.45);
  z-index: 50;
  padding: 0;
  overflow: hidden;
  color: #e8eef2;
}
.notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0;
}
.notify-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.notify-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  justify-content: flex-end;
}
.notify-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7eb8d4;
  cursor: pointer;
  white-space: nowrap;
}
.notify-link:hover {
  color: #b7d9ea;
  text-decoration: underline;
}
.notify-link.is-danger {
  color: #f07178;
}
.notify-link.is-danger:hover {
  color: #ff9aa0;
}
.notify-link.is-muted {
  color: #a8b4bc;
}
.notify-link.is-muted:hover {
  color: #d5dee5;
}
.notify-list {
  display: flex;
  flex-direction: column;
  max-height: 20rem;
  overflow-y: auto;
  min-height: 5.5rem;
}
.notify-empty {
  margin: 0;
  padding: 2.25rem 1rem;
  text-align: center;
  color: #8a9aa4;
  font-size: 0.9rem;
}
.notify-row {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.notify-row:last-child {
  border-bottom: 0;
}
.notify-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.75rem 2.2rem 0.75rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: #e8eef2;
}
.notify-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.notify-item strong {
  font-size: 0.88rem;
  color: #fff;
}
.notify-item span {
  font-size: 0.78rem;
  color: #a8b4bc;
  line-height: 1.35;
}
.notify-row.is-unread .notify-item {
  background: rgba(244, 182, 63, 0.1);
  box-shadow: inset 3px 0 0 var(--amber, #f4b63f);
}
.notify-row.is-unread .notify-item:hover {
  background: rgba(244, 182, 63, 0.16);
}
.notify-item time {
  font-size: 0.68rem;
  color: #6f818c;
}
.notify-delete {
  position: absolute;
  top: 0.45rem;
  right: 0.4rem;
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6f818c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.notify-delete:hover {
  color: #f07178;
  background: rgba(240, 113, 120, 0.12);
}
.notify-panel-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.55rem 0.95rem;
  text-align: center;
}
.notify-inbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(7, 25, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.notify-inbox-card {
  width: min(36rem, 100%);
  max-height: min(90vh, 40rem);
  background: #fff;
  border: 2px solid var(--ops-border, #c5d0d8);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(7, 25, 35, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notify-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #e8eef2;
}
.notify-inbox-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--navy-dark);
}
.notify-inbox-head .notify-link {
  color: #6a7883;
  font-size: 1rem;
}
.notify-inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  padding: 0.55rem 1.1rem;
  border-bottom: 1px solid #e8eef2;
}
.notify-inbox-toolbar .admin-btn {
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
}
.notify-inbox-toolbar .admin-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.notify-inbox-toolbar .notify-link {
  color: var(--navy);
}
.notify-inbox-toolbar .notify-link.is-danger {
  color: #c23b44;
  margin-left: auto;
}
.notify-inbox-list {
  flex: 1;
  overflow-y: auto;
  min-height: 12rem;
}
.notify-inbox-list .notify-item {
  color: inherit;
  padding-right: 2.4rem;
}
.notify-inbox-list .notify-item strong {
  color: var(--navy-dark);
}
.notify-inbox-list .notify-item span {
  color: #6a7883;
}
.notify-inbox-list .notify-item time {
  color: #8a9aa4;
}
.notify-inbox-list .notify-item:hover {
  background: #f7f9fb;
}
.notify-inbox-list .notify-row.is-unread .notify-item {
  background: #fff8e8;
  box-shadow: inset 3px 0 0 var(--amber, #f4b63f);
}
.notify-inbox-list .notify-empty {
  color: #8a9aa4;
}
.notify-inbox-list .notify-delete {
  color: #9aa7b0;
}
.notify-inbox-list .notify-delete:hover {
  color: #c23b44;
  background: #fde8ea;
}

/* —— Discord verification logs —— */
.vl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.85rem;
}
.vl-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #445560;
}
.vl-toolbar select,
.vl-toolbar input {
  padding: 0.4rem 0.55rem;
  border: 1px solid #c5d0d8;
  border-radius: 6px;
  font: inherit;
}
.vl-search-wrap {
  flex: 1;
  min-width: 12rem;
}
.vl-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.vl-status-completed { color: #2f7d4a; }
.vl-status-failed,
.vl-status-abandoned { color: #c23b44; }
.vl-status-expired { color: #c45c28; }
.vl-status-pending { color: var(--navy); }

/* —— Administrative Dashboard —— */
.ad-toolbar {
  margin-bottom: 0.85rem;
}
.ad-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
}
.ad-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #445560;
}
.ad-filters select {
  min-width: 8.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #c5d0d8;
  border-radius: 6px;
  font: inherit;
  color: var(--navy-dark);
  background: #fff;
}
.ad-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}
.ad-status-line {
  margin: 0.75rem 0 0;
}
#section-admin_dashboard .chart-wrap-tall {
  min-height: 22rem;
}

/* —— Task Management —— */
#section-tasks .ops-page {
  gap: 0.65rem;
}
#section-tasks .ops-head {
  margin: 0;
}
#section-tasks .ops-head h2 {
  font-size: 1.28rem;
  line-height: 1.2;
}
#section-tasks .ops-head p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
}
#section-tasks .ops-underline-tabs {
  border: 0;
  border-bottom: 1px solid #d5dee6;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}
#section-tasks .ops-underline-tabs .dar-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.75rem 0.52rem;
  font-size: 0.8rem;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  box-shadow: none !important;
}
#section-tasks .ops-underline-tabs .dar-tab i {
  font-size: 0.78rem;
  opacity: 0.85;
}
#section-tasks .ops-underline-tabs .dar-tab:hover {
  color: #334155 !important;
  border-bottom-color: #cbd5e1 !important;
}
#section-tasks .ops-underline-tabs .dar-tab.is-active {
  color: var(--navy) !important;
  border-bottom-color: var(--navy) !important;
  background: transparent !important;
}
#section-tasks .ops-underline-tabs .dar-tab.is-active i {
  opacity: 1;
}
#section-tasks #tasks-create-panel.ops-card {
  border-width: 1px;
  border-radius: 6px;
  box-shadow: none;
  padding: 1rem 1.1rem;
}
#section-tasks #tasks-create-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.ops-head:has(.tasks-head-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0;
}
.tasks-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tasks-dash {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 6px;
  overflow: hidden;
}
.tasks-kpi {
  flex: 1 1 7.5rem;
  background: transparent;
  border: 0;
  border-right: 1px solid #e8eef2;
  border-radius: 0;
  padding: 0.5rem 0.7rem 0.55rem;
  min-width: 0;
}
.tasks-kpi:last-child {
  border-right: 0;
}
.tasks-kpi-label {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tasks-kpi strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--navy-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tasks-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.tasks-widget {
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 6px;
  padding: 0.6rem 0.7rem 0.65rem;
  min-width: 0;
}
.tasks-widget h3 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}
.tasks-widget-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.1rem 0;
}
.tasks-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
}
.tasks-search-wrap {
  position: relative;
  flex: 1;
  min-width: 12rem;
  display: block;
}
.tasks-search-wrap i {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.78rem;
  pointer-events: none;
}
.tasks-list-toolbar input[type="search"] {
  width: 100%;
  min-width: 0;
  padding: 0.42rem 0.65rem 0.42rem 2rem;
  border: 1px solid #c5d0d8;
  border-radius: 6px;
  font: inherit;
  font-size: 0.86rem;
}
.tasks-count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.tasks-table-wrap {
  margin: 0;
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 6px;
  overflow: auto;
}
.tasks-table {
  font-size: 0.84rem;
}
.tasks-table th {
  padding: 0.5rem 0.65rem;
  background: #f7fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}
.tasks-table td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}
.tasks-table tbody tr:hover {
  background: #f8fbfd;
}
.tasks-title-cell {
  min-width: 14rem;
  max-width: 28rem;
}
.tasks-title {
  display: block;
  font-size: 0.88rem;
  color: var(--navy-dark);
  line-height: 1.25;
}
.tasks-row-body {
  font-size: 0.76rem;
  margin-top: 0.18rem;
  color: #64748b;
  line-height: 1.35;
}
.tasks-row-note {
  font-size: 0.74rem;
  margin-top: 0.22rem;
  color: #8a6a14;
  line-height: 1.35;
}
.tasks-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  background: #eef2f6;
  color: #475569;
}
.tasks-pill.is-done { background: #e8f6ee; color: #157a3c; }
.tasks-pill.is-progress { background: #e8f0f8; color: #0b3a52; }
.tasks-pill.is-wait { background: #fff6e5; color: #9a6700; }
.tasks-pill.is-cancel { background: #f3f4f6; color: #6b7280; }
.tasks-pill.is-open { background: #eef2f6; color: #334155; }
.tasks-pill.priority.is-hot { background: #fde8e8; color: #b42318; }
.tasks-pill.priority.is-high { background: #fff1e6; color: #c2410c; }
.tasks-pill.priority.is-normal { background: #eef2f6; color: #475569; }
.tasks-pill.priority.is-low { background: #f1f5f9; color: #64748b; }
.tasks-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 12rem;
}
.tasks-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tasks-due,
.tasks-created {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #475569;
  font-size: 0.8rem;
}
.tasks-actions-col,
.tasks-row-actions {
  width: 1%;
  white-space: nowrap;
}
.tasks-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-end;
}
.tasks-action {
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
  gap: 0.3rem;
}
.tasks-action i { font-size: 0.72rem; }
.tasks-empty {
  text-align: center;
  padding: 1.25rem 0.75rem !important;
}
.tasks-status-select {
  padding: 0.28rem 0.35rem;
  border: 1px solid #c5d0d8;
  border-radius: 6px;
  font-size: 0.76rem;
}
@media (max-width: 900px) {
  .tasks-action span { display: none; }
}
.tasks-widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tasks-widget-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #eef2f5;
}
.tasks-widget-list li:last-child {
  border-bottom: 0;
}
.tasks-widget-list li strong {
  font-size: 0.86rem;
  color: var(--navy-dark);
}
@media (max-width: 1100px) {
  .tasks-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .tasks-kpi { flex-basis: calc(50% - 1px); }
  .tasks-widgets { grid-template-columns: 1fr; }
}
.tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.task-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid #d5dee5;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #f7fafb 100%);
}
.task-card-main {
  min-width: 0;
  flex: 1;
}
.task-card-main p {
  margin: 0.25rem 0;
  color: #445560;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .dar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dar-form-grid,
  .dar-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .dar-stats { grid-template-columns: 1fr 1fr; }
  .dar-form-grid,
  .dar-detail-grid { grid-template-columns: 1fr; }
  .task-card { flex-direction: column; }
}

@media (max-width: 900px) {
  .achat-tabs { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .achat-row { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .edu-course-head {
    flex-direction: column;
  }

  .edu-defaults-meta {
    margin-left: 0;
    width: 100%;
  }
}


/* —— Alliance transports (Logistics) —— */
.xport-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 1180px;
}
.xport-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.xport-top-copy h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.xport-top-copy p {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}
.xport-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-right: 0.55rem;
  white-space: nowrap;
}
.xport-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}
.xport-dot.green { background: #1f9d4b; }
.xport-dot.amber { background: #d97706; }
.xport-dot.red { background: #dc2626; }
.xport-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.xport-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.xport-check input { margin: 0; }

.xport-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}
.xport-kpi {
  appearance: none;
  border: 1px solid #d7dee8;
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  min-height: 3.35rem;
}
.xport-kpi:hover {
  border-color: #94a3b8;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.xport-kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}
.xport-kpi-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.35rem;
  font-weight: 750;
  color: var(--navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.xport-kpi.is-green { border-left: 3px solid #1f9d4b; }
.xport-kpi.is-green .xport-kpi-value { color: #146c2e; }
.xport-kpi.is-amber { border-left: 3px solid #d97706; }
.xport-kpi.is-amber .xport-kpi-value { color: #9a6700; }
.xport-kpi.is-red { border-left: 3px solid #dc2626; }
.xport-kpi.is-red .xport-kpi-value { color: #b91c1c; }

.xport-toolbar {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.xport-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  min-width: 5.5rem;
}
.xport-field span,
.xport-inline span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.xport-field input,
.xport-field select,
.xport-inline select {
  height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 0.55rem;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
  min-width: 0;
}
.xport-field input:focus,
.xport-field select:focus,
.xport-inline select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(11, 58, 82, 0.12);
}
.xport-field-grow { flex: 1 1 10rem; min-width: 9rem; }

.xport-progress {
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  padding: 0.65rem 0.8rem 0.7rem;
}
.xport-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.xport-progress-meta span {
  font-size: 0.88rem;
  font-weight: 650;
  color: #0f172a;
}
.xport-progress-meta strong {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.xport-progress-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #e8edf3;
  overflow: hidden;
}
.xport-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b3a52 0%, #1a6b8a 100%);
  transition: width 0.35s ease;
}
.xport-progress.is-running .xport-progress-fill {
  background: linear-gradient(90deg, #0b3a52 0%, #c98512 55%, #0b3a52 100%);
  background-size: 200% 100%;
  animation: xport-progress-shine 1.4s linear infinite;
}
.xport-progress.is-waiting .xport-progress-fill {
  width: 35% !important;
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 50%, #94a3b8 100%);
  background-size: 200% 100%;
  animation: xport-progress-shine 1.1s linear infinite;
}
.xport-progress.is-waiting .xport-progress-meta span {
  color: #9a6700;
}
.xport-progress-detail {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}
@keyframes xport-progress-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.xport-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr);
  gap: 0.65rem;
  align-items: start;
}
.xport-panel {
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  overflow: hidden;
  min-height: 12rem;
}
.xport-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e8edf3;
  background: #f8fafc;
}
.xport-panel-head h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.xport-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.xport-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.xport-inline select {
  width: 4.25rem;
  height: 1.7rem;
  font-size: 0.8rem;
}
.xport-table-wrap {
  overflow: auto;
  max-height: min(58vh, 34rem);
}
.xport-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.xport-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
}
.xport-table td {
  padding: 0.42rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  vertical-align: middle;
}
.xport-table tbody tr:hover td {
  background: #f8fafc;
}
.xport-table tbody tr:last-child td {
  border-bottom: none;
}
.xport-col-world {
  font-weight: 700;
  color: var(--navy);
  width: 3.2rem;
}
.xport-col-owner { font-weight: 600; }
.xport-col-vehicle,
.xport-col-mission {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xport-mission-id {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.xport-col-age,
.xport-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.xport-col-action { width: 1%; white-space: nowrap; }
.xport-clear-btn {
  padding: 0.2rem 0.55rem !important;
  font-size: 0.75rem !important;
  min-height: 0 !important;
  line-height: 1.2 !important;
}
.xport-band {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.1rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.xport-band-green { background: #e8f8ee; color: #146c2e; }
.xport-band-amber { background: #fff4df; color: #9a6700; }
.xport-band-red { background: #fde8e8; color: #b91c1c; }
.xport-row-amber td:first-child { box-shadow: inset 3px 0 0 #d97706; }
.xport-row-red td:first-child { box-shadow: inset 3px 0 0 #dc2626; }

.xport-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem 0.85rem;
  max-height: min(58vh, 34rem);
  overflow: auto;
}
.xport-card {
  border: 1px solid #d7dee8;
  border-radius: 8px;
  padding: 0.65rem 0.75rem 0.7rem;
  background: #fff;
  border-left: 3px solid #1f9d4b;
  display: grid;
  gap: 0.28rem;
}
.xport-card-amber { border-left-color: #d97706; }
.xport-card-red { border-left-color: #dc2626; }
.xport-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.xport-card-age {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.xport-card-owner {
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--navy);
  line-height: 1.2;
}
.xport-card-mission {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.3;
}
.xport-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #64748b;
}
.xport-card-world {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--navy);
}
.xport-card-world img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
}
.xport-flag-fallback {
  font-weight: 700;
}
.xport-card-vehicle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}
.xport-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.15rem;
}

.xport-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}
.xport-empty-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: #64748b;
}
.xport-empty-hint {
  margin: 0.4rem auto 0;
  max-width: 22rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #94a3b8;
}
#section-transports .admin-error {
  margin-top: 0.15rem;
}
@media (max-width: 960px) {
  .xport-grid { grid-template-columns: 1fr; }
  .xport-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.intel-shell { padding: 0.85rem 1rem 1.1rem; }
.intel-toolbar {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.intel-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  min-width: 6rem;
}
.intel-field span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-field input,
.intel-field select {
  height: 2.15rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 0.55rem;
  font-size: 0.88rem;
  color: #0f172a;
  background: #fff;
}
.intel-field-grow { flex: 1 1 16rem; min-width: 12rem; }
.intel-result { margin-top: 0.35rem; }
.intel-card {
  border: 1px solid #d7dee8;
  border-radius: 12px;
  padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.intel-card-warn { border-left: 3px solid #d97706; }
.intel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.intel-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-name {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 750;
  color: var(--navy);
  line-height: 1.15;
}
.intel-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
}
.intel-facts dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}
.intel-facts dd.is-muted {
  font-weight: 500;
  color: #94a3b8;
}
.intel-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.intel-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}
.intel-panel-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  margin: 0;
}
.intel-kv dt {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-kv dd {
  margin: 0.12rem 0 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}
.intel-kv dd.is-muted {
  font-weight: 500;
  color: #94a3b8;
}
.intel-alliance-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.intel-alliance-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d7dee8;
  background: #f1f5f9;
  flex: 0 0 auto;
}
.intel-alliance-meta {
  min-width: 0;
  flex: 1 1 auto;
}
.intel-alliance-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--navy);
  line-height: 1.25;
  text-decoration: none;
  word-break: break-word;
}
a.intel-alliance-name:hover {
  text-decoration: underline;
}
.intel-alliance-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 550;
  line-height: 1.3;
}
.intel-alliance-sub a {
  color: #1e5f8a;
  font-weight: 650;
  text-decoration: none;
}
.intel-alliance-sub a:hover {
  text-decoration: underline;
}
.intel-panel-section h5 {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-panel-section .intel-bio {
  max-height: 10rem;
}
.intel-panel-section .admin-muted {
  margin: 0;
  font-size: 0.82rem;
}
.intel-toplist {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d2137 0%, #16324f 55%, #1a3a5c 100%);
  color: #e8eef5;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(13, 33, 55, 0.18);
}
a.intel-toplist:hover {
  filter: brightness(1.05);
}
.intel-toplist-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  flex: 0 0 auto;
  box-shadow: 0 4px 10px rgba(190, 18, 60, 0.35);
}
.intel-toplist-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}
.intel-toplist-text {
  min-width: 0;
  flex: 1 1 auto;
}
.intel-toplist-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}
.intel-toplist-name {
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
  line-height: 1.2;
}
.intel-toplist-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #e8c547;
  color: #1a1508;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.intel-toplist-sub {
  margin: 0.28rem 0 0;
  font-size: 0.86rem;
  color: #9fb3c8;
  font-weight: 500;
}
.intel-toplist-num {
  color: #5eead4;
  font-weight: 750;
}
.intel-toplist-total {
  color: #9fb3c8;
  font-weight: 500;
}
.intel-toplist-note {
  color: #7f95ab;
  font-size: 0.78rem;
  font-weight: 500;
}
.intel-toplist-bot {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fda4af;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.intel-local {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8edf3;
}
.intel-local h4 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--navy);
}
.intel-verified {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  font-size: 0.85rem;
}
.intel-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
}
.intel-identity-text { min-width: 0; }
.intel-avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d7dee8;
  background: #f1f5f9;
  flex: 0 0 auto;
}
.intel-avatar-empty {
  background: repeating-linear-gradient(
    -45deg,
    #f8fafc,
    #f8fafc 6px,
    #eef2f7 6px,
    #eef2f7 12px
  );
}
.intel-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d7dee8;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.intel-pill.is-on {
  border-color: rgba(21, 128, 61, 0.28);
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
}
.intel-pill.is-off {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
}
.intel-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.intel-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid #c9d4e2;
  background: #fff;
  color: #1e5f8a;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.intel-icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}
.intel-icon-btn:hover {
  background: rgba(30, 95, 138, 0.08);
  border-color: #1e5f8a;
}
.intel-icon-btn.is-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
}
.intel-icon-btn.is-danger:hover {
  background: rgba(185, 28, 28, 0.08);
  border-color: #b91c1c;
}
.intel-icon-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  color: #94a3b8;
}
.intel-block {
  margin-top: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
}
.intel-block h4 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.intel-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.intel-split + .intel-block,
.intel-facts + .intel-split {
  /* spacing handled by margin-top on children */
}
.intel-card > .intel-block {
  margin-top: 0.85rem;
}
.intel-caption-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #475569;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.3;
  word-break: break-word;
}
.intel-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.intel-role-chips li {
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #d7dee8;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
}
.intel-bio {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #0f172a;
  max-height: 16rem;
  overflow: auto;
}
.intel-compose {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #cfe0f0;
  border-radius: 10px;
  background: #f0f7fc;
}
.intel-compose[hidden] {
  display: none !important;
}
.intel-compose textarea {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c9d4e2;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
  background: #fff;
}
.intel-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
@media (max-width: 720px) {
  .intel-split { grid-template-columns: 1fr; }
  .intel-panels { grid-template-columns: 1fr; }
  .intel-kv { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .xport-grid { grid-template-columns: 1fr; }
  .xport-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ut-toolbar {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.ut-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.ut-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.ut-row:hover { border-color: #1e5f8a; }
.ut-avatar, .ut-detail-avatar, .ut-dc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #d7dee8;
  background: #f1f5f9;
  flex: 0 0 auto;
}
.ut-detail-avatar { width: 72px; height: 72px; }
.ut-dc-avatar { width: 48px; height: 48px; border-radius: 50%; }
.ut-avatar-empty {
  background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 6px, #eef2f7 6px, #eef2f7 12px);
}
.ut-row-main { min-width: 0; flex: 1; }
.ut-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: center;
}
.ut-row-top strong {
  color: var(--navy);
  font-size: 0.92rem;
}
.ut-world-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.ut-world {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.05rem 0.28rem;
}
.ut-row-sub {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #64748b;
}
.ut-alli-logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
}
.ut-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #d7dee8;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
}
.ut-pill.is-in {
  color: #15803d;
  background: rgba(21, 128, 61, 0.1);
  border-color: rgba(21, 128, 61, 0.28);
}
.ut-pill.is-former {
  color: #b45309;
  background: rgba(180, 83, 9, 0.1);
  border-color: rgba(180, 83, 9, 0.28);
}
.ut-pill.is-watch {
  color: #1e5f8a;
  background: rgba(30, 95, 138, 0.1);
  border-color: rgba(30, 95, 138, 0.28);
}
.ut-pill.is-probation {
  color: #a16207;
  background: rgba(161, 98, 7, 0.12);
  border-color: rgba(161, 98, 7, 0.35);
}
.ut-watch-banner {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid #a16207;
  background: rgba(161, 98, 7, 0.08);
  color: #713f12;
  font-size: 0.88rem;
  line-height: 1.35;
}
.ut-pill.is-current {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.28);
  margin-left: 0.35rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.ut-timeline li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}
.ut-timeline li > span:last-child {
  flex: 1 1 100%;
  color: #64748b;
  font-size: 0.82rem;
}
.ut-discord-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
}
.ut-detail-view { margin-top: 0.5rem; }
.ut-detail-bar { margin-bottom: 0.65rem; }
.ut-detail-card {
  border: 1px solid #d7dee8;
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.ut-person-head {
  margin-bottom: 0.5rem;
}
.ut-person-head h3 {
  margin: 0.15rem 0 0.35rem;
  color: var(--navy);
  font-size: 1.35rem;
}
.ut-alias-line {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}
.ut-alias-line strong {
  color: #334155;
  font-weight: 650;
}
.ut-loading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.65rem 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.9rem;
}
.ut-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #cbd5e1;
  border-top-color: var(--navy, #1e3a5f);
  border-radius: 50%;
  display: inline-block;
  animation: ut-spin 0.7s linear infinite;
  flex: 0 0 auto;
}
@keyframes ut-spin {
  to { transform: rotate(360deg); }
}
.ut-group {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8edf3;
}
.ut-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0.35rem 0.15rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  text-align: left;
}
.ut-group-toggle:hover {
  color: var(--navy);
}
.ut-toggle-hint {
  margin-left: auto;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #1e5f8a;
  font-size: 0.78rem;
}
.ut-worlds-collapsed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0 0.15rem;
}
.ut-worlds-hint {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
}
.ut-filter-label {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  vertical-align: middle;
}
.ut-activity-world-chips {
  margin-bottom: 0.55rem;
}
.ut-world-row {
  cursor: pointer;
}
.ut-world-row:hover,
.ut-world-row:focus-visible {
  background: #f1f5f9;
  outline: none;
}
.ut-name-text {
  display: block;
  color: var(--navy, #1e3a5f);
}
.ut-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8edf3;
  font-size: 0.9rem;
  color: #64748b;
}
.ut-crumb-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #1e5f8a;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ut-crumb-link:hover {
  color: var(--navy, #1e3a5f);
}
.ut-crumb-sep {
  color: #94a3b8;
}
.ut-crumb-current {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #334155;
  font-weight: 600;
}
.ut-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.ut-activity-item {
  padding: 0.55rem 0.65rem;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #fff;
}
.ut-activity-when {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.ut-activity-msg {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.35;
}
.ut-activity-msg .ut-world-cell {
  margin: 0 0.1rem;
}
.ut-group-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}
.ut-dc-mark {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
.ut-world-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.25rem;
}
.ut-world-cell .flag-img {
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.ut-alias-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}
.ut-alias-chip {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}
.ut-alias-chip em {
  font-style: normal;
  color: #64748b;
  font-weight: 600;
}
.ut-alias-chip.is-on,
.ut-alias-chip:hover {
  border-color: rgba(30, 58, 95, 0.35);
  background: #eef4fb;
  color: var(--navy);
}
.ut-alias-inline,
.ut-name-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.ut-alias-inline:hover,
.ut-name-link:hover {
  text-decoration: underline;
}
.ut-flag img {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  margin-right: 0.15rem;
}
.ut-bot-banner {
  margin: 0.45rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #9a3412;
  font-weight: 700;
  font-size: 0.88rem;
}
.ut-bot-banner img {
  width: 14px;
  height: 14px;
}
.ut-bot-worlds {
  display: block;
  margin-top: 0.15rem;
  color: #9a3412;
  font-size: 0.78rem;
}
.ut-row-top .ut-flag {
  margin-left: 0.2rem;
}
.ut-dc-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.ut-dc-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: #f8fafc;
}
.ut-dc-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.ut-dc-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.65rem;
  min-width: 0;
}
.ut-dc-main strong {
  color: var(--navy);
}
.ut-dc-main code {
  font-size: 0.78rem;
  color: #64748b;
}
.ut-worlds-wrap {
  overflow-x: auto;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
}
.ut-worlds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.ut-worlds-table th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e8edf3;
  background: #f8fafc;
  white-space: nowrap;
}
.ut-worlds-table td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ut-worlds-table td strong {
  display: block;
  color: var(--navy);
}
.ut-world-row {
  cursor: pointer;
}
.ut-world-row:hover,
.ut-world-row.is-open {
  background: #f1f5f9;
}
.ut-world-hist td {
  background: #fafbfc;
  padding: 0.65rem 0.75rem;
}
.ut-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.ut-flag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid transparent;
}
.ut-flag.is-online {
  color: #166534;
  background: rgba(22, 101, 52, 0.1);
  border-color: rgba(22, 101, 52, 0.25);
}
.ut-flag.is-offline {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.ut-flag.is-bot {
  color: #9a3412;
  background: rgba(154, 52, 18, 0.1);
  border-color: rgba(154, 52, 18, 0.25);
}
.ut-seen-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  color: #334155;
  font-size: 0.85rem;
}
.ut-seen-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.ut-row-actions {
  white-space: nowrap;
}
.ut-row-actions .admin-btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
}
.ut-accounts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.ut-account-card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 0.85rem;
  background: #fff;
}
.ut-detail-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ut-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.ut-detail-head h3 {
  margin: 0.15rem 0 0.35rem;
  color: var(--navy);
  font-size: 1.25rem;
}
.ut-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.86rem;
  color: #334155;
}
.ut-detail-actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.ut-hist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.ut-block {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #fff;
}
.ut-block-wide { grid-column: 1 / -1; }
.ut-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}
.ut-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ut-timeline li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.84rem;
}
.ut-timeline span {
  color: #64748b;
  font-size: 0.75rem;
}
.ut-link-form { margin-top: 0.75rem; }
.ut-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: end;
}
@media (max-width: 900px) {
  .ut-hist-grid { grid-template-columns: 1fr; }
}


body.abuild-mode .content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem 1rem 1rem;
}
body.abuild-mode #app-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
body.abuild-mode #section-alliance_builder:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.abuild-shell {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.abuild-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.abuild-head-copy { min-width: 0; flex: 1 1 14rem; }
.abuild-head .lead { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.abuild-head-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.abuild-modes {
  display: flex;
  gap: 0.3rem;
  padding: 0.15rem;
  background: #eef2f6;
  border-radius: 999px;
}
.abuild-mode {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.abuild-mode.is-active {
  background: var(--navy);
  color: #fff;
}
.abuild-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem;
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  min-height: 0;
}
.abuild-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.abuild-chip {
  appearance: none;
  border: 1px solid #d7dee8;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
}
.abuild-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.abuild-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
.abuild-stats .kpi-card { padding: 0.4rem 0.5rem; }
.abuild-stats .kpi-value { font-size: 1.05rem; }
.abuild-search input {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.84rem;
}
.abuild-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #64748b;
}
.ab-poi-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 8rem;
  max-height: 18rem;
  overflow: auto;
}
.ab-poi-empty {
  margin: 0;
  padding: 0.7rem 0.4rem;
  color: #64748b;
  font-size: 0.78rem;
}
.ab-poi-item {
  appearance: none;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  font: inherit;
}
.ab-poi-item strong {
  display: block;
  color: var(--navy);
  font-size: 0.82rem;
  line-height: 1.2;
}
.ab-poi-item span {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.7rem;
}
.ab-poi-item:hover { border-color: #b07a12; }
.ab-poi-item.is-active {
  border-color: var(--navy);
  background: #e8eef2;
}
.ab-poi-item.is-owned strong { color: #0f766e; }
.abuild-more {
  border-top: 1px solid #e8eef2;
  padding-top: 0.35rem;
}
.abuild-more summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}
.abuild-more[open] summary { margin-bottom: 0.4rem; }
.abuild-xy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.abuild-more-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.abuild-extend-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.abuild-extend-status > div {
  padding: 0.4rem 0.5rem;
  background: #f8fafc;
  border: 1px solid #e8eef2;
  border-radius: 8px;
}
.abuild-k {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.abuild-tabs { display: none; }
.abuild-split {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.abuild-shell .kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.abuild-shell .kpi-card { padding: 0.55rem 0.5rem; }
.abuild-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.abuild-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; font-size: 0.8rem; }
.abuild-field span { color: var(--muted); font-weight: 600; }
.abuild-map-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #dbe4ea;
}
#ab-map,
.abuild-map-wrap .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.abuild-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 500;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
}
.abuild-legend .leg-row img { display: block; }
.leaflet-marker-icon.rlm-map-icon { background: transparent; border: none; }
.ab-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.ab-dot.needed { background: #c45c28; }
#ab-log {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  max-height: 7rem;
  overflow: auto;
  background: #071923;
  color: #e2e8f0;
  padding: 0.55rem;
  border-radius: 8px;
  white-space: pre-wrap;
}
.abuild-col .list { max-height: 14rem; overflow: auto; margin-top: 0.5rem; }
.ab-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.4rem;
  background: #fff;
}
.ab-item .meta { color: var(--muted); font-size: 0.75rem; margin-top: 0.15rem; }
.badge-owned { color: #0f766e; font-weight: 700; }
.badge-needed { color: #c45c28; font-weight: 700; }
.ab-popup { display: flex; flex-direction: column; gap: 0.35rem; min-width: 10rem; }
.ab-popup .meta { color: #64748b; font-size: 0.75rem; }
.ab-popup-build { margin-top: 0.15rem; width: 100%; }
.abuild-shell .status-ok { color: #0f766e; font-weight: 700; }
.abuild-shell .status-bad { color: #b42318; font-weight: 700; }
#ab-rlmPoi { height: 9rem; width: 100%; }
@media (max-width: 1100px) {
  .abuild-split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(16rem, 42vh) minmax(0, 1fr);
  }
  .abuild-map-wrap {
    order: -1;
    height: auto;
    min-height: 16rem;
  }
}
@media (max-width: 720px) {
  #section-alliance_builder {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
  .abuild-shell { gap: 0.6rem; }
  .abuild-head {
    align-items: stretch;
    gap: 0.55rem;
  }
  .abuild-head h2 { font-size: 1.15rem; }
  .abuild-head .lead { font-size: 0.82rem; }
  .abuild-head-actions { min-width: 0; width: 100%; }
  .abuild-modes { width: 100%; }
  .abuild-mode { flex: 1 1 auto; text-align: center; }
  .abuild-shell .admin-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .abuild-shell .admin-btn,
  .abuild-shell select,
  .abuild-shell input {
    width: 100%;
    min-height: 2.65rem;
    font-size: 16px;
  }
  .abuild-shell .inner-tab {
    min-height: 2.65rem;
  }
  .abuild-map-wrap {
    height: min(48vh, 22rem);
    touch-action: none;
    border-radius: 8px;
  }
  .abuild-legend {
    left: 8px;
    bottom: 8px;
    padding: 0.3rem 0.45rem;
    font-size: 0.68rem;
    max-width: calc(100% - 72px);
  }
  .abuild-col .list { max-height: 11rem; }
  #ab-log { max-height: 5.5rem; font-size: 0.68rem; }
  #ab-rlmPoi { height: 7.5rem; }
  .ab-popup { min-width: 0; max-width: min(78vw, 18rem); }
  .ab-popup-build { min-height: 2.65rem; }
  .leaflet-control-zoom a {
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
  }
  .leaflet-popup-content { margin: 0.7rem 0.85rem; }
}

.ab-confirm {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
}
.ab-confirm[hidden] {
  display: none !important;
}
.ab-confirm-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 25, 35, 0.62);
  cursor: pointer;
}
.ab-confirm-card {
  position: relative;
  z-index: 1;
  width: min(26.5rem, 100%);
  padding: 1.25rem 1.25rem 1.15rem;
  border-radius: 14px;
  background: linear-gradient(165deg, #0d2430 0%, #071923 100%);
  border: 1px solid rgba(244, 182, 63, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: left;
  color: #e8eef1;
}
.ab-confirm-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.ab-confirm-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(244, 182, 63, 0.45);
  flex: 0 0 auto;
}
.ab-confirm-eyebrow {
  margin: 0;
  color: #f4b63f;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ab-confirm-sub {
  margin: 0.2rem 0 0;
  color: #9db0bb;
  font-size: 0.82rem;
}
.ab-confirm-card h3 {
  margin: 0 0 0.45rem;
  color: #f7fafb;
  font-size: 1.15rem;
}
.ab-confirm-card p {
  margin: 0 0 0.85rem;
  color: #c5d0d6;
  font-size: 0.92rem;
  line-height: 1.45;
}
.ab-confirm-facts {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}
.ab-confirm-facts > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem;
}
.ab-confirm-facts dt {
  margin: 0;
  color: #8fa3ae;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ab-confirm-facts dd {
  margin: 0;
  color: #e8eef1;
  font-size: 0.88rem;
  font-weight: 600;
}
.ab-confirm-notes,
.ab-confirm-check {
  display: block;
  margin: 0 0 0.85rem;
  color: #c5d0d6;
  font-size: 0.88rem;
}
.ab-confirm-notes[hidden],
.ab-confirm-check[hidden] {
  display: none !important;
}
.ab-confirm-notes span,
.ab-confirm-check span {
  display: block;
  margin-bottom: 0.35rem;
  color: #9db0bb;
  font-size: 0.78rem;
  font-weight: 650;
}
.ab-confirm-notes textarea,
.ab-confirm-notes input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f7fafb;
  padding: 0.55rem 0.7rem;
}
.ab-confirm-hint {
  display: block;
  margin-top: 0.35rem;
  color: #f4b63f;
  font-size: 0.78rem;
}
.ab-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.ab-confirm-actions .admin-btn {
  border-radius: 8px;
  min-height: 2.45rem;
  min-width: 6.5rem;
}
.ab-confirm-actions .admin-btn:not(.primary) {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ab-confirm-actions .admin-btn.primary {
  background: #c9a227;
  border-color: #c9a227;
  color: #071923;
}
.ab-confirm-list {
  color: #c5d0d6;
}
.ab-confirm-list li {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(244, 182, 63, 0.22);
  color: #e8eef1;
}
.ab-confirm-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
}
.ab-confirm-check input {
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  .ab-confirm-actions {
    flex-direction: column-reverse;
  }
  .ab-confirm-actions .admin-btn {
    width: 100%;
    font-size: 16px;
  }
  .ab-confirm-facts > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* ---- Daily ops briefing ---- */
.brief-toolbar { gap: 0.5rem; align-items: end; }
.brief-toolbar label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; }
.brief-toolbar input[type="date"] {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
.brief-root { display: flex; flex-direction: column; gap: 0.85rem; }
.brief-world-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.brief-world-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.brief-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: #f3f6f8;
  color: #355;
}
.brief-pill.is-ok { background: #e7f6ec; color: #176338; border-color: #b7e0c4; }
.brief-pill.is-wait { background: #fff6e5; color: #8a5a00; border-color: #f0d49a; }
.brief-banner {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7fafb;
}
.brief-banner.is-wait { background: #fff8eb; border-color: #f0d49a; }
.brief-banner p { margin: 0.35rem 0 0; }
.brief-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.55rem;
}
.brief-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.brief-kpi-label { font-size: 0.72rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; }
.brief-kpi-value { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.brief-kpi-hint { font-size: 0.72rem; color: var(--muted); }
.brief-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
}
.brief-card h3 { margin: 0 0 0.55rem; font-size: 0.95rem; }
.brief-stat-line { margin: 0 0 0.45rem; font-size: 0.88rem; line-height: 1.45; }
.brief-list { list-style: none; margin: 0; padding: 0; }
.brief-list li {
  padding: 0.35rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 0.84rem;
  line-height: 1.4;
}
.brief-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  margin-right: 0.25rem;
  background: #e8eef2;
  color: #355;
}
.brief-tag.accepted { background: #e7f6ec; color: #176338; }
.brief-tag.denied { background: #fde8e8; color: #9b1c1c; }
.brief-tag.pending { background: #fff6e5; color: #8a5a00; }
.brief-delta.is-up { color: #176338; font-weight: 700; }
.brief-delta.is-down { color: #9b1c1c; font-weight: 700; }
.brief-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}
.brief-world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.55rem;
}
.brief-world-tile {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfd;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font: inherit;
  font-size: 0.8rem;
}
.brief-world-tile:hover { border-color: #8eb6c9; background: #f0f7fb; }
.brief-world-tile.is-wait { background: #fffaf0; }
.brief-world-tile-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.brief-world-tile-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.brief-subh { margin: 0 0 0.35rem; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.brief-olist { margin: 0; padding-left: 1.2rem; }
.brief-olist li { padding: 0.28rem 0; font-size: 0.84rem; line-height: 1.4; }
.brief-card-warn { border-color: #f0d49a; background: #fffdf7; }
.brief-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
}
.brief-compare-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfd;
  padding: 0.65rem 0.75rem;
}
.brief-compare-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
}
.brief-compare-card .admin-muted {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
}
.brief-compare-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
  padding: 0.22rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.78rem;
}
.brief-compare-row span:nth-child(2) {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .brief-compare-row {
    grid-template-columns: 1fr auto;
  }
  .brief-compare-row span:nth-child(2) {
    display: none;
  }
}

/* Build map (admin RLM test) */
.bmap-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: calc(100vh - 8rem);
}
.bmap-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
}
.bmap-head h2 { margin: 0; }
.bmap-head .lead { margin: 0.25rem 0 0; color: var(--muted); max-width: 42rem; }
.bmap-head-actions { display: flex; flex-direction: column; gap: 0.35rem; min-width: min(14rem, 100%); }
.bmap-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; }
.bmap-field span { color: var(--muted); font-weight: 600; }
.bmap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.bmap-search {
  display: flex;
  gap: 0.35rem;
  flex: 1;
  min-width: min(16rem, 100%);
  align-items: center;
}
.bmap-search input { flex: 1; min-width: 0; }
.bmap-split {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 0.75rem;
  flex: 1;
  min-height: 28rem;
}
@media (max-width: 960px) {
  .bmap-split { grid-template-columns: 1fr; }
}
.bmap-side { display: flex; flex-direction: column; gap: 0.65rem; min-height: 0; }
.bmap-map-wrap {
  position: relative;
  min-height: 28rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #e8eef2;
}
#bmap-map { position: absolute; inset: 0; }
.bmap-legend {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 500;
  background: color-mix(in srgb, var(--panel, #111) 88%, transparent);
  color: var(--text, #eee);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.35;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.bmap-legend .leg-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.bmap-leg-hint { color: var(--muted, #9aa); font-size: 0.7rem; margin-top: 0.2rem; }
.bmap-pin {
  background: transparent !important;
  border: 0 !important;
}
.leaflet-marker-icon.bmap-map-icon {
  background: transparent !important;
  border: 0 !important;
}
.bmap-owned-marker {
  background: transparent !important;
  border: 0 !important;
}
.bmap-owned-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 52px;
  pointer-events: none;
}
.bmap-owned-pin img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #0c121c;
  border: 2px solid #c9a227;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.bmap-owned-pin em {
  display: inline-block;
  margin: 0;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(12, 18, 28, 0.94);
  border: 1px solid rgba(201, 162, 39, 0.55);
  color: #e6c35c;
  font: 700 0.58rem/1 system-ui, sans-serif;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.bmap-owned-marker.is-prison .bmap-owned-pin em {
  border-color: rgba(171, 71, 188, 0.7);
  color: #e1bee7;
}
.bmap-owned-marker.is-hospital .bmap-owned-pin em {
  border-color: rgba(229, 57, 53, 0.7);
  color: #ffcdd2;
}
.bmap-owned-marker.is-academy .bmap-owned-pin em {
  border-color: rgba(33, 150, 243, 0.7);
  color: #bbdefb;
}
.bmap-owned-pin span { display: none; }
.bmap-legend .leg-row img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.25rem;
}
.bmap-pin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font: 700 0.7rem/1 system-ui, sans-serif;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.bmap-pin-hospital .bmap-pin-badge,
.bmap-pin-badge.bmap-pin-hospital { background: #c62828; }
.bmap-pin-prison .bmap-pin-badge,
.bmap-pin-badge.bmap-pin-prison { background: #6a1b9a; }
.bmap-pin-owned .bmap-pin-badge,
.bmap-pin-badge.bmap-pin-owned {
  background: #c9a227;
  color: #1a1200;
  font-size: 0.55rem;
  width: 26px;
  height: 26px;
}
.bmap-pin.leaflet-div-icon {
  background: transparent;
  border: 0;
}
.bmap-suggest-panel {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel, #111) 92%, transparent);
}
.bmap-suggest-panel h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.bmap-suggest-form {
  display: grid;
  gap: 0.55rem;
  max-width: 36rem;
}
.bmap-suggest-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 4rem;
}
.bmap-toolbar .is-suggest-on {
  outline: 2px solid var(--accent, #3b82f6);
}
#bmap-map.bmap-suggest-cursor {
  cursor: crosshair;
}
.bmap-pin-suggest .bmap-pin-badge {
  background: #1565c0;
}
.bmap-queue { max-height: 14rem; overflow: auto; }
.bmap-req {
  padding: 0.55rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.84rem;
}
.bmap-req:first-child { border-top: 0; }
.bmap-req .meta { color: var(--muted); font-size: 0.75rem; margin-top: 0.15rem; }
.bmap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
  align-items: center;
}
.bmap-actions select { max-width: 5.5rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Official changelog */
.changelog-shell { display: grid; gap: 1.25rem; }
.changelog-composer h3 { margin: 0 0 0.35rem; }
.changelog-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.changelog-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.changelog-form input,
.changelog-form textarea {
  width: 100%;
  border: 1px solid var(--border, #d0d7de);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: var(--surface, #fff);
  color: inherit;
}
.changelog-form-actions { display: flex; gap: 0.5rem; }
.changelog-list { display: grid; gap: 1rem; }
.changelog-card {
  border: 1px solid var(--border, #d0d7de);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--surface, #fff);
}
.changelog-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.changelog-doc {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.changelog-title {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  line-height: 1.25;
}
.changelog-card-meta {
  display: grid;
  gap: 0.15rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
}
.changelog-summary {
  margin: 0.75rem 0;
  line-height: 1.45;
}
.changelog-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.changelog-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.75rem;
}
@media (min-width: 860px) {
  .changelog-grid {
    grid-template-columns: 1fr 1fr;
  }
  .changelog-why { grid-column: 1 / -1; }
}
.changelog-grid h4 {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.changelog-grid p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}
.changelog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.changelog-audience-fieldset {
  border: 1px solid var(--border, #d0d7de);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0;
}
.changelog-audience-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 700;
  font-size: 0.82rem;
}
.changelog-audience {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
}
.changelog-audience-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: inherit;
  font-size: 0.88rem;
}
.changelog-card.is-unread {
  border-color: #c9a227;
  box-shadow: inset 3px 0 0 #c9a227;
}
.changelog-chips { margin: 0.35rem 0 0.55rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

.changelog-summary-block {
  margin: 0.35rem 0 0.55rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid #0a3d32;
  background: rgba(6, 32, 24, 0.04);
}
.changelog-summary-block h4 {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a3d32;
}
.changelog-summary { margin: 0; line-height: 1.45; }
.changelog-pdf-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 18, 16, 0.72);
}
.changelog-pdf-viewer[hidden] { display: none !important; }
body.changelog-pdf-open { overflow: hidden; }
.changelog-pdf-dialog {
  width: min(980px, 96vw);
  height: min(90vh, 920px);
  display: grid;
  grid-template-rows: auto 1fr;
  background: #f7f4ef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.changelog-pdf-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: #062018;
  color: #f4efe6;
}
.changelog-pdf-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a227;
}
.changelog-pdf-title {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}
.changelog-pdf-head-actions {
  display: flex;
  gap: 0.45rem;
  flex-shrink: 0;
}
.changelog-pdf-head .admin-btn {
  background: transparent;
  color: #f4efe6;
  border-color: rgba(244,239,230,0.45);
}
.changelog-pdf-head .admin-btn:hover {
  background: rgba(255,255,255,0.08);
}
.changelog-pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ddd;
}

.changelog-discord-send {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.changelog-discord-send select {
  min-width: 9rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border, #c9d1d9);
  background: #fff;
  font: inherit;
}

/* �� Swear categoriser slideshow (Restrictions) �� */
.rest-slideshow-card {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(251, 191, 36, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(14, 165, 233, 0.12), transparent 50%),
    var(--white);
}
.rest-slideshow-head h3 {
  margin-bottom: 0.35rem;
}
.rest-slideshow-head p {
  margin: 0 0 0.85rem;
  max-width: 42rem;
}
.rest-slideshow-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.rest-slideshow {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1.25rem 1.35rem 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}
.rest-show-word {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}
.rest-show-was {
  margin: 0.35rem 0 0.9rem;
  font-size: 0.9rem;
  color: #64748b;
}
.rest-show-line {
  margin: 0 auto 1.15rem;
  max-width: 36rem;
  padding: 0.85rem 1rem;
  border: none;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  border-radius: 0 8px 8px 0;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #334155;
  font-style: italic;
}
.rest-show-line.rest-show-pop {
  animation: rest-show-in 0.35s ease;
}
@keyframes rest-show-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.rest-show-highlight {
  font-style: normal;
  font-weight: 800;
  color: #b45309;
  background: #fde68a;
  padding: 0.05em 0.25em;
  border-radius: 4px;
}
.rest-show-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}
.rest-sev-minor {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
}
.rest-sev-moderate {
  background: #fff7ed !important;
  border-color: #fdba74 !important;
  color: #9a3412 !important;
}
.rest-sev-severe {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}
.rest-sev-not {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #334155 !important;
}
#rest-show-flash {
  min-height: 1.2em;
  margin: 0.25rem 0 0;
}

/* —— GESAdmin AI Chat (Chief / Command) —— */
.gai-page .ops-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gai-status {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}
.gai-status.is-ready {
  color: #0f766e;
  font-weight: 600;
}
.gai-shell {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: min(68vh, 620px);
  padding: 1.2rem 1.3rem 1.3rem;
}
.gai-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.gai-prompt {
  border: 1px solid #dbe4ee;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.gai-prompt:hover {
  border-color: var(--navy);
  background: #f0f7fb;
  color: var(--navy);
}
.gai-log {
  flex: 1;
  min-height: 280px;
  max-height: min(54vh, 520px);
  overflow: auto;
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(11, 58, 82, 0.04), transparent 55%),
    #f4f7fa;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.gai-empty {
  margin: auto 0;
  text-align: center;
  padding: 2rem 1.25rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 28rem;
  align-self: center;
}
.gai-empty strong {
  display: block;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.gai-empty p {
  margin: 0;
}
.gai-msg {
  max-width: min(92%, 42rem);
  padding: 0.75rem 1rem;
  border-radius: 14px;
  line-height: 1.55;
  animation: gai-in 0.22s ease;
}
@keyframes gai-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.gai-msg.is-user {
  align-self: flex-end;
  background: linear-gradient(160deg, var(--navy) 0%, #0a4a68 100%);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.gai-msg.is-user .gai-msg-meta {
  color: rgba(255, 255, 255, 0.65);
}
.gai-msg.is-user .gai-msg-body {
  color: #fff;
  white-space: pre-wrap;
}
.gai-msg.is-ai {
  align-self: flex-start;
  max-width: min(100%, 56rem);
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(11, 58, 82, 0.05);
  border-bottom-left-radius: 5px;
}
.gai-msg.is-ai:has(.gai-table-wrap) {
  max-width: 100%;
  width: 100%;
}
.gai-msg.is-ai .gai-msg-meta {
  color: #64748b;
}
.gai-msg.is-ai .gai-msg-body {
  color: #1e293b;
}
.gai-msg.is-thinking {
  opacity: 0.92;
}
.gai-msg-meta {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  font-weight: 650;
  margin-bottom: 0.28rem;
  text-transform: none;
}
.gai-msg-body {
  word-break: break-word;
  font-size: 0.95rem;
}
.gai-md {
  white-space: normal;
}
.gai-md p {
  margin: 0 0 0.65rem;
}
.gai-md p:last-child {
  margin-bottom: 0;
}
.gai-md .gai-h {
  margin: 0.15rem 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.gai-md .gai-list {
  margin: 0.2rem 0 0.65rem;
  padding-left: 1.15rem;
}
.gai-md .gai-list li {
  margin: 0.2rem 0;
}
.gai-md .gai-hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 0.75rem 0;
}
.gai-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.gai-md .gai-code {
  margin: 0.4rem 0 0.7rem;
  padding: 0.65rem 0.75rem;
  background: #0b3a52;
  color: #e2e8f0;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.82rem;
}
.gai-md .gai-code code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.gai-table-wrap {
  overflow: auto;
  margin: 0.45rem 0 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.gai-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.9rem;
}
.gai-table th,
.gai-table td {
  padding: 0.55rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #eef2f6;
  vertical-align: top;
  line-height: 1.45;
}
.gai-table th {
  background: #f8fafc;
  color: var(--navy);
  font-weight: 650;
  white-space: nowrap;
}
.gai-table tbody th {
  white-space: normal;
}
.gai-table tr:last-child td {
  border-bottom: 0;
}
/* Field | Detail style cards from GESAdmin */
.gai-table.gai-table-kv col.gai-col-key {
  width: 12.5rem;
}
.gai-table.gai-table-kv th:first-child,
.gai-table.gai-table-kv td:first-child {
  white-space: normal;
  width: 1%;
  min-width: 10.5rem;
  max-width: 15rem;
  font-weight: 650;
  color: var(--navy);
  background: #f8fafc;
  word-break: normal;
  overflow-wrap: break-word;
}
.gai-table.gai-table-kv td:last-child {
  width: auto;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.gai-dots {
  display: inline-flex;
  gap: 0.28rem;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.gai-dots i {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #94a3b8;
  display: block;
  animation: gai-dot 1s ease-in-out infinite;
}
.gai-dots i:nth-child(2) { animation-delay: 0.15s; }
.gai-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes gai-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.gai-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem 0.75rem;
  align-items: end;
  padding-top: 0.2rem;
  border-top: 1px solid #e2e8f0;
}
.gai-compose-label {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.25rem;
}
.gai-compose textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid #d0d9e4;
  background: var(--white);
  color: #1e293b;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gai-compose textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 58, 82, 0.1);
}
.gai-compose textarea::placeholder {
  color: #94a3b8;
}
.gai-ocr-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
}
.gai-attachments {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.gai-attach-chip {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d0d9e4;
  background: #eef2f6;
}
.gai-attach-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gai-attach-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.gai-msg-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.4rem;
}
.gai-msg-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d0d9e4;
  background: #eef2f6;
}
@media (max-width: 640px) {
  .gai-compose {
    grid-template-columns: 1fr;
  }
  .gai-compose .admin-btn {
    width: 100%;
  }
}

/* —— Building requests —— */
.breq-shell {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: none;
  width: 100%;
}
.breq-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.breq-top-copy h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.breq-top-copy p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.3;
}
.breq-top-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.breq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.65rem;
  padding: 0.45rem 0.6rem;
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 8px;
}
.breq-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  min-width: 6.5rem;
  flex: 0 1 auto;
}
.breq-field span {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.breq-field select,
.breq-field input {
  border: 1px solid #d7dee8;
  border-radius: 7px;
  padding: 0.32rem 0.5rem;
  font: inherit;
  font-size: 0.84rem;
  color: var(--ink);
  background: #fff;
  min-height: 1.95rem;
}
.breq-field select:focus,
.breq-field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 58, 82, 0.12);
}
.breq-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.5rem;
  align-content: start;
}
.breq-card {
  appearance: none;
  text-align: left;
  border: 1px solid #d7dee8;
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-height: 0;
}
.breq-card:hover {
  border-color: #b07a12;
  box-shadow: 0 6px 18px rgba(7, 25, 35, 0.07);
}
.breq-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.breq-card-world {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.breq-card-status {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #e8eef2;
  color: #475569;
}
.breq-card-status.is-pending {
  background: #fef3c7;
  color: #92400e;
}
.breq-card-status.is-done {
  background: #dcfce7;
  color: #166534;
}
.breq-card-status.is-denied {
  background: #fee2e2;
  color: #991b1b;
}
.breq-card-title {
  margin: 0.05rem 0 0;
  color: var(--navy);
  font-size: 0.92rem;
  line-height: 1.2;
}
.breq-card-from {
  margin: 0;
  color: #64748b;
  font-size: 0.74rem;
}
.breq-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.1rem;
}
.breq-chip {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.08rem 0.35rem;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
}
.breq-chip.is-warn {
  background: #ffedd5;
  color: #9a3412;
}
.breq-card-meta {
  margin: 0.1rem 0 0;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.breq-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  color: #64748b;
}
.breq-empty img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(244, 182, 63, 0.45);
  flex: 0 0 auto;
}
.breq-empty strong {
  color: var(--navy);
  font-size: 0.9rem;
  display: block;
  line-height: 1.2;
}
.breq-empty p {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.25;
}
.breq-empty > div {
  min-width: 0;
}

.breq-lightbox {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.breq-lightbox[hidden] {
  display: none !important;
}
.breq-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 25, 35, 0.62);
  cursor: pointer;
}
.breq-lightbox-card {
  position: relative;
  z-index: 1;
  width: min(34rem, 100%);
  max-height: min(90vh, 42rem);
  overflow: auto;
  padding: 1.25rem 1.3rem 1.15rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(244, 182, 63, 0.35);
  box-shadow: 0 24px 60px rgba(7, 25, 35, 0.35);
}
.breq-lightbox-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.breq-lightbox-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(244, 182, 63, 0.45);
  flex: 0 0 auto;
}
.breq-lightbox-eyebrow {
  margin: 0;
  color: #b07a12;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.breq-lightbox-sub {
  margin: 0.12rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}
.breq-lightbox-x {
  margin-left: auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.breq-lightbox-card h3 {
  margin: 0 0 0.25rem;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.25;
}
.breq-lightbox-lead {
  margin: 0 0 0.85rem;
  color: #64748b;
  font-size: 0.88rem;
}
.breq-lightbox-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.9rem;
}
.breq-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e8eef2;
  min-width: 0;
}
.breq-meta-item span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.breq-meta-item strong {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}
.breq-lightbox-notes {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 1rem;
}
.breq-lightbox-notes span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}
.breq-lightbox-notes textarea {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  resize: vertical;
  min-height: 4.5rem;
}
.breq-lightbox-notes textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 58, 82, 0.12);
}
.breq-lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}
@media (max-width: 560px) {
  .breq-lightbox-meta {
    grid-template-columns: 1fr;
  }
  .breq-lightbox-actions .admin-btn {
    flex: 1 1 auto;
  }
}

/* Alliance ranks — chase desk */
#section-alliance_ranks {
  --arank-navy: #0b1f2c;
  --arank-deep: #123044;
  --arank-amber: #f4b63f;
  --arank-teal: #59c6ba;
  --arank-display: "Bebas Neue", Impact, sans-serif;
}
.arank-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: t100-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.arank-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1.35rem;
  border-radius: 16px;
  color: #f2f6f7;
  background:
    radial-gradient(ellipse 70% 80% at 0% -10%, rgba(244, 182, 63, 0.22), transparent 50%),
    linear-gradient(135deg, var(--arank-navy), var(--arank-deep) 60%, #16425a);
  border: 1px solid rgba(234, 245, 246, 0.12);
  box-shadow: 0 16px 36px rgba(7, 25, 35, 0.22);
}
.arank-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--arank-amber), var(--arank-teal), transparent);
}
.arank-eyebrow {
  margin: 0 0 0.3rem;
  color: var(--arank-amber);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.arank-hero h2 {
  margin: 0;
  font: 2.8rem/0.9 var(--arank-display);
  letter-spacing: 0.04em;
}
.arank-lede {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  color: #c9d6da;
  font-size: 0.94rem;
  line-height: 1.4;
}
.arank-updated {
  display: inline-block;
  margin-top: 0.85rem;
  color: #8fa6ae;
  font-size: 0.78rem;
}
.arank-hero-mark {
  position: relative;
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--arank-amber);
  font-size: 1.8rem;
}
.arank-hero-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 182, 63, 0.4), transparent 70%);
  filter: blur(6px);
  animation: t100-pulse 2.8s ease-in-out infinite;
}
.arank-pulse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  border: 1px solid #d5e2ea;
  background: linear-gradient(90deg, rgba(244, 182, 63, 0.14), transparent 46%), #fff;
}
.arank-pulse[data-mood="cold"] {
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.1), transparent 46%), #fff;
}
.arank-pulse-mood {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #b07a12;
}
.arank-pulse[data-mood="cold"] .arank-pulse-mood { color: #b42318; }
.arank-pulse[data-mood="steady"] .arank-pulse-mood { color: #1f8a7f; }
.arank-pulse-copy h3 {
  margin: 0.12rem 0 0;
  font: 1.65rem/1 var(--arank-display);
  letter-spacing: 0.04em;
  color: var(--navy-dark);
}
.arank-pulse-copy p:last-child {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.arank-delta {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(244, 182, 63, 0.18);
  color: #8a5a08;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}
.arank-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.arank-kpi {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d5e2ea;
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.05);
}
.arank-kpi.is-warn { border-color: #f0c2a8; }
.arank-kpi-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.arank-kpi-value {
  margin: 0.25rem 0 0;
  font: 1.85rem/1 var(--arank-display);
  letter-spacing: 0.03em;
  color: var(--navy-dark);
}
.arank-kpi-meta {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}
.arank-board-wrap {
  background: #fff;
  border: 1px solid #d5e2ea;
  border-radius: 14px;
  padding: 0.95rem 1rem 1.1rem;
}
.arank-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e8eef2;
}
.arank-board-head h3 {
  margin: 0;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.arank-board-head h3 i { color: var(--arank-amber); }
.arank-board-head span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.arank-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20.5rem, 1fr));
  gap: 0.7rem;
}
.arank-card {
  padding: 0.8rem 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #dce6ec;
  background: linear-gradient(180deg, #fff, #f6fafb);
}
.arank-card.is-fresh {
  animation: arank-pop 0.55s ease;
  box-shadow: 0 0 0 2px rgba(89, 198, 186, 0.55);
}
@keyframes arank-pop {
  from { transform: translateY(4px); box-shadow: 0 0 0 3px rgba(244, 182, 63, 0.55); }
  to { transform: none; }
}
.arank-card.is-first {
  border-color: #e6c36a;
  background: linear-gradient(180deg, #fff8e6, #fff);
}
.arank-card.is-drop { border-color: #f0b4ae; }
.arank-card.is-slip { border-color: #f0d0a0; }
.arank-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
}
.arank-flag img,
.arank-flag .flag-img {
  display: block;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(11, 58, 82, 0.12);
}
.arank-flag-fallback {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 1.35rem;
  border-radius: 4px;
  background: var(--arank-navy);
  color: var(--arank-amber);
  font-size: 0.65rem;
  font-weight: 800;
}
.arank-card-id strong {
  display: block;
  font: 1.25rem/1 var(--arank-display);
  letter-spacing: 0.05em;
  color: var(--navy);
}
.arank-card-id span {
  color: var(--muted);
  font-size: 0.74rem;
}
.arank-place {
  text-align: right;
}
.arank-place b {
  display: block;
  font: 1.55rem/1 var(--arank-display);
  color: var(--navy-dark);
}
.arank-place em {
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 800;
  color: #17663a;
}
.arank-card.is-drop .arank-place em { color: #b42318; }
.arank-meter {
  margin: 0.55rem 0 0.45rem;
  height: 6px;
  border-radius: 99px;
  background: #e6eef2;
  overflow: hidden;
}
.arank-meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--arank-deep), var(--arank-teal));
}
.arank-card.is-first .arank-meter i {
  background: linear-gradient(90deg, #d89a1a, var(--arank-amber));
}
.arank-races .rank-chase-line {
  flex-wrap: wrap;
  align-items: flex-start;
  font-size: 0.78rem;
  white-space: normal;
}
.arank-races .rank-chase-rival {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  flex: 1 1 10rem;
  min-width: 0;
}
.arank-when {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.arank-empty {
  margin: 0.6rem 0;
  color: var(--muted);
}
@media (max-width: 900px) {
  .arank-kpis { grid-template-columns: 1fr 1fr; }
  .arank-pulse { flex-direction: column; align-items: flex-start; }
}

/* �� Developer Top 100 (World Track analytics) �� */
#section-top_100 {
  --t100-navy: #071923;
  --t100-deep: #0a2330;
  --t100-panel: #0f2f40;
  --t100-ink: #f2f6f7;
  --t100-copy: #c9d6da;
  --t100-muted: #8fa6ae;
  --t100-line: rgba(234, 245, 246, 0.12);
  --t100-amber: #f4b63f;
  --t100-teal: #59c6ba;
  --t100-up: #6bcf8e;
  --t100-down: #e27538;
  --t100-display: "Bebas Neue", Impact, sans-serif;
  --t100-body: "DM Sans", "Segoe UI", sans-serif;
}
#section-top_100 .t100-page {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  font-family: var(--t100-body);
  animation: t100-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes t100-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.t100-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem 1.45rem;
  border-radius: 16px;
  color: var(--t100-ink);
  background:
    radial-gradient(ellipse 80% 70% at 8% -20%, rgba(89, 198, 186, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 55% at 95% 10%, rgba(244, 182, 63, 0.16), transparent 50%),
    linear-gradient(135deg, var(--t100-navy) 0%, var(--t100-deep) 55%, #0d3548 100%);
  border: 1px solid var(--t100-line);
  box-shadow: 0 18px 40px rgba(7, 25, 35, 0.28);
}
.t100-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--t100-teal), var(--t100-amber), transparent);
}
.t100-hero-copy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.t100-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--t100-amber);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.t100-hero h2 {
  margin: 0;
  font: 3.1rem/0.9 var(--t100-display);
  letter-spacing: 0.04em;
  color: var(--t100-ink);
}
.t100-lede {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  color: var(--t100-copy);
  font-size: 0.95rem;
  line-height: 1.45;
}
.t100-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
}
.t100-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 182, 63, 0.45);
  color: var(--t100-amber);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}
.t100-link:hover {
  background: var(--t100-amber);
  color: var(--t100-navy);
}
.t100-window {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--t100-line);
  color: var(--t100-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.t100-window select {
  border: 0;
  background: transparent;
  color: var(--t100-ink);
  font: inherit;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.t100-window select option { color: #1e293b; }
.t100-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(89, 198, 186, 0.45);
  background: rgba(89, 198, 186, 0.12);
  color: var(--t100-teal);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.t100-refresh:hover {
  background: var(--t100-teal);
  color: var(--t100-navy);
}
.t100-updated {
  color: var(--t100-muted);
  font-size: 0.78rem;
}
.t100-pulse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #d5e2ea;
  background:
    linear-gradient(90deg, rgba(89, 198, 186, 0.12), transparent 42%),
    #fff;
}
.t100-pulse[data-mood="hot"] {
  background:
    linear-gradient(90deg, rgba(244, 182, 63, 0.2), transparent 50%),
    #fff;
}
.t100-pulse[data-mood="cold"] {
  background:
    linear-gradient(90deg, rgba(15, 47, 64, 0.08), transparent 50%),
    #fff;
}
.t100-pulse-mood {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t100-teal);
}
.t100-pulse[data-mood="hot"] .t100-pulse-mood { color: #b07a12; }
.t100-pulse[data-mood="cold"] .t100-pulse-mood { color: #64748b; }
.t100-pulse-copy h3 {
  margin: 0.15rem 0 0;
  font: 1.7rem/1 var(--t100-display);
  letter-spacing: 0.04em;
  color: var(--navy-dark);
}
.t100-pulse-copy p:last-child {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 38rem;
}
.t100-pulse-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}
.t100-delta {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(89, 198, 186, 0.16);
  color: #1f8a7f;
  font-size: 0.72rem;
  font-weight: 700;
}
.t100-pulse[data-tone="down"] .t100-delta {
  background: rgba(226, 117, 56, 0.16);
  color: #b04a1a;
}
.t100-pulse[data-tone="flat"] .t100-delta {
  background: #eef3f6;
  color: #54707c;
}
.t100-spark {
  width: 140px;
  height: 36px;
  color: var(--t100-teal);
}
.t100-pulse[data-mood="hot"] .t100-spark { color: #d89a1a; }
.t100-heat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.t100-heat-chip {
  appearance: none;
  border: 1px solid #d5e2ea;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(89, 198, 186, calc(var(--heat, 0.3) * 0.35));
  color: inherit;
  font: inherit;
  cursor: default;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}
.t100-heat-chip strong {
  font: 1.05rem/1 var(--t100-display);
  letter-spacing: 0.05em;
  color: var(--navy);
}
.t100-heat-chip span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 650;
}
@media (max-width: 800px) {
  .t100-pulse { flex-direction: column; align-items: stretch; }
  .t100-pulse-side { align-items: flex-start; }
}
.t100-hero-mark {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
}
.t100-hero-mark img {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(244, 182, 63, 0.35);
  animation: t100-float 3.6s ease-in-out infinite;
}
.t100-hero-glow {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 198, 186, 0.45), transparent 70%);
  filter: blur(8px);
  animation: t100-pulse 2.8s ease-in-out infinite;
}
@keyframes t100-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes t100-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.t100-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.t100-kpi {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f5f9fb 100%);
  border: 1px solid #d5e2ea;
  box-shadow: 0 8px 22px rgba(7, 25, 35, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: t100-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.t100-kpi:nth-child(2) { animation-delay: 0.05s; }
.t100-kpi:nth-child(3) { animation-delay: 0.1s; }
.t100-kpi:nth-child(4) { animation-delay: 0.15s; }
.t100-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(7, 25, 35, 0.1);
}
.t100-kpi-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(11, 58, 82, 0.1);
  color: var(--navy);
  font-size: 0.95rem;
}
.t100-kpi-icon.is-amber { background: rgba(244, 182, 63, 0.18); color: #b07a12; }
.t100-kpi-icon.is-teal { background: rgba(89, 198, 186, 0.18); color: #1f8a7f; }
.t100-kpi-icon.is-green { background: rgba(107, 207, 142, 0.18); color: #2f8a52; }
.t100-kpi-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.t100-kpi-value {
  margin: 0.2rem 0 0;
  font: 2rem/1 var(--t100-display);
  letter-spacing: 0.03em;
  color: var(--navy-dark);
}
.t100-kpi-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.t100-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.85rem;
}
.t100-split .t100-panel-wide { grid-column: auto; }
.t100-panel {
  background: #fff;
  border: 1px solid #d5e2ea;
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: 0 8px 22px rgba(7, 25, 35, 0.05);
  min-height: 12rem;
}
.t100-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8eef2;
}
.t100-panel-head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.t100-panel-head h3 i { color: var(--t100-amber); }
.t100-panel-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.t100-feed,
.t100-ranklist,
.t100-bars {
  max-height: 28rem;
  overflow: auto;
}
.t100-empty {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.t100-feed-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px solid #eef2f5;
  animation: t100-rise 0.4s ease both;
}
.t100-feed-item:last-child { border-bottom: 0; }
.t100-world-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.28rem 0.45rem;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--t100-deep), var(--t100-navy));
  color: var(--t100-amber);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.t100-feed-main { min-width: 0; }
.t100-feed-query {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t100-feed-hit {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.t100-feed-hit strong { color: var(--navy); font-weight: 650; }
.t100-feed-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}
.t100-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.t100-pill.is-ok {
  background: rgba(107, 207, 142, 0.18);
  color: #1f7a45;
}
.t100-pill.is-miss {
  background: rgba(226, 117, 56, 0.16);
  color: #b04a1a;
}
.t100-feed-meta {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.t100-rank-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.1rem;
  border-bottom: 1px solid #eef2f5;
}
.t100-rank-row:last-child { border-bottom: 0; }
.t100-rank-num {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 1.05rem/1 var(--t100-display);
  background: #eef3f6;
  color: var(--navy);
}
.t100-rank-row:nth-child(1) .t100-rank-num {
  background: linear-gradient(135deg, #f4b63f, #e09a1a);
  color: #3a2800;
}
.t100-rank-row:nth-child(2) .t100-rank-num {
  background: linear-gradient(135deg, #c9d4da, #9aadb6);
  color: #243036;
}
.t100-rank-row:nth-child(3) .t100-rank-num {
  background: linear-gradient(135deg, #d4a574, #b07840);
  color: #2e1c08;
}
.t100-rank-name {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t100-rank-sub {
  margin: 0.12rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.t100-rank-count {
  font: 1.35rem/1 var(--t100-display);
  color: var(--navy-dark);
  letter-spacing: 0.02em;
}
.t100-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0;
}
.t100-bar-label {
  font-size: 0.82rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t100-bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
}
.t100-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), var(--t100-teal));
  transform-origin: left center;
  animation: t100-bar 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes t100-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.t100-bar-n {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
@media (max-width: 1100px) {
  .t100-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t100-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .t100-hero { flex-direction: column; align-items: flex-start; }
  .t100-hero-mark { align-self: flex-end; }
  .t100-hero h2 { font-size: 2.4rem; }
  .t100-kpis { grid-template-columns: 1fr; }
}

/* —— Developer RLM (Realism Location Marker) —— */
#section-rlm {
  --rlm-navy: #071923;
  --rlm-deep: #0a2330;
  --rlm-ink: #f2f6f7;
  --rlm-copy: #c9d6da;
  --rlm-muted: #8fa6ae;
  --rlm-line: rgba(234, 245, 246, 0.12);
  --rlm-amber: #f4b63f;
  --rlm-teal: #59c6ba;
  --rlm-map: #3d9a6a;
  --rlm-display: "Bebas Neue", Impact, sans-serif;
  --rlm-body: "DM Sans", "Segoe UI", sans-serif;
}
#section-rlm .rlm-page {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  font-family: var(--rlm-body);
  animation: rlm-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes rlm-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.rlm-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem 1.45rem;
  border-radius: 16px;
  color: var(--rlm-ink);
  background:
    radial-gradient(ellipse 75% 65% at 12% -15%, rgba(61, 154, 106, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 50% at 92% 8%, rgba(244, 182, 63, 0.14), transparent 50%),
    linear-gradient(135deg, var(--rlm-navy) 0%, #0a2c28 50%, var(--rlm-deep) 100%);
  border: 1px solid var(--rlm-line);
  box-shadow: 0 18px 40px rgba(7, 25, 35, 0.28);
}
.rlm-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rlm-map), var(--rlm-teal), var(--rlm-amber), transparent);
}
.rlm-hero-copy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.rlm-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--rlm-amber);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rlm-hero h2 {
  margin: 0;
  font: 3.1rem/0.9 var(--rlm-display);
  letter-spacing: 0.06em;
  color: var(--rlm-ink);
}
.rlm-lede {
  margin: 0.55rem 0 0;
  max-width: 38rem;
  color: var(--rlm-copy);
  font-size: 0.95rem;
  line-height: 1.45;
}
.rlm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
}
.rlm-window {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--rlm-line);
  color: var(--rlm-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rlm-window select {
  border: 0;
  background: transparent;
  color: var(--rlm-ink);
  font: inherit;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.rlm-window select option { color: #1e293b; }
.rlm-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 154, 106, 0.5);
  background: rgba(61, 154, 106, 0.16);
  color: #8fd4ae;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.rlm-refresh:hover {
  background: var(--rlm-map);
  color: #fff;
}
.rlm-updated {
  color: var(--rlm-muted);
  font-size: 0.78rem;
}
.rlm-hero-mark {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
}
.rlm-hero-mark img {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(61, 154, 106, 0.45);
  animation: rlm-float 3.6s ease-in-out infinite;
}
.rlm-hero-glow {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 154, 106, 0.5), transparent 70%);
  filter: blur(8px);
  animation: rlm-pulse 2.8s ease-in-out infinite;
}
@keyframes rlm-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes rlm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.rlm-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.rlm-kpi {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f4faf7 100%);
  border: 1px solid #d3e5db;
  box-shadow: 0 8px 22px rgba(7, 25, 35, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rlm-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.rlm-kpi:nth-child(2) { animation-delay: 0.05s; }
.rlm-kpi:nth-child(3) { animation-delay: 0.1s; }
.rlm-kpi:nth-child(4) { animation-delay: 0.15s; }
.rlm-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(7, 25, 35, 0.1);
}
.rlm-kpi-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(11, 58, 82, 0.1);
  color: var(--navy);
  font-size: 0.95rem;
}
.rlm-kpi-icon.is-amber { background: rgba(244, 182, 63, 0.18); color: #b07a12; }
.rlm-kpi-icon.is-teal { background: rgba(89, 198, 186, 0.18); color: #1f8a7f; }
.rlm-kpi-icon.is-green { background: rgba(61, 154, 106, 0.18); color: #2a7a4e; }
.rlm-kpi-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rlm-kpi-value {
  margin: 0.2rem 0 0;
  font: 2rem/1 var(--rlm-display);
  letter-spacing: 0.03em;
  color: var(--navy-dark);
}
.rlm-kpi-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.rlm-channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.rlm-ch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.rlm-ch b {
  font: 1.05rem/1 var(--rlm-display);
  letter-spacing: 0.02em;
}
.rlm-ch.is-stable { background: rgba(11, 58, 82, 0.1); color: var(--navy); }
.rlm-ch.is-beta { background: rgba(244, 182, 63, 0.2); color: #8a5d0a; }
.rlm-ch.is-dev { background: rgba(89, 198, 186, 0.2); color: #157a70; }
.rlm-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0.85rem;
}
.rlm-panel {
  background: #fff;
  border: 1px solid #d3e5db;
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: 0 8px 22px rgba(7, 25, 35, 0.05);
  min-height: 10rem;
}
.rlm-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8f0eb;
}
.rlm-panel-head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.rlm-panel-head h3 i { color: var(--rlm-map); }
.rlm-panel-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rlm-empty {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.rlm-serverlist,
.rlm-bars,
.rlm-authlist {
  max-height: 26rem;
  overflow: auto;
}
.rlm-server-row,
.rlm-auth-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.1rem;
  border-bottom: 1px solid #eef4f0;
  animation: rlm-rise 0.4s ease both;
}
.rlm-auth-row {
  grid-template-columns: auto 1fr auto auto;
}
.rlm-server-row:last-child,
.rlm-auth-row:last-child { border-bottom: 0; }
.rlm-world-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.28rem 0.45rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #0d3a32, var(--rlm-navy));
  color: #8fd4ae;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.rlm-server-main,
.rlm-auth-main { min-width: 0; }
.rlm-server-users {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}
.rlm-server-users span {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
}
.rlm-server-hits,
.rlm-auth-sub {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.rlm-auth-name {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rlm-ch-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rlm-ch-badge.is-stable { background: rgba(11, 58, 82, 0.12); color: var(--navy); }
.rlm-ch-badge.is-beta { background: rgba(244, 182, 63, 0.22); color: #8a5d0a; }
.rlm-ch-badge.is-dev { background: rgba(89, 198, 186, 0.22); color: #157a70; }
.rlm-ch-badge.is-web { background: rgba(107, 207, 142, 0.2); color: #2a7a4e; }
.rlm-ch-badge.is-other { background: #eef2f5; color: var(--muted); }
.rlm-revoke {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e2b4a8;
  background: #fff6f3;
  color: #a32626;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease;
}
.rlm-revoke:hover { background: #fde8e2; }
.rlm-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0;
}
.rlm-bar-label {
  font-size: 0.82rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rlm-bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: #e8f0eb;
  overflow: hidden;
}
.rlm-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy-dark), var(--rlm-map));
  transform-origin: left center;
  animation: rlm-bar 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes rlm-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.rlm-bar-n {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rlm-grant-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}
.rlm-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 7.5rem;
}
.rlm-field span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rlm-field input,
.rlm-field select {
  border: 1px solid #c9d9cf;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: #fbfefc;
  color: var(--ink);
  min-width: 0;
}
.rlm-field input:focus,
.rlm-field select:focus {
  outline: none;
  border-color: var(--rlm-map);
  box-shadow: 0 0 0 3px rgba(61, 154, 106, 0.18);
}
.rlm-field-sm { min-width: 5.5rem; max-width: 7rem; }
.rlm-field-grow { flex: 1 1 12rem; min-width: 10rem; }
.rlm-grant-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.62rem 1.1rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #2a7a4e, var(--rlm-map));
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(42, 122, 78, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rlm-grant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(42, 122, 78, 0.35);
}
.rlm-grant-status {
  margin: 0.75rem 0 0;
  min-height: 1.1rem;
  font-size: 0.85rem;
  color: var(--rlm-map);
  font-weight: 600;
}
@media (max-width: 1100px) {
  .rlm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rlm-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .rlm-hero { flex-direction: column; align-items: flex-start; }
  .rlm-hero-mark { align-self: flex-end; }
  .rlm-hero h2 { font-size: 2.4rem; }
  .rlm-kpis { grid-template-columns: 1fr; }
  .rlm-auth-row {
    grid-template-columns: auto 1fr;
  }
  .rlm-auth-row .rlm-ch-badge { justify-self: start; }
  .rlm-auth-row .rlm-revoke { grid-column: 1 / -1; justify-self: start; }
}

/* RLM Name Queue */
.nq-page {
  max-width: none;
  width: 100%;
  container-type: inline-size;
  container-name: nq;
}
.nq-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.nq-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.nq-hero h2 { margin: 0.2rem 0 0.35rem; color: var(--navy); }
.nq-lede { margin: 0; color: #475569; max-width: 48rem; }
.nq-hero-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.nq-toolbar, .nq-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.nq-progress { font-weight: 700; color: var(--navy); }
.nq-mode { color: #64748b; font-size: 0.9rem; }
.nq-ai, .nq-filters label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #475569;
}
.nq-ai select, .nq-filters select {
  min-width: 9rem;
}
.nq-ai input[type="text"] {
  min-width: 10rem;
  font: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}
/* 1 / 2 / 3 cards — subgrid aligns title/meta/map across a row to the tallest */
.nq-grid {
  display: grid;
  width: 100%;
  column-gap: 1rem;
  row-gap: 0;
  grid-template-columns: minmax(0, 1fr);
}
.nq-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 36rem;
}
.nq-card {
  border: 1px solid #d7dee8;
  border-radius: 12px;
  padding: 0.9rem;
  background: #fff;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4; /* h3 · meta · map · body */
  row-gap: 0.45rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  align-items: stretch;
}
.nq-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
/* Mid screens (this view): 2 equal-width cards */
@container nq (min-width: 760px) {
  .nq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Wide PC: 3 equal-width cards filling the row */
@container nq (min-width: 1180px) {
  .nq-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Fallback when container queries unavailable */
@supports not (container-type: inline-size) {
  @media (min-width: 1100px) {
    .nq-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (min-width: 1600px) {
    .nq-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
}
/* Browsers without subgrid: stack normally (no scroll hacks) */
@supports not (grid-template-rows: subgrid) {
  .nq-card {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }
}
.nq-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.4;
}
.nq-meta {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
}
.nq-meta a { color: #1e5f8a; }
.nq-map-thumb {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #eef2f7;
  overflow: hidden;
  align-self: start;
}
.nq-single .nq-map-thumb {
  height: 220px;
}
.nq-card label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748b;
}
.nq-card input, .nq-card select, .nq-card textarea {
  font: inherit;
  font-weight: 400;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}
.nq-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  align-items: center;
  margin-top: 0.2rem;
}
.nq-hint { margin: 0; font-size: 0.75rem; line-height: 1.35; }
.nq-card .admin-btn,
.nq-ai-btns .admin-btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.25;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  white-space: nowrap;
}
.nq-actions .admin-btn {
  padding: 0.26rem 0.45rem;
  font-size: 0.76rem;
  flex: 0 1 auto;
}
.admin-btn.nq-warn {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
}
.admin-btn.nq-warn:hover { background: #92400e; border-color: #92400e; }
.admin-btn.nq-danger {
  background: #c44;
  border-color: #c44;
  color: #fff;
}
.admin-btn.nq-danger:hover { background: #a33; border-color: #a33; }
.nq-ai-paste {
  display: none;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px dashed #cbd5e1;
}
.nq-ai-paste.open { display: block; }
.nq-ai-btns {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.25rem;
}
.nq-ask-quota {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}
.nq-ask-quota.is-exhausted {
  color: #b45309;
}
.nq-card .admin-btn.nq-ask-ges:disabled,
.nq-ai-btns .admin-btn.nq-ask-ges:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nq-ask-lb {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.nq-ask-lb[hidden] { display: none !important; }
.nq-ask-lb-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.nq-ask-lb-card {
  position: relative;
  z-index: 1;
  width: min(44rem, 100%);
  max-height: min(92vh, 48rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.1rem 0.95rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d7dee8;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
.nq-ask-lb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.nq-ask-lb-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.nq-ask-lb-card h3 {
  margin: 0.2rem 0 0.15rem;
  color: var(--navy);
  font-size: 1.2rem;
}
.nq-ask-lb-sub {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.4;
}
.nq-ask-lb-log {
  flex: 1;
  min-height: 220px;
  max-height: min(58vh, 480px);
  overflow-y: auto;
  overflow-x: hidden;
}
.nq-ask-lb-summary {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.4;
}
.nq-ask-lb-summary strong {
  color: var(--navy);
}
.nq-ask-lb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.nq-ask-lb-warn {
  margin: 0;
  color: #b45309;
  font-size: 0.82rem;
}
.nq-card.nq-card-filled {
  outline: 2px solid #1e5f8a;
  outline-offset: 2px;
  transition: outline-color 0.3s ease;
}
.nq-remove.nq-pulse-hint {
  animation: nq-pulse-hint 0.9s ease-in-out 3;
}
@keyframes nq-pulse-hint {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.45); }
}
.nq-ask-lb .gai-msg {
  max-width: 100%;
}
.nq-ask-lb .gai-msg.is-user .gai-msg-body,
.nq-ask-lb .gai-msg.is-ai .gai-msg-body {
  max-height: none;
  overflow: visible;
}
.nq-ask-lb .gai-msg.is-user .gai-msg-body pre,
.nq-ask-lb .gai-msg.is-ai .gai-msg-body pre {
  max-height: none;
  overflow: visible;
}
@media (max-width: 640px) {
  .nq-grid,
  .nq-single {
    grid-template-columns: minmax(0, 1fr);
  }
  .nq-actions,
  .nq-ai-btns {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .nq-card .admin-btn,
  .nq-ai-btns .admin-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Developer → Dev changelog */
.devlog-form { display: grid; gap: 0.6rem; }
.devlog-form input, .devlog-form textarea, .devlog-filters input, .devlog-filters select {
  width: 100%; padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(0, 0, 0, 0.25); color: inherit;
}
.devlog-form button { justify-self: start; }
.devlog-filters { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 0.6rem; }
@media (max-width: 720px) { .devlog-filters { grid-template-columns: 1fr; } }
.devlog-badge {
  flex: none; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
}
.devlog-badge.is-deploy { background: rgba(46, 204, 113, 0.18); color: #7be0a4; }
.devlog-badge.is-manual { background: rgba(52, 152, 219, 0.18); color: #8cc8f0; }
.devlog-badge.is-panel { background: rgba(155, 89, 182, 0.2); color: #cfa6e6; }
.devlog-badge.is-detected { background: rgba(231, 76, 60, 0.22); color: #f5a097; }
.devlog-card.is-detected { border-color: rgba(231, 76, 60, 0.45); }
.devlog-details {
  margin: 0.7rem 0 0; white-space: pre-wrap; font-size: 0.82rem; line-height: 1.4;
  color: rgba(232, 238, 242, 0.8); background: rgba(0, 0, 0, 0.2); padding: 0.6rem; border-radius: 8px;
}
.devlog-files { margin-top: 0.6rem; font-size: 0.82rem; }
.devlog-files ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

/* Alliance appeals → web portal cases (light board, same language as watchlist) */
.appeal-portal-block {
  margin-top: 1.25rem;
}
.ap-board {
  background: #fff;
  border: 1px solid #d5e2ea;
  border-radius: 14px;
  padding: 1rem 1.05rem 1.15rem;
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.04);
  color: var(--navy-dark, #0b3a52);
}
.ap-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8eef2;
}
.ap-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f8a7f;
}
.ap-board-head h3 {
  margin: 0;
  font: 1.55rem/1 "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
  color: var(--navy-dark, #0b3a52);
}
.ap-lede { margin: 0.35rem 0 0; max-width: 36rem; font-size: 0.88rem; }
.appeal-portal-layout {
  display: grid;
  grid-template-columns: minmax(250px, 340px) 1fr;
  gap: 0.85rem;
  align-items: start;
}
@media (max-width: 900px) {
  .appeal-portal-layout { grid-template-columns: 1fr; }
}
.appeal-portal-aside {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.appeal-portal-create {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #e2eaf0;
  background: #f7fafb;
}
.appeal-portal-create h4 {
  margin: 0 0 0.15rem;
  font-size: 0.86rem;
  color: var(--navy-dark, #0b3a52);
}
.appeal-portal-create label {
  display: grid;
  gap: 0.22rem;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--muted, #6b7c85);
}
.appeal-portal-create input,
.appeal-portal-create textarea,
.appeal-portal-status-row select,
#appeal-portal-reply {
  width: 100%;
  padding: 0.48rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c9d7e0;
  background: #fff;
  color: var(--navy-dark, #0b3a52);
  font: inherit;
}
.appeal-portal-create input:focus,
.appeal-portal-create textarea:focus,
#appeal-portal-reply:focus {
  outline: none;
  border-color: #59c6ba;
  box-shadow: 0 0 0 3px rgba(89, 198, 186, 0.16);
}
.appeal-portal-pm {
  font-size: 0.76rem;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed #c9d7e0;
  background: #fffdf5;
  color: #5a4a1a;
  margin: 0;
}
.ap-list-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #6b7c85);
}
.appeal-portal-list { display: grid; gap: 0.4rem; max-height: 280px; overflow: auto; }
.appeal-portal-row {
  text-align: left;
  display: grid;
  gap: 0.12rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #dce6ec;
  border-left: 3px solid #b8cdd8;
  background: linear-gradient(180deg, #fff, #f6fafb);
  color: var(--navy-dark, #0b3a52);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.appeal-portal-row:hover {
  border-color: #b8cdd8;
  box-shadow: 0 4px 12px rgba(7, 25, 35, 0.06);
}
.appeal-portal-row.is-active {
  border-color: #59c6ba;
  border-left-color: #1f8a7f;
  box-shadow: 0 0 0 2px rgba(89, 198, 186, 0.2);
}
.appeal-portal-row strong { font-size: 0.92rem; }
.appeal-portal-detail {
  min-height: 280px;
  padding: 0.85rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid #e2eaf0;
  background: #f7fafb;
}
.appeal-portal-detail-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--navy-dark, #0b3a52);
}
.appeal-portal-msgs {
  display: grid;
  gap: 0.45rem;
  margin: 0.85rem 0;
  max-height: 280px;
  overflow: auto;
}
.appeal-portal-msg {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #e2eaf0;
  background: #fff;
}
.appeal-portal-msg header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}
.appeal-portal-msg p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
}
.appeal-portal-msg.staff-only {
  border-left: 3px solid #8b5cf6;
  background: #faf8ff;
}
.appeal-portal-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-top: 0.5rem;
}
.appeal-portal-status-row label {
  display: grid;
  gap: 0.22rem;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--muted, #6b7c85);
}

/* Alliance watchlist — sibling to Alliance ranks (light board on navy hero) */
#section-alliance_watchlist {
  --awl-navy: #0b1f2c;
  --awl-deep: #123044;
  --awl-amber: #f4b63f;
  --awl-teal: #59c6ba;
  --awl-green: #1f8a5a;
  --awl-amber-status: #b07a12;
  --awl-red: #b42318;
  --awl-display: "Bebas Neue", Impact, sans-serif;
}
.awl-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: t100-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.awl-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1.35rem;
  border-radius: 16px;
  color: #f2f6f7;
  background:
    radial-gradient(ellipse 70% 80% at 100% -10%, rgba(89, 198, 186, 0.2), transparent 50%),
    linear-gradient(135deg, var(--awl-navy), var(--awl-deep) 60%, #16425a);
  border: 1px solid rgba(234, 245, 246, 0.12);
  box-shadow: 0 16px 36px rgba(7, 25, 35, 0.22);
}
.awl-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--awl-teal), var(--awl-amber), transparent);
}
.awl-eyebrow {
  margin: 0 0 0.3rem;
  color: var(--awl-teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.awl-hero h2 {
  margin: 0;
  font: 2.8rem/0.9 var(--awl-display);
  letter-spacing: 0.04em;
}
.awl-lede {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  color: #c9d6da;
  font-size: 0.94rem;
  line-height: 1.4;
}
.awl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.awl-updated {
  color: #8fa6ae;
  font-size: 0.78rem;
  margin-right: 0.25rem;
}
.awl-btn-light {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #f2f6f7 !important;
}
.awl-btn-light:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}
.awl-hero-mark {
  position: relative;
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--awl-teal);
  font-size: 1.7rem;
}
.awl-hero-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 198, 186, 0.4), transparent 70%);
  filter: blur(6px);
  animation: t100-pulse 2.8s ease-in-out infinite;
}
.awl-board-wrap {
  background: #fff;
  border: 1px solid #d5e2ea;
  border-radius: 14px;
  padding: 0.95rem 1rem 1.1rem;
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.04);
}
.awl-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e8eef2;
}
.awl-board-head h3 {
  margin: 0;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy-dark, #0b3a52);
}
.awl-board-head h3 i { color: var(--awl-teal); }
.awl-board-head span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7c85);
}
.awl-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 0.75rem;
}
.awl-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid #dce6ec;
  border-left: 4px solid #c9a24a;
  background: linear-gradient(180deg, #fff, #f6fafb);
  color: var(--navy-dark, #0b3a52);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}
.awl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(7, 25, 35, 0.08);
  border-color: #b8cdd8;
}
.awl-card--green { border-left-color: var(--awl-green); }
.awl-card--amber { border-left-color: var(--awl-amber-status); }
.awl-card--red { border-left-color: var(--awl-red); }
.awl-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
}
.awl-card-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8eef2;
  box-shadow: 0 0 0 1px rgba(11, 58, 82, 0.1);
}
.awl-card-logo--ph {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #3d6a7c;
  background: linear-gradient(160deg, #e8f4f6, #d5e6ec);
}
.awl-card-body { min-width: 0; }
.awl-card-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #6b7c85);
}
.awl-card-title {
  display: block;
  margin-top: 0.12rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-dark, #0b3a52);
}
.awl-card-worlds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.awl-chip {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: #e8eef2;
  color: #2a5566;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.awl-chip-empty {
  font-size: 0.78rem;
  color: var(--muted, #6b7c85);
}
.awl-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--muted, #6b7c85);
  padding-top: 0.15rem;
  border-top: 1px solid #eef3f6;
}
.awl-pill {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.awl-pill--green { background: rgba(31, 138, 90, 0.12); color: var(--awl-green); }
.awl-pill--amber { background: rgba(176, 122, 18, 0.12); color: var(--awl-amber-status); }
.awl-pill--red { background: rgba(180, 35, 24, 0.1); color: var(--awl-red); }
.awl-detail-head { margin-bottom: 0.85rem; }
.awl-detail-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.awl-detail-brand h3 {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font: 1.55rem/1 var(--awl-display);
  letter-spacing: 0.04em;
  color: var(--navy-dark, #0b3a52);
}
.awl-detail-brand span {
  font-size: 0.78rem;
  color: var(--muted, #6b7c85);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.awl-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e2eaf0;
}
.awl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  color: var(--navy-dark, #0b3a52);
}
.awl-table th,
.awl-table td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid #eef3f6;
  vertical-align: top;
}
.awl-table th {
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7c85);
  background: #f7fafb;
}
.awl-table tr:last-child td { border-bottom: 0; }
.awl-row--green { box-shadow: inset 3px 0 0 var(--awl-green); }
.awl-row--amber { box-shadow: inset 3px 0 0 var(--awl-amber-status); }
.awl-row--red { box-shadow: inset 3px 0 0 var(--awl-red); }
.awl-world { letter-spacing: 0.04em; }
.awl-name { font-size: 0.78rem; color: var(--muted, #6b7c85); margin-top: 0.12rem; }
.awl-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, #6b7c85);
  margin-top: 0.15rem;
}
.awl-num { font-variant-numeric: tabular-nums; }
.awl-row-err { margin-top: 0.25rem; font-size: 0.72rem; color: var(--awl-red); }
.awl-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  white-space: nowrap;
}
.awl-link, .awl-del { font-size: 0.78rem; padding: 0.22rem 0.45rem; }
.awl-del { color: var(--awl-red) !important; }
.awl-foot { margin: 0.65rem 0 0; font-size: 0.78rem; }
.awl-add-wrap { margin-top: 0; }
.awl-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
}
.awl-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #6b7c85);
}
.awl-form input,
.awl-form select {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c9d7e0;
  background: #fff;
  color: var(--navy-dark, #0b3a52);
  font: inherit;
}
.awl-form input:focus,
.awl-form select:focus {
  outline: none;
  border-color: #59c6ba;
  box-shadow: 0 0 0 3px rgba(89, 198, 186, 0.18);
}
.awl-form .admin-btn { height: 2.45rem; white-space: nowrap; }
@media (max-width: 900px) {
  .awl-form { grid-template-columns: 1fr 1fr; }
  .awl-form .admin-btn { grid-column: 1 / -1; }
  .awl-hero h2 { font-size: 2.2rem; }
}

/* —— Alliance event location votes —— */
.aev-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: t100-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.aev-hero {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.4rem 1.35rem;
  border-radius: 16px;
  color: #f2f6f7;
  background:
    radial-gradient(ellipse 70% 80% at 100% -10%, rgba(89, 158, 198, 0.22), transparent 50%),
    linear-gradient(135deg, #0b3a52, #16425a 55%, #1a4f6b);
  border: 1px solid rgba(234, 245, 246, 0.12);
  box-shadow: 0 16px 36px rgba(7, 25, 35, 0.22);
}
.aev-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #59c6ba, #5b9bd5, transparent);
}
.aev-eyebrow {
  margin: 0 0 0.3rem;
  color: #59c6ba;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.aev-hero h2 {
  margin: 0;
  font: 2.6rem/0.95 var(--awl-display, "Segoe UI", sans-serif);
  letter-spacing: 0.03em;
}
.aev-lede {
  margin: 0.5rem 0 0;
  max-width: 38rem;
  color: #c9d6da;
  font-size: 0.94rem;
  line-height: 1.4;
}
.aev-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.aev-updated { color: #8fa6ae; font-size: 0.78rem; }
.aev-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #c9d6da;
  font-size: 0.82rem;
}
.aev-filter select {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: #f2f6f7;
}
.aev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.aev-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.aev-board {
  background: #fff;
  border: 1px solid #d5e2ea;
  border-radius: 14px;
  padding: 0.95rem 1rem 1.1rem;
  box-shadow: 0 8px 20px rgba(7, 25, 35, 0.04);
}
.aev-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.aev-board-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy-dark, #0b3a52);
}
.aev-board-head span {
  color: #6b8490;
  font-size: 0.78rem;
}
.aev-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 28rem;
  overflow: auto;
}
.aev-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2ebf0;
  background: #f8fbfd;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.aev-row:hover {
  border-color: #59c6ba;
  background: #f0faf8;
}
.aev-row.is-active {
  border-color: #2b6cb0;
  background: #eef5fb;
  box-shadow: inset 3px 0 0 #2b6cb0;
}
.aev-row strong { color: var(--navy-dark, #0b3a52); }
.aev-form {
  display: grid;
  gap: 0.75rem;
}
.aev-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3d5a68;
}
.aev-form input,
.aev-form select,
.aev-form textarea {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c9d7e0;
  background: #fff;
  color: var(--navy-dark, #0b3a52);
  font: inherit;
}
.aev-form input:focus,
.aev-form select:focus,
.aev-form textarea:focus {
  outline: none;
  border-color: #59c6ba;
  box-shadow: 0 0 0 3px rgba(89, 198, 186, 0.18);
}
.aev-detail-head h3 { margin: 0 0 0.25rem; color: var(--navy-dark, #0b3a52); }
.aev-opt-list {
  margin: 0.75rem 0;
  padding-left: 1.1rem;
  color: #2a4450;
}
.aev-winner { color: #1f8a5a; margin: 0.5rem 0; }
.aev-warn { color: #b07a12; margin: 0.5rem 0; }
.aev-notes {
  margin: 0.5rem 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: #f4f8fa;
  border: 1px solid #e2ebf0;
  color: #3d5a68;
  white-space: pre-wrap;
}
.aev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-top: 0.85rem;
}
.aev-winner-pick {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #3d5a68;
  min-width: 12rem;
}
.aev-winner-pick select {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #c9d7e0;
  font: inherit;
}
@media (max-width: 980px) {
  .aev-layout { grid-template-columns: 1fr; }
  .aev-hero h2 { font-size: 2.1rem; }
}
