:root {
  --bg: #08090b;
  --panel: #121418;
  --panel-soft: #191c22;
  --line: #2a2f38;
  --text: #f5f7fb;
  --muted: #a7afbd;
  --blue: #2877ff;
  --cyan: #4aa3ff;
  --violet: #b07cff;
  --yellow: #f8d24a;
  --red: #e5484d;
  --dark-red: #8f1d2c;
  --orange: #f08a24;
  --green: #2fca6f;
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #34465f #101827;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: #101827;
}

*::-webkit-scrollbar-thumb {
  background: #34465f;
  border-radius: 999px;
  border: 2px solid #101827;
}

*::-webkit-scrollbar-thumb:hover {
  background: #4a6385;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.devmode-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(245, 158, 11, .75);
  border-radius: 999px;
  color: #ffe3a3;
  background: rgba(245, 158, 11, .14);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.devmode-chip strong {
  color: #fff2c8;
  font-weight: 950;
}

.maintenance-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  max-width: min(520px, 42vw);
  padding: 5px 10px;
  border: 1px solid rgba(239, 68, 68, .76);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, .26);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.maintenance-chip strong {
  color: #fee2e2;
  font-weight: 950;
}

.maintenance-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-mode-chip,
.showcase-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(96, 165, 250, .46);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .18);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.brand .showcase-label {
  margin-left: 4px;
  min-height: 20px;
  padding: 0 7px;
  font-size: 9px;
}

.login-intro .showcase-label {
  vertical-align: middle;
}

.notify-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.notify {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 13px 38px 16px 14px;
  color: var(--text);
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #121d2f;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .36);
  animation: notify-in .22s ease-out both;
  pointer-events: auto;
  cursor: pointer;
}

.notify.leaving {
  animation: notify-out .22s ease-in both;
}

.notify.success {
  border-color: rgba(22, 185, 106, .55);
}

.notify.error {
  border-color: rgba(225, 43, 53, .6);
}

.notify.danger {
  border-color: rgba(225, 43, 53, .72);
  background: linear-gradient(135deg, rgba(225, 43, 53, .13), rgba(18, 29, 47, .96));
}

.notify.info {
  border-color: rgba(59, 130, 246, .62);
}

.notify-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.notify.success .notify-icon {
  color: #35f28f;
  background: rgba(22, 185, 106, .18);
}

.notify.error .notify-icon {
  color: #ff7279;
  background: rgba(225, 43, 53, .18);
}

.notify.danger .notify-icon {
  color: #ff7279;
  background: rgba(225, 43, 53, .22);
}

.notify.info .notify-icon {
  color: #93c5fd;
  background: rgba(59, 130, 246, .2);
}

.notify.swat-call-notify {
  width: 100%;
  max-width: 100%;
  min-height: 92px;
  border-color: rgba(248, 113, 113, .78);
  background: linear-gradient(135deg, rgba(127, 29, 29, .95), rgba(15, 35, 68, .98) 54%, rgba(30, 64, 175, .92));
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .25), 0 20px 60px rgba(0, 0, 0, .46), 0 0 36px rgba(239, 68, 68, .2);
}

.notify.swat-call-notify .notify-icon {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #2563eb);
}

.notify.swat-call-notify .notify-copy strong {
  color: #ffffff;
  font-size: 15px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.notify.swat-call-notify .notify-copy span {
  color: #eef6ff;
  font-size: 14px;
}

.notify-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.notify-copy strong {
  font-size: 13px;
}

.notify-copy span {
  color: #c6d4e8;
  font-size: 13px;
  line-height: 1.35;
}

.notify-lines {
  display: grid;
  gap: 4px;
}

.notify-lines span {
  display: block;
}

.notify-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform-origin: left;
  animation: notify-progress var(--notify-duration) linear forwards;
}

.notify.paused .notify-progress {
  animation-play-state: paused;
}

.notify-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #dce9fb;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 6px;
  background: rgba(8, 14, 24, .42);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.notify-close:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .48);
  background: rgba(255, 255, 255, .12);
}

.notify.success .notify-progress {
  background: #16b96a;
}

.notify.error .notify-progress {
  background: #e12b35;
}

.notify.danger .notify-progress {
  background: #e12b35;
}

.notify.info .notify-progress {
  background: #3b82f6;
}

.notify.swat-call-notify .notify-progress {
  background: linear-gradient(90deg, #ef4444, #2563eb);
}

.browser-audio-warning {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, .6);
  border-radius: 8px;
  color: #fecaca;
  background: rgba(127, 29, 29, .32);
  font-weight: 850;
  line-height: 1.35;
}

.tutorial-stage {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
}

.tutorial-panel {
  width: min(1380px, calc(100vw - 34px));
  min-height: min(820px, calc(100vh - 135px));
  padding: 28px;
}

.tutorial-progress-head,
.tutorial-actions,
.tutorial-browser-bar,
.tutorial-screen,
.tutorial-dn-box,
.tutorial-admin-row {
  display: flex;
  align-items: center;
}

.tutorial-progress-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tutorial-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.tutorial-dots i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .32);
}

.tutorial-dots i.done {
  background: rgba(34, 197, 94, .72);
}

.tutorial-dots i.active {
  width: 28px;
  background: #3b82f6;
}

.tutorial-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1.2fr) minmax(360px, .8fr);
  gap: 26px;
  align-items: stretch;
}

.tutorial-media {
  min-height: 610px;
  display: grid;
  overflow: hidden;
}

.tutorial-media > img,
.tutorial-admin-preview > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: #071120;
  border: 1px solid rgba(75, 110, 170, .65);
}

.tutorial-media > img {
  max-height: 610px;
}

.tutorial-image-scroll-wrap,
.tutorial-image-grid,
.tutorial-admin-image-list {
  width: 100%;
}

.tutorial-image-scroll-wrap {
  position: relative;
  height: 610px;
  overflow: hidden;
}

.tutorial-image-grid,
.tutorial-admin-image-list {
  display: grid;
  gap: 10px;
}

.tutorial-image-grid {
  align-content: start;
  height: 610px;
  max-height: 610px;
  padding-bottom: 72px;
  overflow: auto;
  scroll-padding-bottom: 72px;
}

.tutorial-image-open,
.tutorial-image-grid img,
.tutorial-admin-image-list img {
  width: 100%;
  min-width: 0;
  height: 610px;
  max-height: 610px;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(75, 110, 170, .65);
  border-radius: 8px;
  background: #071120;
}

.tutorial-image-open {
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.tutorial-image-open:hover {
  border-color: rgba(96, 165, 250, .95);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
}

.tutorial-image-open img {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.tutorial-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(96, 165, 250, .68);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 12, 24, .88);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35), 0 0 0 4px rgba(96, 165, 250, .1);
  font-size: 12px;
  font-weight: 950;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.tutorial-image-scroll-wrap.hint-hidden .tutorial-scroll-hint {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.tutorial-scroll-hint b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #06101f;
  background: #60a5fa;
  font-size: 15px;
  line-height: 1;
}

.tutorial-admin-image-list {
  max-height: 220px;
  overflow: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tutorial-admin-image-list img {
  height: 96px;
}

.tutorial-illustration {
  overflow: hidden;
  border: 1px solid rgba(75, 110, 170, .65);
  border-radius: 8px;
  background: #071120;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}

.tutorial-welcome-card {
  min-height: 610px;
  padding: clamp(26px, 4vw, 48px);
  display: grid;
  align-content: center;
  gap: 22px;
  border: 1px solid rgba(96, 165, 250, .42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(15, 23, 42, .72)),
    #071120;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 24px 70px rgba(0, 0, 0, .24);
}

.tutorial-welcome-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 5vw, 72px);
  line-height: .95;
}

.tutorial-welcome-card p {
  max-width: 760px;
  color: #bfdbfe;
  font-size: 17px;
  font-weight: 800;
}

.tutorial-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tutorial-profile-grid span {
  min-height: 96px;
  padding: 15px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(96, 165, 250, .34);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(8, 18, 34, .72);
  font-size: 20px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.tutorial-profile-grid b {
  color: #93c5fd;
  font-size: 12px;
  text-transform: uppercase;
}

.tutorial-browser-bar {
  gap: 7px;
  padding: 12px 14px;
  color: #9fb5d4;
  background: rgba(15, 23, 42, .95);
  border-bottom: 1px solid rgba(72, 99, 147, .48);
}

.tutorial-browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef4444;
}

.tutorial-browser-bar i:nth-child(2) { background: #f59e0b; }
.tutorial-browser-bar i:nth-child(3) { background: #22c55e; }

.tutorial-browser-bar span {
  margin-left: 8px;
  font-size: 12px;
}

.tutorial-screen {
  min-height: 560px;
  align-items: stretch;
}

.tutorial-screen aside {
  width: 220px;
  padding: 18px 12px;
  display: grid;
  align-content: start;
  gap: 7px;
  background: rgba(10, 22, 43, .92);
  border-right: 1px solid rgba(72, 99, 147, .5);
}

.tutorial-screen aside b {
  padding: 7px 10px;
  border-radius: 7px;
  color: #b8c8e3;
  font-size: 12px;
  line-height: 1.2;
}

.tutorial-screen aside b.active {
  color: #ffffff;
  background: rgba(37, 99, 235, .75);
}

.tutorial-screen main {
  position: relative;
  flex: 1;
  padding: 42px;
  display: grid;
  place-items: center;
  text-align: center;
}

.tutorial-screen main strong {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 46px);
}

.tutorial-screen main p {
  color: #9fc5ff;
  font-weight: 900;
}

.tutorial-arrow {
  position: absolute;
  left: 24px;
  top: 42%;
  color: #facc15;
  font-size: 64px;
  text-shadow: 0 0 24px rgba(250, 204, 21, .45);
}

.tutorial-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.tutorial-copy h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
}

.tutorial-copy p {
  color: #d7e6ff;
  font-size: 17px;
  line-height: 1.55;
}

.tutorial-text-blocks {
  display: grid;
  gap: 12px;
}

.tutorial-lead-text,
.tutorial-info-card {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(96, 165, 250, .34);
  border-radius: 8px;
  background: rgba(8, 18, 34, .72);
}

.tutorial-lead-text {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.tutorial-info-card {
  display: grid;
  gap: 9px;
  border-color: rgba(245, 158, 11, .38);
  background: linear-gradient(135deg, rgba(245, 158, 11, .13), rgba(37, 99, 235, .1));
}

.tutorial-info-card strong {
  color: #fde68a;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.tutorial-info-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.tutorial-info-card li {
  position: relative;
  padding-left: 20px;
  color: #eaf3ff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.tutorial-info-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .14);
}

.tutorial-discord-card {
  display: grid;
  gap: 9px;
  padding: 14px 15px;
  border: 1px solid rgba(239, 68, 68, .52);
  border-radius: 8px;
  background: rgba(127, 29, 29, .18);
}

.tutorial-discord-hero {
  min-height: 610px;
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  align-content: center;
  gap: 22px;
  border: 1px solid rgba(239, 68, 68, .55);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 18%, rgba(88, 101, 242, .34), transparent 30%),
    linear-gradient(135deg, rgba(127, 29, 29, .42), rgba(8, 18, 34, .82)),
    #071120;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 24px 70px rgba(0, 0, 0, .24);
}

.tutorial-discord-hero.linked {
  border-color: rgba(34, 197, 94, .58);
  background:
    radial-gradient(circle at 20% 18%, rgba(34, 197, 94, .28), transparent 30%),
    linear-gradient(135deg, rgba(20, 83, 45, .42), rgba(8, 18, 34, .82)),
    #071120;
}

.tutorial-discord-hero h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(44px, 5vw, 76px);
  line-height: .94;
}

.tutorial-discord-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  font-weight: 850;
}

.tutorial-discord-status {
  padding: 16px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(8, 18, 34, .68);
}

.tutorial-discord-status b {
  color: #ffffff;
  font-size: 24px;
}

.tutorial-discord-status span {
  color: #bfdbfe;
  font-weight: 850;
}

.tutorial-discord-card.linked {
  border-color: rgba(34, 197, 94, .52);
  background: rgba(20, 83, 45, .2);
}

.tutorial-discord-card strong {
  color: #ffffff;
  font-size: 16px;
}

.tutorial-discord-card span {
  color: #cfe2ff;
  font-weight: 800;
}

.tutorial-required-hint {
  margin: -2px 0 0;
  font-weight: 850;
}

.tutorial-dn-box {
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(96, 165, 250, .5);
  border-radius: 8px;
  background: rgba(37, 99, 235, .15);
}

.tutorial-dn-box span {
  color: #9fb5d4;
  font-weight: 800;
}

.tutorial-dn-box strong {
  color: #fff;
  font-size: 30px;
}

.tutorial-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.tutorial-admin-card {
  grid-column: 1 / -1;
}

.tutorial-admin-list {
  display: grid;
  gap: 14px;
}

.tutorial-admin-row {
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(72, 99, 147, .55);
  border-radius: 8px;
  background: rgba(8, 18, 34, .66);
}

.tutorial-admin-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .2);
  font-weight: 950;
}

.tutorial-admin-fields {
  flex: 1;
  display: grid;
  gap: 10px;
}

.tutorial-admin-preview {
  width: 260px;
  min-height: 170px;
  display: grid;
}

.tutorial-admin-preview .tutorial-screen {
  min-height: 128px;
}

.tutorial-admin-preview .tutorial-screen aside {
  width: 80px;
  padding: 8px 5px;
}

.tutorial-admin-preview .tutorial-screen aside b {
  padding: 4px;
  font-size: 6px;
}

.tutorial-admin-preview .tutorial-screen main {
  padding: 12px;
}

.tutorial-admin-preview .tutorial-screen main strong {
  font-size: 18px;
}

.tutorial-admin-preview .tutorial-arrow {
  left: 7px;
  font-size: 24px;
}

.tutorial-upload-btn {
  position: relative;
  overflow: hidden;
}

.tutorial-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .tutorial-layout {
    grid-template-columns: 1fr;
  }

  .tutorial-media {
    min-height: 460px;
  }

  .tutorial-screen {
    min-height: 420px;
  }
}

body.swat-alert-flash::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  border: 8px solid transparent;
  animation: swat-alert-flash 10s ease-out both;
}

@keyframes swat-alert-flash {
  0%, 18%, 36%, 54%, 72% {
    border-color: rgba(239, 68, 68, .82);
    box-shadow: inset 0 0 60px rgba(239, 68, 68, .22), 0 0 42px rgba(239, 68, 68, .25);
  }
  9%, 27%, 45%, 63%, 81% {
    border-color: rgba(37, 99, 235, .82);
    box-shadow: inset 0 0 60px rgba(37, 99, 235, .2), 0 0 42px rgba(37, 99, 235, .25);
  }
  100% {
    opacity: 0;
    border-color: transparent;
    box-shadow: none;
  }
}

@keyframes notify-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notify-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(24px);
  }
}

@keyframes notify-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 30% 10%, #1a2029 0, transparent 36%), #08090b;
}

.loading-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 30% 10%, #1a2029 0, transparent 36%), #08090b;
}

.loading-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  color: var(--text);
}

.loading-panel img {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
}

.loading-panel strong {
  font-size: 18px;
}

.loading-panel span {
  width: 150px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #1a2940;
}

.loading-panel span::before {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: #2f6df6;
  animation: loading-slide 1s ease-in-out infinite;
}

@keyframes loading-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(240%); }
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

.login-panel h1,
.topbar h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: #0d0f13;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
}

.sidebar {
  height: 100vh;
  padding: 0 12px 16px;
  background: #0b1222;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 18px 0 40px rgba(0, 0, 0, .2);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #263850 #0b1222;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: #0b1222;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #263850;
  border-radius: 999px;
  border: 2px solid #0b1222;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #34465f;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 66px;
  margin: 0 -12px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: #0b1222;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid rgba(255, 217, 92, .6);
  border-radius: 999px;
  background: #050505;
}

.brand strong {
  font-size: 18px;
}

.profile-card {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid rgba(74, 163, 255, .12);
  border-radius: 8px;
  background: #121d33;
}

.profile-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-copy strong,
.profile-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 13px;
}

.profile-copy span {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  color: #66b7ff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
}

.profile-copy em {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.profile-copy em.on {
  color: #35f28f;
  background: rgba(30, 130, 78, .22);
  border: 1px solid #16b96a;
}

.profile-copy em.off {
  color: #ff585f;
  background: rgba(114, 17, 28, .18);
  border: 1px solid #e12b35;
}

.avatar {
  flex: 0 0 auto;
  display: inline-block;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: #0e1728;
  overflow: hidden;
  max-width: none;
  max-height: none;
}

.avatar.sm {
  width: 30px;
  height: 30px;
}

.avatar.md {
  width: 40px;
  height: 40px;
}

.avatar.lg {
  width: 48px;
  height: 48px;
}

.avatar.xl {
  width: 76px;
  height: 76px;
}

.avatar-fallback {
  display: inline-grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, .28), transparent 18%),
    linear-gradient(135deg, #142746, #0a0e16 56%, #173b2f);
  box-shadow: inset 0 0 0 2px rgba(74, 163, 255, .18);
}

.avatar-fallback span {
  color: #eaf5ff;
  font-size: 12px;
  font-weight: 900;
}

.navigation {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  overflow: visible;
}

.direction-tabs,
.direction-member-tabs {
  flex-wrap: wrap;
}

.direction-member-tabs-panel {
  margin-bottom: 14px;
  padding: 12px;
}

.nav-btn {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 8px;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-btn.nav-btn-truncated:hover {
  min-height: 50px;
  align-items: start;
}

.nav-btn.nav-btn-truncated:hover .nav-label {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.18;
  align-self: center;
}

.has-ellipsis-tooltip {
  cursor: help;
}

.custom-ellipsis-tooltip {
  position: fixed;
  z-index: 999999;
  max-width: min(420px, calc(100vw - 28px));
  padding: 9px 11px;
  color: #ecf5ff;
  border: 1px solid rgba(93, 156, 255, .55);
  border-radius: 8px;
  background: #0d1728;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .48), 0 0 0 3px rgba(93, 156, 255, .12);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.custom-ellipsis-tooltip.hidden {
  display: none;
}

.nav-meta {
  position: relative;
  width: 38px;
  height: 24px;
  display: inline-grid;
  place-items: center end;
  justify-self: end;
}

.nav-meta .page-lock {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.nav-meta .nav-count-badge {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.nav-btn:hover,
.nav-btn.active {
  color: var(--text);
  background: #152746;
  border-color: rgba(74, 163, 255, .55);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  position: relative;
}

.nav-hidden-eye {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, .38);
  border-radius: 999px;
  background: rgba(255, 209, 102, .1);
}

.nav-hidden-eye svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg,
.nav-icon img,
.section-icon svg,
.section-icon img,
.mini-icon svg,
.mini-icon img,
.agent-action svg,
.action-btn svg,
.edit-icon svg,
.edit-pencil svg,
.edit-pencil img {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-icon,
.asset-action-icon {
  display: block;
  object-fit: contain;
}

.asset-action-icon {
  width: 22px;
  height: 22px;
  image-rendering: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.mini-icon .asset-action-icon,
.agent-action .asset-action-icon {
  width: 24px;
  height: 24px;
}

.asset-icon-fluctuation {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  flex: 0 0 auto;
  margin: 14px -12px 0;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #0b1222;
}

.logout-tab {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: rgba(15, 23, 42, .82);
  border: 1px solid #31445f;
  border-radius: 6px;
  padding: 9px 10px;
  font-weight: 800;
  text-align: left;
}

.logout-tab:hover {
  background: #152746;
  border-color: rgba(74, 163, 255, .55);
}

.workspace {
  min-width: 0;
  height: 100vh;
  overflow: auto;
  display: grid;
  grid-template-rows: auto 1fr;
  border-left: 1px solid #243247;
}

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #0c1221;
  position: sticky;
  top: 0;
  z-index: 3;
}

.topbar > .template-mode-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.header-title-block {
  min-width: 0;
}

.header-title-block.with-icon {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon subtitle";
  align-items: center;
  column-gap: 10px;
}

.header-title-block.with-icon #pageTitle {
  grid-area: title;
}

.header-title-block.with-icon #rankLine {
  grid-area: subtitle;
}

.header-icon {
  grid-area: icon;
  display: inline-grid;
  place-items: center;
  color: var(--cyan);
}

.header-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar h2 {
  font-size: 28px;
  line-height: 1.1;
}

.topbar .eyebrow {
  margin: 6px 0 0;
  color: #9fb5d4;
  font-size: 16px;
  text-transform: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.tutorial-header-btn {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(96, 165, 250, .46);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .16);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.tutorial-header-btn:hover {
  color: #ffffff;
  border-color: rgba(96, 165, 250, .78);
  background: rgba(37, 99, 235, .3);
}

.top-discord-link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #dbe4ff;
  background: transparent;
  text-decoration: none;
  overflow: hidden;
  box-shadow: none;
  transition: transform .16s ease, filter .16s ease;
}

.top-discord-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: none;
}

.top-discord-link img {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
}

.gibson-cola-btn {
  position: relative;
  isolation: isolate;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #dc2626, #f97316, #16a34a, #2563eb, #7c3aed, #dc2626);
  background-size: 260% 100%;
  box-shadow: 0 10px 24px rgba(220, 38, 38, .22), inset 0 0 0 1px rgba(255, 255, 255, .12);
  font-weight: 950;
  cursor: pointer;
  animation: colaButtonFlow 4s linear infinite;
}

.gibson-cola-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .28), inset 0 0 0 1px rgba(255, 255, 255, .18);
}

@keyframes colaButtonFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

.cola-party-active .workspace {
  animation: colaRainbowFlash .28s linear infinite;
}

.custom-animation-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.custom-animation-stage {
  display: grid;
  justify-items: center;
  gap: 10px;
  animation: customAnimationPop .18s ease-out;
}

.custom-animation-media {
  display: block;
  max-width: min(58vw, 760px);
  max-height: min(58vh, 620px);
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .42));
}

.custom-animation-stage span {
  padding: 8px 14px;
  border: 1px solid rgba(96, 165, 250, .32);
  border-radius: 999px;
  color: #eaf2ff;
  background: rgba(8, 13, 24, .62);
  font-weight: 950;
}

.cola-party-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}

.cola-party-title {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, .82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .36), 0 0 36px rgba(59, 130, 246, .28);
  font-size: 24px;
  font-weight: 950;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
  animation: colaTitlePulse .7s ease-in-out infinite alternate;
}

.cola-bottle {
  position: absolute;
  left: var(--left);
  bottom: -180px;
  width: 56px;
  height: 150px;
  display: grid;
  place-items: center;
  padding: 22px 6px 14px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 18px 18px 12px 12px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .22), transparent 28%, rgba(255, 255, 255, .08) 70%, rgba(255, 255, 255, .28)),
    linear-gradient(180deg, #111827 0 18%, #020617 18% 44%, #dc2626 44% 66%, #020617 66% 100%);
  box-shadow: 0 18px 28px rgba(0, 0, 0, .35), inset 0 0 18px rgba(255, 255, 255, .08);
  transform: scale(var(--scale));
  animation: colaBottleBounce var(--duration) cubic-bezier(.26, .74, .26, 1) var(--delay) infinite;
}

.cola-bottle::before {
  content: "";
  position: absolute;
  top: -23px;
  left: 16px;
  width: 22px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-bottom: 0;
  border-radius: 8px 8px 2px 2px;
  background: #0f172a;
}

.cola-bottle span,
.cola-bottle b,
.cola-bottle em {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1;
  text-align: center;
}

.cola-bottle span {
  font-size: 12px;
  font-weight: 900;
}

.cola-bottle b {
  margin-top: 4px;
  color: #e0f2fe;
  font-size: 14px;
  letter-spacing: 0;
}

.cola-bottle em {
  margin-top: 10px;
  color: #fecaca;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.jumpscare-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, .95) 0 7%, rgba(220, 38, 38, .92) 8% 22%, rgba(0, 0, 0, .98) 58%),
    #000000;
  animation: jumpscareShake .08s linear infinite, jumpscareFlash .18s linear infinite;
}

.jumpscare-overlay strong {
  position: absolute;
  bottom: 16%;
  font-size: clamp(42px, 9vw, 150px);
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 0 18px #ff0000, 0 0 44px #000000;
}

.jumpscare-overlay small {
  position: absolute;
  bottom: 10%;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(0, 0, 0, .72);
  font-size: 18px;
  font-weight: 900;
}

.jumpscare-face {
  position: relative;
  width: min(64vw, 620px);
  aspect-ratio: 1;
  border-radius: 46% 54% 44% 56%;
  background: #f8fafc;
  box-shadow: inset 0 -42px 0 rgba(0, 0, 0, .12), 0 0 90px rgba(248, 113, 113, .7);
  transform: scale(1.05);
}

.jumpscare-face span {
  position: absolute;
  top: 25%;
  width: 20%;
  height: 24%;
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 22px #ef4444;
}

.jumpscare-face span:first-child { left: 22%; }
.jumpscare-face span:nth-child(2) { right: 22%; }

.jumpscare-face b {
  position: absolute;
  left: 50%;
  bottom: 17%;
  width: 34%;
  height: 28%;
  border-radius: 0 0 50% 50%;
  background: #000000;
  transform: translateX(-50%);
  box-shadow: inset 0 -20px 0 #dc2626;
}

@keyframes colaRainbowFlash {
  0% { filter: hue-rotate(0deg) saturate(1.15); }
  25% { filter: hue-rotate(95deg) saturate(1.65); }
  50% { filter: hue-rotate(190deg) saturate(1.8); }
  75% { filter: hue-rotate(285deg) saturate(1.55); }
  100% { filter: hue-rotate(360deg) saturate(1.15); }
}

@keyframes customAnimationPop {
  from { transform: scale(.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes colaTitlePulse {
  from { transform: translateX(-50%) scale(.98); }
  to { transform: translateX(-50%) scale(1.05); }
}

@keyframes colaBottleBounce {
  0% { transform: translateY(0) translateX(-30px) rotate(-16deg) scale(var(--scale)); opacity: 0; }
  10% { opacity: 1; }
  38% { transform: translateY(-58vh) translateX(34px) rotate(18deg) scale(var(--scale)); }
  62% { transform: translateY(-36vh) translateX(-12px) rotate(-10deg) scale(var(--scale)); }
  82% { opacity: 1; }
  100% { transform: translateY(-112vh) translateX(42px) rotate(22deg) scale(var(--scale)); opacity: 0; }
}

@keyframes jumpscareShake {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(10px, -8px) scale(1.02); }
  50% { transform: translate(-8px, 8px) scale(1.01); }
  75% { transform: translate(6px, 5px) scale(1.03); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes jumpscareFlash {
  0%, 100% { filter: brightness(1.4) contrast(1.25); }
  50% { filter: brightness(.7) contrast(1.9) hue-rotate(25deg); }
}

.calendar-header-notice {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(560px, 42vw);
  padding: 9px 14px;
  border: 1px solid rgba(251, 191, 36, .48);
  border-radius: 999px;
  color: #fff7d6;
  background: rgba(120, 53, 15, .7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .04);
  cursor: pointer;
}

.calendar-header-notice svg {
  width: 16px;
  height: 16px;
  color: #fbbf24;
  stroke: currentColor;
}

.calendar-header-notice strong,
.calendar-header-notice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-header-notice span {
  color: #fde68a;
  font-size: 12px;
  font-weight: 900;
}

.content {
  min-width: 0;
  padding: 14px 26px 26px;
  display: grid;
  gap: 16px;
  background: #070b14;
}

.promotion-page {
  display: grid;
  gap: 12px;
}

.promotion-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(74, 163, 255, .22);
  border-radius: 8px;
  background: #0f172a;
}

.promotion-page-head h2 {
  margin: 0;
  font-size: 24px;
}

.promotion-page-head > span {
  padding: 5px 10px;
  border: 1px solid rgba(96, 165, 250, .42);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .16);
  font-weight: 900;
}

.promotion-announcement-list {
  display: grid;
  gap: 10px;
}

.promotion-day-group {
  display: grid;
  gap: 8px;
}

.promotion-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .74);
}

.promotion-day-heading strong {
  color: #e5f0ff;
  font-size: 14px;
}

.promotion-day-heading span {
  color: #93a9c8;
  font-size: 12px;
  font-weight: 800;
}

.promotion-day-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
}

.promotion-announcement {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, .5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 83, 45, .28), rgba(15, 23, 42, .98));
}

.promotion-announcement.demotion {
  border-color: rgba(248, 113, 113, .55);
  background: linear-gradient(135deg, rgba(127, 29, 29, .28), rgba(15, 23, 42, .98));
}

.promotion-announcement-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #bbf7d0;
  background: rgba(22, 163, 74, .22);
  font-size: 20px;
  font-weight: 900;
}

.promotion-announcement.demotion .promotion-announcement-icon {
  color: #fecaca;
  background: rgba(220, 38, 38, .22);
}

.promotion-announcement span {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.promotion-announcement strong {
  display: block;
  margin-top: 1px;
  color: #fff;
  font-size: 16px;
}

.promotion-announcement p {
  margin: 4px 0;
  color: #d7e3f4;
  font-size: 13px;
}

.promotion-announcement small {
  color: #93a9c8;
  font-size: 11px;
}

.hero-title {
  text-align: center;
  display: grid;
  gap: 6px;
}

.hero-title h1 {
  margin: 0;
  font-size: 34px;
}

.panel {
  min-width: 0;
  max-width: 100%;
  background: #101827;
  border: 1px solid #263850;
  border-radius: 8px;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header h3,
.panel h3 {
  margin: 0;
}

.defcon-panel {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
}

.defcon-panel p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.defcon-value {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.defcon-meta {
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
  margin-left: auto;
  padding-top: 2px;
  align-self: center;
}

.defcon-panel .icon-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.defcon-5 {
  background: linear-gradient(135deg, #243447, #172230);
}

.defcon-4 {
  background: linear-gradient(135deg, #5c6876, #44505f);
}

.defcon-3 {
  background: linear-gradient(135deg, #d87522, #824616);
  border-color: rgba(255, 174, 76, .55);
}

.defcon-2 {
  background: linear-gradient(135deg, #d94b4e, #8f2632);
  border-color: rgba(255, 110, 114, .62);
}

.defcon-1 {
  background: linear-gradient(135deg, #ff1f35, #9f0c1a);
  border-color: rgba(255, 132, 142, .7);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 2px 10px;
  background: #101827;
  border: 1px solid #263850;
  border-radius: 8px;
  padding: 8px 14px;
}

.stat-card span {
  color: #f4f7ff;
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  font-size: 19px;
  grid-column: 1;
}

.stat-card i {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--cyan);
  font-style: normal;
}

.stat-card i svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.stat-card small {
  color: #8eb8e8;
  font-size: 12px;
  grid-column: 1;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: var(--cyan);
}

.note-list {
  display: grid;
  gap: 12px;
}

.note-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #34465f;
  border-radius: 8px;
  background: #142033;
}

.note-card.note-it-info {
  border-color: rgba(168, 85, 247, .62);
  background: linear-gradient(135deg, rgba(88, 28, 135, .34), rgba(20, 32, 51, .96));
  box-shadow: 0 0 0 1px rgba(168, 85, 247, .16), 0 16px 36px rgba(88, 28, 135, .18);
}

.note-card.note-direktion {
  border-color: rgba(239, 68, 68, .76);
  background: linear-gradient(135deg, rgba(127, 29, 29, .42), rgba(20, 32, 51, .96));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .20), 0 16px 36px rgba(127, 29, 29, .18);
}

.note-card.note-anweisung {
  border-color: rgba(245, 158, 11, .72);
  background: linear-gradient(135deg, rgba(245, 158, 11, .24), rgba(20, 32, 51, .96));
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .18), 0 16px 36px rgba(245, 158, 11, .12);
}

.note-priority-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(143, 183, 255, .36);
  border-radius: 8px;
  color: #9cc8ff;
  background: rgba(74, 163, 255, .10);
}

.note-priority-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 2;
}

.note-card.note-direktion .note-priority-icon {
  color: #fecaca;
  border-color: rgba(239, 68, 68, .58);
  background: rgba(239, 68, 68, .16);
}

.note-card.note-anweisung .note-priority-icon {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, .58);
  background: rgba(245, 158, 11, .16);
}

.note-card.note-it-info .note-priority-icon {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, .55);
  background: rgba(168, 85, 247, .16);
}

.note-card p {
  margin: 4px 0;
}

.department-note-body {
  margin: 4px 0;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.45;
  white-space: normal;
}

.department-note-body div {
  min-height: 1.35em;
}

.department-note-body.align-left {
  text-align: left;
}

.department-note-body.align-center {
  text-align: center;
}

.department-note-body.align-right {
  text-align: right;
}

.note-card a {
  color: #8fb7ff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.leadership-member-list {
  display: grid;
  gap: 12px;
}

.leadership-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.leadership-toolbar label {
  display: grid;
  gap: 6px;
  color: #8eb8e8;
  font-size: 12px;
  font-weight: 900;
}

.leadership-member-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.leadership-member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.leadership-member-head > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leadership-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.leadership-hours {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.leadership-facts span,
.leadership-hours span,
.leadership-notes > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.leadership-facts b {
  color: #8eb8e8;
  font-size: 12px;
}

.leadership-hours span.active {
  border-color: rgba(74, 163, 255, .65);
  background: rgba(37, 99, 235, .16);
}

.leadership-hours b {
  color: #9dffbf;
  font-size: 12px;
}

.leadership-notes {
  display: grid;
  gap: 8px;
}

.leadership-notes p {
  margin: 0;
}

.hr-management-shell,
.hr-member-list {
  display: grid;
  gap: 10px;
}

.hr-create-head {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.hr-create-head h4 {
  margin: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.hr-create-head .muted {
  margin-top: 4px;
  line-height: 1.35;
}

.hr-member-toolbar {
  grid-template-columns: minmax(220px, 1fr);
  margin-bottom: 0;
}

.hr-member-row,
.hr-auto-grid span {
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.hr-member-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(0, 1.15fr) minmax(260px, 1.2fr) minmax(190px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.hr-member-row.readonly {
  grid-template-columns: minmax(210px, 1fr) minmax(0, 1.4fr) auto;
}

.hr-member-row.is-absent {
  border-color: rgba(245, 158, 11, .62);
  background: rgba(245, 158, 11, .08);
}

.hr-member-main {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.hr-member-main span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hr-member-main small {
  color: #8fa0b8;
}

.hr-member-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hr-member-meta span,
.hr-member-hours span,
.hr-auto-grid span {
  display: grid;
  gap: 3px;
  padding: 8px;
  color: #d8e8ff;
}

.hr-member-meta b,
.hr-member-hours b,
.hr-auto-grid b {
  color: #8eb8e8;
  font-size: 12px;
}

.hr-member-hours {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hr-member-hours span {
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.hr-absence-card {
  border-color: rgba(245, 158, 11, .48) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, .2), rgba(15, 23, 42, .78)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.hr-absence-card b {
  color: #fbbf24 !important;
}

.hr-absence-card small {
  color: #f8db9d;
}

.hr-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.hr-member-actions button {
  min-height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}

.hr-member-notes {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.hr-member-notes span {
  position: relative;
  display: grid;
  gap: 3px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px;
  border: 1px solid #263850;
  border-radius: 8px;
  color: #d8e8ff;
  background: rgba(0, 0, 0, .12);
}

.hr-member-notes small {
  color: #8fa0b8;
}

.hr-member-notes .delete-dept-member-note {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.hr-member-file-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.hr-member-file-summary span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.hr-member-file-summary span.danger {
  border-color: rgba(239, 68, 68, .58);
  background: rgba(127, 29, 29, .18);
}

.hr-member-file-summary b {
  color: #f8fbff;
  font-size: 20px;
}

.hr-member-file-summary span.danger b {
  color: #fecaca;
}

.member-file-menu,
.rookie-file-form {
  display: grid;
  gap: 10px;
}

.member-file-menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rookie-file-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rookie-file-form .full {
  grid-column: 1 / -1;
}

.member-note-view-list {
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
}

.member-note-entry {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(15, 23, 42, .5);
}

.member-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.member-note-view-list article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
}

.member-note-view-list p {
  margin: 0;
  white-space: pre-wrap;
  color: #d8e8ff;
}

.rookie-file-card {
  gap: 10px !important;
}

.rookie-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rookie-file-grid span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #2b4568;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
}

.rookie-file-grid b {
  color: #8eb8e8;
  font-size: 12px;
}

.absence-manage-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, .36);
  border-radius: 8px;
  background: rgba(245, 158, 11, .08);
}

.absence-manage-card span {
  display: grid;
  gap: 2px;
}

.absence-manage-card b {
  color: #fbbf24;
}

.absence-manage-card p {
  margin: 0;
  color: #d8e8ff;
  white-space: pre-wrap;
}

.module-grant-list {
  display: grid;
  gap: 10px;
}

.module-grant-row {
  display: grid;
  grid-template-columns: minmax(190px, .42fr) minmax(420px, 1.58fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
}

.module-grant-row > div:first-child {
  display: grid;
  gap: 3px;
}

.module-grant-row small {
  color: #8fa0b8;
}

.training-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.module-grant-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  align-items: start;
}

.module-grant-group {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #243a58;
  border-radius: 8px;
  background: rgba(15, 23, 42, .42);
}

.module-grant-group h4 {
  margin: 0;
  color: #8eb8e8;
  font-size: 12px;
  text-transform: uppercase;
}

.module-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid #2b4568;
  border-radius: 8px;
  color: #cfe4ff;
  background: rgba(15, 23, 42, .88);
  cursor: pointer;
}

.module-toggle span {
  min-width: 0;
  text-align: left;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 850;
}

.module-toggle i {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  text-align: center;
  color: #93c5fd;
  background: rgba(37, 99, 235, .18);
}

.module-toggle.is-active {
  border-color: rgba(34, 197, 94, .7);
  color: #ecfdf5;
  background: linear-gradient(135deg, rgba(22, 163, 74, .32), rgba(15, 23, 42, .92));
}

.module-toggle.is-active i {
  color: #052e16;
  background: #86efac;
}

.module-toggle:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.hr-auto-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.training-exam-layout,
.training-management-grid {
  display: grid;
  gap: 14px;
}

.est-dashboard {
  gap: 16px;
}

.est-overview-panel {
  display: grid;
  gap: 12px;
}

.est-flow-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.est-flow-overview article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.est-flow-overview b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #9fd0ff;
  background: rgba(47, 109, 246, .18);
}

.est-flow-overview span {
  display: grid;
  gap: 4px;
}

.est-flow-overview small {
  color: #9fb4d0;
  line-height: 1.35;
}

.est-create-panel {
  gap: 10px;
}

.est-create-box {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  justify-content: start;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 32, 51, .98), rgba(12, 22, 38, .98));
}

.training-exam-card,
.training-manage-card {
  display: grid;
  gap: 14px;
}

.compact-est-panel {
  gap: 10px;
  padding: 14px;
}

.compact-est-panel .panel-header {
  margin-bottom: 0;
}

.compact-est-panel .panel-header h3 {
  margin: 0;
}

.compact-est-panel .panel-header p {
  margin: 2px 0 0;
}

.exam-start-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.est-create-row {
  grid-template-columns: minmax(260px, 420px) auto;
  justify-content: start;
  padding: 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.est-create-row label {
  margin: 0;
}

.est-module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.est-module-chip {
  min-width: 150px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.est-module-chip span {
  color: #8eb8e8;
  font-size: 11px;
  font-weight: 900;
}

.est-module-chip strong {
  font-size: 13px;
}

.exam-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.compact-module-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.compact-module-grid .exam-module-card {
  min-height: 82px;
  padding: 10px;
}

.module-start-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, .8fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.exam-user-picker {
  position: relative;
}

.exam-user-options {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101827;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
}

.exam-user-picker.open .exam-user-options {
  display: grid;
  gap: 4px;
}

.exam-user-options button {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #dce8f8;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.exam-user-options button:hover {
  border-color: #30445f;
  background: rgba(74, 163, 255, .12);
}

.exam-module-card,
.active-exam-box,
.exam-result-preview,
.module-template-list span {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.exam-module-card > span {
  color: #8eb8e8;
  font-size: 12px;
  font-weight: 900;
}

.exam-question-list {
  display: grid;
  gap: 8px;
}

.exam-question-row {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
  align-items: flex-start;
  padding: 9px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.exam-question-row input {
  width: auto;
  margin-top: 3px;
}

.exam-question-row span,
.exam-question-row small {
  display: grid;
  gap: 3px;
}

.active-exam-box,
.exam-result-preview {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.exam-result-preview {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.result-pass,
.result-fail {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.result-pass {
  color: #75ffad;
  background: rgba(22, 185, 106, .13);
}

.result-fail {
  color: #ff9ca0;
  background: rgba(225, 43, 53, .13);
}

.module-template-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.training-admin-module {
  align-content: start;
}

.training-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.training-module-head > div:first-child {
  display: grid;
  gap: 4px;
}

.training-question-admin-list {
  display: grid;
  gap: 8px;
}

.training-question-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
}

.training-question-admin-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.training-question-admin-row b {
  white-space: normal;
}

.training-question-form .question-type-display {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: rgba(47, 109, 246, .08);
}

.training-question-form .question-type-display span {
  color: #8eb8e8;
  font-size: 12px;
  font-weight: 900;
}

.training-question-form .question-type-display strong {
  color: #f5f8ff;
}

.image-upload-card {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.image-upload-card strong {
  color: #f5f8ff;
  min-width: 0;
  overflow-wrap: anywhere;
}

.image-upload-card small {
  color: #9fb4d0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.image-upload-drop {
  position: relative;
  display: grid !important;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-height: 104px;
  padding: 10px;
  text-align: center;
  border: 1px dashed #4f6f99;
  border-radius: 8px;
  background: rgba(47, 109, 246, .08);
  cursor: pointer;
  user-select: none;
  min-width: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.image-upload-drop:hover,
.image-upload-drop.drag-over {
  border-color: #6fb3ff;
  background: rgba(47, 109, 246, .16);
  transform: translateY(-1px);
}

.image-upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload-drop .upload-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(47, 109, 246, .18);
  color: #9fd0ff;
  font-weight: 900;
}

.image-upload-drop .upload-icon svg {
  width: 18px;
  height: 18px;
}

.image-upload-drop strong,
.image-upload-drop small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-big-field textarea {
  min-height: 180px;
}

.modal.exam-modal {
  width: 86vw;
  max-width: 1200px;
  min-height: 70vh;
}

.modal.exam-modal.setup-exam-modal {
  width: min(560px, calc(100vw - 28px));
  min-height: 0;
  align-content: start;
}

.setup-exam-modal .exam-runner-card {
  padding: 14px;
  gap: 10px;
}

.setup-exam-modal .exam-runner-card h4 {
  font-size: 18px;
}

.setup-exam-modal .modal-actions .blue-btn,
.setup-exam-modal .modal-actions .ghost-btn {
  min-height: 36px;
  padding: 8px 14px;
}

.exam-runner-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.exam-runner-card > span {
  color: #8eb8e8;
  font-size: 12px;
  font-weight: 900;
}

.exam-runner-card h4 {
  margin: 0;
  font-size: 22px;
}

.exam-answer-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.exam-answer-list,
.exam-module-stepper {
  display: grid;
  gap: 8px;
}

.exam-answer-list {
  padding: 12px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
}

.exam-module-stepper {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 12px;
}

.exam-module-stepper span {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101a2b;
}

.exam-module-stepper span.active {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, .16);
}

.exam-module-stepper span.done {
  border-color: rgba(22, 185, 106, .55);
}

.exam-module-stepper b {
  color: #f5f8ff;
}

.exam-module-stepper small {
  color: #8fa0b8;
}

.exam-answer-columns > div,
.manual-solution-box,
.exam-review-module {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
}

.exam-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #31445f;
  border-radius: 8px;
  background: #101a2b;
}

.exam-check input {
  width: auto;
}

.exam-check.penalty {
  border-color: rgba(255, 76, 86, .45);
  color: #ffb2b7;
}

.exam-review-list {
  display: grid;
  gap: 12px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.exam-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid #31445f;
  border-radius: 8px;
  background: #101a2b;
}

.exam-review-row span {
  display: grid;
  gap: 3px;
}

.exam-review-row.detailed {
  grid-template-columns: minmax(0, 1fr) 130px;
  align-items: start;
}

.exam-review-row.detailed small {
  color: #a9bad3;
  line-height: 1.45;
}

.archive-detail {
  max-height: 64vh;
}

.archive-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.archive-module-head h4 {
  margin: 0;
}

.archive-question-row strong {
  justify-self: end;
  color: #f5f8ff;
}

.catalog-exam-modal {
  width: 96vw;
  max-width: 1760px;
  min-height: 84vh;
}

.modal.catalog-exam-modal {
  width: 98vw;
  max-width: none;
}

.exam-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.exam-modal-head h3 {
  margin: 0;
}

.exam-top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-right: 34px;
}

.pause-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(22, 185, 106, .45);
  border-radius: 8px;
  color: #75ffad;
  font-weight: 900;
  background: rgba(22, 185, 106, .12);
}

.pause-pill.paused {
  border-color: rgba(255, 183, 77, .55);
  color: #ffd28a;
  background: rgba(255, 183, 77, .12);
}

.compact-est-start .exam-start-grid.compact {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
}

.training-completed-split {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.training-active-card {
  display: grid;
  gap: 14px;
}

.training-active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.training-completed-card {
  display: grid;
  gap: 12px;
}

.training-active-exam-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 32, 51, .98), rgba(13, 23, 39, .98));
}

.training-active-head,
.training-active-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.training-active-head strong {
  display: block;
  font-size: 17px;
}

.training-active-head small,
.training-module-pill small {
  color: #9fb4d0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(74, 163, 255, .45);
  border-radius: 999px;
  color: #9fd0ff;
  background: rgba(37, 99, 235, .14);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.warn {
  border-color: rgba(245, 158, 11, .55);
  color: #ffd28a;
  background: rgba(245, 158, 11, .12);
}

.status-pill.success {
  border-color: rgba(34, 197, 94, .55);
  color: #8cffb3;
  background: rgba(34, 197, 94, .12);
}

.training-active-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.training-active-meta span {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
}

.training-active-meta b {
  color: #8eb8e8;
  font-size: 12px;
}

.training-module-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.training-module-pill {
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 8px 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.training-module-pill.active {
  border-color: rgba(74, 163, 255, .7);
  background: rgba(37, 99, 235, .18);
}

.training-module-pill.good {
  border-color: rgba(34, 197, 94, .7);
}

.training-module-pill.warn {
  border-color: rgba(245, 158, 11, .8);
}

.training-module-pill.bad {
  border-color: rgba(239, 68, 68, .72);
}

.training-active-actions {
  justify-content: flex-start;
}

.panel-header.slim {
  margin: 0;
}

.panel-header.slim h3 {
  font-size: 18px;
}

.exam-module-stepper {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.exam-module-tab {
  min-height: 54px;
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101a2b;
  color: #f5f8ff;
  text-align: left;
  cursor: pointer;
}

.exam-module-tab:hover,
.exam-module-tab.active {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, .16);
}

.exam-module-tab.good,
.archive-module-block.good,
.est-runner-main.good,
.est-location-side.good {
  border-color: rgba(22, 185, 106, .62);
}

.exam-module-tab.warn,
.archive-module-block.warn,
.est-runner-main.warn,
.est-location-side.warn {
  border-color: rgba(255, 183, 77, .7);
}

.exam-module-tab.bad,
.archive-module-block.bad,
.est-runner-main.bad,
.est-location-side.bad {
  border-color: rgba(255, 76, 86, .62);
}

.est-runner-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(440px, .95fr);
  gap: 14px;
}

.est-runner-main,
.est-location-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.exam-catalog-list {
  display: grid;
  gap: 12px;
}

.location-list {
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
}

.exam-catalog-question {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: #101a2b;
}

.exam-catalog-question.score-right-question {
  grid-template-columns: minmax(0, 1fr) 138px;
  align-items: stretch;
}

.exam-catalog-question.score-left-question {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
}

.question-content-box {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.exam-current-module-chip {
  width: min(360px, 100%);
  justify-self: center;
  display: grid;
  gap: 2px;
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101a2b;
}

.exam-current-module-chip span,
.exam-current-module-chip small {
  color: #8fa0b8;
  font-size: 12px;
}

.exam-current-module-chip strong {
  color: #f5f8ff;
  font-size: 17px;
}

.catalog-question-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.catalog-question-grid.location-score-left {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-question-body {
  display: grid;
  gap: 10px;
}

.catalog-question-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.catalog-question-head b,
.catalog-question-head small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.catalog-question-head small {
  color: #8fa0b8;
  white-space: nowrap;
}

.manual-solution-box.compact {
  padding: 9px;
}

.manual-solution-box.compact p {
  margin: 0;
}

.inline-solution {
  padding: 8px 10px;
  border-left: 3px solid #2f6df6;
  border-radius: 6px;
  color: #a9bad3;
  background: rgba(47, 109, 246, .08);
  font-size: 12px;
  line-height: 1.45;
}

.exam-answer-list.neutral {
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-answer-list {
  gap: 5px;
}

.compact-answer-row {
  min-height: 28px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1.2;
}

.compact-answer-row span {
  align-self: center;
}

.exam-check.muted-check {
  border-color: #43526a;
  color: #c7d4e7;
}

.location-question label,
.exam-catalog-question label {
  display: grid;
  gap: 6px;
}

.score-select {
  width: 56px;
  height: 36px;
  justify-self: end;
  text-align: center;
  font-weight: 900;
  border-radius: 8px;
  padding: 0 4px;
  color: #f5f8ff;
  background-color: #101827;
}

.question-score-row {
  display: grid;
  align-items: center;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .13);
}

.question-score-row > span:first-child {
  margin-right: 0;
  color: #8fa0b8;
  font-size: 12px;
  font-weight: 900;
}

.auto-score {
  width: 56px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #30445f;
  border-radius: 8px;
  font-weight: 900;
}

.score-0,
.score--1 {
  border-color: rgba(255, 76, 86, .7);
  color: #ffb2b7;
  background-color: rgba(88, 22, 30, .95);
}

.score-0-5 {
  border-color: rgba(255, 183, 77, .75);
  color: #ffd28a;
  background-color: rgba(82, 56, 18, .95);
}

.score-1,
.score-1-5,
.score-2 {
  border-color: rgba(22, 185, 106, .7);
  color: #75ffad;
  background-color: rgba(16, 72, 43, .95);
}

.score-select option,
.penalty-line select option {
  color: #f5f8ff;
  background: #101827;
}

.penalty-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #a9bad3;
  font-size: 12px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.exam-setup-row {
  display: flex;
  justify-content: flex-end;
}

.exam-setup-second {
  width: min(260px, 100%);
}

.exam-runner-meta.compact-meta {
  grid-template-columns: minmax(160px, 260px) auto;
}

.penalty-line select {
  width: 70px;
}

.location-question-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #30445f;
}

.question-image-preview {
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed #3a5476;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  overflow: hidden;
}

.question-image-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.scenario-info-box {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #314762;
  border-radius: 8px;
  background: rgba(47, 109, 246, .08);
}

.scenario-info-box strong {
  color: #9cc7ff;
}

.scenario-info-box p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.scenario-side-module,
.scenario-side-card {
  display: grid;
  gap: 10px;
}

.scenario-runner-question textarea {
  min-height: 180px;
}

.compact-choice-question textarea {
  min-height: 110px;
}

.compact-choice-question .scenario-info-box p {
  white-space: pre-wrap;
}

.est-side-module {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.est-side-module.good {
  border-color: rgba(22, 185, 106, .62);
}

.est-side-module.warn {
  border-color: rgba(255, 183, 77, .7);
}

.est-side-module.bad {
  border-color: rgba(255, 76, 86, .62);
}

.module-start-choice,
.est-fixed-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.module-start-choice strong,
.est-fixed-flow strong {
  grid-column: 1 / -1;
}

.est-fixed-flow span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  padding: 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.est-fixed-flow span.active {
  border-color: rgba(74, 163, 255, .72);
  background: rgba(37, 99, 235, .18);
}

.est-fixed-flow b {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #9fd0ff;
  background: rgba(47, 109, 246, .18);
}

.est-fixed-flow i {
  color: #f5f8ff;
  font-style: normal;
  font-weight: 900;
}

.est-fixed-flow small {
  color: #9fb4d0;
}

.module-start-choice .selected {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, .18);
  color: #fff;
}

.compact-start {
  gap: 12px;
  padding: 14px;
}

.completed-exam-row {
  border-color: rgba(22, 185, 106, .35);
}

.next-module-menu {
  display: grid;
  gap: 8px;
  justify-self: end;
  width: min(420px, 100%);
  padding: 12px;
  margin-top: -8px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101a2b;
}

.next-module-menu.hidden {
  display: none;
}

.next-module-pick {
  justify-content: space-between;
}

.exam-module-start-card {
  min-height: 0;
}

.exam-runner-meta {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101a2b;
}

.exam-runner-meta.compact-meta {
  grid-template-columns: minmax(220px, 360px) auto;
  justify-content: space-between;
  align-items: center;
}

.exam-runner-meta.compact-meta label {
  font-size: 12px;
}

.exam-runner-meta span {
  display: grid;
  gap: 3px;
  color: #dce8f8;
}

.exam-runner-meta i {
  font-style: normal;
  color: #75ffad;
  font-weight: 900;
}

.training-archive-card {
  display: grid;
  gap: 12px;
}

.training-archive-list {
  display: grid;
  gap: 10px;
}

.training-archive-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(180px, .7fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.training-archive-row div:first-child,
.training-archive-row span {
  display: grid;
  gap: 3px;
}

.training-archive-row b,
.training-archive-row small {
  color: #8fa0b8;
}

.avatar-crop-layout {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.avatar-crop-frame {
  width: 260px;
  height: 260px;
  overflow: hidden;
  border: 2px solid #4aa3ff;
  border-radius: 999px;
  background: #0b1220;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.avatar-crop-frame:active {
  cursor: grabbing;
}

.avatar-crop-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  user-select: none;
  pointer-events: none;
}

.note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.note-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.department-note-editor {
  display: grid;
  gap: 10px;
}

.department-note-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(72, 99, 147, .55);
  border-radius: 8px;
  background: rgba(9, 18, 35, .72);
}

.department-note-toolbar label {
  min-width: 135px;
  margin: 0;
  display: grid;
  gap: 5px;
  color: #bcd0eb;
  font-size: 12px;
  font-weight: 850;
}

.department-note-toolbar select {
  min-height: 36px;
}

.department-note-editor textarea {
  min-height: 180px;
  resize: vertical;
}

.mini-icon,
.agent-action {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #5da8ff;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 0;
}

.mini-icon:hover,
.agent-action:hover {
  background: transparent;
}

.mini-icon.danger,
.agent-action {
  color: #ff5a61;
}

.mini-icon.danger {
  border: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.info {
  background: rgba(40, 119, 255, .18);
  color: #8fb7ff;
}

.badge.it-info {
  background: rgba(88, 28, 135, .34);
  color: #f3e8ff;
  border: 1px solid rgba(168, 85, 247, .48);
}

.badge.anweisung {
  background: rgba(229, 72, 77, .18);
  color: #ff9ca0;
}

.badge.direktion {
  background: rgba(143, 29, 44, .45);
  color: #ffc0c8;
}

.service-pill {
  min-width: 0;
  text-align: center;
  padding: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 900;
  background: transparent;
  border: 0;
}

.service-pill.on {
  color: #35f28f;
  background: transparent;
  border: 0;
}

.service-pill.off {
  color: #ff585f;
  background: transparent;
  border: 0;
}

.hard-refresh-btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(99, 168, 255, .24);
  border-radius: 999px;
  color: #9fb5d4;
  background: rgba(16, 24, 39, .62);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.hard-refresh-btn:hover {
  color: #ffffff;
  border-color: rgba(99, 168, 255, .55);
  background: rgba(40, 119, 255, .18);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-btn,
.blue-btn,
.red-btn,
.orange-btn,
.ghost-btn,
.icon-btn {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 9px 13px;
  color: white;
  font-weight: 700;
}

.primary-btn,
.blue-btn {
  background: #2563eb;
}

.blue-btn svg,
.red-btn svg,
.orange-btn svg,
.ghost-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.red-btn {
  background: #ef2525;
}

.orange-btn {
  background: #fb5b05;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 116px;
}

.action-btn span {
  display: inline-grid;
  place-items: center;
}

.ghost-btn,
.icon-btn {
  background: #202b3b;
  border: 1px solid #33465f;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #263850;
  border-radius: 8px;
}

.panel:has(.members-table-wrap) {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.department-layout table {
  min-width: 100%;
}

.department-layout .table-wrap {
  overflow: visible;
}

th,
td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: #d5e4ff;
  background: #0d1422;
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.training-archive-row.exam-passed {
  border-color: rgba(22, 185, 106, .5);
}

.training-archive-row.exam-failed {
  border-color: rgba(225, 43, 53, .55);
}

.seizure-page {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 12px;
}

.seizure-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.seizure-stats-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 28px;
  margin-top: -4px;
  color: #b6c8e4;
  font-size: 13px;
  font-weight: 900;
}

.seizure-stats-head label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auto-time-score {
  min-width: 78px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(74, 163, 255, .55);
  border-radius: 8px;
  color: #9fd0ff;
  background: rgba(37, 99, 235, .14);
  font-weight: 900;
}

.time-score-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.seizure-range-select {
  width: 118px;
  min-height: 32px;
  padding: 5px 10px;
}

.seizure-stats .stat-card {
  min-height: 90px;
}

.seizure-panel .panel-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seizure-panel .panel-header svg {
  width: 20px;
  height: 20px;
  color: #55a8ff;
  stroke: currentColor;
}

.seizure-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 18px;
}

.seizure-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 310px);
  min-height: 280px;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-inline: contain;
}

.seizure-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #101827;
}

.seizure-table {
  min-width: 1260px;
  table-layout: fixed;
}

.seizure-table th,
.seizure-table td {
  padding: 14px;
  vertical-align: middle;
  line-height: 1.45;
}

.seizure-table td {
  color: #eef5ff;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.seizure-table th:nth-child(1),
.seizure-table td:nth-child(1) {
  width: 185px;
}

.seizure-table th:nth-child(2),
.seizure-table td:nth-child(2) {
  width: 190px;
}

.seizure-table th:nth-child(3),
.seizure-table td:nth-child(3) {
  width: 190px;
}

.seizure-table th:nth-child(4),
.seizure-table td:nth-child(4),
.seizure-table th:nth-child(5),
.seizure-table td:nth-child(5) {
  width: 110px;
}

.seizure-table th:nth-child(6),
.seizure-table td:nth-child(6) {
  width: 118px;
  overflow-wrap: normal;
  word-break: normal;
}

.seizure-table th:nth-child(7),
.seizure-table td:nth-child(7) {
  width: 135px;
}

.seizure-table th:nth-child(8),
.seizure-table td:nth-child(8) {
  width: 155px;
}

.seizure-table th:nth-child(9),
.seizure-table td:nth-child(9) {
  width: 145px;
}

.seizure-table th:nth-child(10),
.seizure-table td:nth-child(10) {
  width: 86px;
}

.seizure-vehicle-line {
  display: block;
  margin-top: 5px;
  color: #93c5fd;
  font-size: 12px;
  line-height: 1.35;
}

.seizure-location-cell {
  max-width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.evidence-link-list {
  display: grid;
  gap: 8px;
}

.evidence-link-list > span {
  display: inline-flex;
  width: fit-content;
  max-width: 260px;
  overflow: hidden;
  color: #93c5fd;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-preview-card {
  display: grid;
  gap: 6px;
  width: 166px;
  min-width: 166px;
  padding: 7px;
  background: #101827;
  border: 1px solid #2d415c;
  border-radius: 8px;
}

.evidence-thumb-link {
  display: block;
  width: 100%;
  height: 86px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid #30445f;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  contain: strict;
}

.evidence-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  opacity: 0;
  transition: opacity .16s ease;
}

.evidence-preview-card.is-loaded .evidence-thumb-link img {
  opacity: 1;
}

.evidence-thumb-link span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #93c5fd;
  font-weight: 900;
  letter-spacing: 0;
}

.evidence-thumb-link .prnt-fallback {
  display: none;
}

.evidence-preview-card.no-preview img {
  display: none;
}

.evidence-preview-card.no-preview .prnt-fallback {
  display: grid;
}

.evidence-text-link {
  overflow: hidden;
  color: #93c5fd;
  font-weight: 900;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seizure-actions svg {
  width: 18px;
  height: 18px;
}

.gear-action {
  color: #dbeafe;
  background: #172338;
  border: 1px solid #3f5877;
}

.gear-action:hover {
  color: #ffffff;
  border-color: #62a8ff;
  background: #20314c;
}

.seizure-more-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.seizure-more-row svg {
  width: 16px;
  height: 16px;
}

.required-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.required-label b {
  color: #ff7177;
}

.seizure-source-field {
  display: grid;
  gap: 8px;
  color: #d8e5f8;
  font-weight: 900;
}

.seizure-source-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.seizure-source-options label {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.seizure-source-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seizure-source-options span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid #57708f;
  border-radius: 8px;
  background: #1b2c45;
  color: #e6f1ff;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.seizure-source-options input:checked + span {
  color: #ffffff;
  border-color: #4aa3ff;
  background: rgba(37, 99, 235, .36);
}

.seizure-source-options label:first-child input:checked + span {
  color: #ffe3aa;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, .24);
}

.seizure-source-options label:last-child input:checked + span {
  color: #c9ffe8;
  border-color: #22c55e;
  background: rgba(34, 197, 94, .22);
}

.admin-duty-count {
  color: #ff5b65;
  font-style: normal;
  font-weight: 950;
}

.status-admin {
  color: #ff7b82;
  border-color: rgba(225, 43, 53, .75);
  background: rgba(225, 43, 53, .14);
}

.danger-choice {
  border-color: rgba(239, 68, 68, .42);
}

.danger-choice strong {
  color: #ff9ca0;
}

.modal.evidence-preview-modal {
  width: min(980px, 96vw);
}

.evidence-popup-preview {
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid #2d415c;
  border-radius: 8px;
}

.evidence-popup-preview img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.evidence-popup-preview iframe {
  width: 100%;
  height: 72vh;
  border: 0;
  background: #fff;
}

.evidence-popup-link {
  justify-self: flex-end;
}

.evidence-field {
  display: grid;
  gap: 10px;
}

.field-title {
  color: #d5e4ff;
  font-weight: 900;
}

.evidence-input-list {
  display: grid;
  gap: 10px;
}

.evidence-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.evidence-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-add-btn {
  justify-self: flex-start;
}

.uploaded-evidence-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.uploaded-evidence-row input {
  color: #7fa8d8;
  font-size: 12px;
}

.uploaded-evidence-name {
  max-width: 180px;
  overflow: hidden;
  color: #cfe1fb;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#addSeizureBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  line-height: 1;
}

#addSeizureBtn svg {
  display: block;
  width: 18px;
  height: 18px;
  color: #ffffff;
  stroke: #ffffff;
}

.empty-table {
  text-align: center;
  color: var(--muted);
}

.seizure-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, .14);
}

.seizure-pill.yes {
  color: #ff8d94;
  background: rgba(239, 68, 68, .16);
  border-color: rgba(239, 68, 68, .5);
}

.seizure-pill.no {
  color: #b9c8e1;
  background: rgba(148, 163, 184, .12);
}

.seizure-pill.dealer {
  color: #ffd38a;
  background: rgba(245, 158, 11, .16);
  border-color: rgba(245, 158, 11, .45);
}

.seizure-pill.camper {
  color: #9df3c4;
  background: rgba(16, 185, 129, .16);
  border-color: rgba(16, 185, 129, .45);
}

.seizure-pill.normal {
  color: #9ed1ff;
  background: rgba(59, 130, 246, .16);
  border-color: rgba(59, 130, 246, .45);
}

.modal.seizure-modal {
  width: min(980px, 96vw);
}

.seizure-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.seizure-modal-head span {
  display: grid;
  place-items: center;
  color: #63a8ff;
}

.seizure-modal-head svg {
  width: 22px;
  height: 22px;
}

.seizure-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  margin-top: 16px;
}

.seizure-modal-grid label {
  display: grid;
  gap: 8px;
  align-content: start;
}

.seizure-modal-grid .full {
  grid-column: 1 / -1;
}

.seizure-modal-grid textarea {
  min-height: 80px;
}

.seizure-modal-grid b {
  color: #ff6b78;
}

.seizure-checkbox {
  align-self: end;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
}

.modal-actions .full-action {
  width: 100%;
  justify-content: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.account-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.account-status-chip.active {
  color: #75ffad;
  background: rgba(22, 185, 106, .16);
  border: 1px solid #16b96a;
}

.account-status-chip.locked {
  color: #ff8e94;
  background: rgba(239, 37, 37, .14);
  border: 1px solid #ef4444;
}

.account-status-chip.suspended {
  color: #ffd18a;
  background: rgba(245, 158, 11, .16);
  border: 1px solid #f59e0b;
}

.member-row-locked td {
  background: rgba(239, 37, 37, .05);
}

.member-row-suspended td {
  background: rgba(245, 158, 11, .06);
}

.member-row-absence {
  opacity: .68;
}

.member-row-absence td {
  background: rgba(148, 163, 184, .06);
}

.absence-mini-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(148, 163, 184, .38);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, .12);
  font-size: 11px;
  font-weight: 900;
}

button.absence-mini-pill {
  cursor: pointer;
}

.absence-section {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.absence-section h4 {
  margin: 0;
}

.member-row-self td {
  background: rgba(22, 185, 106, .08);
}

.member-row-self td:first-child {
  box-shadow: inset 3px 0 0 rgba(22, 185, 106, .85);
}

.status-inside {
  color: #d6b7ff;
  border: 1px solid #b36bff;
  background: rgba(132, 66, 210, .18);
}

.status-outside {
  color: #ffd84d;
  border: 1px solid #f1b800;
  background: rgba(201, 151, 0, .14);
}

.status-undercover {
  color: #8ee7ff;
  border: 1px solid #2bc7ff;
  background: rgba(43, 199, 255, .14);
}

.split-right {
  border-right: 2px solid #3a404b;
}

.training-no {
  color: var(--red);
  font-weight: 900;
}

.training-yes {
  color: var(--green);
  font-weight: 900;
}

.archive-training-list {
  min-width: 260px;
}

.training-mini {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  padding: 2px 7px;
  border: 1px solid #34465f;
  border-radius: 999px;
  color: #b9d4ff;
  background: rgba(37, 99, 235, .12);
  font-size: 12px;
  font-weight: 800;
}

.training-group-start {
  border-left: 2px solid #3a404b;
}

.members-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1420px;
}

.members-table-wrap {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  max-height: calc(100vh - 245px);
  overflow: auto;
}

.table-scrollbar-sync {
  position: sticky;
  top: 92px;
  z-index: 18;
  overflow-x: auto;
  overflow-y: hidden;
  height: 18px;
  border: 1px solid #263850;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #0d1422;
}

.table-scrollbar-sync > div {
  height: 1px;
}

.members-table th,
.members-table td {
  padding-left: 20px;
  padding-right: 20px;
}

.members-table thead th {
  position: sticky;
  top: 0;
  z-index: 14;
  overflow: visible;
  background: #101827;
  box-shadow: 0 1px 0 #263850;
}

.members-table thead th:hover {
  z-index: 90;
}

.members-table th.training-group-start {
  border-left: 2px solid #3a404b;
}

.members-table td.training-group-start {
  border-left: 0;
}

.training-hover-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.members-training-head {
  flex-direction: column;
  gap: 3px;
  line-height: 1.15;
}

.members-training-head > span:first-child {
  position: relative;
  z-index: 1;
}

.members-training-head small {
  max-width: 92px;
  color: #facc15;
  font-size: 10px;
  font-weight: 800;
  white-space: normal;
}

.training-hover-card {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  gap: 5px;
  width: max-content;
  min-width: 190px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid rgba(77, 139, 255, .55);
  border-radius: 8px;
  color: #dbeafe;
  text-align: left;
  background: linear-gradient(145deg, rgba(15, 23, 42, .98), rgba(20, 32, 51, .98));
  box-shadow: 0 14px 35px rgba(0, 0, 0, .42);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity .12s ease, transform .12s ease;
}

.training-hover-card b {
  color: #f8fbff;
  font-size: 13px;
}

.training-hover-card span,
.training-hover-card i {
  display: block;
  color: #9fb4d0;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.training-hover-card i {
  color: #facc15;
}

.training-hover-anchor:hover .training-hover-card,
.training-hover-anchor:focus-within .training-hover-card {
  opacity: 1;
  transform: translate(-50%, 0);
}

.members-table thead .training-hover-card {
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 120;
}

.members-table td .training-hover-card {
  top: auto;
  bottom: calc(100% + 8px);
}

.members-table .member-name-col {
  border-right: 2px solid #3a404b;
}

.member-module-cell {
  width: 34px;
  min-height: 30px;
  padding: 4px;
  border: 1px solid rgba(90, 124, 170, .5);
  border-radius: 8px;
  color: inherit;
  background: rgba(15, 23, 42, .78);
  font-weight: 900;
}

.member-module-cell:hover {
  border-color: rgba(77, 139, 255, .9);
  background: rgba(36, 99, 235, .22);
}

.module-draft-changed {
  box-shadow: inset 0 0 0 999px rgba(245, 158, 11, .08);
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

table th.text-center,
table td.text-center {
  text-align: center;
}

table th.text-left,
table td.text-left {
  text-align: left;
}

.member-name-col {
  min-width: 230px;
  width: 230px;
}

.member-rank-col {
  min-width: 86px;
  width: 86px;
}

.heading-count.frak-count {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, .45);
  background: rgba(88, 28, 135, .28);
}

.member-row-frakverwaltung td {
  background: rgba(88, 28, 135, .08);
}

.frakverwaltung-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  color: #f3e8ff;
  border: 1px solid rgba(168, 85, 247, .48);
  border-radius: 7px;
  background: rgba(88, 28, 135, .34);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.training-hidden {
  color: rgba(216, 180, 254, .55);
}

.member-name-wrap {
  max-width: 210px;
  align-items: center;
}

.member-name-wrap > span:last-child,
.rank-wrap {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  line-height: 1.3;
}

.rank-wrap {
  display: inline-block;
  max-width: 180px;
}

.rank-number {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 30px;
  padding: 4px 9px;
  color: #dbeafe;
  border: 1px solid #33465f;
  border-radius: 7px;
  background: #152238;
  font-weight: 950;
  cursor: default;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.member-rank-col .rank-number {
  cursor: pointer;
}

.member-rank-col .rank-number:hover {
  border-color: #5d9cff;
  background: #1b2d49;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .28), 0 0 0 3px rgba(93, 156, 255, .12);
}

.member-rank-col .rank-number::after {
  content: attr(data-rank-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 25;
  width: max-content;
  max-width: 240px;
  padding: 7px 9px;
  color: #ecf5ff;
  border: 1px solid rgba(93, 156, 255, .45);
  border-radius: 7px;
  background: #0d1728;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .38);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
}

.member-rank-col .rank-number:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.members-table tbody tr:hover .member-rank-col,
.members-table tbody tr:focus-within .member-rank-col {
  position: relative;
  z-index: 80;
}

.members-table tbody tr:nth-child(-n+3) .member-rank-col .rank-number::after {
  top: calc(100% + 8px);
  bottom: auto;
}

.members-table tbody tr:nth-child(-n+3) .member-rank-col .rank-number:hover::after {
  transform: translate(-50%, 0);
}

.muted {
  color: var(--muted);
}

.member-name,
.profile-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 22px;
  padding: 18px 20px 22px;
  min-height: 210px;
}

.profile-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.profile-main strong {
  font-size: 28px;
}

.profile-badges,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.profile-inline-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin-top: 44px;
}

.profile-inline-facts span {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: #f5f7fb;
  font-size: 22px;
  font-weight: 800;
}

.profile-inline-facts b {
  color: #8eb8e8;
  font-size: 13px;
  font-weight: 800;
}

.profile-tabs {
  width: fit-content;
  min-height: 0;
  margin: 0;
  padding: 3px;
  gap: 3px;
  align-self: start;
}

.profile-tabs button {
  min-height: 24px;
  max-height: 24px;
  padding: 4px 10px;
  font-size: 12px;
}

.profile-training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.profile-training-group-grid {
  display: grid;
  gap: 14px;
}

.flat-training-grid {
  align-items: stretch;
}

.profile-training-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.profile-training-group h4 {
  margin: 0;
  font-size: 15px;
}

.profile-training-list {
  display: grid;
  gap: 8px;
}

.profile-training-row {
  min-height: 74px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.profile-training-row.done {
  border-color: rgba(22, 185, 106, .45);
}

.profile-training-row.done .profile-training-state {
  color: #75ffad;
}

.profile-training-row.open .profile-training-state {
  color: #ff9ca0;
}

.flat-training-grid .profile-training-row > span {
  font-weight: 950;
}

.profile-training-name {
  color: #e8f1ff;
}

.profile-training-info {
  display: grid;
  gap: 5px;
}

.profile-training-info small,
.profile-training-info em {
  display: block;
  color: #9fb4d0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.profile-training-info em {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(250, 204, 21, .35);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, .1);
  font-style: normal;
}

.profile-training-row b small {
  display: block;
  margin-top: 3px;
  color: #91a7c4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.profile-stat-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.progress-stat {
  gap: 8px 10px;
}

.progress-stat .progress-bar {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #0d1422;
  border: 1px solid #263850;
}

.progress-stat .progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16b96a, #52ff98);
}

.split-stat {
  align-content: stretch;
}

.service-split {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-split span {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #263850;
  border-radius: 7px;
  background: #0d1422;
  color: #f5f7fb;
  font-weight: 900;
}

.service-split b {
  color: #8eb8e8;
  font-size: 11px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  border: 1px solid #475569;
  background: rgba(71, 85, 105, .22);
  font-size: 12px;
  font-weight: 900;
}

.role-pill.role-frakverwaltung {
  color: #f3e8ff;
  border-color: rgba(168, 85, 247, .5);
  background: rgba(88, 28, 135, .34);
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #91b9ff;
  border: 1px solid #2563eb;
  background: rgba(37, 99, 235, .18);
  font-size: 12px;
  font-weight: 900;
}

.role-supervisor {
  color: #ffe58a;
  border-color: #f6c945;
  background: rgba(246, 201, 69, .14);
}

.role-direktion {
  color: #ff9ca0;
  border-color: #ef2525;
  background: rgba(239, 37, 37, .16);
}

.role-it {
  color: #8ee7ff;
  border-color: #2bc7ff;
  background: rgba(43, 199, 255, .16);
}

.role-it-leitung {
  color: #e6d6ff;
  border-color: #a855f7;
  background: rgba(168, 85, 247, .18);
}

.it-role-readonly,
.it-role-note,
.it-role-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101a2b;
}

.it-role-controls .it-toggle {
  flex: 1 1 220px;
  margin: 0;
}

.it-role-readonly span {
  display: inline-flex;
  gap: 6px;
  color: #dce8f8;
  font-weight: 800;
}

.it-role-readonly b {
  color: #8eb8e8;
}

.it-role-readonly small {
  width: 100%;
  color: #8fa0b8;
}

.filter-row {
  margin-bottom: 12px;
}

.compact-input {
  max-width: 320px;
}

.log-action-chip {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(71, 85, 105, .22);
  border: 1px solid #475569;
  font-size: 12px;
  font-weight: 900;
}

.log-good .log-action-chip {
  color: #52ff98;
  border-color: #16b96a;
  background: rgba(22, 185, 106, .16);
}

.log-bad .log-action-chip {
  color: #ff8b91;
  border-color: #e12b35;
  background: rgba(225, 43, 53, .16);
}

.log-warn .log-action-chip {
  color: #ffe58a;
  border-color: #f6c945;
  background: rgba(246, 201, 69, .14);
}

.log-detail-text {
  max-width: 720px;
  color: #d5dfed;
  font-size: 13px;
  line-height: 1.45;
}

.log-detail-text strong {
  color: #ffffff;
  font-weight: 950;
}

.log-detail-text mark {
  padding: 0 4px;
  border-radius: 4px;
  color: #ffffff;
  background: rgba(255, 255, 255, .12);
  font-weight: 950;
}

.log-detail-text mark.good {
  color: #75ffad;
  background: rgba(22, 185, 106, .12);
}

.log-detail-text mark.bad {
  color: #ff9ca0;
  background: rgba(225, 43, 53, .12);
}

.log-detail-separator,
.log-arrow {
  color: #7f8ca3;
  font-weight: 900;
}

.uprank-list,
.uprank-rule-list {
  display: grid;
  gap: 12px;
}

.uprank-search-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  max-width: 520px;
}

.uprank-search-row small {
  color: #8fa0b8;
}

.uprank-card,
.uprank-rule-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #2d4058;
  border-radius: 8px;
  background: #141b28;
}

.uprank-card {
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr) auto;
  align-items: center;
}

.uprank-card.ready {
  border-color: rgba(22, 185, 106, .7);
  background: rgba(22, 185, 106, .08);
}

.uprank-card.preview-ready {
  border-color: rgba(99, 168, 255, .46);
  background: rgba(47, 109, 246, .06);
}

.uprank-card.special-required {
  border-color: rgba(245, 158, 11, .8);
  background: rgba(245, 158, 11, .08);
}

.uprank-card.negative-file {
  border-color: rgba(239, 68, 68, .85);
  background: rgba(127, 29, 29, .22);
}

.uprank-main,
.uprank-rule-card > div:first-child {
  display: grid;
  gap: 4px;
}

.uprank-main strong,
.uprank-rule-card strong {
  font-size: 16px;
}

.uprank-main span,
.uprank-rule-card small {
  color: #b7c8df;
}

.uprank-facts,
.uprank-actions,
.uprank-modal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.uprank-actions {
  justify-content: flex-end;
}

.action-confirm-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(74, 163, 255, .42);
  border-radius: 8px;
  background: rgba(47, 109, 246, .1);
  cursor: pointer;
}

.action-confirm-toggle input {
  appearance: none;
  width: 42px;
  height: 24px;
  border: 1px solid rgba(148, 163, 184, .65);
  border-radius: 999px;
  background: #0b1220;
  position: relative;
  transition: border-color .16s ease, background .16s ease;
}

.action-confirm-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #94a3b8;
  transition: transform .16s ease, background .16s ease;
}

.action-confirm-toggle input:checked {
  border-color: #22c55e;
  background: rgba(34, 197, 94, .25);
}

.action-confirm-toggle input:checked::after {
  transform: translateX(18px);
  background: #4ade80;
}

.action-confirm-toggle span {
  display: grid;
  gap: 2px;
}

.action-confirm-toggle small {
  color: #a9bddc;
}

.uprank-missing-box {
  min-width: 0;
  max-width: 220px;
  display: grid;
  gap: 4px;
  padding: 7px 10px;
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, .08);
  color: #d7e3f4;
  font-size: 12px;
}

.uprank-missing-box strong {
  color: #ffd18a;
}

.uprank-missing-box span {
  line-height: 1.35;
}

.uprank-missing-box.danger {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, .12);
}

.uprank-missing-box.danger strong {
  color: #fecaca;
}

.uprank-missing-box.preview {
  border-left-color: #60a5fa;
  background: rgba(96, 165, 250, .1);
}

.requirement-chip.preview {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, .55);
  background: rgba(96, 165, 250, .12);
}

.uprank-file-alert {
  grid-column: 2 / 3;
  align-self: center;
  display: inline-grid;
  width: fit-content;
  max-width: min(520px, 100%);
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid rgba(239, 68, 68, .55);
  border-left: 3px solid #ef4444;
  border-radius: 8px;
  color: #fecaca;
  background: rgba(127, 29, 29, .22);
  font-size: 12px;
}

.uprank-file-alert strong {
  color: #fee2e2;
  font-size: 12px;
}

.uprank-file-alert span {
  color: #fca5a5;
  line-height: 1.25;
}

.requirement-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #41546f;
  border-radius: 999px;
  color: #c9d6e8;
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 800;
}

.requirement-chip.ok {
  color: #75ffad;
  border-color: rgba(22, 185, 106, .7);
  background: rgba(22, 185, 106, .13);
}

.requirement-chip.missing {
  color: #ff9ca0;
  border-color: rgba(225, 43, 53, .75);
  background: rgba(225, 43, 53, .13);
}

.requirement-chip.danger {
  color: #fecaca;
  border-color: rgba(239, 68, 68, .8);
  background: rgba(239, 68, 68, .16);
}

.requirement-chip.special {
  color: #ffd18a;
  border-color: rgba(245, 158, 11, .8);
  background: rgba(245, 158, 11, .15);
}

.uprank-rule-card {
  grid-template-columns: minmax(210px, .9fr) 140px auto minmax(0, 2fr);
  align-items: center;
  overflow: visible;
}

.uprank-rule-card > * {
  min-width: 0;
}

.compact-rule-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: max-content;
  max-width: 100%;
  margin-left: 8px;
  padding: 6px 11px;
  border: 1px solid rgba(148, 163, 184, .55);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, .68);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}

.compact-rule-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compact-rule-toggle:has(input:checked) {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, .9);
  background: rgba(14, 165, 233, .2);
}

.rule-training-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.rule-training-grid .training-toggle {
  min-height: 0;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.rule-training-grid .training-toggle span {
  width: auto;
  min-height: 30px;
  padding: 5px 10px;
  border-color: rgba(71, 85, 105, .85);
  background: rgba(23, 34, 53, .75);
  color: #dbeafe;
  overflow: visible;
  white-space: nowrap;
}

.rule-training-grid .training-toggle:hover span {
  border-color: rgba(96, 165, 250, .9);
  background: rgba(37, 99, 235, .16);
}

.rule-training-grid .training-toggle input:checked + span {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .78);
  background: rgba(22, 163, 74, .18);
}

@media (max-width: 1280px) {
  .uprank-rule-card {
    grid-template-columns: minmax(180px, 1fr) 130px auto;
  }

  .uprank-rule-card .rule-training-grid {
    grid-column: 1 / -1;
  }
}

.uprank-modal-summary {
  margin: 12px 0;
}

.compact-stats {
  margin-bottom: 14px;
}

.fluctuation-summary {
  display: grid;
  gap: 14px;
}

.fluctuation-summary-grid {
  display: grid;
  grid-template-columns: 180px 180px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.fluctuation-total {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, .03);
}

.fluctuation-total span {
  font-size: 13px;
  font-weight: 800;
}

.fluctuation-total strong {
  font-size: 34px;
  line-height: 1;
}

.fluctuation-summary-list {
  display: grid;
  gap: 8px;
}

.fluctuation-summary-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #34465f;
  border-radius: 8px;
  background: #142033;
}

.summary-green {
  color: #52ff98;
}

.summary-red {
  color: #ff8b91;
}

.member-name.truncate {
  max-width: none;
  min-width: 0;
}

.it-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.it-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 14px;
  margin-bottom: 14px;
}

.it-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.it-hero-panel h3 {
  margin: 0 0 4px;
}

.it-hero-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.it-hero-stats span {
  min-width: 88px;
  padding: 8px 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #aebdd1;
  font-size: 12px;
}

.it-hero-stats b {
  display: block;
  color: #fff;
  font-size: 18px;
}

.it-tool-grid {
  display: grid;
  gap: 10px;
}

.it-tool-grid.compact .it-tool {
  min-height: 58px;
  padding: 12px;
}

.it-tool.devmode-on {
  border-color: rgba(245, 158, 11, .78);
  background: rgba(245, 158, 11, .14);
}

.it-overview-block.it-danger-zone {
  border-color: rgba(239, 68, 68, .46);
  background: rgba(127, 29, 29, .16);
}

.it-tool.danger-tool {
  border-color: rgba(239, 68, 68, .58);
  background: rgba(127, 29, 29, .24);
}

.it-tool.danger-tool strong {
  color: #ffd7d7;
}

.it-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.it-card {
  overflow: hidden;
}

.it-command-center {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.it-overview-card {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border-color: rgba(96, 165, 250, .28);
  background:
    linear-gradient(135deg, rgba(47, 109, 246, .16), transparent 45%),
    #101827;
}

.it-workbench {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "system"
    "restarts"
    "pages"
    "members"
    "ranks";
  gap: 14px;
}

.it-tabs {
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin: 0;
}

.it-overview-start {
  gap: 12px;
}

.it-overview-redesign {
  gap: 14px;
}

.it-overview-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  gap: 14px;
  align-items: start;
}

.it-overview-headline h3 {
  margin: 0 0 4px;
}

.it-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.it-status-strip span {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid #2d4058;
  border-radius: 8px;
  background: #101827;
  color: #9fb2cc;
  font-size: 12px;
}

.it-status-strip b {
  display: block;
  color: #eaf3ff;
  font-size: 18px;
}

.it-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.it-overview-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #263a53;
  border-radius: 8px;
  background: rgba(10, 17, 30, .58);
}

.it-overview-block > div:first-child {
  display: grid;
  gap: 3px;
}

.it-overview-block strong {
  color: #dceaff;
}

.it-overview-block small {
  color: #8fa0b8;
}

.backup-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.backup-status-grid .info-box p {
  margin: 6px 0 0;
  color: #dbeafe;
  font-weight: 800;
}

.backup-list-wrap {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.backup-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #c7f9ff;
  border: 1px solid rgba(56, 189, 248, .55);
  background: rgba(56, 189, 248, .13);
}

.backup-type-pill.manual {
  color: #fde68a;
  border-color: rgba(245, 158, 11, .58);
  background: rgba(245, 158, 11, .14);
}

.it-overview-restarts {
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, .7fr) minmax(220px, .9fr);
  align-items: center;
}

.it-overview-restarts .restart-list {
  grid-column: 1 / -1;
}

.compact-actions {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.it-department-position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
}

.department-position-shortcut {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #2d4058;
  border-radius: 8px;
  background: #101827;
}

.department-position-shortcut strong {
  color: #dceaff;
}

.department-position-shortcut small {
  min-height: 0;
  color: #8fa0b8;
  line-height: 1.35;
}

.it-section-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow: visible;
}

.restart-overview-card {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #263a53;
  border-radius: 8px;
  background: rgba(10, 17, 30, .55);
}

.restart-overview-card > div:first-child {
  display: grid;
  gap: 3px;
}

.restart-overview-card > div:first-child strong {
  color: #dceaff;
}

.restart-overview-card > div:first-child small {
  color: #8fa0b8;
}

.restart-overview-card .restart-list {
  grid-column: 1 / -1;
}

.it-system-card { grid-area: system; }
.it-restarts-card { grid-area: restarts; }
.it-pages-card { grid-area: pages; }
.it-members-card { grid-area: members; }
.it-ranks-card { grid-area: ranks; }

.it-workbench .it-section-card {
  grid-area: auto;
}

.it-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.it-section-title > span:first-child {
  display: none;
}

.it-section-title h3,
.it-section-title p {
  margin: 0;
}

.it-section-title .button-row {
  justify-content: flex-end;
}

.secret-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.secret-config-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(121, 145, 184, .22);
  border-radius: 8px;
  background: rgba(15, 23, 42, .42);
}

.secret-config-block h4 {
  margin: 0;
  color: #e8f2ff;
}

.secret-state {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.secret-state.set {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .18);
}

.secret-state.missing {
  color: #fecaca;
  background: rgba(239, 68, 68, .18);
}

.it-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.it-tool.passive {
  cursor: default;
}

.it-compact-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.it-member-list,
.department-position-list {
  display: grid;
  gap: 8px;
}

.discord-sync-layout {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.2fr);
  gap: 12px;
  align-items: start;
}

.discord-sync-config,
.discord-sync-section,
.discord-department-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #263a53;
  border-radius: 8px;
  background: rgba(10, 17, 30, .58);
}

.discord-sync-section {
  grid-column: 2;
}

.discord-readonly input,
.discord-readonly button:disabled,
.discord-readonly .discord-role-picker {
  cursor: not-allowed;
}

.discord-readonly input:disabled,
.discord-readonly button:disabled {
  opacity: .72;
}

.discord-readonly .discord-role-picker.readonly {
  background: rgba(8, 13, 24, .42);
}

.discord-sync-section > div:first-child,
.discord-department-card > div:first-child {
  display: grid;
  gap: 3px;
}

.discord-sync-section strong,
.discord-department-card strong {
  color: #dceaff;
}

.discord-sync-section small,
.discord-department-card small {
  color: #8fa0b8;
}

.discord-role-grid,
.discord-department-list {
  display: grid;
  gap: 8px;
}

.discord-role-row {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
}

.discord-role-row span {
  color: #cfe1fb;
  font-size: 13px;
}

.discord-role-picker {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.discord-role-picker.disabled {
  padding: 10px;
  border: 1px dashed #344761;
  border-radius: 8px;
}

.discord-role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
}

.discord-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--role-color) 72%, #ffffff 18%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--role-color) 18%, #101827);
  color: #f8fbff;
  font-size: 12px;
}

.discord-role-chip b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-role-remove {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
}

.discord-role-empty {
  color: #7488a8;
  font-size: 12px;
}

.discord-role-search {
  width: 100%;
}

.discord-role-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #344761;
  border-radius: 8px;
  background: #0d1422;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
}

.discord-role-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #dceaff;
  cursor: pointer;
  text-align: left;
}

.discord-role-option span {
  color: var(--role-color);
  font-weight: 900;
}

.discord-role-option small {
  color: #7f91ad;
}

.discord-role-option:hover,
.discord-role-option.selected {
  border-color: color-mix(in srgb, var(--role-color) 52%, #ffffff 16%);
  background: color-mix(in srgb, var(--role-color) 14%, #111827);
}

.discord-import-status {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(99, 168, 255, .24);
  border-radius: 8px;
  background: rgba(40, 119, 255, .1);
  color: #cfe1fb;
  font-size: 12px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfe1fb;
  font-weight: 800;
}

.switch-line input {
  width: auto;
  accent-color: #2877ff;
}

.discord-login-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(128, 139, 255, .5);
  border-radius: 8px;
  background: linear-gradient(135deg, #5865f2, #4652c8);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(88, 101, 242, .22);
}

.discord-login-btn:hover {
  filter: brightness(1.08);
}

.discord-login-btn.loading,
.discord-login-btn:disabled {
  opacity: .82;
  cursor: wait;
  transform: none;
}

.profile-discord-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.profile-discord-card h3,
.profile-discord-card p {
  margin: 0;
}

.profile-discord-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(88, 101, 242, .26);
  border-radius: 8px;
  background: rgba(88, 101, 242, .08);
}

.profile-discord-strip strong,
.profile-discord-strip small {
  display: block;
}

.profile-discord-strip small {
  margin-top: 2px;
  color: #9fb4d0;
}

.discord-hover-id {
  cursor: help;
}

.profile-strip-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.discord-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, .16);
}

.discord-status-dot.linked {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16);
}

.profile-twitch-strip {
  border-color: rgba(168, 85, 247, .3);
  background: rgba(168, 85, 247, .08);
}

.discord-status-dot.twitch.linked {
  background: #a855f7;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .18);
}

.duty-member-name {
  justify-content: flex-start;
}

.twitch-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(248, 113, 113, .78);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .14);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.twitch-live-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, .22);
}

.compact-action {
  min-height: 34px;
  padding: 7px 10px;
}

.it-password-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 320px) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #314862;
  border-radius: 8px;
  background: #101827;
}

.it-password-panel strong,
.it-password-panel small {
  display: block;
}

.it-password-panel small {
  margin-top: 4px;
  color: #8fa0b8;
}

.it-password-panel p {
  grid-column: 1 / -1;
  margin: 0;
}

.force-password-stage {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
  gap: 18px;
  align-content: center;
}

.force-password-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #eef6ff;
  font-size: 18px;
  font-weight: 900;
}

.force-password-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.force-password-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  border-color: rgba(99, 168, 255, .28);
  background: linear-gradient(180deg, #111b2a, #0d1420);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
}

.force-password-panel h3,
.force-password-panel p {
  margin: 0;
}

.force-password-panel .login-kicker {
  color: #74b8ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.force-password-panel label {
  display: grid;
  gap: 8px;
}

.security-note-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: #dcecff;
  border: 1px solid rgba(99, 168, 255, .36);
  border-radius: 8px;
  background: rgba(40, 119, 255, .12);
}

.security-note-box span {
  color: #9fb4d0;
}

.discord-required-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(88, 101, 242, .42);
  border-radius: 8px;
  color: #eef6ff;
  background: linear-gradient(135deg, rgba(88, 101, 242, .2), rgba(40, 119, 255, .1));
}

.discord-required-box span {
  color: #aebfe0;
}

.discord-join-steps {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(88, 101, 242, .42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 101, 242, .18), rgba(40, 119, 255, .08));
}

.discord-join-steps div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
}

.discord-join-steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 999px;
  background: #5865f2;
  font-size: 13px;
}

.discord-join-steps span {
  color: #dcecff;
  line-height: 1.45;
}

.discord-required-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.discord-join-main-btn {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-weight: 950;
}

.discord-dashboard-notice {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-color: rgba(229, 72, 77, .5);
  background: linear-gradient(135deg, rgba(143, 29, 44, .35), rgba(20, 32, 51, .95));
}

.discord-dashboard-notice .login-kicker {
  color: #ff9ca0;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.discord-dashboard-notice h3,
.discord-dashboard-notice p {
  margin: 0;
}

.discord-dashboard-notice p {
  margin-top: 6px;
  color: #d6e2f3;
}

.force-password-panel .small-hint {
  color: #8fa4c2;
  font-size: 13px;
}

.discord-open-link {
  width: auto;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.force-password-panel button {
  justify-self: flex-start;
}

.it-member-row,
.department-position-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, auto) minmax(150px, auto) minmax(240px, .8fr) auto auto auto;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid #2d4058;
  border-radius: 8px;
  background: #141b28;
}

.it-member-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.it-member-row small,
.department-position-manager small {
  display: block;
  color: #8fa0b8;
}

.it-member-roles {
  display: inline-flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.it-activity-list {
  display: grid;
  gap: 10px;
}

.it-activity-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, .26);
  border-radius: 8px;
  background: rgba(15, 23, 42, .68);
}

.it-activity-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.it-activity-user small {
  display: block;
  color: #9fb5d4;
}

.it-activity-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.it-activity-meta span {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(2, 6, 23, .35);
  color: #dbeafe;
}

.it-activity-meta b,
.it-activity-meta small {
  display: block;
}

.it-activity-meta b {
  color: #93c5fd;
  font-size: 11px;
  text-transform: uppercase;
}

.it-mailbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
  min-height: 620px;
}

.it-mailbox-thread-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.it-mailbox-thread {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(15, 23, 42, .68);
  text-align: left;
  cursor: pointer;
}

.it-mailbox-thread.active,
.it-mailbox-thread:hover {
  border-color: rgba(96, 165, 250, .58);
  background: rgba(30, 58, 138, .25);
}

.it-mailbox-thread b,
.it-mailbox-thread small,
.it-mailbox-thread em,
.it-mailbox-thread i {
  display: block;
}

.it-mailbox-thread small {
  margin-top: 3px;
  color: #9fb5d4;
}

.it-mailbox-thread em,
.it-mailbox-thread i {
  color: #93c5fd;
  font-size: 12px;
  font-style: normal;
}

.it-mailbox-reader {
  min-width: 0;
}

.it-mailbox-reader .mailbox-chat {
  min-height: 620px;
}

.it-activation-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(100, 116, 139, .28);
  background: rgba(15, 23, 42, .38);
}

.it-activation-chip strong,
.it-activation-chip small {
  display: block;
}

.it-activation-chip strong {
  font-size: 12px;
  color: #dceaff;
}

.it-activation-chip small {
  color: #8fa0b8;
}

.it-activation-chip.active {
  border-color: rgba(34, 197, 94, .36);
  background: rgba(34, 197, 94, .08);
}

.it-activation-chip.active strong {
  color: #75ffad;
}

.it-activation-chip.pending {
  border-color: rgba(245, 158, 11, .42);
  background: rgba(245, 158, 11, .12);
}

.it-activation-chip.pending strong {
  color: #ffd18a;
}

.it-member-discord {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(100, 116, 139, .28);
  border-radius: 8px;
  background: rgba(15, 23, 42, .38);
}

.it-member-discord.linked {
  border-color: rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .08);
}

.it-member-discord strong,
.it-member-discord small {
  display: block;
}

.it-member-discord strong {
  color: #dceaff;
  font-size: 12px;
}

.it-member-discord small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.it-member-discord button {
  min-height: 32px;
  padding: 7px 10px;
}

.department-position-manager {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #2f4259;
  border-radius: 8px;
  background: #141b28;
}

.department-position-row {
  grid-template-columns: minmax(140px, .55fr) minmax(190px, 1fr) 110px auto auto auto;
}

.leader-position-toggle,
.position-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.leader-position-toggle {
  color: #cfe1fb;
  font-size: 12px;
  font-weight: 900;
}

.leader-position-toggle input {
  accent-color: #2877ff;
}

.position-color-select {
  min-width: 100px;
}

.permission-panel {
  margin-top: 14px;
}

.permission-list {
  display: grid;
  gap: 12px;
}

.permission-row {
  display: grid;
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid #2f4259;
  border-radius: 8px;
  background: #141b28;
}

.permission-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(143, 160, 184, .18);
}

.permission-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.permission-copy small {
  color: #8fa0b8;
}

.permission-summary {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 5px 9px;
  border: 1px solid rgba(74, 163, 255, .35);
  border-radius: 999px;
  color: #d9e9ff;
  background: rgba(37, 99, 235, .12);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.permission-all-control {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  padding: 7px 12px;
  border: 1px solid rgba(74, 163, 255, .55);
  border-radius: 8px;
  color: #d9e9ff;
  background: rgba(37, 99, 235, .16);
  font-size: 13px;
  font-weight: 900;
}

.permission-all-control input {
  width: auto;
}

.permission-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.permission-controls > div {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(52, 70, 95, .75);
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.permission-controls span {
  color: #c4d2e7;
  font-size: 13px;
  font-weight: 900;
}

.permission-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.permission-options label {
  min-height: 32px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid #33465f;
  border-radius: 8px;
  color: #dce8f8;
  background: rgba(255, 255, 255, .035);
  font-size: 11px;
  font-weight: 800;
}

.permission-options .permission-all {
  border-color: rgba(74, 163, 255, .65);
  background: rgba(37, 99, 235, .16);
  color: #d9e9ff;
}

.permission-picker {
  display: grid;
  gap: 6px;
}

.permission-picker .permission-search {
  min-height: 36px;
  padding: 8px 10px;
  border-color: #3a5270;
  background: #0e1725;
}

.permission-hint {
  min-height: 16px;
  color: #8196b1;
  font-size: 11px;
  line-height: 1.25;
}

.permission-checks {
  margin-top: 2px;
  min-height: 72px;
  max-height: 230px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.permission-checks label {
  position: relative;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #dce8f8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.permission-checks label:hover {
  background: rgba(255, 255, 255, .06);
}

.permission-checks label.selected {
  border-color: rgba(74, 163, 255, .42);
  background: rgba(37, 99, 235, .15);
}

.permission-checks label.suggestion-hidden {
  display: none;
}

.permission-toggle input,
.permission-all-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.permission-switch {
  width: 32px;
  height: 18px;
  position: relative;
  flex: 0 0 auto;
  border: 1px solid #425571;
  border-radius: 999px;
  background: #202b3c;
  transition: background .16s ease, border-color .16s ease;
}

.permission-switch::after {
  content: "";
  width: 12px;
  height: 12px;
  position: absolute;
  top: 2px;
  left: 3px;
  border-radius: 999px;
  background: #9bacbf;
  transition: transform .16s ease, background .16s ease;
}

.permission-toggle input:checked + .permission-switch,
.permission-all-control input:checked + .permission-switch {
  border-color: rgba(74, 163, 255, .9);
  background: #2563eb;
}

.permission-toggle input:checked + .permission-switch::after,
.permission-all-control input:checked + .permission-switch::after {
  transform: translateX(13px);
  background: #fff;
}

.modal-permission-list {
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.modal.permission-modal {
  width: 90vw;
  max-width: none;
  min-width: min(1180px, calc(100vw - 18px));
  height: 90vh;
  max-height: none;
  align-content: start;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  padding: 28px;
  background: #0f1726;
  border: 2px solid #39516f;
  box-shadow: 0 34px 120px rgba(0, 0, 0, .82), 0 0 0 1px rgba(74, 163, 255, .16) inset;
}

.modal.permission-modal h3 {
  text-align: center;
  font-size: 28px;
}

.modal.permission-modal > .muted {
  max-width: 920px;
  justify-self: center;
  text-align: center;
}

.modal.permission-modal .modal-actions {
  position: sticky;
  bottom: -28px;
  margin: 0 -28px -28px;
  padding: 16px 28px;
  background: rgba(15, 23, 38, .96);
  border-top: 1px solid #2d4058;
}

.permission-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permission-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 94px;
  padding: 14px;
  border: 1px solid #2f4259;
  border-radius: 8px;
  background: #141b28;
}

.permission-action-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.permission-action-card strong {
  color: #f5f8ff;
}

.permission-action-card small {
  color: #8fa0b8;
}

.permission-action-card span {
  color: #8eb8e8;
  font-size: 12px;
  font-weight: 900;
}

.page-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid #263850;
}

.page-heading h1,
.department-page-head h2 {
  margin: 0 0 4px;
}

.page-heading p {
  margin: 0;
  color: #9cb8dc;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.department-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 560px;
  padding: 18px 18px 22px;
  border: 1px solid #34465f;
  border-radius: 8px;
  background: #101827;
  text-align: left;
}

.department-card.swat-department-card {
  grid-column: span 1;
}

.department-card.swat-department-card .mini-table th:nth-child(1),
.department-card.swat-department-card .mini-table td:nth-child(1) {
  width: 40%;
}

.department-card.swat-department-card .mini-table th:nth-child(2),
.department-card.swat-department-card .mini-table td:nth-child(2) {
  width: 54px;
}

.department-card.swat-department-card .position-chip {
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.department-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.department-card-head strong {
  min-width: 0;
  line-height: 1.25;
}

.department-card-head strong,
.info-strip,
.department-add,
.department-manage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.department-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
}

.department-manage {
  margin-top: 8px;
}

.department-expand svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.department-card-head svg,
.info-strip svg,
.department-add svg,
.department-manage svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.application-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.application-pill.open {
  color: #4cff93;
  border: 1px solid #16b96a;
  background: rgba(22, 185, 106, .14);
}

.application-pill.closed {
  color: #ff7b82;
  border: 1px solid #e12b35;
  background: rgba(225, 43, 53, .14);
}

.info-strip {
  justify-content: center;
  min-height: 38px;
  color: white;
  background: #16a34a;
  border: 0;
  border-radius: 5px;
  font-weight: 900;
}

.mini-table {
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.mini-table th,
.mini-table td {
  height: auto;
  min-height: 68px;
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mini-table tbody tr {
  height: 68px;
}

.mini-table th {
  height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.mini-table th:nth-child(1),
.mini-table td:nth-child(1) {
  width: 34%;
}

.mini-table th:nth-child(2),
.mini-table td:nth-child(2) {
  width: 64px;
}

.mini-table th:nth-child(3),
.mini-table td:nth-child(3) {
  width: auto;
}

.dept-card-name {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 2px 0;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.dept-card-name span:last-child {
  display: block;
  align-self: center;
  max-height: none;
  overflow-wrap: anywhere;
  word-break: normal;
}

.online-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  margin: 0;
  border-radius: 999px;
  background: #ff4d55;
  box-shadow: 0 0 0 2px rgba(255, 77, 85, .16);
}

.online-dot.online {
  background: #20e07a;
  box-shadow: 0 0 0 2px rgba(32, 224, 122, .16);
}

.position-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.position-chip.green {
  color: #4cff93;
  border: 1px solid #16b96a;
  background: rgba(22, 185, 106, .14);
}

.position-chip.red {
  color: #ff7177;
  border: 1px solid #ef2525;
  background: rgba(239, 37, 37, .12);
}

.position-chip.orange {
  color: #ff9a3d;
  border: 1px solid #fb5b05;
  background: rgba(251, 91, 5, .13);
}

.position-chip.blue {
  color: #67a5ff;
  border: 1px solid #2563eb;
  background: rgba(37, 99, 235, .18);
}

.position-chip.swat-leader-chip {
  color: #f0abfc;
  border-color: #c026d3;
  background: rgba(192, 38, 211, .18);
}

.department-member-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  margin-left: 6px;
  padding: 2px 8px;
  color: #dcecff;
  border: 1px solid rgba(99, 168, 255, .38);
  border-radius: 999px;
  background: rgba(40, 119, 255, .16);
  font-size: 12px;
  font-weight: 900;
}

.department-rank-label {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  color: #67a5ff;
  font-weight: 500;
  line-height: 1.25;
}

.department-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.internal-subhead {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  margin-bottom: 18px;
  padding: 4px 0 0 0;
}

.internal-subhead h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.department-overview-head {
  gap: 8px;
  margin-bottom: 0;
}

.department-overview-head .internal-stats {
  margin-top: 0;
}

.department-overview-content {
  margin-top: 4px;
}

.department-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.vote-btn,
.department-add,
.department-manage,
.dept-note-add {
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.department-manage {
  justify-self: stretch;
  justify-content: center;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vote-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.tabs-row {
  display: inline-flex;
  flex-wrap: wrap;
  width: auto;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid #34465f;
  border-radius: 6px;
  background: #172235;
}

.tabs-row button {
  width: auto;
  min-width: 0;
  min-height: 30px;
  max-height: none;
  color: #8ea4c4;
  background: transparent;
  border: 0;
  border-radius: 4px;
  padding: 6px 14px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.sub-tabs {
  margin-bottom: 12px;
}

.department-tabs {
  align-self: flex-start;
}

.tabs-row .tab-active {
  color: #ffffff;
  background: #2563eb;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 340px));
  gap: 14px;
  justify-content: start;
}

.internal-stats {
  grid-template-columns: repeat(3, 360px);
  margin-top: 8px;
}

.internal-stats .internal-stat-card {
  width: 360px !important;
  min-height: 144px !important;
  max-height: 144px !important;
  max-width: 360px !important;
  padding: 10px 16px !important;
  gap: 2px 10px;
  align-content: center;
}

.internal-stats .internal-stat-card strong {
  font-size: 20px;
  line-height: 1;
}

.internal-stats .internal-stat-card span,
.internal-stats .internal-stat-card small {
  font-size: 12px;
  line-height: 1.15;
}

.internal-stats .internal-stat-card i svg {
  width: 16px;
  height: 16px;
}

.department-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
  gap: 18px;
}

.training-docs-panel {
  display: grid;
  gap: 14px;
}

.training-docs-input {
  display: grid;
  gap: 8px;
  color: #dce8ff;
  font-weight: 800;
}

.training-docs-input textarea {
  min-height: 118px;
  resize: vertical;
}

.training-docs-embed-shell {
  display: grid;
  gap: 12px;
}

.training-docs-embed-shell.with-outline {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: stretch;
}

.training-docs-outline {
  position: sticky;
  top: 86px;
  min-height: 520px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(70, 107, 167, .66);
  border-radius: 8px;
  background: #0f1b2c;
}

.training-docs-outline > strong {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 15px;
}

.training-docs-search {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: #9db8df;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.training-docs-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(96, 165, 250, .32);
  border-radius: 7px;
  color: #eaf2ff;
  background: rgba(2, 6, 23, .42);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.training-docs-search-results {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: 8px;
  background: rgba(5, 12, 25, .58);
}

.training-docs-search-results > strong {
  color: #ffffff;
  font-size: 13px;
}

.training-docs-cache-note {
  display: block;
  margin: -4px 0 10px;
  color: #7ea6d8;
  font-size: 11px;
  font-weight: 800;
}

.training-docs-search-list {
  display: grid;
  gap: 6px;
}

.training-docs-search-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(96, 165, 250, .16);
  border-radius: 7px;
  color: #dbeafe;
  background: rgba(15, 23, 42, .72);
  text-align: left;
  cursor: pointer;
}

.training-docs-search-list button:hover {
  border-color: rgba(96, 165, 250, .52);
  background: rgba(37, 99, 235, .22);
}

.training-docs-search-list b {
  color: #ffffff;
  font-size: 12px;
}

.training-docs-search-list span {
  color: #a9c2e8;
  font-size: 12px;
  line-height: 1.35;
}

.training-docs-outline-list {
  display: grid;
  gap: 6px;
}

.training-docs-outline-list button {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 7px;
  color: #cfe2ff;
  background: rgba(15, 23, 42, .62);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.training-docs-outline-list button:hover,
.training-docs-outline-list button.active {
  color: #ffffff;
  border-color: rgba(96, 165, 250, .58);
  background: rgba(37, 99, 235, .26);
}

.training-docs-outline-list button.level-2 { padding-left: 18px; }
.training-docs-outline-list button.level-3 { padding-left: 28px; font-size: 13px; }
.training-docs-outline-list button.level-4,
.training-docs-outline-list button.level-5,
.training-docs-outline-list button.level-6 { padding-left: 38px; font-size: 12px; opacity: .92; }

.training-docs-frame-wrap {
  position: relative;
  min-height: 680px;
  overflow: visible;
  border: 1px solid rgba(70, 107, 167, .66);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}

.training-docs-frame-wrap.is-jump-highlighted {
  animation: training-docs-frame-pulse 2.4s ease both;
}

.training-docs-jump-highlight {
  position: sticky;
  top: 84px;
  z-index: 4;
  width: min(520px, calc(100% - 28px));
  margin: 14px auto -58px;
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border: 1px solid rgba(96, 165, 250, .82);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(15, 32, 62, .94);
  box-shadow: 0 18px 42px rgba(37, 99, 235, .28);
  pointer-events: none;
  animation: training-docs-marker 2.6s ease both;
}

.training-docs-jump-highlight strong {
  color: #93c5fd;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.training-docs-jump-highlight span {
  font-size: 14px;
  font-weight: 900;
}

@keyframes training-docs-frame-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03); }
  15%, 72% { box-shadow: inset 0 0 0 2px rgba(96, 165, 250, .72), 0 0 0 4px rgba(37, 99, 235, .16); }
}

@keyframes training-docs-marker {
  0% { opacity: 0; transform: translateY(-8px); }
  12%, 82% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

.training-docs-frame {
  width: 100%;
  min-height: 1800px;
  display: block;
  border: 0;
  background: #ffffff;
}

.training-docs-document {
  min-height: 760px;
  padding: clamp(22px, 3vw, 42px);
  color: #111827;
  background: #ffffff;
  border-radius: 8px;
}

.training-docs-document :is(h1, h2, h3, h4, h5, h6) {
  scroll-margin-top: 110px;
  color: #0f172a;
}

.training-docs-document img {
  max-width: 100%;
  height: auto;
  filter: none;
}

.training-docs-document a {
  color: #1d4ed8;
}

.training-docs-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  color: #475569;
  font-weight: 800;
}

.training-docs-loading.error {
  color: #b91c1c;
}

.training-docs-empty {
  min-height: 220px;
}

@media (max-width: 980px) {
  .training-docs-embed-shell.with-outline {
    grid-template-columns: 1fr;
  }

  .training-docs-outline {
    min-height: auto;
    max-height: 260px;
  }
}

.swat-overview {
  display: grid;
  gap: 18px;
}

.swat-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.swat-team-card {
  border: 1px solid rgba(72, 99, 147, .62);
  border-radius: 8px;
  padding: 14px;
  background: rgba(9, 18, 35, .78);
}

.swat-team-card.active {
  border-color: rgba(239, 68, 68, .75);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .15), 0 0 28px rgba(239, 68, 68, .12);
}

.swat-team-head,
.swat-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.swat-team-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swat-team-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.swat-team-count,
.swat-team-count-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.swat-team-count {
  min-width: 25px;
  justify-content: center;
  padding: 3px 8px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .18);
  border: 1px solid rgba(96, 165, 250, .34);
}

.swat-team-count-label {
  padding: 3px 8px;
  color: #dbeafe;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .24);
}

.swat-status {
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 999px;
  padding: 3px 8px;
  color: #a8b3c7;
  font-size: 12px;
  font-weight: 800;
}

.swat-status.active {
  border-color: rgba(239, 68, 68, .45);
  color: #fecaca;
  background: rgba(239, 68, 68, .14);
}

.swat-member-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.swat-team-add {
  margin-top: 12px;
  width: 100%;
}

.swat-team-deactivate {
  width: 100%;
  margin-top: 10px;
}

.swat-member-row {
  align-items: flex-start;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(15, 27, 49, .7);
}

.swat-member-row.leader,
.swat-team-leader {
  border-color: rgba(245, 158, 11, .62);
  background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(15, 27, 49, .86));
}

.swat-team-leader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, .55);
  border-radius: 8px;
}

.swat-team-leader div {
  display: grid;
  gap: 2px;
}

.swat-team-leader small {
  color: #ffd18a;
}

.swat-member-row span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.swat-member-row small {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #9fb4d0;
  text-align: right;
}

.swat-duty-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(248, 113, 113, .36);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, .2);
  font-size: 11px;
  font-weight: 900;
}

.swat-duty-state.online {
  border-color: rgba(34, 197, 94, .42);
  color: #bbf7d0;
  background: rgba(20, 83, 45, .24);
}

.swat-duty-state .online-dot {
  width: 7px;
  height: 7px;
}

.department-swat-teams {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.department-swat-teams span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid #253b57;
  border-radius: 7px;
  color: #bfd4ef;
  background: rgba(12, 20, 33, .72);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .swat-team-grid {
    grid-template-columns: 1fr;
  }
}

.department-info-view {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  align-items: start;
  gap: 16px;
}

.information-admin-view {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.department-modal-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  color: #67a5ff;
  border-radius: 999px;
  background: rgba(37, 99, 235, .24);
}

.department-info-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(74, 163, 255, .28);
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .28), transparent 38%),
    linear-gradient(145deg, rgba(16, 24, 39, .98), rgba(8, 13, 24, .98));
}

.department-info-hero .department-modal-icon {
  margin: 0;
}

.department-info-hero h3 {
  margin: 2px 0 4px;
}

.department-info-hero p {
  margin: 0;
  color: #9cb8dc;
}

.department-info-hero .application-pill {
  align-self: start;
}

.department-modal-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.department-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.department-modal-heading h4 {
  margin: 0;
  font-size: 16px;
}

.department-modal-heading .blue-btn,
#editInformation,
.department-info-view .blue-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.department-modal-heading svg,
#editInformation svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.info-box {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(87, 121, 168, .34);
  border-radius: 8px;
  background: rgba(23, 34, 53, .72);
}

.department-description-box {
  align-self: start;
}

.department-info-view .info-box {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 18px;
  border-color: rgba(74, 163, 255, .34);
  background: linear-gradient(145deg, rgba(18, 31, 51, .96), rgba(10, 16, 27, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

.department-info-view .info-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #4aa3ff;
}

.department-info-view .info-box > strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #e8f2ff;
  font-size: 17px;
}

.department-info-view .info-box > strong svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.department-requirements-box {
  border-color: rgba(34, 197, 94, .34);
  background: linear-gradient(135deg, rgba(20, 83, 45, .16), rgba(15, 23, 42, .64));
}

.department-info-view .department-requirements-box::before {
  background: #22c55e;
}

.department-info-text {
  color: #d8e6ff;
  font-size: 15px;
  line-height: 1.55;
}

.department-info-text p,
.department-info-text ul {
  margin: 0;
}

.department-info-text p {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  background: rgba(8, 13, 24, .26);
}

.department-info-text p + p,
.department-info-text p + ul,
.department-info-text ul + p {
  margin-top: 8px;
}

.department-info-text ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.department-info-text li {
  position: relative;
  padding: 9px 11px 9px 30px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 7px;
  background: rgba(8, 13, 24, .32);
  line-height: 1.45;
}

.department-info-text li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .14);
}

.department-info-text.requirements li {
  border-color: rgba(34, 197, 94, .24);
}

.department-info-text.requirements li::before {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}

.information-card {
  padding: 24px;
  background: #0f172a;
}

.department-info-view .info-box.permits-card {
  min-height: 0;
}

.info-edit-lock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 158, 11, .45);
  border-radius: 8px;
  color: #fbbf24;
  background: rgba(245, 158, 11, .12);
}

.info-edit-lock svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  stroke: currentColor;
}

.info-edit-lock span {
  display: grid;
  gap: 1px;
}

.info-edit-lock b {
  color: #fff7ed;
  font-size: 12px;
}

.info-edit-lock small {
  color: #fde68a;
  font-size: 11px;
}

.information-admin-view .rich-text-view {
  min-height: 70px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.rights-split-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}

.rights-split-pane {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, .24);
  border-radius: 8px;
  background: rgba(8, 13, 24, .24);
}

.rights-split-pane h5 {
  margin: 0 0 8px;
  color: #dbeafe;
  font-size: 14px;
}

.rights-split-pane .rich-text-view {
  min-height: 0;
  padding-top: 0;
}

@media (max-width: 900px) {
  .rights-split-grid {
    grid-template-columns: 1fr;
  }
}

.modern-info-view {
  gap: 18px;
}

.info-change-alert {
  padding: 12px 14px;
  border: 1px solid rgba(255, 183, 77, .55);
  border-radius: 8px;
  color: #ffd28a;
  background: rgba(255, 183, 77, .12);
  font-weight: 900;
}

.internal-doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.internal-doc-tile {
  position: relative;
  min-height: 118px;
  height: 100%;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(79, 112, 153, .82);
  border-radius: 8px;
  color: #f5f8ff;
  background: linear-gradient(145deg, #17253a 0%, #101a2b 100%);
  box-shadow: inset 4px 0 0 rgba(47, 109, 246, .74), 0 12px 28px rgba(0, 0, 0, .22);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.internal-doc-tile::after {
  content: "Öffnen";
  justify-self: start;
  width: fit-content;
  margin-top: 4px;
  padding: 4px 9px;
  border: 1px solid rgba(103, 165, 255, .42);
  border-radius: 999px;
  color: #cfe6ff;
  background: rgba(47, 109, 246, .18);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.internal-doc-tile:hover,
.internal-doc-tile:focus-visible {
  transform: translateY(-2px);
  border-color: #2f6df6;
  background: rgba(47, 109, 246, .14);
  box-shadow: inset 4px 0 0 #67a5ff, 0 0 0 3px rgba(47, 109, 246, .16), 0 16px 34px rgba(0, 0, 0, .3);
}

.sanction-catalog-doc-tile {
  box-shadow: inset 4px 0 0 rgba(248, 113, 113, .86), 0 12px 28px rgba(0, 0, 0, .22);
}

.sanction-catalog-doc-tile::after {
  content: "Tabelle";
  border-color: rgba(248, 113, 113, .5);
  color: #fecaca;
  background: rgba(127, 29, 29, .22);
}

.sanction-doc-view {
  display: grid;
  gap: 14px;
}

.sanction-doc-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(84, 112, 153, .7);
  border-radius: 8px;
  background: #0f172a;
}

.sanction-doc-toolbar input {
  flex: 1;
}

.sanction-doc-toolbar span {
  color: #bfdbfe;
  font-weight: 900;
  white-space: nowrap;
}

.sanction-doc-table-wrap {
  display: grid;
  gap: 14px;
}

.sanction-doc-group {
  overflow: hidden;
  border: 1px solid rgba(84, 112, 153, .72);
  border-radius: 8px;
  background: rgba(11, 18, 32, .65);
}

.sanction-doc-group h4 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(84, 112, 153, .55);
  color: #fff;
  background: rgba(47, 109, 246, .12);
}

.sanction-doc-table {
  width: 100%;
  border-collapse: collapse;
}

.sanction-doc-table th,
.sanction-doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(84, 112, 153, .25);
  text-align: left;
  vertical-align: top;
}

.sanction-doc-table th {
  color: #93c5fd;
  font-size: 12px;
  text-transform: uppercase;
}

.sanction-doc-table td:first-child {
  width: 130px;
  color: #c7d2fe;
  font-weight: 900;
}

.sanction-doc-table strong {
  display: block;
  color: #f8fbff;
}

.sanction-doc-table small {
  display: block;
  margin-top: 4px;
  color: #9fb5d4;
}

.sanction-doc-action {
  display: inline-flex;
  padding: 4px 9px;
  border: 1px solid rgba(248, 113, 113, .5);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, .22);
  font-size: 12px;
  font-weight: 900;
}

.info-change-list,
.info-change-row {
  display: grid;
  gap: 10px;
}

.info-change-row {
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.sanction-catalog-public-card {
  display: grid;
  gap: 14px;
}

.sanction-public-groups {
  display: grid;
  gap: 12px;
}

.sanction-public-group {
  overflow: hidden;
  border: 1px solid rgba(84, 112, 153, .72);
  border-radius: 8px;
  background: rgba(11, 18, 32, .55);
}

.sanction-public-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(84, 112, 153, .5);
  color: #fff;
  background: rgba(47, 109, 246, .12);
}

.sanction-public-head small {
  color: #a9bddc;
}

.sanction-public-list {
  display: grid;
}

.sanction-public-row {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) 180px 120px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid rgba(84, 112, 153, .22);
}

.sanction-public-row:first-child {
  border-top: 0;
}

.sanction-public-row span,
.sanction-public-row small,
.sanction-public-row em {
  color: #b9cae6;
  font-style: normal;
}

.sanction-public-row em {
  justify-self: start;
  padding: 3px 8px;
  border: 1px solid rgba(248, 113, 113, .5);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, .24);
  font-size: 12px;
  font-weight: 900;
}

.info-change-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.info-change-row-head span {
  display: grid;
  gap: 3px;
}

.doc-change-diff {
  display: grid;
  gap: 8px;
}

.doc-change-diff.cleared del,
.doc-change-diff.cleared ins {
  color: #cbd5e1;
  background: rgba(148, 163, 184, .08);
  border-color: rgba(148, 163, 184, .22);
}

.doc-change-diff del,
.doc-change-diff ins {
  display: block;
  padding: 8px;
  border-radius: 6px;
  line-height: 1.45;
}

.doc-change-diff del {
  color: #ff8f96;
  background: rgba(255, 76, 86, .12);
  border: 1px solid rgba(255, 76, 86, .32);
  text-decoration: line-through;
}

.doc-change-diff ins {
  color: #75ffad;
  background: rgba(22, 185, 106, .12);
  border: 1px solid rgba(22, 185, 106, .32);
  text-decoration: none;
}

.paper-doc-page .doc-inline-added,
.paper-doc-page .doc-inline-change-summary ins {
  color: #00ff66;
  background: rgba(0, 255, 102, .12);
  border: 1px solid rgba(0, 255, 102, .36);
  border-radius: 6px;
  text-decoration: none;
}

.paper-doc-page :not(span).doc-inline-added {
  display: block;
  padding: 6px 8px;
}

.paper-doc-page span.doc-inline-added {
  display: inline;
  padding: 1px 3px;
}

.paper-doc-page .doc-inline-change-summary {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 12px;
  border: 1px solid rgba(74, 163, 255, .28);
  border-radius: 8px;
  background: rgba(10, 17, 30, .56);
}

.paper-doc-page .doc-inline-change-summary > strong {
  color: #c7d7ef;
  font-size: 13px;
}

.paper-doc-page .doc-inline-change-summary del,
.paper-doc-page .doc-inline-change-summary ins {
  display: block;
  padding: 8px;
  line-height: 1.45;
}

.paper-doc-page .doc-inline-change-summary del {
  color: #ff1f1f;
  background: rgba(255, 31, 31, .12);
  border: 1px solid rgba(255, 31, 31, .36);
  border-radius: 6px;
  text-decoration: line-through;
}

.modal.wide-doc-modal {
  width: 94vw;
  max-width: 1320px;
  max-height: 96vh;
}

.paper-doc-modal {
  display: grid;
  gap: 14px;
}

.paper-doc-modal.side-toolbar-doc {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
}

.information-editor-workspace {
  display: grid;
  gap: 14px;
}

.information-editor-sticky {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 0 0 10px;
  background: linear-gradient(180deg, #08111f 0%, rgba(8, 17, 31, .96) 78%, rgba(8, 17, 31, 0) 100%);
}

.information-editor-sticky #paperDocTitle {
  max-width: 940px;
  width: 100%;
  height: 46px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #fff;
  background: #101827;
  font-size: 19px;
  font-weight: 900;
}

.paper-doc-tools {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 10px;
  margin-top: 58px;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101827;
}

.paper-doc-tools input,
.paper-doc-tools button {
  width: 100%;
}

.doc-search-count {
  display: block;
  min-height: 18px;
  color: #8eb8e8;
  font-size: 12px;
  font-weight: 800;
}

.paper-doc-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: center;
  padding-right: 70px;
}

.paper-doc-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.paper-doc-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.paper-doc-head-actions .compact-action {
  min-height: 32px;
  padding: 6px 12px;
}

.paper-doc-head.no-title {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}

.paper-doc-page {
  min-height: 84vh;
  max-width: 940px;
  justify-self: center;
  width: 100%;
  padding: 34px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #dce8f8;
  background: #101827;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  line-height: 1.65;
}

.paper-doc-editor {
  resize: vertical;
  font: inherit;
  min-height: 84vh;
}

.rich-doc-editor {
  min-height: 68vh;
  outline: none;
  overflow: auto;
}

.rich-doc-editor:focus {
  border-color: rgba(74, 163, 255, .72);
  box-shadow: 0 0 0 3px rgba(74, 163, 255, .12), 0 20px 60px rgba(0, 0, 0, .35);
}

.rich-doc-editor.drag-over {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, .08);
}

.docs-editor-toolbar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 940px;
  justify-self: center;
  width: 100%;
  padding: 8px;
  border: 1px solid #426489;
  border-radius: 8px;
  background: rgba(15, 23, 38, .98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}

.docs-toolbar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.docs-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 38px;
  padding: 5px;
  border: 1px solid rgba(98, 151, 207, .55);
  border-radius: 8px;
  background: rgba(16, 24, 39, .72);
}

.docs-toolbar-group.compact {
  margin-left: auto;
}

.docs-toolbar-label {
  color: #c7e0ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.docs-editor-toolbar button,
.docs-editor-toolbar select,
.docs-editor-toolbar input[type="color"] {
  min-height: 32px;
  padding: 5px 9px;
  color: #f4f9ff;
  background: #172a45;
  border: 1px solid #52739b;
  border-radius: 8px;
  font-weight: 800;
}

.docs-editor-toolbar button:hover {
  color: #ffffff;
  border-color: rgba(104, 177, 255, .92);
  background: rgba(40, 119, 255, .28);
}

.docs-color-swatch {
  width: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 999px;
}

.docs-editor-toolbar .docs-color-swatch.default,
.docs-editor-toolbar .docs-color-swatch.default:hover { background: #ffffff; }
.docs-editor-toolbar .docs-color-swatch.green,
.docs-editor-toolbar .docs-color-swatch.green:hover { background: #00ff66; }
.docs-editor-toolbar .docs-color-swatch.red,
.docs-editor-toolbar .docs-color-swatch.red:hover { background: #ff1f1f; }
.docs-editor-toolbar .docs-color-swatch.yellow,
.docs-editor-toolbar .docs-color-swatch.yellow:hover { background: #ffd400; }
.docs-editor-toolbar .docs-color-swatch.blue,
.docs-editor-toolbar .docs-color-swatch.blue:hover { background: #1e90ff; }

.docs-editor-toolbar .docs-color-swatch:hover {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .16);
}

.paper-doc-page .doc-image,
.doc-save-preview .doc-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 280px;
  height: auto;
  margin: 0 auto;
  border: 1px solid #30445f;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(4, 10, 19, .45);
}

.paper-doc-page .doc-media-row,
.doc-save-preview .doc-media-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(220px, .85fr);
  gap: 16px;
  align-items: stretch;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(74, 163, 255, .28);
  border-radius: 8px;
  background: rgba(12, 22, 36, .56);
}

.vehicle-rules-view {
  display: grid;
  gap: 14px;
}

.vehicle-rules-notice,
.vehicle-rules-editor-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, .5);
  border-radius: 8px;
  color: #fde68a;
  background: rgba(245, 158, 11, .12);
}

.vehicle-rules-notice strong,
.vehicle-rules-editor-note strong {
  color: #fff7ed;
}

.vehicle-rules-notice span,
.vehicle-rules-editor-note span {
  color: #facc15;
  font-weight: 800;
}

.vehicle-rule-card {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(74, 163, 255, .28);
  border-radius: 8px;
  background: rgba(12, 22, 37, .72);
}

.vehicle-rule-card figure {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin: 0;
  border: 1px solid #314969;
  border-radius: 8px;
  background: rgba(4, 10, 19, .48);
  overflow: hidden;
}

.vehicle-rule-card img {
  width: 100%;
  height: 100%;
  max-height: 210px;
  object-fit: contain;
}

.vehicle-rule-card figure span,
.vehicle-rules-empty {
  color: #8aa1bc;
  font-weight: 800;
}

.vehicle-rule-card h4 {
  margin: 3px 0 18px;
  color: #f8fbff;
  font-size: 24px;
}

.vehicle-rule-kicker {
  color: #5fb3ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-rule-card p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.vehicle-rule-card p b {
  color: #b8d7ff;
}

.vehicle-rule-card p span {
  padding: 5px 10px;
  border: 1px solid rgba(34, 197, 94, .42);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, .12);
  font-weight: 900;
}

.vehicle-rule-info {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: rgba(15, 23, 42, .54);
}

.vehicle-rule-info b {
  color: #b8d7ff;
  font-size: 12px;
  text-transform: uppercase;
}

.vehicle-rule-info span {
  color: #dcecff;
  line-height: 1.45;
  white-space: pre-wrap;
}

.vehicle-rule-info a {
  color: #8fb7ff;
  font-weight: 800;
  text-decoration: underline;
}

.vehicle-rules-editor {
  display: grid;
  gap: 12px;
  width: min(1040px, 100%);
  justify-self: center;
}

.vehicle-rules-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #426489;
  border-radius: 8px;
  background: rgba(15, 23, 38, .98);
}

.vehicle-rules-editor-head strong {
  color: #f8fbff;
}

.vehicle-rules-editor-head small {
  display: block;
  margin-top: 3px;
  color: #93a4bd;
}

.vehicle-rule-list {
  display: grid;
  gap: 12px;
}

.vehicle-rule-edit-row {
  display: grid;
  grid-template-columns: minmax(220px, 32%) minmax(0, 1fr) 36px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #2a4162;
  border-radius: 8px;
  background: rgba(15, 23, 42, .82);
}

.vehicle-rule-edit-row.drag-over {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, .08);
}

.vehicle-image-drop {
  display: grid;
  cursor: pointer;
}

.vehicle-image-drop input {
  display: none;
}

.vehicle-image-preview {
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 1px dashed #52739b;
  border-radius: 8px;
  color: #c7e0ff;
  background: rgba(4, 10, 19, .45);
  font-weight: 900;
  text-align: center;
  overflow: hidden;
}

.vehicle-image-preview svg {
  width: 18px;
  height: 18px;
}

.vehicle-image-preview img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}

.vehicle-rule-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 10px;
}

.vehicle-rule-info-field {
  grid-column: 1 / -1;
}

.vehicle-rule-info-field textarea {
  resize: vertical;
}

.doc-create-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.doc-create-choice {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(96, 165, 250, .34);
  border-radius: 8px;
  color: #dbeafe;
  text-align: left;
  background: linear-gradient(180deg, rgba(15, 23, 42, .94), rgba(9, 15, 28, .86));
  cursor: pointer;
}

.doc-create-choice:hover {
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.doc-create-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #e0f2fe;
  background: #2563eb;
}

.doc-create-choice svg {
  width: 19px;
  height: 19px;
}

.doc-create-choice b {
  color: #f8fbff;
  font-size: 17px;
}

.doc-create-choice small {
  color: #9fb4d0;
  line-height: 1.45;
}

.structured-rules-view,
.structured-rules-editor {
  display: grid;
  gap: 14px;
}

.structured-rules-editor {
  width: min(1040px, 100%);
  justify-self: center;
}

.structured-rules-header,
.structured-rules-header-editor {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, .34);
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
}

.structured-rules-header strong {
  color: #f8fbff;
  font-size: 20px;
}

.structured-rules-header span {
  color: #dbeafe;
  line-height: 1.5;
  white-space: pre-wrap;
}

.structured-rule-list {
  display: grid;
  gap: 12px;
}

.structured-rule-card,
.structured-rule-edit-row {
  display: grid;
  grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(74, 163, 255, .28);
  border-radius: 8px;
  background: rgba(12, 22, 37, .72);
}

.structured-rule-edit-row {
  grid-template-columns: minmax(220px, 28%) minmax(0, 1fr) 36px;
  align-items: center;
}

.structured-rule-edit-row.drag-over {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, .08);
}

.structured-rule-card figure {
  display: grid;
  place-items: center;
  min-height: 130px;
  margin: 0;
  border: 1px solid #314969;
  border-radius: 8px;
  background: rgba(4, 10, 19, .48);
  overflow: hidden;
}

.structured-rule-card img {
  width: 100%;
  height: 100%;
  max-height: 190px;
  object-fit: contain;
}

.structured-rule-content {
  display: grid;
  align-content: start;
  gap: 10px;
}

.structured-rule-content h4 {
  margin: 0;
  color: #f8fbff;
  font-size: 22px;
}

.structured-rule-data,
.structured-rule-info {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  color: #dcecff;
  background: rgba(15, 23, 42, .54);
  line-height: 1.45;
  white-space: pre-wrap;
}

.structured-rule-info {
  display: grid;
  gap: 5px;
}

.structured-rule-info b {
  color: #b8d7ff;
  font-size: 12px;
  text-transform: uppercase;
}

.structured-rule-fields {
  display: grid;
  gap: 10px;
}

.structured-rule-fields textarea {
  resize: vertical;
}

.paper-doc-page .doc-image-frame,
.doc-save-preview .doc-image-frame {
  display: grid;
  align-items: center;
  min-height: 170px;
  margin: 0;
}

.paper-doc-page .doc-media-text,
.doc-save-preview .doc-media-text {
  min-height: 170px;
  padding: 12px;
  border: 1px dashed rgba(142, 184, 232, .36);
  border-radius: 8px;
  background: rgba(8, 17, 31, .42);
}

.paper-doc-page .doc-media-text:empty::before {
  content: "";
  display: block;
  min-height: 24px;
}

.paper-doc-page a,
.doc-save-preview a {
  color: #66b5ff;
  text-decoration: underline;
}

.modal.wide-doc-modal .modal-x {
  right: 24px;
}

.paper-doc-page .doc-section,
.doc-save-preview .doc-section {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(74, 163, 255, .36);
  border-radius: 8px;
  background: rgba(20, 32, 51, .72);
}

.paper-doc-page .doc-section h3,
.doc-save-preview .doc-section h3 {
  margin-top: 0;
}
.docs-tool-btn,
.docs-color-menu {
  height: 34px;
  border: 1px solid #30445f;
  border-radius: 6px;
  color: #dce8f8;
  background: #142033;
  font: inherit;
  font-weight: 800;
}

.docs-editor-toolbar select {
  min-width: 128px;
  padding: 0 9px;
}

.docs-tool-btn {
  min-width: 34px;
  padding: 0 9px;
}

.docs-tool-btn.wide {
  min-width: 68px;
}

.docs-tool-btn:hover,
.docs-color-menu:hover,
.docs-editor-toolbar select:hover {
  border-color: #3f80ff;
  background: #1a2940;
}

.docs-tool-btn.accent {
  border-color: rgba(47, 109, 246, .72);
  background: #1b3770;
}

.docs-color-menu {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
}

.docs-color-menu input {
  width: 24px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.docs-toolbar-separator {
  width: 1px;
  height: 24px;
  margin: 0 3px;
  background: #30445f;
}

.wysiwyg-editor {
  overflow: auto;
  white-space: normal;
  outline: none;
  caret-color: #dce8f8;
}

.wysiwyg-editor:focus {
  border-color: #2f6df6;
  box-shadow: 0 0 0 3px rgba(47, 109, 246, .2), 0 20px 60px rgba(0, 0, 0, .35);
}

.paper-doc-page h3,
.paper-doc-page h4,
.wysiwyg-editor h3,
.wysiwyg-editor h4 {
  margin: 0 0 12px;
  color: #fff;
  line-height: 1.25;
}

.paper-doc-page h2,
.wysiwyg-editor h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
}

.doc-section-card {
  position: relative;
  display: block;
  margin: 0 0 28px;
  padding: 24px 26px 22px;
  border: 1px solid rgba(121, 161, 211, .32);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(24, 39, 61, .94), rgba(13, 23, 39, .96));
  box-shadow: inset 5px 0 0 rgba(47, 109, 246, .72), 0 18px 42px rgba(0, 0, 0, .26);
}

.doc-section-card.warning {
  border-color: rgba(255, 190, 92, .5);
  background: linear-gradient(145deg, rgba(91, 58, 12, .38), rgba(32, 24, 18, .95));
  box-shadow: inset 5px 0 0 rgba(255, 190, 92, .82), 0 18px 42px rgba(0, 0, 0, .26);
}

.doc-section-card h2 {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(142, 184, 232, .22);
  border-radius: 6px;
  color: #f8fbff;
  background: rgba(47, 109, 246, .16);
}

.paper-doc-page > h2,
.paper-doc-page > h3,
.paper-doc-page > h4,
.wysiwyg-editor > h2,
.wysiwyg-editor > h3,
.wysiwyg-editor > h4 {
  margin: 26px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(121, 161, 211, .3);
  border-left: 5px solid rgba(47, 109, 246, .72);
  border-radius: 8px;
  color: #f8fbff;
  background: linear-gradient(145deg, rgba(24, 39, 61, .9), rgba(13, 23, 39, .88));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.doc-section-divider {
  height: 1px;
  margin: 26px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(142, 184, 232, .55), transparent);
}

.doc-clause-heading {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(142, 184, 232, .16);
}

.doc-clause {
  padding-left: 12px;
  border-left: 3px solid rgba(47, 109, 246, .55);
}

.doc-subheading {
  margin-top: 16px;
  color: #a9cffc;
}

.paper-doc-page p,
.wysiwyg-editor p {
  margin: 0 0 10px;
}

.paper-doc-page ul,
.paper-doc-page ol,
.wysiwyg-editor ul,
.wysiwyg-editor ol {
  margin: 0 0 12px;
  padding-left: 26px;
}

.paper-doc-page li,
.wysiwyg-editor li {
  margin: 4px 0;
}

.doc-compare-modal {
  width: min(1240px, 94vw);
  max-width: 1240px;
}

.doc-compare-head {
  display: grid;
  gap: 6px;
  margin: 0 44px 16px 0;
}

.doc-compare-kicker {
  width: max-content;
  padding: 4px 9px;
  border: 1px solid rgba(142, 184, 232, .22);
  border-radius: 999px;
  color: #8eb8e8;
  background: rgba(47, 109, 246, .14);
  font-size: 12px;
  font-weight: 900;
}

.doc-compare-head h3 {
  margin: 0;
}

.doc-compare-head p {
  max-width: 760px;
  margin: 0;
  color: #9fb2cf;
}

.doc-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.doc-compare-grid.compact {
  gap: 12px;
}

.doc-compare-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(48, 68, 95, .9);
  border-radius: 8px;
  background: #0d1625;
}

.doc-compare-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(48, 68, 95, .82);
  background: rgba(20, 32, 51, .78);
}

.doc-compare-panel header span {
  color: #ffffff;
  font-weight: 900;
}

.doc-compare-panel header small {
  color: #9fb2cf;
  font-weight: 800;
}

.doc-compare-panel.before {
  border-color: rgba(239, 68, 68, .42);
  box-shadow: inset 4px 0 0 rgba(239, 68, 68, .55);
}

.doc-compare-panel.after {
  border-color: rgba(22, 185, 106, .45);
  box-shadow: inset 4px 0 0 rgba(22, 185, 106, .58);
}

.doc-save-preview {
  height: min(56vh, 620px);
  min-height: 320px;
  padding: 18px 18px 18px 22px;
  border: 0;
  border-radius: 0;
  color: #dce8f8;
  background: #101827;
  line-height: 1.55;
  overflow: auto;
}

.doc-change-preview {
  max-height: 280px;
  overflow: auto;
  padding: 14px 14px 14px 18px;
  border: 0;
  border-radius: 0;
  background: #101827;
  line-height: 1.5;
}

.doc-search-mark {
  padding: 1px 4px;
  border-radius: 4px;
  color: #05101f;
  background: #ffd54a;
}

.doc-search-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.doc-search-control input {
  min-width: 0;
}

.doc-search-control span {
  min-width: 52px;
  padding: 6px 8px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #c7e0ff;
  background: rgba(16, 24, 39, .88);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.doc-change-details {
  max-width: 860px;
  width: 100%;
  justify-self: center;
  padding: 10px 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101827;
}

.doc-change-details.hidden,
.doc-edit-mode.hidden,
.doc-read-mode.hidden {
  display: none;
}

.mode-toggle-btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #dce8f8;
  background: #142033;
  font-weight: 900;
}

.mode-toggle-btn.active {
  color: #75ffad;
  border-color: rgba(22, 185, 106, .55);
  background: rgba(22, 185, 106, .14);
}

.focus-change {
  border-color: #2f6df6;
  box-shadow: 0 0 0 2px rgba(47, 109, 246, .18);
}

.nav-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 999px;
  color: #ffffff;
  background: #ef4444;
  border: 2px solid #0b1220;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.nav-count-badge {
  min-width: 24px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  padding: 0 7px;
  border-radius: 999px;
  color: #ffffff;
  background: #ef4444;
  border: 1px solid rgba(255, 255, 255, .38);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .18);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.nav-meta .page-lock + .nav-count-badge {
  left: -4px;
}

.nav-count-badge-danger {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .25), 0 0 14px rgba(220, 38, 38, .28);
}

.direction-sanction-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(248, 113, 113, .35);
  background: linear-gradient(135deg, rgba(127, 29, 29, .26), rgba(15, 23, 42, .86));
}

.direction-focus-card.sanction-approval-card.danger {
  border-color: rgba(248, 113, 113, .5);
  background: rgba(127, 29, 29, .22);
}

.direction-activity-panel .table-wrap {
  margin-top: 10px;
}

.last-duty-cell {
  display: inline-grid;
  gap: 2px;
  min-width: 132px;
}

.last-duty-cell strong {
  font-size: 13px;
  color: #dbeafe;
}

.last-duty-cell small {
  color: #8fa9cb;
  font-size: 11px;
}

.last-duty-cell.online strong {
  color: #86efac;
}

.last-duty-cell.stale strong {
  color: #fca5a5;
}

.activity-warning-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(248, 113, 113, .4);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, .22);
  font-weight: 900;
}

.activity-rank-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(96, 165, 250, .42);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .16);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.activity-group-row td {
  padding: 14px 0 8px;
  border-bottom: 0;
  background: transparent;
}

.activity-group-row span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.activity-group-row span::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(96, 165, 250, .45), rgba(96, 165, 250, 0));
}

.activity-row-stale {
  background: rgba(127, 29, 29, .08);
}

.sanction-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sanction-case-column {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  background: rgba(15, 23, 42, .55);
}

.sanction-case-list {
  display: grid;
  gap: 10px;
}

.sanction-case-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(71, 85, 105, .8);
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
}

.sanction-case-card.pending_approval {
  border-color: rgba(248, 113, 113, .55);
}

.sanction-case-card.rejected {
  border-color: rgba(239, 68, 68, .62);
  background: linear-gradient(145deg, rgba(69, 10, 10, .34), rgba(15, 23, 42, .72));
}

.sanction-case-head,
.sanction-case-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sanction-case-head small,
.sanction-case-body p {
  display: block;
  color: #bfdbfe;
}

.sanction-case-body {
  display: grid;
  gap: 10px;
}

.sanction-case-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.sanction-case-title-row b {
  color: #f8fafc;
  line-height: 1.25;
}

.sanction-status-chip,
.sanction-case-facts span,
.sanction-case-timeline span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.sanction-status-chip {
  padding: 5px 9px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .18);
  border: 1px solid rgba(96, 165, 250, .36);
}

.sanction-case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sanction-case-facts span {
  padding: 5px 9px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .22);
}

.sanction-case-facts .fine {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .38);
  background: rgba(20, 83, 45, .24);
}

.sanction-case-facts .strike {
  color: #fde68a;
  border-color: rgba(245, 158, 11, .42);
  background: rgba(120, 53, 15, .24);
}

.sanction-case-body p {
  margin: 0;
}

.sanction-case-body .sanction-case-reason {
  margin-top: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(248, 113, 113, .38);
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  color: #fff1f2;
  background: rgba(127, 29, 29, .24);
  font-weight: 850;
}

.sanction-case-body .sanction-case-reason em {
  display: block;
  margin-bottom: 4px;
  color: #fca5a5;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.sanction-case-card.pending_approval .sanction-case-reason {
  border-color: rgba(251, 191, 36, .5);
  border-left-color: #f59e0b;
  background: rgba(120, 53, 15, .3);
}

.sanction-case-card.pending_approval .sanction-case-reason em {
  color: #fde68a;
}

.sanction-case-body .sanction-case-reason.rejected {
  border-color: rgba(239, 68, 68, .58);
  border-left-color: #dc2626;
  background: rgba(69, 10, 10, .42);
}

.sanction-case-body .sanction-case-reason.rejected em {
  color: #fecaca;
}

.sanction-case-timeline {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.sanction-case-timeline span {
  padding: 6px 9px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, .42);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
}

.online-state {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.online-state.online {
  color: #bbf7d0;
  background: rgba(22, 163, 74, .18);
  border: 1px solid rgba(34, 197, 94, .42);
}

.online-state.offline {
  color: #cbd5e1;
  background: rgba(71, 85, 105, .35);
  border: 1px solid rgba(148, 163, 184, .22);
}

.department-documents-panel .panel-header {
  align-items: flex-start;
}

.department-doc-grid {
  margin-top: 14px;
}

.department-doc-tile {
  position: relative;
}

.department-doc-tile .doc-tile-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.hr-open-sanctions-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(251, 146, 60, .34);
  border-radius: 8px;
  background: rgba(124, 45, 18, .16);
}

.hr-open-sanction-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.hr-open-sanction-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 8px;
  color: #e5efff;
  background: rgba(15, 23, 42, .72);
  text-align: left;
  cursor: pointer;
}

.hr-open-sanction-card:hover {
  border-color: rgba(96, 165, 250, .55);
  background: rgba(30, 41, 59, .82);
}

.hr-open-sanction-card small {
  display: block;
  margin-top: 3px;
  color: #bfdbfe;
}

@media (max-width: 1100px) {
  .sanction-case-grid {
    grid-template-columns: 1fr;
  }
  .direction-sanction-summary {
    align-items: stretch;
    flex-direction: column;
  }
}

.mailbox-shell {
  display: grid;
  grid-template-rows: max-content auto;
  align-content: start;
  gap: 7px;
}

.mailbox-hero,
.mailbox-list-panel,
.mailbox-side {
  border: 1px solid #263850;
  border-radius: 8px;
  background: #101827;
}

.mailbox-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  align-content: center;
  align-self: start;
  min-height: 0;
  height: 58px;
  max-height: 58px;
  overflow: hidden;
  padding: 6px 10px;
}

.mailbox-hero h3,
.mailbox-hero p,
.mailbox-list-head h4,
.mailbox-list-head p {
  margin: 0;
}

.mailbox-kicker {
  color: #74b8ff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mailbox-hero h3 {
  font-size: 19px;
  line-height: 1.05;
}

.mailbox-hero p {
  margin-top: 2px;
  color: #9fb4d0;
  font-size: 11px;
  line-height: 1.2;
}

.mailbox-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(70px, 1fr));
  gap: 5px;
}

.mailbox-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  align-self: center;
}

.mailbox-summary-grid span,
.mailbox-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
  text-align: left;
}

.mailbox-alert-chip {
  cursor: pointer;
}

.mailbox-alert-chip:hover {
  border-color: rgba(249, 115, 22, .72);
  background: rgba(249, 115, 22, .16);
}

.mailbox-alert-chip.active {
  border-color: rgba(74, 163, 255, .72);
  background: rgba(47, 109, 246, .2);
}

.mailbox-summary-grid b,
.mailbox-alert-chip b {
  color: #eef6ff;
  font-size: 13px;
}

.mailbox-summary-grid small,
.mailbox-alert-chip small {
  color: #8fa0b8;
  font-size: 11px;
}

.mailbox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mailbox-tabs button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #cfe1fb;
  background: #101827;
  font-weight: 900;
  cursor: pointer;
}

.mailbox-tabs button.active {
  border-color: rgba(74, 163, 255, .58);
  background: rgba(40, 119, 255, .16);
}

.mailbox-tabs b {
  min-width: 21px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(74, 163, 255, .22);
  font-size: 12px;
}

.mailbox-layout {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.mailbox-side {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.mailbox-side span,
.mailbox-side small {
  color: #9fb4d0;
}

.mailbox-side-note {
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgba(99, 168, 255, .22);
  border-radius: 8px;
  color: #cfe1fb;
  background: rgba(40, 119, 255, .1);
  font-size: 12px;
}

.mailbox-thread-list {
  display: grid;
  gap: 6px;
}

.mailbox-thread-list button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #cfe1fb;
  background: #142033;
  text-align: left;
  cursor: pointer;
}

.mailbox-thread-list button.active {
  border-color: rgba(74, 163, 255, .58);
  background: rgba(40, 119, 255, .16);
}

.mailbox-thread-list span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mailbox-thread-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-thread-list em {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.mailbox-list-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.mailbox-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mailbox-list-head p {
  color: #8fa0b8;
}

.mailbox-list {
  display: grid;
  gap: 7px;
}

.mailbox-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  padding: 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.mailbox-row footer {
  grid-column: 1 / -1;
  padding-top: 6px;
  border-top: 1px solid #263850;
  color: #8fa0b8;
  font-size: 12px;
}

.mailbox-main {
  display: grid;
  gap: 3px;
  padding-right: 54px;
}

.mailbox-main p {
  margin: 0;
  color: #a9bad3;
}

.mailbox-state {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #cfe1fb;
  background: rgba(148, 163, 184, .16);
  font-size: 11px;
  font-weight: 900;
}

.mailbox-row.unread {
  border-color: rgba(74, 163, 255, .62);
}

.mailbox-row.unread .mailbox-state {
  color: #ffffff;
  background: rgba(40, 119, 255, .55);
}

.mailbox-row.read {
  opacity: .78;
}

.mailbox-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed #30445f;
  border-radius: 8px;
  color: #9fb4d0;
}

.mailbox-chat {
  display: grid;
  gap: 8px;
}

.mailbox-chat-head {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.mailbox-chat-head small {
  display: block;
  margin-top: 2px;
  color: #8fa0b8;
}

.mailbox-chat-notice {
  margin: 0;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.mailbox-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mailbox-participants span {
  padding: 4px 8px;
  border: 1px solid rgba(74, 163, 255, .24);
  border-radius: 999px;
  color: #cfe1fb;
  background: rgba(40, 119, 255, .1);
  font-size: 12px;
}

.mailbox-chat-messages {
  max-height: 460px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding: 4px;
}

.mailbox-chat-message {
  width: min(76%, 680px);
  display: grid;
  gap: 5px;
  justify-self: start;
  padding: 8px 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.mailbox-chat-message.own {
  justify-self: end;
  border-color: rgba(74, 163, 255, .42);
  background: rgba(40, 119, 255, .18);
}

.mailbox-chat-message small {
  color: #8fa0b8;
  font-size: 12px;
}

.mailbox-chat-message p {
  margin: 0;
  color: #eef6ff;
  line-height: 1.45;
}

.mailbox-chat-message a {
  color: #74b8ff;
  font-weight: 800;
  word-break: break-word;
}

.mailbox-attachments {
  display: grid;
  gap: 6px;
}

.mailbox-image-link img {
  display: block;
  max-width: min(360px, 100%);
  max-height: 260px;
  border-radius: 8px;
  border: 1px solid #30445f;
  object-fit: contain;
  background: #070b14;
}

.mailbox-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  border: 1px solid transparent;
  border-radius: 8px;
}

.mailbox-chat-compose.drag-over {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, .1);
}

.mailbox-chat-compose textarea {
  min-height: 62px;
  resize: vertical;
}

.mailbox-chat-compose .form-error {
  grid-column: 1 / -1;
}

.mailbox-image-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #142033;
}

.mailbox-image-preview img {
  width: 54px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.mailbox-image-preview span {
  min-width: 0;
  flex: 1;
  color: #dbeafe;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mailbox-side-title.compact {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #263850;
}

.mailbox-side-title small {
  color: #8fa0b8;
  font-size: 11px;
}

.mailbox-thread-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.mailbox-thread-card.active .mailbox-thread-open {
  border-color: rgba(74, 163, 255, .58);
  background: rgba(40, 119, 255, .16);
}

.mailbox-thread-card.is-deleted,
.mailbox-thread-card.is-removed {
  opacity: .72;
}

.mailbox-thread-actions {
  display: flex;
  gap: 4px;
}

.mailbox-thread-actions .mini-icon {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
}

.mailbox-chat-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mailbox-participants span.leader {
  border-color: rgba(255, 190, 92, .42);
  background: rgba(255, 190, 92, .13);
}

.mailbox-participants span small {
  display: inline;
  margin: 0 0 0 6px;
  color: #ffcf8a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mailbox-user-picker {
  max-height: 300px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #0b1320;
}

.mailbox-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: #142033;
}

.mailbox-user-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mailbox-user-row small {
  color: #8fa0b8;
}

.mailbox-leader-toggle {
  display: inline-flex !important;
  grid-auto-flow: column;
  align-items: center;
  gap: 5px;
  color: #cfe1fb;
  font-size: 12px;
  font-weight: 900;
}

.danger-btn {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(239, 68, 68, .42);
  border-radius: 8px;
  color: #ffd6d6;
  background: rgba(127, 29, 29, .24);
  font-weight: 900;
}

.danger-btn:hover {
  border-color: rgba(239, 68, 68, .72);
  background: rgba(127, 29, 29, .36);
}

.doc-change-details summary {
  cursor: pointer;
  font-weight: 900;
}

.modal.doc-changelog-modal {
  width: min(1780px, 98vw);
  max-width: 1780px;
}

.doc-changelog-modal-list {
  display: grid;
  gap: 16px;
  max-height: 82vh;
  overflow: auto;
  padding-right: 4px;
}

.doc-changelog-modal .doc-compare-head {
  margin-right: 64px;
}

.doc-changelog-modal .doc-compare-grid.compact {
  grid-template-columns: repeat(2, minmax(560px, 1fr));
}

.doc-changelog-modal .doc-change-preview {
  max-height: 64vh;
  min-height: 460px;
  font-size: 15px;
}

.doc-changelog-modal .info-change-row {
  padding: 16px;
  border-color: rgba(79, 112, 153, .72);
  background: linear-gradient(145deg, rgba(20, 32, 51, .88), rgba(11, 19, 32, .94));
}

.doc-changelog-modal .info-change-row.focus-change {
  border-color: rgba(255, 190, 92, .76);
  box-shadow: 0 0 0 3px rgba(255, 190, 92, .13);
}

@media (max-width: 1280px) {
  .doc-changelog-modal .doc-compare-grid.compact {
    grid-template-columns: 1fr;
  }

  .doc-changelog-modal .doc-change-preview {
    min-height: 340px;
  }
}

.change-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.change-row-head span {
  display: grid;
  gap: 4px;
}

.format-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-editor-toolbar {
  max-width: 860px;
  justify-self: center;
  width: 100%;
  padding: 8px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #101827;
}

.format-toolbar button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #30445f;
  border-radius: 8px;
  color: #dce8f8;
  background: #142033;
}

.doc-align-center {
  text-align: center;
}

.doc-text-green {
  color: #75ffad;
}

.doc-text-red {
  color: #ff9ca0;
}

.doc-list-item {
  padding-left: 18px;
  position: relative;
}

.doc-list-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .75em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #8eb8e8;
}

.doc-list-item.numbered::before {
  display: none;
}

.paper-doc-page a {
  color: #8eb8e8;
  text-decoration: underline;
}

.exam-runner-meta.compact-meta {
  grid-template-columns: minmax(160px, 260px) auto;
}

.exam-runner-meta.compact-meta label {
  max-width: 260px;
}

.info-box strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.info-box strong svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.info-box.full {
  grid-column: 1 / -1;
}

.file-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.file-summary-grid .info-box p {
  margin: 0;
  font-weight: 800;
}

.file-action-row {
  margin: 12px 0 14px;
}

.dn-conflict-box {
  margin: 12px 0;
}

.file-section-grid {
  display: grid;
  gap: 14px;
}

.modal.personnel-file-modal {
  width: min(1500px, calc(100vw - 32px));
  min-width: min(960px, calc(100vw - 32px));
  min-height: 58vh;
  max-height: 96vh;
  gap: 18px;
  padding: 24px;
  background: #0f1726;
  border-color: rgba(75, 103, 142, .8);
}

.modal.personnel-file-modal .modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  margin-bottom: 0;
  background: rgba(15, 23, 42, .9);
  border: 1px solid rgba(143, 166, 199, .28);
}

.personnel-file-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 96px;
  padding: 22px;
  border: 1px solid rgba(74, 163, 255, .28);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(23, 34, 53, .98), rgba(13, 20, 34, .98));
}

.personnel-file-hero h3 {
  margin: 2px 0 4px;
  font-size: 28px;
}

.personnel-file-hero p {
  margin: 0;
  color: #b7c8df;
}

.personnel-file-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.personnel-file-hero-facts span {
  display: inline-flex;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(71, 85, 105, .8);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, .62);
  font-size: 12px;
}

.personnel-file-hero-facts b {
  color: #8fa8ca;
}

.personnel-file-state {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.personnel-file-state.ok {
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, .65);
  background: rgba(22, 163, 74, .16);
}

.personnel-file-state.danger {
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, .7);
  background: rgba(127, 29, 29, .24);
}

.file-summary-grid.modern {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.file-stat-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid #2f4460;
  border-radius: 8px;
  background: #111c2d;
}

.file-stat-card > span {
  color: #8fa8ca;
  font-size: 12px;
  font-weight: 800;
}

.file-stat-card strong {
  color: #f8fbff;
  font-size: 20px;
}

.file-stat-card.danger {
  border-color: rgba(239, 68, 68, .5);
  background: rgba(127, 29, 29, .16);
}

.file-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
}

.file-action-bar > div:first-child {
  display: grid;
  gap: 3px;
}

.file-action-bar span {
  color: #8fa8ca;
  font-size: 12px;
}

.file-action-bar .file-action-row {
  margin: 0;
}

.file-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.file-section {
  padding: 14px;
  border: 1px solid #2f4460;
  border-radius: 8px;
  background: #101827;
}

.file-section.rejected {
  border-color: rgba(239, 68, 68, .36);
  background: rgba(69, 10, 10, .18);
}

.file-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.file-section h4 {
  margin: 0;
}

.file-section-head span {
  min-width: 28px;
  padding: 3px 8px;
  border: 1px solid #33465f;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.personnel-file-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.personnel-file-list.compact {
  max-height: 390px;
}

.file-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #34465f;
  border-left: 4px solid #4aa3ff;
  border-radius: 8px;
  background: #172235;
}

.file-entry-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: 260px;
}

.file-entry-actions small {
  width: 100%;
  color: #fbbf24;
  font-size: 11px;
  text-align: right;
}

.profile-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-hint {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
}

.modal.personnel-file-modal .file-entry {
  background: rgba(23, 34, 53, .86);
}

.modal.personnel-file-modal .file-section.notes,
.modal.personnel-file-modal .file-section.history {
  min-height: 280px;
}

.modal.personnel-file-modal .file-section.history:last-of-type {
  grid-column: span 2;
}

@media (max-width: 1200px) {
  .file-section-grid,
  .profile-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .personnel-file-hero,
  .file-action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .file-summary-grid.modern,
  .file-section-grid,
  .profile-file-grid {
    grid-template-columns: 1fr;
  }

  .modal.personnel-file-modal .file-section.history:last-of-type {
    grid-column: auto;
  }
}

.file-entry.note {
  border-left-color: #4aa3ff;
}

.file-entry.strike {
  border-left-color: #f59e0b;
}

.file-entry.fine {
  border-left-color: #22c55e;
}

.file-entry.danger {
  border-left-color: #ef4444;
}

.file-entry.history {
  border-left-color: #a855f7;
}

.file-entry.archived {
  opacity: .72;
  border-left-color: #64748b;
}

.file-entry-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.file-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.file-entry-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  color: #b7c8df;
  background: rgba(8, 13, 24, .34);
  font-size: 11px;
  font-weight: 800;
}

.file-pill,
.strike-counter {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.strike-counter {
  color: #75ffad;
  background: rgba(22, 185, 106, .16);
  border: 1px solid #16b96a;
}

.strike-counter.warn {
  color: #ffd18a;
  background: rgba(245, 158, 11, .16);
  border-color: #f59e0b;
}

.strike-counter.danger {
  color: #ff8e94;
  background: rgba(239, 37, 37, .14);
  border-color: #ef4444;
}

.file-pill.active {
  color: #75ffad;
  background: rgba(22, 185, 106, .16);
}

.file-pill.archived {
  color: #cbd5e1;
  background: rgba(100, 116, 139, .22);
}

.file-pill.fine {
  color: #b8ffcf;
  background: rgba(22, 185, 106, .14);
}

.file-pill.open {
  color: #ffd18a;
  background: rgba(245, 158, 11, .16);
}

.file-pill.pending {
  color: #bfdbfe;
  background: rgba(37, 99, 235, .18);
  border: 1px solid rgba(96, 165, 250, .45);
}

.file-pill.rejected {
  color: #fecaca;
  background: rgba(127, 29, 29, .28);
  border: 1px solid rgba(239, 68, 68, .5);
}

.file-pill.paid {
  color: #75ffad;
  background: rgba(22, 185, 106, .16);
}

.file-pill.internal {
  color: #d8b4fe;
  background: rgba(168, 85, 247, .16);
}

.catalog-editor-list {
  display: grid;
  gap: 14px;
}

.catalog-category-block {
  overflow: hidden;
  border: 1px solid #314763;
  border-radius: 10px;
  background: rgba(8, 13, 24, .44);
}

.catalog-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(91, 127, 170, .32);
  background: linear-gradient(135deg, rgba(32, 49, 77, .9), rgba(17, 28, 47, .92));
}

.catalog-category-head strong {
  display: block;
  color: #f8fbff;
  font-size: 15px;
}

.catalog-category-head small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.catalog-category-head small span {
  padding: 3px 8px;
  border: 1px solid rgba(108, 145, 190, .45);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(23, 37, 60, .72);
}

.catalog-category-head .small-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(96, 165, 250, .5);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .22);
  font-weight: 700;
  cursor: pointer;
}

.catalog-category-head .small-action:hover {
  border-color: rgba(147, 197, 253, .85);
  background: rgba(37, 99, 235, .34);
}

.catalog-category-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.catalog-editor-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) 110px minmax(220px, 1.8fr) minmax(130px, .8fr) minmax(140px, .9fr) 120px 105px 88px 120px 36px;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(63, 89, 124, .82);
  border-radius: 8px;
  background: rgba(16, 24, 39, .9);
}

.catalog-editor-row label {
  min-width: 0;
}

.catalog-editor-row input,
.catalog-editor-row select,
.catalog-editor-row textarea {
  min-height: 36px;
}

.catalog-title-field input {
  font-weight: 700;
}

.catalog-editor-row .full {
  grid-column: 1 / -2;
}

@media (max-width: 1500px) {
  .catalog-editor-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 36px;
  }

  .catalog-editor-row .catalog-title-field,
  .catalog-editor-row .full {
    grid-column: 1 / -2;
  }
}

@media (max-width: 900px) {
  .catalog-category-head,
  .catalog-editor-row {
    grid-template-columns: 1fr;
  }

  .catalog-editor-row .catalog-title-field,
  .catalog-editor-row .full {
    grid-column: auto;
  }
}

.direction-file-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 150px;
}

.direction-file-overview {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: rgba(15, 23, 42, .38);
}

.direction-file-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.direction-file-overview-head span {
  color: #8fa0b8;
  font-size: 12px;
  font-weight: 800;
}

.direction-file-overview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.direction-file-overview-list article {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: #101827;
}

.direction-file-overview-list small {
  color: #8fa0b8;
}

.file-entry.paid-entry {
  opacity: .78;
}

.note-settings {
  position: static;
  flex: 0 0 auto;
}

.inline-note-settings {
  width: 28px;
  height: 28px;
  margin-left: auto;
}

.inline-note-settings svg {
  width: 15px;
  height: 15px;
}

.file-entry p {
  margin: 5px 0;
  color: #dbe8ff;
}

.file-entry small {
  color: #8fa8ca;
}

.link-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.small-link-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 138px;
  padding: 16px;
  border: 1px solid #2f4460;
  border-radius: 8px;
  background: #1b2738;
}

.small-link-card strong {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.small-link-card .link-label {
  margin-top: 2px;
  color: #b7c8df;
  font-size: 13px;
}

.small-link-card a {
  color: #9fc7ff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.small-link-card .button-row {
  justify-content: flex-start;
  margin-top: 6px;
}

.compact-action {
  min-height: 32px;
  padding: 6px 12px;
}

.compact-action .asset-action-icon,
.blue-btn .asset-action-icon,
.ghost-btn .asset-action-icon {
  width: 20px;
  height: 20px;
}

.rich-text-view {
  min-height: 110px;
  padding: 12px;
  border: 1px solid #2f4460;
  border-radius: 8px;
  background: #101827;
  color: var(--text);
  line-height: 1.55;
}

.rich-text-view h3,
.rich-text-view h4 {
  margin: 8px 0 6px;
}

.compact-table table {
  min-width: 100%;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}

.status-dot.medium {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

.status-dot.high {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .16);
}

.requirements-pill {
  display: block;
  max-width: 100%;
  padding: 0;
  color: #d8e6ff;
  border: 0;
  border-radius: 8px;
  background: transparent;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.45;
}

.department-info-view .requirements-pill {
  display: grid;
  gap: 8px;
}

.department-info-view .requirements-pill {
  white-space: pre-line;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, .24);
  border-radius: 8px;
  background: rgba(8, 13, 24, .32);
}

.department-info-modal {
  width: min(920px, calc(100vw - 32px));
}

.department-info-modal .department-info-view {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
}

.department-info-modal .personnel-box {
  display: none !important;
}

.personnel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #34465f;
  border-radius: 7px;
  background: #223047;
}

.personnel-row span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.personnel-row b,
.personnel-row small,
.truncate span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-menu-list {
  display: grid;
  gap: 10px;
}

.manage-member-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.manage-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #34465f;
  border-radius: 7px;
  background: #172235;
}

.manage-member-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.manage-member-row strong,
.manage-member-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.action-menu-list button {
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-menu-btn {
  width: 100%;
  min-height: 40px;
}

.action-edit-btn {
  justify-self: center;
  min-width: 150px;
  width: auto;
  min-height: 38px;
}

.user-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.user-action-head h3 {
  margin: 0;
}

.action-lock-note {
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid rgba(245, 158, 11, .45);
  border-radius: 8px;
  color: #fbbf24;
  background: rgba(245, 158, 11, .12);
  font-size: 12px;
  font-weight: 800;
}

.user-action-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.user-action-group {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, .24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(8, 13, 24, .72));
}

.user-action-group-wide {
  grid-column: 1 / -1;
}

.user-action-group > p {
  margin: 0 0 2px;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.user-action-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon copy";
  gap: 2px 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #2f4f77;
  border-radius: 8px;
  color: #dbeafe;
  text-align: left;
  background: rgba(15, 23, 42, .9);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.user-action-card > span {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #93c5fd;
  background: rgba(37, 99, 235, .22);
}

.user-action-card svg {
  width: 17px;
  height: 17px;
  color: currentColor;
  stroke: currentColor;
}

.user-action-card b {
  grid-area: title;
  color: #f8fbff;
}

.user-action-card small {
  grid-area: copy;
  color: #93a4bd;
  line-height: 1.35;
}

.user-action-card.primary {
  border-color: rgba(56, 189, 248, .72);
  background: linear-gradient(135deg, rgba(14, 165, 233, .26), rgba(15, 23, 42, .9));
}

.user-action-card.primary > span {
  color: #e0f2fe;
  background: #0284c7;
}

.user-action-card.info {
  border-color: rgba(34, 197, 94, .68);
  background: linear-gradient(135deg, rgba(22, 163, 74, .2), rgba(15, 23, 42, .9));
}

.user-action-card.info > span {
  color: #ecfdf5;
  background: #16a34a;
}

.user-action-card.warn {
  border-color: rgba(245, 158, 11, .72);
  background: linear-gradient(135deg, rgba(217, 119, 6, .22), rgba(15, 23, 42, .9));
}

.user-action-card.warn > span {
  color: #fffbeb;
  background: #d97706;
}

.user-action-card.danger {
  border-color: rgba(248, 113, 113, .74);
  background: linear-gradient(135deg, rgba(220, 38, 38, .22), rgba(15, 23, 42, .9));
}

.user-action-card.danger > span {
  color: #fff1f2;
  background: #dc2626;
}

.user-action-card.critical {
  border-color: rgba(244, 63, 94, .82);
  background: linear-gradient(135deg, rgba(190, 18, 60, .28), rgba(15, 23, 42, .92));
}

.user-action-card.critical > span {
  color: #fff1f2;
  background: #be123c;
}

.user-action-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #60a5fa;
  background: rgba(30, 41, 59, .92);
}

.user-action-card:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: grayscale(.35);
}

.checkbox-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  color: var(--text);
}

.checkbox-line input {
  width: auto;
}

.modal.sanction-entry-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: 94vh;
  padding: 42px 24px 24px;
  background: #0f1726;
  border-color: rgba(245, 158, 11, .42);
}

.modal.sanction-entry-modal .modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  z-index: 30;
  background: rgba(15, 23, 42, .82);
  border: 1px solid rgba(148, 163, 184, .18);
}

.sanction-entry-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(23, 34, 53, .98), rgba(20, 25, 38, .98));
}

.sanction-entry-hero h3 {
  margin: 3px 0 4px;
  font-size: 24px;
}

.sanction-entry-hero p {
  margin: 0;
  color: #b7c8df;
}

.sanction-strike-state {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(245, 158, 11, .6);
  border-radius: 999px;
  color: #ffd18a;
  background: rgba(245, 158, 11, .13);
  font-size: 12px;
  font-weight: 900;
}

.sanction-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sanction-entry-grid .full,
.sanction-reason-field {
  grid-column: 1 / -1;
}

.sanction-fine-range-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 197, 94, .42);
  border-radius: 8px;
  background: rgba(20, 83, 45, .18);
  color: #dcfce7;
}

.sanction-fine-range-card.hidden {
  display: none;
}

.sanction-fine-range-card strong {
  color: #86efac;
}

.sanction-fine-range-card span {
  font-weight: 900;
}

.sanction-fine-range-card small {
  color: #bbf7d0;
}

.sanction-catalog-picker {
  display: grid;
  gap: 8px;
}

.sanction-combobox {
  position: relative;
  display: grid;
  gap: 0;
}

.sanction-catalog-picker input,
.sanction-combobox input {
  border-color: rgba(96, 165, 250, .35);
  background: rgba(8, 13, 23, .92);
}

.sanction-combobox-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 55;
  display: grid;
  gap: 5px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(96, 165, 250, .45);
  border-radius: 8px;
  background: #0b1220;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}

.sanction-combobox-list.hidden {
  display: none;
}

.sanction-combobox-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(51, 70, 95, .85);
  border-radius: 7px;
  color: #dbeafe;
  text-align: left;
  background: rgba(15, 23, 42, .88);
  cursor: pointer;
}

.sanction-combobox-list button:hover {
  border-color: rgba(96, 165, 250, .88);
  background: rgba(30, 64, 120, .58);
}

.sanction-combobox-list .custom-sanction-option {
  margin-top: 5px;
  border-color: rgba(245, 158, 11, .46);
  background: rgba(245, 158, 11, .12);
}

.sanction-combobox-list button strong {
  color: #f8fbff;
}

.sanction-combobox-list button small {
  color: #9fb4d0;
}

.sanction-reason-field textarea {
  min-height: 150px;
}

.sanction-strike-fields {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  background: rgba(15, 23, 42, .45);
}

.sanction-strike-fields.active {
  border-color: rgba(245, 158, 11, .62);
  background: rgba(245, 158, 11, .1);
}

.sanction-strike-fields > div:first-child {
  display: grid;
  gap: 3px;
}

.sanction-strike-fields strong {
  color: #f8fbff;
}

.sanction-strike-fields small {
  color: #facc15;
}

.sanction-no-expiry-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(96, 165, 250, .34);
  border-radius: 8px;
  color: #cfe3ff;
  background: rgba(15, 23, 42, .66);
  font-weight: 800;
}

.sanction-no-expiry-toggle input {
  width: 18px;
  height: 18px;
}

.hidden-training-shell {
  gap: 12px;
}

.hidden-training-shell > .training-exam-layout {
  margin-top: 0;
}

.sanction-internal-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(168, 85, 247, .5);
  border-radius: 8px;
  color: #e9d5ff;
  background: rgba(88, 28, 135, .18);
}

.sanction-internal-toggle span {
  display: grid;
  gap: 2px;
}

.sanction-internal-toggle small {
  color: #c4b5fd;
  font-size: 12px;
}

.sanction-internal-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sanction-internal-toggle i {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 24px;
  border: 1px solid rgba(196, 181, 253, .55);
  border-radius: 999px;
  background: rgba(15, 23, 42, .85);
}

.sanction-internal-toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #c4b5fd;
  transition: transform .15s ease, background .15s ease;
}

.sanction-internal-toggle input:checked + i {
  border-color: rgba(168, 85, 247, .9);
  background: rgba(168, 85, 247, .34);
}

.sanction-internal-toggle input:checked + i::after {
  transform: translateX(22px);
  background: #f3e8ff;
}

.training-picker {
  display: grid;
  gap: 12px;
}

.training-picker-group {
  padding: 12px;
  border: 1px solid #2f4460;
  border-radius: 8px;
  background: #101827;
}

.training-picker-title {
  margin-bottom: 10px;
  color: #d5e4ff;
  font-size: 13px;
  font-weight: 900;
}

.training-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.training-toggle {
  position: relative;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #33465f;
  border-radius: 7px;
  background: #172235;
  color: #dbe8ff;
  font-weight: 800;
  cursor: pointer;
}

.training-toggle input {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.training-toggle:focus-within span {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .22);
}

.mini-table tr {
  min-height: 68px;
}

.training-toggle span {
  width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid #31445d;
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
}

.training-toggle:hover span {
  border-color: #4aa3ff;
  background: rgba(37, 99, 235, .12);
}

.training-toggle input:checked + span {
  color: #77ffb2;
  border-color: rgba(22, 185, 106, .65);
  background: rgba(22, 185, 106, .15);
}

.it-toggle {
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #33465f;
  border-radius: 8px;
  background: #101827;
}

.it-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.it-toggle-ui {
  width: 46px;
  height: 26px;
  position: relative;
  border-radius: 999px;
  background: #263850;
  border: 1px solid #41556f;
}

.it-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #9fb3cc;
  transition: transform .16s ease, background .16s ease;
}

.it-toggle input:checked + .it-toggle-ui {
  background: rgba(37, 99, 235, .45);
  border-color: #4aa3ff;
}

.it-toggle input:checked + .it-toggle-ui::after {
  transform: translateX(20px);
  background: #ffffff;
}

.it-toggle input:disabled + .it-toggle-ui {
  opacity: .68;
  cursor: not-allowed;
}

.it-toggle:has(input:disabled) {
  opacity: .82;
}

.it-toggle small {
  display: block;
  margin-top: 3px;
  color: #8fa8ca;
}

.modal.duty-modal {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  background: #0e1726;
  border: 1px solid #2f4b6f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .66);
}

.duty-modal .modal-x {
  top: 14px;
  right: 14px;
  color: #8ba9ce;
}

.duty-workflow {
  display: grid;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, .18), transparent 38%),
    #111c2d;
}

.duty-workflow-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #28425f;
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}

.duty-head-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #8cc7ff;
  border-radius: 12px;
  background: rgba(74, 163, 255, .12);
  border: 1px solid rgba(74, 163, 255, .32);
}

.duty-head-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.duty-kicker {
  display: block;
  margin-bottom: 4px;
  color: #78b8ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.duty-workflow h3 {
  margin: 0;
  color: #f3f8ff;
  font-size: 25px;
  line-height: 1.1;
}

.duty-workflow p {
  margin: 5px 0 0;
  color: #a9bdd7;
  font-size: 14px;
  font-weight: 800;
}

.duty-choice-grid {
  display: grid;
  gap: 10px;
}

.duty-choice-card {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 5px 48px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 0;
  color: #eaf3ff;
  background: #172438;
  border: 1px solid #2e4563;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.duty-choice-card:hover {
  transform: translateY(-1px);
  border-color: #55799f;
  background: #1b2b43;
}

.duty-choice-card.active {
  border-color: #65b5ff;
  background: #1d334f;
  box-shadow: 0 0 0 1px rgba(101, 181, 255, .25);
}

.duty-card-accent {
  width: 5px;
  height: 100%;
  border-radius: 10px 0 0 10px;
  background: #64748b;
}

.duty-choice-card.inside .duty-card-accent {
  background: #38bdf8;
}

.duty-choice-card.outside .duty-card-accent {
  background: #facc15;
}

.duty-choice-card.undercover .duty-card-accent {
  background: #a78bfa;
}

.duty-choice-card.admin .duty-card-accent {
  background: #ef4444;
}

.duty-choice-card i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #dcecff;
  border-radius: 10px;
  background: rgba(148, 163, 184, .16);
  border: 1px solid rgba(148, 163, 184, .2);
}

.duty-choice-card i svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.duty-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.duty-card-copy strong {
  color: #f4f8ff;
  font-size: 18px;
  line-height: 1.1;
}

.duty-card-copy small {
  color: #9fb1ca;
  font-size: 13px;
  font-weight: 850;
}

.duty-card-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: transparent;
  border: 1px solid #435a76;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  font-weight: 950;
}

.duty-choice-card.active .duty-card-check {
  color: #082032;
  border-color: #7dd3fc;
  background: #7dd3fc;
}

.duty-choice-card[disabled] {
  opacity: .48;
  cursor: not-allowed;
}

.duty-choice-card[disabled]:hover {
  transform: none;
  border-color: #2e4563;
  background: #172438;
}

.duty-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #263a55;
}

.duty-modal-actions button {
  min-height: 42px;
  justify-content: center;
  font-size: 14px;
}

.doc-search-control {
  display: grid;
  gap: 6px;
}

.doc-search-control span {
  color: #91a7c4;
  font-size: 12px;
  font-weight: 900;
}

.table-subline {
  display: block;
  margin-top: 5px;
  color: #8fa8ca;
  font-size: 12px;
  font-weight: 800;
}

.user-actions {
  width: 34px;
  height: 34px;
  color: #dbeafe;
  border: 1px solid #3f5877;
  background: #172338;
}

.doc-search-mark.active-search-mark {
  color: #05101f;
  background: #facc15;
  outline: 2px solid #fde68a;
}

.add-doc-button {
  transform: translateY(-5px);
}

.old-data-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #33465f;
  border-radius: 8px;
  background: #101827;
}

.old-data-box p {
  margin: 5px 0 0;
  color: #9fb3cc;
}

.fluctuation-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.fluctuation-chip.hired {
  color: #52ff98;
  border: 1px solid #16b96a;
  background: rgba(22, 185, 106, .16);
}

.fluctuation-chip.dismissed {
  color: #ff8b91;
  border: 1px solid #e12b35;
  background: rgba(225, 43, 53, .16);
}

.direction-tabs {
  margin-top: 0;
  margin-bottom: 0;
}

.direction-tabs .tab-danger {
  border-color: rgba(248, 113, 113, .65);
  color: #fecaca;
  background: rgba(127, 29, 29, .28);
}

.direction-overview-focus {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.direction-focus-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  align-content: center;
  padding: 16px;
  border: 1px solid rgba(87, 121, 168, .42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(17, 30, 49, .98), rgba(12, 20, 34, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.direction-focus-card span {
  color: #b9cdea;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.direction-focus-card strong {
  color: #f5f8ff;
  font-size: 30px;
  line-height: 1;
}

.direction-focus-card small {
  color: #8fa9cb;
  font-size: 12px;
}

.direction-focus-card.muted-card {
  border-color: rgba(148, 163, 184, .28);
}

.direction-focus-card.strike-card {
  border-color: rgba(99, 168, 255, .48);
}

.direction-focus-card.fine-card {
  border-color: rgba(99, 168, 255, .48);
}

.heading-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 8px;
  color: #dcecff;
  background: rgba(40, 119, 255, .18);
  border: 1px solid rgba(99, 168, 255, .42);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.badge.dept-leitung {
  background: rgba(239, 37, 37, .18);
  color: #ff8e94;
}

.badge.dept-info {
  background: rgba(22, 185, 106, .18);
  color: #75ffad;
}

.badge.dept-mitglied {
  background: rgba(37, 99, 235, .18);
  color: #91b9ff;
}

.it-tool {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
  color: var(--text);
  background: #142033;
  border: 1px solid #34465f;
  border-radius: 8px;
  padding: 10px 14px;
}

.it-tool span {
  color: var(--muted);
}

.it-section {
  padding: 0;
  overflow: hidden;
}

.it-section summary {
  min-height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  list-style: none;
}

.it-section summary::-webkit-details-marker {
  display: none;
}

.it-section summary::before {
  content: "+";
  width: 20px;
  height: 20px;
  position: absolute;
  left: 14px;
  display: inline-grid;
  place-items: center;
  color: #8eb8e8;
  border: 1px solid #34465f;
  border-radius: 6px;
}

.it-section[open] summary::before {
  content: "-";
}

.it-section > :not(summary) {
  margin: 0 12px 12px;
}

.it-section-actions {
  padding-top: 8px;
}

.edit-list {
  display: grid;
  gap: 10px;
}

.edit-row {
  display: grid;
  grid-template-columns: 30px minmax(140px, 220px) 1fr auto 28px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #263850;
  border-radius: 8px;
  background: #101827;
}

.edit-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  padding: 10px 2px 4px;
  border-top: 1px solid #2d4058;
  color: #d8e6ff;
  font-weight: 900;
}

.edit-section-divider small {
  color: #8fa0b8;
  font-weight: 700;
}

.rank-edit-list .edit-row {
  grid-template-columns: minmax(90px, 120px) 1fr 28px;
}

.edit-icon,
.edit-pencil {
  color: var(--cyan);
  display: inline-grid;
  place-items: center;
}

.edit-pencil {
  color: #8aa7c7;
}

.edit-name,
.rank-number {
  color: #d8e6ff;
  font-weight: 800;
}

.edit-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.page-lock {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: 6px;
  background: rgba(255, 209, 102, .12);
}

.page-lock svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.member-rank-col .rank-number {
  cursor: pointer;
}

.member-rank-col .rank-number:hover {
  color: #eef6ff;
  border-color: #5d9cff;
  background: #1b2d49;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .28), 0 0 0 3px rgba(93, 156, 255, .12);
}

.member-rank-col .rank-number::after {
  content: attr(data-rank-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 25;
  width: max-content;
  max-width: 240px;
  padding: 7px 9px;
  color: #ecf5ff;
  border: 1px solid rgba(93, 156, 255, .45);
  border-radius: 7px;
  background: #0d1728;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .38);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
}

.member-rank-col .rank-number:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #ff9ca0;
}

.form-success {
  color: #9dffbf;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .68);
}

.modal {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: grid;
  gap: 15px;
  background: #121418;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.modal-x {
  position: sticky;
  top: 10px;
  right: 10px;
  z-index: 20;
  float: right;
  justify-self: end;
  margin-bottom: -45px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #8fa6c7;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.modal-x:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
}

.page-order-controls {
  display: inline-flex;
  gap: 4px;
}

.login-shell {
  background:
    radial-gradient(circle at 16% 18%, rgba(47, 109, 246, .24), transparent 32%),
    radial-gradient(circle at 84% 74%, rgba(255, 210, 138, .14), transparent 34%),
    #070b13;
}

.login-stage {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 420px);
  gap: 28px;
  align-items: stretch;
}

.login-intro,
.login-panel {
  border: 1px solid rgba(121, 145, 184, .26);
  background: linear-gradient(145deg, rgba(18, 29, 48, .96), rgba(12, 18, 31, .96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

.login-intro {
  min-height: 520px;
  display: grid;
  align-content: end;
  gap: 16px;
  padding: 44px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.login-intro::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  pointer-events: none;
}

.login-intro img {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 18px 44px rgba(47, 109, 246, .26);
}

.login-intro h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
}

.login-intro p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #b8c6de;
  font-size: 18px;
}

.login-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.login-trust-row span {
  padding: 8px 11px;
  border: 1px solid rgba(122, 154, 205, .24);
  border-radius: 999px;
  color: #dce8ff;
  background: rgba(255, 255, 255, .05);
  font-weight: 800;
  font-size: 12px;
}

.login-panel {
  width: 100%;
  align-self: center;
  padding: 34px;
  border-radius: 12px;
  background: rgba(14, 22, 37, .98);
}

.login-panel h2 {
  margin: 0 0 6px;
  color: #f8fbff;
  font-size: 30px;
}

.login-action-stack {
  display: grid;
  gap: 10px;
}

.login-panel .primary-btn,
.login-panel .discord-login-btn {
  min-height: 48px;
  border-radius: 8px;
  font-size: 14px;
  transition: transform .14s ease, filter .14s ease, opacity .14s ease;
}

.login-panel .primary-btn {
  margin-top: 2px;
  background: linear-gradient(135deg, #2f6df6, #1749b7);
  box-shadow: 0 12px 26px rgba(47, 109, 246, .24);
}

.login-panel footer {
  padding-top: 12px;
  border-top: 1px solid rgba(121, 145, 184, .18);
  color: #8fa6c7;
  font-size: 12px;
  text-align: center;
}

.inspect-blocker {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 14, .88);
  backdrop-filter: blur(8px);
}

.inspect-blocker.hidden {
  display: none;
}

.inspect-blocker > div {
  width: min(420px, calc(100vw - 32px));
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border: 1px solid rgba(121, 145, 184, .28);
  border-radius: 12px;
  color: #f8fbff;
  background: #101a2c;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
}

.inspect-blocker img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
}

.modal-x {
  position: sticky;
  top: 12px;
  right: 12px;
  z-index: 20;
  float: right;
  justify-self: end;
  margin-bottom: -49px;
  width: 34px;
  height: 34px;
  color: #b7c9e8;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(143, 166, 199, .22);
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.modal-x:hover {
  color: #ffffff;
  border-color: rgba(143, 166, 199, .48);
  background: rgba(47, 109, 246, .18);
}

.internal-doc-tile-wrap {
  position: relative;
  min-height: 118px;
  min-width: 0;
}

.internal-doc-tile-wrap .internal-doc-tile {
  width: 100%;
  padding-right: 52px;
}

.internal-doc-tile-wrap .delete-info-doc {
  position: absolute;
  top: 10px;
  right: 10px;
}

.information-card .department-modal-heading {
  align-items: flex-start;
}

.information-card .department-modal-heading .blue-btn {
  transform: translateY(-4px);
}

.members-search-row {
  max-width: 560px;
  margin: 0 0 14px;
}

.restart-card {
  padding: 18px;
}

.restart-editor {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.restart-editor input {
  max-width: 150px;
}

.restart-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.it-animation-card {
  grid-column: 1 / -1;
}

.animation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.animation-editor {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) 110px minmax(220px, .8fr) minmax(260px, 1.1fr);
  gap: 10px;
  align-items: end;
}

.animation-save-state {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  color: #9fb5d4;
  background: rgba(15, 23, 42, .52);
}

.animation-save-state.saved {
  border-color: rgba(34, 197, 94, .38);
  background: rgba(20, 83, 45, .12);
}

.animation-save-state strong {
  color: #dbeafe;
}

.animation-save-state.saved strong {
  color: #bbf7d0;
}

.animation-save-state span {
  color: #9fb5d4;
  font-size: 12px;
}

.animation-save-state a {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
}

.animation-editor label {
  display: grid;
  gap: 6px;
  color: #9fb5d4;
  font-size: 12px;
  font-weight: 900;
}

.animation-editor input {
  width: 100%;
}

.animation-upload input {
  padding: 8px;
}

.animation-url-input {
  grid-column: span 1;
}

.animation-library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .6fr);
  gap: 12px;
}

.animation-library-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 8px;
  background: rgba(8, 13, 24, .26);
}

.animation-editor-section {
  grid-column: 1 / -1;
}

.animation-library-section > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.animation-library-section b {
  color: #dbeafe;
}

.animation-library-section small {
  color: #8fa0b8;
}

.animation-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.animation-library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
}

.animation-library-play {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .12);
  text-align: left;
  cursor: pointer;
}

.animation-library-play strong,
.animation-library-play span {
  display: block;
}

.animation-library-play span {
  margin-top: 3px;
  color: #8fa0b8;
  font-size: 12px;
}

.animation-library-play:hover {
  border-color: rgba(96, 165, 250, .58);
  background: rgba(37, 99, 235, .2);
}

.animation-library-item.preset .animation-library-play {
  border-color: rgba(148, 163, 184, .22);
  background: rgba(148, 163, 184, .08);
}

@media (max-width: 900px) {
  .animation-library-layout {
    grid-template-columns: 1fr;
  }

  .animation-editor {
    grid-template-columns: 1fr;
  }
}

.restart-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(121, 145, 184, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
}

.filterable-row.search-match {
  outline: 1px solid rgba(34, 197, 94, .46);
  outline-offset: -1px;
  background: rgba(34, 197, 94, .08);
}

@media (max-width: 860px) {
  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: auto;
    padding: 30px;
  }

  .it-workbench {
    grid-template-columns: 1fr;
    grid-template-areas:
      "system"
      "restarts"
      "pages"
      "members"
      "ranks";
  }

  .it-section-title {
    grid-template-columns: minmax(0, 1fr);
  }

  .it-overview-headline,
  .it-overview-grid,
  .it-overview-restarts,
  .secret-config-grid,
  .discord-sync-layout,
  .discord-role-row,
  .profile-discord-card,
  .profile-discord-strip,
  .mailbox-hero,
  .mailbox-layout {
    grid-template-columns: 1fr;
  }

  .mailbox-hero {
    height: auto;
    max-height: none;
  }

  .mailbox-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .paper-doc-page .doc-media-row,
  .doc-save-preview .doc-media-row {
    grid-template-columns: 1fr;
  }

  .mailbox-row {
    grid-template-columns: 1fr;
  }

  .doc-changelog-modal .doc-compare-grid.compact {
    grid-template-columns: 1fr;
  }

  .discord-sync-section {
    grid-column: auto;
  }

  .it-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .it-section-title > .button-row,
  .it-section-title > button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.modal h3 {
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-card {
  text-align: left;
  padding: 14px;
  color: var(--text);
  background: #0f1116;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.choice-card.active {
  border-color: var(--blue);
  background: rgba(40, 119, 255, .12);
}

.choice-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 100%;
  overflow-x: hidden;
}

.full {
  grid-column: 1 / -1;
}

.template-page {
  min-height: 240px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.changelog-page {
  display: grid;
  gap: 10px;
}

.changelog-page-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 6px 8px;
  border-bottom: 1px solid #263850;
}

.changelog-page-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.changelog-page-head p {
  margin: 6px 0 0;
  color: #9fb4d0;
}

.changelog-panel {
  display: grid;
  padding: 16px;
}

.changelog-list {
  display: grid;
  gap: 16px;
}

.changelog-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #1b2738;
  border: 1px solid #34465f;
  border-radius: 8px;
}

.changelog-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.changelog-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.changelog-actions {
  flex: 0 0 auto;
}

.changelog-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.changelog-badge,
.changelog-version {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.nav-badge.changelog-nav-badge {
  background: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, .22);
}

.changelog-badge.feature {
  color: #44ff8d;
  background: rgba(16, 185, 129, .16);
  border: 1px solid rgba(16, 185, 129, .65);
}

.changelog-badge.fix {
  color: #ffd6d6;
  background: rgba(239, 68, 68, .16);
  border: 1px solid rgba(239, 68, 68, .65);
}

.changelog-version {
  color: #dbeafe;
  background: rgba(15, 23, 42, .35);
  border: 1px solid #49617f;
}

.changelog-body {
  display: grid;
  gap: 7px;
}

.changelog-body p {
  margin: 0;
  color: #dbeafe;
  font-weight: 500;
  line-height: 1.35;
}

.changelog-body h4 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
}

.changelog-body ul {
  margin: 0;
  padding-left: 19px;
  display: grid;
  gap: 4px;
  color: #dbeafe;
}

.changelog-body li {
  line-height: 1.32;
}

.changelog-body strong {
  color: #ffffff;
  font-weight: 900;
}

.changelog-editor {
  min-height: 260px;
  resize: vertical;
}

.changelog-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  color: #8fa0b8;
  font-size: 12px;
}

.changelog-card footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.changelog-card footer svg {
  width: 16px;
  height: 16px;
  color: #8fa0b8;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.changelog-empty {
  padding: 26px;
  color: #a8c1df;
  background: rgba(27, 39, 56, .65);
  border: 1px dashed #34465f;
  border-radius: 8px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 375px;
  gap: 24px;
}

.calendar-panel {
  padding: 0;
  overflow: hidden;
}

.calendar-head {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #263850;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 20px 16px 12px;
  color: #9fc0e8;
  font-weight: 900;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 16px 24px;
}

.calendar-day {
  min-height: 96px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid #263850;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.calendar-day:not(.muted-day):hover {
  border-color: #4aa3ff;
  background: rgba(40, 119, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(74, 163, 255, .28), 0 8px 18px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}

.calendar-day.today {
  border-color: #2877ff;
  background: rgba(37, 99, 235, .12);
}

.muted-day {
  opacity: .35;
}

.calendar-event-pill {
  display: block;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #dbeafe;
  background: #1f4287;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-pill.calendar-cancelled {
  text-decoration: line-through;
  color: #fecaca;
  background: #8f2632;
}

.calendar-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.calendar-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  max-width: max-content;
  min-width: 170px;
  min-height: 38px;
  padding: 8px 14px;
  justify-self: start;
  margin-top: 14px;
}

.upcoming-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.upcoming-event {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-left: 4px solid #2877ff;
  border-radius: 8px;
  background: #1b2738;
}

.upcoming-event p {
  margin: 0;
  color: #c5d4ea;
}

.selected-day-panel {
  padding: 18px;
}

.selected-day-panel h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.selected-day-panel .upcoming-list {
  gap: 12px;
  margin-top: 12px;
}

.selected-event-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 14px 44px 14px 14px;
  border-left: 4px solid #2877ff;
  border-radius: 8px;
  background: #1b2738;
}

.selected-event-card p {
  margin: 0;
  color: #c5d4ea;
}

.calendar-cancelled-card {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .28);
}

.calendar-cancelled-card strong {
  color: #fecaca;
}

.calendar-cancelled-label,
.calendar-repeat-label {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.calendar-cancelled-label {
  color: #fecaca;
  background: rgba(239, 68, 68, .2);
  border: 1px solid rgba(248, 113, 113, .35);
}

.calendar-repeat-label {
  color: #bfdbfe;
  background: rgba(37, 99, 235, .2);
  border: 1px solid rgba(96, 165, 250, .35);
}

.calendar-event-settings {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: #dcecff;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 17px;
}

.calendar-event-settings:hover {
  background: rgba(255, 255, 255, .08);
}

.file-entry-head .inline-note-settings {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid rgba(121, 145, 184, .25);
  background: rgba(255, 255, 255, .04);
}

.event-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9fc0e8;
}

.event-meta-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.event-author {
  color: #7f90af;
}

.calendar-color-blau,
.calendar-event-pill.calendar-color-blau {
  border-color: #2877ff;
  background: #1f4287;
}

.calendar-color-gruen,
.calendar-event-pill.calendar-color-gruen {
  border-color: #22c55e;
  background: #1f7a46;
}

.calendar-color-orange,
.calendar-event-pill.calendar-color-orange {
  border-color: #f59e0b;
  background: #8a4f12;
}

.calendar-color-rot,
.calendar-event-pill.calendar-color-rot {
  border-color: #ef4444;
  background: #8f2632;
}

.calendar-color-lila,
.calendar-event-pill.calendar-color-lila {
  border-color: #a855f7;
  background: #56308f;
}

.upcoming-event span,
.upcoming-event small,
.selected-event-card span,
.selected-event-card small {
  color: #9fc0e8;
}

.selected-event-card .event-author {
  color: #7f90af;
}

.calendar-prev svg {
  transform: rotate(90deg);
}

.calendar-next svg {
  transform: rotate(-90deg);
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    min-height: auto;
    position: static;
  }

  .workspace {
    height: auto;
    overflow: visible;
  }

  .navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-4,
  .grid-3,
  .form-grid,
  .it-grid,
  .department-grid,
  .department-layout,
  .department-info-view {
    grid-template-columns: 1fr;
  }

  .department-card.swat-department-card {
    grid-column: auto;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .fluctuation-summary-grid {
    grid-template-columns: 1fr;
  }

  .link-card-grid {
    grid-template-columns: 1fr;
  }

  .internal-doc-grid {
    grid-template-columns: 1fr;
  }

  .doc-compare-grid {
    grid-template-columns: 1fr;
  }

  .doc-save-preview {
    height: 360px;
  }

  .profile-training-grid,
  .duty-choice-grid {
    grid-template-columns: 1fr;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .seizure-modal-grid,
  .seizure-search-row {
    grid-template-columns: 1fr;
  }

  .seizure-stats-head {
    justify-content: flex-start;
  }

  .it-layout,
  .permission-controls,
  .permission-action-grid,
  .it-password-panel,
  .it-member-row,
  .module-grant-row,
  .member-file-menu,
  .rookie-file-form,
  .rookie-file-grid,
  .hr-member-file-summary,
  .user-action-menu,
  .leadership-facts,
  .leadership-hours,
  .leadership-toolbar,
  .direction-overview-focus {
    grid-template-columns: 1fr;
  }

  .it-member-roles {
    justify-content: flex-start;
  }

  .permission-action-card,
  .permission-row-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 1500px) and (min-width: 981px) {
  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .internal-doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .direction-overview-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .permission-controls {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 620px) {
  .content,
  .topbar {
    padding: 16px;
  }

  .topbar,
  .defcon-panel,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar > .template-mode-chip {
    position: static;
    transform: none;
  }

  .navigation {
    grid-template-columns: 1fr;
  }
}
