/* =========================================================
   ПАО «Россети Ленэнерго» — профессиональный Mini App UI
   ========================================================= */

:root {
  --bg-0: #020b17;
  --bg-1: #041326;
  --bg-2: #08223f;
  --panel: rgba(7, 28, 54, 0.72);
  --panel-strong: rgba(7, 30, 58, 0.92);
  --panel-soft: rgba(10, 40, 72, 0.54);
  --line: rgba(151, 198, 226, 0.13);
  --line-strong: rgba(108, 208, 239, 0.25);
  --text: #f4f8fc;
  --text-2: #b5c6d8;
  --muted: #718aa5;
  --cyan: #23b7e5;
  --cyan-bright: #55d4f4;
  --blue: #0977be;
  --blue-deep: #07548c;
  --green: #45d5a2;
  --amber: #f3c45c;
  --red: #ff6b76;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-0);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(0, 132, 200, 0.16), transparent 32%),
    linear-gradient(145deg, #03101f 0%, #041326 46%, #061a30 100%);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-grid {
  position: absolute;
  inset: -10%;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(126, 183, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 183, 216, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(700px) rotateX(8deg) scale(1.08);
  animation: gridDrift 24s linear infinite;
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 95%);
}

.scene-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.22;
  animation: orbFloat 14s ease-in-out infinite alternate;
}

.scene-orb-a {
  width: 520px;
  height: 520px;
  right: -180px;
  top: -190px;
  background: #00a8dd;
}

.scene-orb-b {
  width: 460px;
  height: 460px;
  left: -240px;
  bottom: -120px;
  background: #086bb7;
  animation-delay: -5s;
}

.scene-orb-c {
  width: 300px;
  height: 300px;
  left: 47%;
  top: 39%;
  background: #0c90cf;
  opacity: 0.08;
  animation-delay: -9s;
}

.scene-beam {
  position: absolute;
  width: 1px;
  height: 65vh;
  background: linear-gradient(to bottom, transparent, rgba(87, 203, 239, 0.2), transparent);
  transform: rotate(34deg);
  opacity: 0.32;
  animation: beamSweep 15s ease-in-out infinite;
}

.scene-beam-a {
  left: 24%;
  top: -10%;
}

.scene-beam-b {
  right: 20%;
  bottom: -18%;
  animation-delay: -7s;
}

.scene-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

@keyframes gridDrift {
  from { transform: perspective(700px) rotateX(8deg) translateY(0) scale(1.08); }
  to { transform: perspective(700px) rotateX(8deg) translateY(42px) scale(1.08); }
}

@keyframes orbFloat {
  from { transform: translate3d(-18px, -12px, 0) scale(0.94); }
  to { transform: translate3d(30px, 24px, 0) scale(1.08); }
}

@keyframes beamSweep {
  0%, 100% { opacity: 0.08; transform: rotate(34deg) translateY(-8%); }
  50% { opacity: 0.34; transform: rotate(34deg) translateY(10%); }
}

.logo-surface {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f3;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 16px 45px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.logo-surface-large {
  width: 184px;
  height: 92px;
  border-radius: 19px;
}

.logo-surface-header {
  width: 122px;
  height: 55px;
  border-radius: 13px;
}

.company-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.logo-surface.is-logo-loaded .company-logo {
  display: block;
}

.logo-fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #0874b7;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.logo-fallback span {
  font-size: 16px;
}

.logo-fallback small {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* AUTH */

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding:
    max(20px, env(safe-area-inset-top))
    18px
    max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.auth-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-panel {
  position: relative;
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(8, 34, 63, 0.90), rgba(3, 17, 35, 0.88));
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  animation: panelIn 1.05s cubic-bezier(.16,.84,.32,1) 0.12s forwards;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(81, 207, 240, 0.22), transparent 38%, rgba(255,255,255,0.03));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes panelIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-logo-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.auth-copy {
  padding: 29px 0 23px;
}

.micro-label {
  display: inline-block;
  color: #61cce9;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.auth-copy h1,
.home-hero h1,
.monitoring-hero h1 {
  margin: 9px 0 0;
  font-weight: 750;
  letter-spacing: -0.045em;
}

.auth-copy h1 {
  font-size: clamp(31px, 8vw, 42px);
}

.auth-copy p {
  margin: 14px 0 0;
  color: #8ca2ba;
  font-size: 12px;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 15px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field > span {
  color: #a1b4c9;
  font-size: 10px;
  font-weight: 650;
}

.input-shell {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 15px;
  background: rgba(2, 15, 32, 0.58);
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.input-shell:focus-within {
  border-color: rgba(74, 202, 238, 0.48);
  background: rgba(3, 23, 45, 0.72);
  box-shadow:
    0 0 0 4px rgba(27, 174, 224, 0.07),
    0 9px 25px rgba(0, 0, 0, 0.12);
}

.input-shell > svg,
.icon-button svg,
.primary-action svg,
.module-icon svg,
.module-footer svg,
.back-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-shell > svg {
  width: 18px;
  height: 18px;
  color: #66819e;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 16px 0;
  border: 0;
  outline: 0;
  color: #eef7ff;
  background: transparent;
  font-size: 13px;
}

.input-shell input::placeholder {
  color: #4f6882;
}

.icon-button {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #8198b1;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.icon-button:hover {
  color: #dcebf7;
  border-color: rgba(91, 204, 237, 0.22);
  background: rgba(48, 165, 212, 0.08);
}

.input-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.input-action svg,
.logout-button svg,
.modal-close svg {
  width: 17px;
  height: 17px;
}

.primary-action {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(106, 218, 245, 0.18);
  border-radius: 15px;
  color: white;
  background: linear-gradient(110deg, #0877bd 0%, #08a9c8 100%);
  box-shadow: 0 16px 34px rgba(0, 116, 185, 0.20);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.primary-action::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -30%;
  width: 24%;
  height: 330%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: rotate(18deg);
  animation: actionShine 5s ease-in-out infinite;
}

@keyframes actionShine {
  0%, 72% { left: -35%; opacity: 0; }
  78% { opacity: 1; }
  92%, 100% { left: 120%; opacity: 0; }
}

.primary-action:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 19px 40px rgba(0, 116, 185, 0.26);
}

.primary-action:disabled {
  opacity: 0.62;
  cursor: wait;
}

.primary-action svg {
  width: 18px;
  height: 18px;
}

.login-error {
  padding: 11px 13px;
  border: 1px solid rgba(255, 107, 118, 0.16);
  border-radius: 12px;
  color: #ffa4ab;
  background: rgba(255, 107, 118, 0.065);
  font-size: 10px;
  line-height: 1.5;
  animation: errorShake .35s ease;
}

@keyframes errorShake {
  0%,100% { transform: translateX(0); }
  35% { transform: translateX(-5px); }
  70% { transform: translateX(5px); }
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 19px;
  color: #58728d;
  font-size: 9px;
}

.secure-dot,
.system-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(69, 213, 162, 0.07), 0 0 17px rgba(69, 213, 162, 0.45);
}

/* APP */

.app-shell {
  position: relative;
  z-index: 2;
  width: min(100% - 26px, 1120px);
  margin: 0 auto;
  padding:
    max(13px, env(safe-area-inset-top))
    0
    max(24px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
}

body.authenticated .app-shell {
  visibility: visible;
  animation: appReveal .75s cubic-bezier(.16,.84,.32,1) forwards;
}

@keyframes appReveal {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

body.auth-pending {
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 30;
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 13px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(4, 22, 43, 0.82);
  box-shadow: 0 19px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.brand-home {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 260px;
}

.identity span {
  color: #7188a0;
  font-size: 8px;
}

.identity strong {
  margin-top: 3px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8f1fa;
  font-size: 10px;
  font-weight: 650;
}

.role-badge {
  padding: 7px 9px;
  border: 1px solid rgba(75, 199, 235, 0.12);
  border-radius: 999px;
  color: #7fcde4;
  background: rgba(35, 183, 229, 0.06);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.role-badge.is-dispatcher {
  color: #82e0bd;
  border-color: rgba(69, 213, 162, 0.15);
  background: rgba(69, 213, 162, 0.07);
}

.logout-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
  animation: viewIn .55s cubic-bezier(.16,.84,.32,1);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(13px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* HOME */

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 30px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(8, 40, 73, 0.88), rgba(3, 19, 39, 0.79));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.home-hero::before {
  content: "";
  position: absolute;
  right: 18%;
  top: -55%;
  width: 1px;
  height: 210%;
  background: linear-gradient(transparent, rgba(79, 198, 235, 0.18), transparent);
  transform: rotate(27deg);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
}

.home-hero h1 {
  max-width: 640px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.02;
}

.home-hero p {
  max-width: 620px;
  margin: 16px 0 0;
  color: #8da4bb;
  font-size: 14px;
  line-height: 1.7;
}

.system-line {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #8197ae;
  font-size: 10px;
}

.system-pulse {
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(.9); opacity: .75; }
  50% { transform: scale(1.12); opacity: 1; }
}

.hero-visual {
  position: relative;
  width: 280px;
  height: 280px;
  margin-left: auto;
}

.radar-ring {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(67, 190, 228, 0.17);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: radarPulse 4.5s ease-out infinite;
}

.radar-ring-1 {
  width: 90px;
  height: 90px;
}

.radar-ring-2 {
  width: 170px;
  height: 170px;
  animation-delay: -1.4s;
}

.radar-ring-3 {
  width: 250px;
  height: 250px;
  animation-delay: -2.8s;
}

@keyframes radarPulse {
  0% { opacity: .15; transform: translate(-50%, -50%) scale(.82); }
  45% { opacity: .6; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.11); }
}

.radar-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 212, 244, 0.3);
  border-radius: 50%;
  color: #5fd7f3;
  background:
    radial-gradient(circle at 35% 25%, rgba(80, 216, 247, 0.24), rgba(5, 62, 101, 0.42));
  box-shadow:
    0 0 55px rgba(35, 183, 229, 0.16),
    inset 0 0 30px rgba(68, 197, 235, 0.08);
  transform: translate(-50%, -50%);
  animation: coreFloat 3.8s ease-in-out infinite;
}

.radar-core svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

@keyframes coreFloat {
  0%,100% { transform: translate(-50%, -50%) translateY(-2px); }
  50% { transform: translate(-50%, -50%) translateY(4px); }
}

.section-intro,
.monitoring-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 36px 6px 17px;
}

.section-intro h2,
.monitoring-heading h2 {
  margin: 7px 0 0;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.section-caption {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
  color: #697f97;
  background: rgba(255,255,255,.025);
  font-size: 9px;
}

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

.module-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 25px;
  color: inherit;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(8, 35, 65, 0.76), rgba(3, 20, 40, 0.74));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.23);
  cursor: pointer;
  backdrop-filter: blur(22px);
  transition:
    transform .3s cubic-bezier(.2,.8,.2,1),
    border-color .3s ease,
    box-shadow .3s ease,
    background .3s ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 84% 10%, rgba(60, 203, 241, 0.13), transparent 32%);
  transition: opacity .3s ease;
}

.module-card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(71, 201, 238, 0.45), transparent);
  transform: scaleX(0);
  transition: transform .35s ease;
}

.module-card:hover {
  transform: translateY(-5px);
  border-color: rgba(81, 205, 239, 0.25);
  box-shadow: 0 32px 75px rgba(0, 0, 0, 0.29);
  background:
    linear-gradient(145deg, rgba(9, 43, 78, 0.87), rgba(4, 23, 45, 0.80));
}

.module-card:hover::before {
  opacity: 1;
}

.module-card:hover::after {
  transform: scaleX(1);
}

.module-topline,
.module-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(81, 204, 238, 0.18);
  border-radius: 15px;
  color: #68d6f1;
  background: rgba(20, 128, 174, 0.10);
  box-shadow: inset 0 0 28px rgba(25, 168, 218, 0.05);
}

.module-icon svg {
  width: 25px;
  height: 25px;
}

.module-status {
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  color: #71859b;
  background: rgba(255,255,255,.03);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.module-status-live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #78deb9;
  border-color: rgba(69, 213, 162, 0.14);
  background: rgba(69, 213, 162, 0.065);
}

.module-status-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(69, 213, 162, .5);
}

.module-copy {
  position: relative;
  z-index: 2;
  margin-top: 31px;
}

.module-copy > span {
  color: #657f98;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.module-copy h3 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.module-copy p {
  margin: 12px 0 0;
  max-width: 430px;
  color: #8096ad;
  font-size: 11px;
  line-height: 1.65;
}

.module-footer {
  margin-top: auto;
  padding-top: 25px;
  color: #b8c9d8;
  font-size: 10px;
  font-weight: 650;
}

.module-footer svg {
  width: 18px;
  height: 18px;
  transition: transform .25s ease;
}

.module-card:hover .module-footer svg {
  transform: translateX(4px);
}

/* MONITORING */

.view-toolbar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #a8bacb;
  background: rgba(7, 30, 56, 0.62);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.back-button:hover {
  border-color: var(--line-strong);
  background: rgba(10, 45, 78, 0.72);
  transform: translateX(-2px);
}

.back-button svg {
  width: 16px;
  height: 16px;
}

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #768ca3;
  font-size: 9px;
}

.monitoring-hero {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 22px;
  padding: 33px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    linear-gradient(135deg, rgba(8, 38, 70, 0.80), rgba(4, 21, 42, 0.72));
  box-shadow: 0 23px 62px rgba(0,0,0,.2);
}

.monitoring-hero h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.monitoring-hero p {
  margin: 12px 0 0;
  color: #8096ad;
  font-size: 12px;
  line-height: 1.6;
}

.summary-tile {
  min-height: 124px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  background: rgba(3, 17, 35, 0.42);
}

.summary-tile > span {
  color: #899db2;
  font-size: 9px;
}

.summary-tile strong {
  margin: 7px 0;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.summary-tile small {
  margin-top: auto;
  color: #566f88;
  font-size: 8px;
}

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

.division-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(8, 34, 64, 0.75), rgba(4, 20, 40, 0.70));
  box-shadow: 0 20px 52px rgba(0,0,0,.2);
  backdrop-filter: blur(18px);
  transition: border-color .25s ease, transform .25s ease;
}

.division-card:hover {
  border-color: rgba(91, 202, 236, 0.19);
}

.division-header {
  width: 100%;
  min-height: 111px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.division-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.division-icon {
  width: 51px;
  height: 51px;
  flex: 0 0 51px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 199, 234, 0.20);
  border-radius: 15px;
  color: #62d2ef;
  background:
    radial-gradient(circle at 28% 18%, rgba(90, 217, 246, 0.20), transparent 45%),
    rgba(6, 86, 126, 0.15);
}

.division-icon svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.division-kicker {
  margin-bottom: 5px;
  color: #59c8e7;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
}

.division-main h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.division-main p {
  margin: 5px 0 0;
  color: #7087a0;
  font-size: 9px;
}

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

.counter {
  min-width: 75px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.counter span {
  display: block;
  color: #71869d;
  font-size: 7px;
}

.counter strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
  line-height: 1;
}

.chevron,
.item-chevron {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.035);
  transition: transform .25s ease, background .25s ease;
}

.chevron {
  width: 33px;
  height: 33px;
  border-radius: 10px;
}

.chevron svg,
.item-chevron svg {
  fill: none;
  stroke: #879db3;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chevron svg {
  width: 16px;
  height: 16px;
}

.division-card.is-open .chevron {
  transform: rotate(180deg);
  background: rgba(29, 159, 208, 0.09);
}

.division-body {
  display: none;
  padding: 0 17px 17px;
}

.division-card.is-open .division-body {
  display: block;
  animation: detailsIn .28s ease;
}

@keyframes detailsIn {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  padding: 16px 0 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.section-heading h3 {
  margin: 0;
  font-size: 13px;
}

.section-heading p {
  margin: 5px 0 0;
  color: #71869e;
  font-size: 9px;
}

.live-badge {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(69, 213, 162, .12);
  border-radius: 999px;
  color: #77dab7;
  background: rgba(69,213,162,.05);
  font-size: 7px;
  letter-spacing: .08em;
}

.live-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.live-badge.loading {
  color: #e6c777;
  border-color: rgba(243,196,92,.13);
  background: rgba(243,196,92,.05);
}

.live-badge.loading span {
  background: var(--amber);
}

.live-badge.error {
  color: #ff969e;
  border-color: rgba(255,107,118,.14);
  background: rgba(255,107,118,.05);
}

.live-badge.error span {
  background: var(--red);
}

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

.outage-item {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 15px;
  background: rgba(2, 14, 29, 0.39);
}

.outage-summary {
  width: 100%;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 29px;
  align-items: center;
  gap: 10px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.outage-object {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.alert-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255,107,118,.06);
}

.object-name {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 700;
}

.object-author {
  display: block;
  overflow: hidden;
  color: #70869d;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outage-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.outage-time strong {
  font-size: 11px;
}

.outage-time span {
  color: #6b8097;
  font-size: 7px;
}

.item-chevron {
  width: 27px;
  height: 27px;
  border-radius: 8px;
}

.item-chevron svg {
  width: 13px;
  height: 13px;
}

.outage-item.is-open .item-chevron {
  transform: rotate(180deg);
}

.outage-details {
  display: none;
  padding: 0 13px 13px;
}

.outage-item.is-open .outage-details {
  display: block;
  animation: detailsIn .23s ease;
}

.details-panel {
  padding: 13px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}

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

.detail span,
.record-block span {
  display: block;
  margin-bottom: 4px;
  color: #637a92;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  color: #d8e4ee;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
}

.record-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.05);
}

.record-block p {
  margin: 0;
  color: #cad8e5;
  font-size: 10px;
  line-height: 1.55;
}

.empty-state {
  padding: 27px 15px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.075);
  border-radius: 15px;
  background: rgba(255,255,255,.015);
}

.empty-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: rgba(69,213,162,.07);
  font-size: 12px;
  font-weight: 800;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 12px;
}

.empty-state p {
  margin: 0;
  color: #687f97;
  font-size: 9px;
  line-height: 1.5;
}

.footer {
  padding: 22px 7px 5px;
  display: flex;
  justify-content: center;
  gap: 7px;
  color: #48627b;
  font-size: 8px;
}

/* MODAL */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 8, 17, 0.66);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: min(100%, 390px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(8, 35, 64, 0.98), rgba(3, 17, 34, 0.98));
  box-shadow: var(--shadow);
  transform: translateY(16px) scale(.97);
  transition: transform .32s cubic-bezier(.16,.84,.32,1);
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 35px;
  height: 35px;
  border-radius: 10px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(81, 204, 238, 0.2);
  border-radius: 17px;
  color: #62d1ee;
  background: rgba(18, 130, 177, 0.10);
}

.modal-icon.is-denied {
  color: #ff8f98;
  border-color: rgba(255,107,118,.18);
  background: rgba(255,107,118,.065);
}

.modal-icon.is-development {
  color: #7eddb9;
  border-color: rgba(69,213,162,.16);
  background: rgba(69,213,162,.06);
}

.modal-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-card h2 {
  margin: 9px 0 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.modal-card p {
  margin: 12px 0 24px;
  color: #879db3;
  font-size: 11px;
  line-height: 1.65;
}

.secondary-action {
  width: 100%;
  min-height: 47px;
  border: 1px solid rgba(88, 202, 235, .15);
  border-radius: 13px;
  color: #e7f4fb;
  background: rgba(27, 137, 181, .12);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease;
}

.secondary-action:hover {
  border-color: rgba(88, 202, 235, .28);
  background: rgba(27, 137, 181, .18);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 820px) {
  .home-hero {
    grid-template-columns: 1fr 230px;
    padding: 35px;
  }

  .hero-visual {
    width: 220px;
    height: 220px;
  }

  .radar-ring-3 {
    width: 210px;
    height: 210px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100% - 18px, 1120px);
  }

  .topbar {
    min-height: 66px;
    padding: 8px 9px;
    border-radius: 17px;
  }

  .logo-surface-header {
    width: 92px;
    height: 43px;
    border-radius: 10px;
  }

  .identity {
    max-width: 125px;
  }

  .identity strong {
    max-width: 125px;
    font-size: 8px;
  }

  .identity span {
    font-size: 7px;
  }

  .role-badge {
    display: none;
  }

  .logout-button {
    width: 34px;
    height: 34px;
  }

  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 29px 24px 25px;
  }

  .home-hero h1 {
    font-size: 34px;
  }

  .home-hero p {
    font-size: 11px;
  }

  .hero-visual {
    width: 170px;
    height: 170px;
    margin: -2px auto 0;
  }

  .radar-ring-1 {
    width: 65px;
    height: 65px;
  }

  .radar-ring-2 {
    width: 112px;
    height: 112px;
  }

  .radar-ring-3 {
    width: 160px;
    height: 160px;
  }

  .radar-core {
    width: 57px;
    height: 57px;
  }

  .radar-core svg {
    width: 27px;
    height: 27px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 255px;
    padding: 20px;
  }

  .module-copy {
    margin-top: 25px;
  }

  .module-copy h3 {
    font-size: 21px;
  }

  .view-toolbar {
    margin-top: 13px;
  }

  .toolbar-status {
    max-width: 155px;
    text-align: right;
  }

  .monitoring-hero {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  .summary-tile {
    min-height: 95px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label count"
      "small count";
    align-items: center;
  }

  .summary-tile > span {
    grid-area: label;
  }

  .summary-tile strong {
    grid-area: count;
    margin: 0;
    font-size: 38px;
  }

  .summary-tile small {
    grid-area: small;
    margin: 2px 0 0;
  }

  .division-grid {
    grid-template-columns: 1fr;
  }

  .division-header {
    min-height: 103px;
    padding: 15px;
  }

  .division-icon {
    width: 47px;
    height: 47px;
    flex-basis: 47px;
  }

  .division-main h2 {
    font-size: 20px;
  }

  .division-main p {
    max-width: 145px;
    line-height: 1.35;
  }

  .counter {
    min-width: 66px;
    padding: 8px 9px;
  }

  .counter strong {
    font-size: 19px;
  }

  .chevron {
    display: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .logo-surface-large {
    width: 155px;
    height: 78px;
  }
}


/* =========================================================
   DEVELOPER CONTROL CENTER
   ========================================================= */

.module-status-developer {
  color: #b79cff;
  border-color: rgba(159, 123, 255, 0.18);
  background: rgba(126, 86, 229, 0.08);
}

.module-card-admin .module-icon {
  color: #a890ff;
  border-color: rgba(159, 123, 255, 0.20);
  background: rgba(126, 86, 229, 0.09);
}

.module-card-admin:hover {
  border-color: rgba(159, 123, 255, 0.27);
  background:
    linear-gradient(145deg, rgba(31, 37, 78, 0.88), rgba(9, 23, 50, 0.82));
}

.role-badge.is-developer {
  color: #c2adff;
  border-color: rgba(159, 123, 255, 0.20);
  background: rgba(126, 86, 229, 0.09);
}

.system-line.is-maintenance .system-pulse {
  background: var(--amber);
  box-shadow:
    0 0 0 5px rgba(243, 196, 92, 0.07),
    0 0 17px rgba(243, 196, 92, 0.38);
}

.system-line.is-stopped .system-pulse {
  background: var(--red);
  box-shadow:
    0 0 0 5px rgba(255, 107, 118, 0.07),
    0 0 17px rgba(255, 107, 118, 0.38);
}

.admin-hero {
  margin-top: 18px;
  min-height: 210px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    radial-gradient(circle at 86% 12%, rgba(142, 108, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(15, 35, 72, 0.87), rgba(4, 20, 42, 0.78));
  box-shadow: 0 24px 65px rgba(0,0,0,.22);
  overflow: hidden;
  position: relative;
}

.admin-hero::after {
  content: "";
  position: absolute;
  right: 19%;
  top: -65%;
  width: 1px;
  height: 230%;
  transform: rotate(32deg);
  background:
    linear-gradient(
      transparent,
      rgba(181, 157, 255, .22),
      transparent
    );
  animation: adminBeam 6s ease-in-out infinite;
}

@keyframes adminBeam {
  0%,100% { opacity: .22; transform: rotate(32deg) translateY(-3%); }
  50% { opacity: .75; transform: rotate(32deg) translateY(8%); }
}

.admin-hero h1 {
  margin: 9px 0 0;
  font-size: clamp(31px, 5vw, 45px);
  letter-spacing: -0.045em;
}

.admin-hero p {
  max-width: 620px;
  margin: 13px 0 0;
  color: #8096ad;
  font-size: 12px;
  line-height: 1.65;
}

.admin-system-badge {
  position: relative;
  z-index: 2;
  min-width: 185px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(69, 213, 162, .15);
  border-radius: 17px;
  background: rgba(69, 213, 162, .055);
}

.admin-system-badge > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 0 5px rgba(69, 213, 162, .06),
    0 0 18px rgba(69, 213, 162, .4);
}

.admin-system-badge strong {
  font-size: 10px;
  font-weight: 750;
}

.admin-system-badge.is-maintenance {
  color: #e9cf87;
  border-color: rgba(243, 196, 92, .17);
  background: rgba(243, 196, 92, .055);
}

.admin-system-badge.is-maintenance > span {
  background: var(--amber);
  box-shadow:
    0 0 0 5px rgba(243, 196, 92, .06),
    0 0 18px rgba(243, 196, 92, .35);
}

.admin-system-badge.is-stopped {
  color: #ff9ca4;
  border-color: rgba(255, 107, 118, .17);
  background: rgba(255, 107, 118, .055);
}

.admin-system-badge.is-stopped > span {
  background: var(--red);
  box-shadow:
    0 0 0 5px rgba(255, 107, 118, .06),
    0 0 18px rgba(255, 107, 118, .35);
}

.storage-warning {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(243, 196, 92, .15);
  border-radius: 16px;
  color: #d9c283;
  background: rgba(243, 196, 92, .055);
}

.storage-warning strong {
  font-size: 11px;
}

.storage-warning p {
  margin: 5px 0 0;
  color: #927f5b;
  font-size: 9px;
  line-height: 1.5;
}

.admin-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.admin-stat-card {
  min-height: 126px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(9, 35, 65, .74), rgba(4, 19, 39, .70));
  box-shadow: 0 18px 45px rgba(0,0,0,.16);
}

.admin-stat-card > span {
  color: #71889f;
  font-size: 8px;
  font-weight: 650;
}

.admin-stat-card strong {
  margin: 8px 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.045em;
}

.admin-stat-card small {
  margin-top: auto;
  color: #506a84;
  font-size: 7px;
  line-height: 1.35;
}

.admin-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.admin-panel {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(8, 32, 61, .78), rgba(4, 19, 38, .74));
  box-shadow: 0 22px 55px rgba(0,0,0,.18);
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.admin-panel-heading h2 {
  margin: 7px 0 0;
  font-size: 19px;
  letter-spacing: -.03em;
}

.mode-selector {
  margin-top: 20px;
  display: grid;
  gap: 9px;
}

.mode-option {
  width: 100%;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  grid-template-areas:
    "light title"
    "light caption";
  gap: 3px 11px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 14px;
  color: inherit;
  text-align: left;
  background: rgba(2, 15, 31, .36);
  cursor: pointer;
  transition:
    border-color .2s ease,
    background .2s ease,
    transform .2s ease;
}

.mode-option:hover {
  border-color: rgba(93, 200, 233, .16);
  background: rgba(9, 41, 70, .48);
  transform: translateX(2px);
}

.mode-option.is-selected {
  border-color: rgba(91, 202, 236, .28);
  background: rgba(16, 79, 109, .18);
  box-shadow: inset 0 0 0 1px rgba(91, 202, 236, .04);
}

.mode-light {
  grid-area: light;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.mode-light-green {
  background: var(--green);
  box-shadow: 0 0 12px rgba(69,213,162,.38);
}

.mode-light-amber {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(243,196,92,.35);
}

.mode-light-red {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255,107,118,.35);
}

.mode-option strong {
  grid-area: title;
  font-size: 10px;
  font-weight: 700;
}

.mode-option small {
  grid-area: caption;
  color: #607992;
  font-size: 8px;
}

.admin-message-field {
  margin-top: 18px;
  display: grid;
  gap: 7px;
}

.admin-message-field > span {
  color: #8298ae;
  font-size: 9px;
  font-weight: 650;
}

.admin-message-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 94px;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 13px;
  outline: 0;
  color: #eaf3fa;
  background: rgba(2, 15, 31, .45);
  font-size: 10px;
  line-height: 1.55;
  transition:
    border-color .2s ease,
    box-shadow .2s ease;
}

.admin-message-field textarea:focus {
  border-color: rgba(91, 202, 236, .32);
  box-shadow: 0 0 0 4px rgba(35, 183, 229, .05);
}

.admin-message-field textarea::placeholder {
  color: #49647e;
}

.system-control-footer {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.system-changed-info {
  color: #58718a;
  font-size: 8px;
  line-height: 1.45;
}

.admin-save-button {
  min-width: 155px;
  min-height: 45px;
  margin-top: 0;
}

.sessions-heading {
  margin-bottom: 16px;
}

.admin-refresh-button {
  width: 37px;
  height: 37px;
  border-radius: 11px;
}

.admin-refresh-button svg {
  width: 17px;
  height: 17px;
}

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

.session-row {
  padding: 12px 13px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(120px, .7fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 13px;
  background: rgba(2, 14, 29, .32);
  transition:
    border-color .2s ease,
    background .2s ease;
}

.session-row:hover {
  border-color: rgba(90, 197, 230, .12);
  background: rgba(6, 31, 55, .40);
}

.session-person {
  min-width: 0;
}

.session-person strong {
  display: block;
  overflow: hidden;
  color: #dfeaf3;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-person span {
  display: block;
  margin-top: 4px;
  color: #58718a;
  font-size: 7px;
}

.session-role {
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 999px;
  color: #7890a7;
  background: rgba(255,255,255,.025);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.session-status {
  text-align: right;
}

.session-status strong {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #748ba2;
  font-size: 8px;
  font-weight: 650;
}

.session-status strong i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #50657a;
}

.session-status strong.is-online {
  color: #77dab7;
}

.session-status strong.is-online i {
  background: var(--green);
  box-shadow: 0 0 10px rgba(69,213,162,.4);
}

.session-status small {
  display: block;
  margin-top: 4px;
  color: #50677f;
  font-size: 7px;
}

.session-loading,
.session-empty {
  padding: 28px 15px;
  text-align: center;
  color: #647b92;
  font-size: 9px;
  border: 1px dashed rgba(255,255,255,.065);
  border-radius: 13px;
}

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

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-hero {
    min-height: auto;
    padding: 25px;
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-system-badge {
    min-width: 0;
  }

  .admin-stats {
    gap: 9px;
  }

  .admin-stat-card {
    min-height: 108px;
    padding: 14px;
  }

  .admin-stat-card strong {
    font-size: 29px;
  }

  .admin-panel {
    padding: 17px;
  }

  .system-control-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-save-button {
    width: 100%;
  }

  .session-row {
    grid-template-columns:
      minmax(0,1fr) auto;
    grid-template-areas:
      "person role"
      "status status";
  }

  .session-person {
    grid-area: person;
  }

  .session-role {
    grid-area: role;
  }

  .session-status {
    grid-area: status;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.045);
    text-align: left;
  }

  .session-status strong {
    justify-content: flex-start;
  }
}


/* =========================================================
   DYNAMIC ROLES / ACCESS MANAGEMENT
   ========================================================= */

.access-management-panel {
  margin-top: 16px;
}

.access-heading {
  align-items: flex-start;
}

.access-heading-copy {
  max-width: 620px;
  margin: 7px 0 0;
  color: #647d95;
  font-size: 9px;
  line-height: 1.55;
}

.create-role-button {
  width: auto;
  min-width: 130px;
  padding: 0 15px;
}

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

.role-card {
  position: relative;
  min-height: 172px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 15px;
  background: rgba(2, 15, 31, .34);
  transition:
    border-color .2s ease,
    transform .2s ease,
    background .2s ease;
}

.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 201, 234, .15);
  background: rgba(7, 34, 60, .42);
}

.role-card.is-builtin {
  background:
    linear-gradient(
      145deg,
      rgba(16, 45, 70, .38),
      rgba(3, 18, 35, .36)
    );
}

.role-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.role-card-name {
  min-width: 0;
}

.role-card-name strong {
  display: block;
  color: #e3edf5;
  font-size: 11px;
}

.role-card-name span {
  display: block;
  margin-top: 4px;
  color: #647e96;
  font-size: 7px;
  line-height: 1.4;
}

.role-kind {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 999px;
  color: #748ba2;
  background: rgba(255,255,255,.025);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .07em;
}

.role-kind.is-custom {
  color: #c0aaff;
  border-color: rgba(159, 123, 255, .14);
  background: rgba(126, 86, 229, .06);
}

.role-panels {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.role-panel-chip {
  padding: 5px 7px;
  border: 1px solid rgba(83, 193, 226, .09);
  border-radius: 999px;
  color: #70a8bf;
  background: rgba(33, 132, 171, .045);
  font-size: 6px;
}

.role-card-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 7px;
}

.role-action {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 9px;
  color: #8499ad;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  font-size: 7px;
  font-weight: 700;
}

.role-action:hover {
  color: #d8e6f0;
  border-color: rgba(91, 202, 236, .15);
}

.role-action.is-danger:hover {
  color: #ff9aa3;
  border-color: rgba(255,107,118,.16);
  background: rgba(255,107,118,.05);
}

.session-row.is-manageable {
  cursor: pointer;
}

.session-row.is-manageable::after {
  content: "Настроить доступ";
  justify-self: end;
  color: #536e87;
  font-size: 6px;
  grid-column: 1 / -1;
  transition: color .2s ease;
}

.session-row.is-manageable:hover::after {
  color: #6ecce7;
}

.session-role-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.management-backdrop {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 8, 17, .74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity .25s ease,
    visibility .25s ease;
}

.management-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.management-card {
  position: relative;
  width: min(100%, 590px);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 27px;
  border: 1px solid rgba(115, 207, 235, .18);
  border-radius: 23px;
  background:
    linear-gradient(
      145deg,
      rgba(8, 34, 63, .985),
      rgba(3, 17, 34, .985)
    );
  box-shadow: 0 35px 100px rgba(0,0,0,.42);
  transform: translateY(14px) scale(.975);
  transition:
    transform .28s cubic-bezier(.16,.84,.32,1);
}

.management-backdrop.is-open .management-card {
  transform: translateY(0) scale(1);
}

.management-card h2 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: -.035em;
}

.management-body {
  margin-top: 21px;
}

.management-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.management-field > span {
  color: #8298ae;
  font-size: 8px;
  font-weight: 700;
}

.management-field input,
.management-field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  outline: 0;
  color: #eaf3fa;
  background: rgba(2, 15, 31, .45);
  font-size: 10px;
}

.management-field textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

.management-field input:focus,
.management-field textarea:focus {
  border-color: rgba(91, 202, 236, .30);
  box-shadow: 0 0 0 4px rgba(35,183,229,.045);
}

.management-section-title {
  margin: 18px 0 9px;
  color: #91a6ba;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.permission-grid,
.role-choice-grid {
  display: grid;
  gap: 7px;
}

.permission-option,
.role-choice {
  position: relative;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 12px;
  background: rgba(2, 15, 31, .30);
  cursor: pointer;
}

.permission-option:hover,
.role-choice:hover {
  border-color: rgba(91, 202, 236, .13);
  background: rgba(8, 36, 62, .36);
}

.permission-option input,
.role-choice input {
  margin: 2px 0 0;
  accent-color: #22b5df;
}

.permission-copy strong,
.role-choice-copy strong {
  display: block;
  color: #dce8f1;
  font-size: 9px;
}

.permission-copy span,
.role-choice-copy span {
  display: block;
  margin-top: 4px;
  color: #5f7890;
  font-size: 7px;
  line-height: 1.45;
}

.role-choice-copy .role-choice-panels {
  color: #6ea4ba;
}

.management-note {
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid rgba(243,196,92,.10);
  border-radius: 10px;
  color: #907e5d;
  background: rgba(243,196,92,.035);
  font-size: 7px;
  line-height: 1.5;
}

.management-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 9px;
}

.management-save {
  min-height: 47px;
  margin-top: 0;
}

.access-empty {
  grid-column: 1 / -1;
  padding: 26px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.065);
  border-radius: 14px;
  color: #647d95;
  font-size: 9px;
}

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

@media (max-width: 700px) {
  .access-heading {
    flex-direction: column;
  }

  .create-role-button {
    width: 100%;
  }

  .role-list {
    grid-template-columns: 1fr;
  }

  .management-card {
    padding: 22px;
  }

  .management-actions {
    grid-template-columns: 1fr;
  }

  .session-role-stack {
    justify-content: flex-start;
  }
}


/* =========================================================
   DISPATCHER INTERFACE
   ========================================================= */

.dispatcher-shell {
  display: grid;
  gap: 16px;
}

.dispatcher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 16px;
  align-items: stretch;
}

.dispatcher-hero p {
  max-width: 680px;
}

.dispatcher-assigned-tile,
.dispatcher-select-wrap,
.dispatcher-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(111, 206, 237, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(7, 31, 58, 0.82), rgba(4, 17, 34, 0.9));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
}

.dispatcher-assigned-tile {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.dispatcher-assigned-tile span,
.dispatcher-assigned-tile small {
  color: #7d96ab;
}

.dispatcher-assigned-tile strong {
  margin: 8px 0 10px;
  font-size: clamp(28px, 2.5vw, 42px);
  line-height: 1.08;
  max-width: 100%;
  color: #edf5fb;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

.dispatcher-select-wrap {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: end;
}

.dispatcher-select-label {
  display: grid;
  gap: 9px;
}

.dispatcher-select-label span {
  color: #88a4bb;
  font-size: 11px;
  font-weight: 700;
}

.dispatcher-select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  outline: 0;
  color: #e7f1f8;
  background: rgba(3, 16, 31, 0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.dispatcher-select:focus {
  border-color: rgba(93, 202, 236, 0.3);
  box-shadow: 0 0 0 5px rgba(35, 181, 223, 0.06);
}

.dispatcher-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 16px;
  /* Panels must keep their own natural height.
     A tall NDR block must not stretch neighboring panels. */
  align-items: start;
}

.dispatcher-panel {
  padding: 22px;
}

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

.dispatcher-panel-head h2 {
  margin: 7px 0 0;
  font-size: clamp(22px, 3vw, 28px);
}

.dispatcher-live-badge,
.dispatcher-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #8ad1e6;
  background: rgba(13, 117, 151, 0.12);
  border: 1px solid rgba(90, 193, 226, 0.16);
}

.dispatcher-live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #41d6a7;
  box-shadow: 0 0 12px rgba(65,214,167,.8);
}

.dispatcher-dev-badge {
  color: #bca7ff;
  background: rgba(118, 75, 232, 0.11);
  border-color: rgba(159, 123, 255, 0.16);
}

.dispatcher-request-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dispatcher-request-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(2, 15, 31, 0.42);
}

.dispatcher-request-card span,
.dispatcher-request-card small {
  color: #7f9ab0;
}

.dispatcher-request-card strong {
  display: block;
  margin-top: 8px;
  color: #ecf4fb;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
}

.dispatcher-request-card small {
  display: block;
  margin-top: 10px;
  font-size: 11px;
}

.dispatcher-request-card.is-primary {
  grid-column: span 2;
  background:
    radial-gradient(circle at 100% 0%, rgba(49, 190, 234, 0.18), transparent 40%),
    linear-gradient(145deg, rgba(10, 40, 74, 0.84), rgba(5, 22, 42, 0.94));
  border-color: rgba(95, 205, 238, 0.18);
}

.dispatcher-donut-marker {
  position: absolute;
  z-index: 2;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid rgba(2, 16, 31, .88);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
  color: #f8fcff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  pointer-events: none;
}

.dispatcher-requests-chart-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.dispatcher-requests-donut {
  width: min(100%, 190px);
}

.dispatcher-requests-side {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.dispatcher-requests-caption {
  margin: 0;
  color: #88a6ba;
  font-size: 11px;
  line-height: 1.45;
}

.dispatcher-ending-card-inline {
  min-height: 92px;
  padding: 14px 16px;
}

.dispatcher-ending-card-inline .dispatcher-ending-overlay {
  min-height: 60px;
}

.dispatcher-ending-card-inline .dispatcher-ending-overlay strong {
  margin-top: 8px;
}

.dispatcher-workorders-legend-item.is-review {
  color: #38bdf8;
}

.dispatcher-workorders-legend-item.is-approved {
  color: #22c55e;
}

.dispatcher-workorders-legend-item.is-open-status {
  color: #8b5cf6;
}

.dispatcher-workorders-legend-item.is-closed {
  color: #f59e0b;
}

.dispatcher-workorders-legend-item.is-acknowledged {
  color: #f43f5e;
}

.dispatcher-defects-lockup {
  position: relative;
  min-height: 100%;
  margin-top: 18px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
  background:
    linear-gradient(145deg, rgba(4, 20, 38, 0.88), rgba(3, 13, 25, 0.98));
}

.dispatcher-defects-blur {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(34, 181, 223, 0.12), transparent 28%),
    radial-gradient(circle at 70% 80%, rgba(140, 93, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(10, 24, 44, 0.8), rgba(4, 11, 22, 0.96));
  filter: blur(14px) saturate(.9);
  transform: scale(1.08);
}

.dispatcher-defects-copy {
  position: relative;
  z-index: 1;
  min-height: 280px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dispatcher-defects-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffb0b0;
  background: rgba(255, 92, 120, 0.12);
  border: 1px solid rgba(255, 92, 120, 0.16);
  font-size: 34px;
  font-weight: 900;
}

.dispatcher-defects-copy strong {
  margin-top: 18px;
  color: #edf5fb;
  font-size: 24px;
}

.dispatcher-defects-copy span {
  max-width: 280px;
  margin-top: 9px;
  color: #89a4b9;
  line-height: 1.55;
}

.role-panel-chip-dispatcher {
  color: #9fd3ff;
  border-color: rgba(93, 173, 255, 0.16);
  background: rgba(46, 102, 198, 0.08);
}

.dispatcher-role-select {
  min-height: 46px;
}

@media (max-width: 1280px) {
  .dispatcher-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  }

  .dispatcher-assigned-tile strong {
    font-size: clamp(26px, 2.6vw, 36px);
  }
}

@media (max-width: 940px) {
  .dispatcher-hero,
  .dispatcher-select-wrap,
  .dispatcher-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dispatcher-request-grid {
    grid-template-columns: 1fr;
  }

  .dispatcher-request-card.is-primary {
    grid-column: auto;
  }
}

/* =========================================================
   DISPATCHER V2 · SK-11 + ROLE SCOPES
   ========================================================= */

.dispatcher-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dispatcher-toolbar-actions .admin-refresh-button {
  flex: 0 0 auto;
}

.dispatcher-toolbar-actions .admin-refresh-button.is-loading svg {
  animation: dispatcher-spin .8s linear infinite;
}

@keyframes dispatcher-spin {
  to { transform: rotate(360deg); }
}

.dispatcher-select-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dispatcher-select-stack > :only-child {
  grid-column: 1 / -1;
}

.dispatcher-data-notice {
  padding: 13px 16px;
  border: 1px solid rgba(246, 196, 86, .15);
  border-radius: 14px;
  color: #b8a373;
  background: rgba(238, 179, 58, .055);
  font-size: 9px;
  line-height: 1.55;
}

.dispatcher-data-notice.is-error {
  color: #df919b;
  border-color: rgba(255, 105, 122, .16);
  background: rgba(255, 78, 101, .05);
}

.dispatcher-data-notice.is-stale {
  color: #c9aa72;
  border-color: rgba(255, 190, 75, .14);
  background: rgba(255, 179, 54, .045);
}

.dispatcher-live-badge.is-stale i {
  background: #e6b85f;
  box-shadow: 0 0 12px rgba(230, 184, 95, .7);
}

.dispatcher-source-meta {
  margin-top: 14px;
  padding: 11px 12px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  background: rgba(2, 14, 29, .3);
  color: #708da4;
  font-size: 8px;
  line-height: 1.45;
}

.dispatcher-source-meta span:last-child {
  color: #84b6c9;
}

.dispatcher-request-grid-v2 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dispatcher-request-grid-v2 .dispatcher-request-card.is-primary {
  grid-column: span 2;
}

.dispatcher-ending-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
}

.dispatcher-ending-blur {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 900;
  color: rgba(220,235,245,.32);
  filter: blur(8px);
  transform: scale(1.12);
  background:
    radial-gradient(circle at 60% 30%, rgba(83, 196, 231, .12), transparent 45%),
    rgba(3, 17, 32, .72);
}

.dispatcher-ending-overlay {
  position: relative;
  z-index: 1;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dispatcher-ending-overlay strong {
  width: 34px;
  height: 34px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 18px;
  color: #b9a4ef;
  border: 1px solid rgba(167, 132, 255, .17);
  background: rgba(123, 83, 223, .08);
}

.dispatcher-ending-overlay small {
  margin-top: 8px;
  color: #907eb9;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.dispatcher-source-management {
  margin-top: 16px;
}

.dispatcher-config-filter {
  min-width: 270px;
  display: grid;
  gap: 7px;
}

.dispatcher-config-filter > span {
  color: #758ea4;
  font-size: 8px;
  font-weight: 700;
}

.dispatcher-config-filter .dispatcher-select {
  min-height: 42px;
}

.dispatcher-config-status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(80, 190, 224, .09);
  background: rgba(20, 111, 143, .04);
  color: #6fa6ba;
  font-size: 8px;
}

.dispatcher-config-status.is-warning {
  color: #ae9566;
  border-color: rgba(236, 181, 73, .12);
  background: rgba(236, 181, 73, .035);
}

.dispatcher-config-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dispatcher-config-card {
  min-height: 180px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 15px;
  background: rgba(2, 15, 31, .34);
}

.dispatcher-config-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dispatcher-config-card h3 {
  margin: 5px 0 0;
  color: #dce9f2;
  font-size: 13px;
}

.dispatcher-config-state {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  color: #6e879d;
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .07em;
}

.dispatcher-config-state.is-custom {
  color: #bea5ff;
  border-color: rgba(158, 122, 255, .14);
  background: rgba(120, 82, 223, .06);
}

.dispatcher-config-sources {
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dispatcher-config-sources span {
  padding: 5px 7px;
  border-radius: 999px;
  color: #77abc0;
  border: 1px solid rgba(72, 182, 216, .09);
  background: rgba(25, 123, 156, .04);
  font-size: 7px;
}

.dispatcher-config-sources span.is-empty {
  color: #8b7481;
  border-color: rgba(185, 105, 126, .08);
  background: rgba(185, 105, 126, .035);
}

.dispatcher-config-edit {
  margin-top: auto;
  align-self: flex-start;
}

.dispatcher-source-editor-field textarea {
  min-height: 180px;
  font-family: "Segoe UI", Arial, sans-serif;
}

.dispatcher-source-defaults {
  margin-top: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  background: rgba(2, 15, 31, .28);
}

.dispatcher-source-defaults > span {
  color: #687f94;
  font-size: 7px;
}

.dispatcher-source-defaults > strong {
  color: #a9c2d3;
  font-size: 9px;
  line-height: 1.5;
}

.dispatcher-source-defaults .role-action {
  justify-self: start;
  margin-top: 5px;
}

@media (max-width: 1050px) {
  .dispatcher-config-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dispatcher-request-grid-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .dispatcher-toolbar-actions {
    align-items: flex-end;
  }

  .dispatcher-select-stack,
  .dispatcher-request-grid-v2,
  .dispatcher-config-list {
    grid-template-columns: 1fr;
  }

  .dispatcher-request-grid-v2 .dispatcher-request-card.is-primary {
    grid-column: auto;
  }

  .dispatcher-config-filter {
    width: 100%;
    min-width: 0;
  }
}

.dispatcher-source-picker {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.dispatcher-source-picker .management-field {
  margin-bottom: 0;
}

.dispatcher-source-picker .dispatcher-select {
  min-height: 44px;
}

.dispatcher-source-picker .role-action {
  min-height: 44px;
  padding-inline: 14px;
}

@media (max-width: 640px) {
  .dispatcher-source-picker {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   USER MANAGEMENT
   ========================================================= */

.session-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.create-user-button {
  width: auto;
  min-height: 37px;
  padding: 0 13px;
  white-space: nowrap;
}

.user-create-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

.user-danger-zone {
  margin-top: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 95, 112, .13);
  border-radius: 13px;
  background: rgba(255, 71, 91, .045);
}

.user-danger-zone strong {
  display: block;
  color: #f1dce0;
  font-size: 9px;
}

.user-danger-zone span {
  display: block;
  margin-top: 4px;
  color: #8e6f77;
  font-size: 7px;
  line-height: 1.45;
}

.danger-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 95, 112, .18);
  border-radius: 10px;
  color: #ff9daa;
  background: rgba(255, 71, 91, .07);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  transition:
    border-color .2s ease,
    background .2s ease,
    color .2s ease;
}

.danger-action:hover {
  color: #ffd7dc;
  border-color: rgba(255, 95, 112, .35);
  background: rgba(255, 71, 91, .13);
}

@media (max-width: 700px) {
  .sessions-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .session-heading-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .create-user-button {
    flex: 1;
  }

  .user-create-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .user-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .danger-action {
    width: 100%;
  }
}


/* =========================================================
   DISPATCHER — DEFECTS + WORK ORDERS SIDE STACK
   ========================================================= */

.dispatcher-side-stack {
  display: grid;
  /* Do not split the total column height 50/50.
     Each side panel uses only the height its content needs. */
  grid-template-rows: auto auto;
  align-content: start;
  align-self: start;
  gap: 16px;
  min-width: 0;
}

.dispatcher-side-stack .dispatcher-panel {
  min-height: 0;
}

.dispatcher-side-stack .dispatcher-panel-head h2 {
  font-size: clamp(20px, 2.3vw, 26px);
}

.dispatcher-side-stack .dispatcher-defects-copy,
.dispatcher-workorders-copy {
  min-height: 210px;
}

.dispatcher-workorders-lockup {
  position: relative;
  min-height: 100%;
  margin-top: 18px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
  background:
    linear-gradient(145deg, rgba(4, 20, 38, 0.88), rgba(3, 13, 25, 0.98));
}

.dispatcher-workorders-blur {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(35, 181, 223, 0.12), transparent 30%),
    radial-gradient(circle at 80% 75%, rgba(112, 138, 255, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(10, 24, 44, 0.8), rgba(4, 11, 22, 0.96));
  filter: blur(14px) saturate(.9);
  transform: scale(1.08);
}

.dispatcher-workorders-copy {
  position: relative;
  z-index: 1;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dispatcher-workorders-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #9fd8ec;
  background: rgba(37, 161, 207, 0.10);
  border: 1px solid rgba(88, 193, 229, 0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.dispatcher-workorders-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dispatcher-workorders-copy strong {
  margin-top: 17px;
  color: #edf5fb;
  font-size: 22px;
}

.dispatcher-workorders-copy span {
  max-width: 300px;
  margin-top: 9px;
  color: #89a4b9;
  line-height: 1.55;
}

@media (max-width: 940px) {
  .dispatcher-side-stack {
    grid-template-rows: auto;
  }

  .dispatcher-side-stack .dispatcher-defects-copy,
  .dispatcher-workorders-copy {
    min-height: 240px;
  }
}

/* =========================================================
   DISPATCHER SOURCE BREAKDOWN
   ========================================================= */

.dispatcher-source-breakdown {
  margin-top: 12px;
  border: 1px solid rgba(100, 201, 234, .10);
  border-radius: 14px;
  background: rgba(3, 17, 33, .36);
  overflow: hidden;
}

.dispatcher-breakdown-toggle {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  color: #dceaf3;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.dispatcher-breakdown-toggle > span {
  display: grid;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
}

.dispatcher-breakdown-toggle small {
  color: #6d879d;
  font-size: 7px;
  font-weight: 600;
}

.dispatcher-breakdown-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #6baac0;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.dispatcher-breakdown-toggle svg.is-open {
  transform: rotate(180deg);
}

.dispatcher-breakdown-options {
  padding: 0 10px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Explicitly honor the collapsed state in MAX WebView and browsers. */
.dispatcher-breakdown-options[hidden] {
  display: none !important;
}

.dispatcher-breakdown-chip {
  min-width: 130px;
  padding: 9px 11px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  color: #8ca5b9;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  text-align: left;
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.dispatcher-breakdown-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(92, 201, 234, .15);
}

.dispatcher-breakdown-chip strong {
  color: #dbe8f1;
  font-size: 8px;
  font-weight: 800;
}

.dispatcher-breakdown-chip span {
  color: #6f899e;
  font-size: 7px;
}

.dispatcher-breakdown-chip.is-active {
  border-color: rgba(73, 204, 235, .28);
  background: rgba(24, 132, 169, .10);
  box-shadow: inset 0 0 0 1px rgba(67, 198, 232, .03);
}

.dispatcher-breakdown-chip.is-missing {
  border-style: dashed;
  opacity: .72;
}

/* =========================================================
   DEVELOPER — DYNAMIC DISPATCHER STRUCTURE
   ========================================================= */

.dispatcher-config-toolbar {
  min-width: min(100%, 650px);
  display: grid;
  grid-template-columns: auto auto minmax(230px, 1fr);
  gap: 8px;
  align-items: end;
}

.dispatcher-structure-action {
  width: auto;
  min-width: 128px;
  min-height: 44px;
  padding: 0 12px;
}

.dispatcher-delete-group {
  grid-column: 3;
  justify-self: end;
  min-height: 30px;
  margin-top: -2px;
}

.dispatcher-config-card-actions {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dispatcher-config-card-actions .dispatcher-config-edit {
  flex: 1 1 170px;
}

.dispatcher-config-card-actions .is-danger {
  flex: 0 0 auto;
}

.dispatcher-structure-empty {
  display: grid;
  gap: 6px;
}

.dispatcher-structure-empty strong {
  color: #cbdbe7;
  font-size: 10px;
}

.dispatcher-structure-empty span {
  color: #688298;
  font-size: 8px;
}

@media (max-width: 1050px) {
  .dispatcher-config-toolbar {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .dispatcher-config-filter {
    grid-column: 1 / -1;
  }

  .dispatcher-delete-group {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .dispatcher-config-toolbar {
    grid-template-columns: 1fr;
  }

  .dispatcher-config-filter,
  .dispatcher-delete-group {
    grid-column: 1;
  }

  .dispatcher-structure-action,
  .dispatcher-delete-group {
    width: 100%;
  }

  .dispatcher-breakdown-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dispatcher-breakdown-chip {
    width: 100%;
  }
}


/* Dispatcher structure — edit existing subdivision */
.dispatcher-edit-group {
  grid-column: 3;
  justify-self: start;
  min-height: 30px;
  margin-top: -2px;
}

@media (max-width: 1050px) {
  .dispatcher-edit-group {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .dispatcher-edit-group {
    grid-column: 1;
    width: 100%;
  }
}


/* =========================================================
   MOBILE STARTUP / LOW BANDWIDTH OPTIMIZATION
   ========================================================= */

/*
  На первом экране логотип сначала показывается локальным fallback.
  Внешнее изображение подгружается после события window.load и
  только затем заменяет fallback.
*/
.logo-surface.is-logo-loaded .logo-fallback {
  display: none;
}

/*
  На небольших экранах уменьшаем стоимость декоративной графики.
  Это не меняет функциональность, но снижает нагрузку на мобильный WebView.
*/
@media (max-width: 720px) {
  .scene-grid,
  .scene-orb,
  .scene-beam {
    animation: none !important;
  }

  .auth-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/*
  При Save-Data / 2G приложение добавляет low-bandwidth через JS.
  В этом режиме оставляем статичный профессиональный фон без тяжёлых эффектов.
*/
body.low-bandwidth .scene-orb,
body.low-bandwidth .scene-beam,
body.low-bandwidth .scene-grid {
  animation: none !important;
}

body.low-bandwidth .scene-noise {
  display: none;
}

body.low-bandwidth .auth-panel,
body.low-bandwidth .topbar,
body.low-bandwidth .glass-panel {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* =========================================================
   DISPATCHER — НАРЯДЫ / РАСПОРЯЖЕНИЯ / ДОПУСКИ
   ========================================================= */

.dispatcher-workorders-panel {
  overflow: hidden;
}

.dispatcher-workorders-meta {
  margin-top: 14px;
}

.dispatcher-workorders-notice {
  margin-top: 12px;
}

.dispatcher-workorders-breakdown {
  margin-top: 12px;
}

/* NDR may contain dozens of configured sources. Keep the page compact:
   the source list scrolls inside the NDR panel instead of making the whole
   dispatcher dashboard several screens tall. */
.dispatcher-workorders-breakdown .dispatcher-breakdown-options {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.dispatcher-workorders-breakdown .dispatcher-breakdown-options::-webkit-scrollbar {
  width: 8px;
}

.dispatcher-workorders-breakdown .dispatcher-breakdown-options::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(101, 184, 211, .28);
  background-clip: padding-box;
}

.dispatcher-workorders-chart-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.dispatcher-workorders-donut {
  width: min(100%, 190px);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(rgba(129, 156, 178, .18) 0 100%);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .05);
  position: relative;
}

.dispatcher-workorders-donut::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: rgba(3, 16, 31, .96);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 8px 24px rgba(0, 0, 0, .28);
}

.dispatcher-workorders-donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.dispatcher-workorders-donut-center strong {
  color: #f5fbff;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -.04em;
}

.dispatcher-workorders-donut-center span {
  color: #7f9ab0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dispatcher-workorders-legend {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.dispatcher-workorders-legend-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(2, 15, 31, .34);
  border: 1px solid rgba(255,255,255,.05);
}

.dispatcher-workorders-legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  background: currentColor;
}

.dispatcher-workorders-legend-item span {
  min-width: 0;
  color: #9ab2c5;
  font-size: 12px;
  line-height: 1.25;
}

.dispatcher-workorders-legend-item strong {
  color: #eef7fc;
  font-size: 17px;
}

.dispatcher-workorders-legend-item.is-registered {
  color: #2dd4bf;
}

.dispatcher-workorders-legend-item.is-created {
  color: #3b82f6;
}

.dispatcher-workorders-legend-item.is-admission {
  color: #8b5cf6;
}

.dispatcher-workorders-legend-item.is-preparation {
  color: #f59e0b;
}

.dispatcher-workorders-legend-item.is-break {
  color: #f43f5e;
}

.dispatcher-workorders-config-toolbar {
  justify-content: flex-end;
}

.dispatcher-workorders-config-card .dispatcher-config-state:not(.is-custom) {
  color: #8ba0b2;
  border-color: rgba(139, 160, 178, .16);
  background: rgba(139, 160, 178, .06);
}

@media (max-width: 1180px) {
  .dispatcher-requests-chart-layout,
  .dispatcher-workorders-chart-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
  }

  .dispatcher-requests-donut,
  .dispatcher-workorders-donut {
    width: 150px;
  }
}

@media (max-width: 940px) {
  .dispatcher-requests-chart-layout,
  .dispatcher-workorders-chart-layout {
    grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
  }

  .dispatcher-requests-donut,
  .dispatcher-workorders-donut {
    width: min(100%, 210px);
  }
}

@media (max-width: 620px) {
  .dispatcher-workorders-breakdown .dispatcher-breakdown-options {
    max-height: 360px;
  }

  .dispatcher-requests-chart-layout,
  .dispatcher-workorders-chart-layout {
    grid-template-columns: minmax(118px, 140px) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .dispatcher-requests-donut,
  .dispatcher-workorders-donut {
    width: min(100%, 140px);
  }

  .dispatcher-workorders-donut::after {
    inset: 24%;
  }

  .dispatcher-workorders-legend {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .dispatcher-workorders-legend-item {
    min-height: 34px;
    padding: 7px 8px;
    gap: 8px;
  }

  .dispatcher-workorders-legend-item span {
    font-size: 11px;
  }

  .dispatcher-workorders-legend-item strong {
    font-size: 15px;
  }

  .dispatcher-requests-caption {
    font-size: 10px;
  }

  .dispatcher-donut-marker {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-size: 10px;
  }
}

@media (max-width: 420px) {
  .dispatcher-requests-chart-layout,
  .dispatcher-workorders-chart-layout {
    grid-template-columns: minmax(104px, 118px) minmax(0, 1fr);
    gap: 10px;
  }

  .dispatcher-requests-donut,
  .dispatcher-workorders-donut {
    width: min(100%, 118px);
  }

  .dispatcher-workorders-donut-center strong {
    font-size: 24px;
  }

  .dispatcher-workorders-donut-center span {
    font-size: 9px;
  }

  .dispatcher-workorders-legend-item strong {
    font-size: 14px;
  }
}

/* =========================================================
   АВАРИЙНЫЙ МОНИТОРИНГ — СК-11 OMS / COMPACT COUNTERS
   ========================================================= */

.outage-counter-card {
  min-height: 0;
}

.outage-counter-header {
  min-height: 100px;
  cursor: default;
}

.outage-counter-card:hover {
  transform: none;
}

.outage-counter-value {
  min-width: 92px;
  text-align: center;
  border-color: rgba(255, 107, 118, .11);
  background: rgba(255, 107, 118, .035);
}

.outage-counter-value strong {
  color: #f2f8fc;
  font-size: 28px;
}

.outage-counter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.outage-sources-toggle {
  min-height: 42px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(78, 190, 224, .12);
  border-radius: 12px;
  color: #8fc5d7;
  background: rgba(19, 104, 134, .055);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.outage-sources-toggle:hover {
  color: #c9eef9;
  border-color: rgba(83, 205, 241, .22);
  background: rgba(26, 131, 166, .09);
}

.outage-sources-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.outage-sources-toggle svg.is-open {
  transform: rotate(180deg);
}

.outage-sources-breakdown {
  margin: 0 16px 16px;
  padding: 10px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 14px;
  background: rgba(2, 15, 31, .34);
}

.outage-sources-breakdown[hidden] {
  display: none !important;
}

.outage-source-row {
  min-width: 0;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 11px;
  background: rgba(255,255,255,.018);
}

.outage-source-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.outage-source-row-main span {
  min-width: 0;
  color: #a8c2d3;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.outage-source-row-main small {
  color: #8a6e78;
  font-size: 8px;
}

.outage-source-row > strong {
  min-width: 34px;
  text-align: right;
  color: #f1f7fb;
  font-size: 19px;
  line-height: 1;
}

.outage-source-row.is-missing {
  opacity: .62;
}

.outage-source-row.is-missing > strong {
  color: #8d7880;
}

.monitoring-loading-card {
  grid-column: 1 / -1;
  min-height: 110px;
  padding: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #7590a7;
  background: rgba(4, 20, 40, .62);
  font-size: 11px;
  text-align: center;
}

.monitoring-loading-card.is-error {
  color: #d4939b;
  border-color: rgba(255, 107, 118, .12);
  background: rgba(99, 30, 41, .05);
}

.outage-source-management {
  margin-top: 16px;
}

.outage-source-management .admin-panel-heading {
  align-items: flex-start;
}

.outage-source-management .dispatcher-structure-action {
  flex: 0 0 auto;
}

.outage-config-card {
  min-height: 170px;
}

@media (min-width: 1180px) {
  .division-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .outage-counter-header {
    min-height: 92px;
  }

  .outage-counter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .outage-counter-value {
    min-width: 76px;
  }

  .outage-counter-value strong {
    font-size: 24px;
  }

  .outage-sources-toggle {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 8px;
  }

  .outage-sources-breakdown {
    margin: 0 10px 12px;
    padding: 8px;
  }

  .outage-source-row {
    padding: 8px 9px;
  }

  .outage-source-row-main span {
    font-size: 9px;
  }

  .outage-source-row > strong {
    font-size: 17px;
  }

  .outage-source-management .admin-panel-heading {
    align-items: stretch;
  }
}

/* =========================================================
   COMMAND CENTER 2026 · ROSSETI LENENERGO INSPIRED REDESIGN
   Visual-only layer. Existing IDs, JS contracts and API logic stay intact.
   ========================================================= */

:root {
  --le-brand: #0a78b9;
  --le-brand-2: #12a7d8;
  --le-electric: #42d5ef;
  --le-navy: #031527;
  --le-navy-2: #061d33;
  --le-panel: rgba(5, 24, 43, .90);
  --le-panel-soft: rgba(8, 31, 54, .78);
  --le-border: rgba(105, 186, 221, .16);
  --le-border-hot: rgba(82, 207, 239, .34);
  --le-text: #f2f8fc;
  --le-muted: #8ca8ba;
  --le-success: #42d6a4;
  --le-warning: #f4c15d;
  --le-danger: #ff687d;
}

html {
  background: #020d18;
}

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  letter-spacing: -.01em;
  background:
    radial-gradient(circle at 76% 8%, rgba(0, 156, 214, .13), transparent 25%),
    radial-gradient(circle at 11% 45%, rgba(10, 112, 181, .10), transparent 30%),
    linear-gradient(135deg, #020d18 0%, #031526 44%, #041a2e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.95%, rgba(95, 197, 230, .025) 50%, transparent 50.05%),
    linear-gradient(transparent 49.95%, rgba(95, 197, 230, .025) 50%, transparent 50.05%);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, rgba(0,0,0,.55) 48%, transparent 88%);
}

.scene-grid {
  opacity: .095;
  background-size: 64px 64px;
  animation-duration: 40s;
}

.scene-orb {
  opacity: .12;
  filter: blur(130px);
}

.scene-beam {
  opacity: .35;
}

/* Corporate wordmark: do not rely on a remote image for the main identity. */
.company-logo {
  display: none !important;
}

.logo-fallback {
  opacity: 1 !important;
  display: grid !important;
  align-content: center;
  justify-items: start;
  gap: 0;
  color: white;
}

.logo-fallback::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 34px;
  left: 12px;
  top: 50%;
  transform: translateY(-50%) skewX(-19deg);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--le-electric), var(--le-brand));
  box-shadow: 10px 0 0 rgba(30, 174, 221, .42);
}

.logo-fallback span,
.logo-fallback small {
  padding-left: 34px;
}

.logo-fallback span {
  color: #f6fbfe;
  font-size: 13px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: .035em;
}

.logo-fallback small {
  margin-top: 2px;
  color: #54c7eb;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .14em;
}

.logo-surface {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(7, 44, 75, .88), rgba(3, 23, 42, .96));
  border: 1px solid rgba(96, 196, 229, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

/* Top navigation */
.topbar {
  min-height: 74px;
  padding: 10px clamp(18px, 3vw, 42px);
  background: rgba(2, 14, 26, .88);
  border-bottom: 1px solid rgba(104, 186, 219, .12);
  backdrop-filter: blur(22px) saturate(130%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .16);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 2%, rgba(65, 206, 239, .58) 18%, rgba(8, 122, 185, .18) 70%, transparent 98%);
}

.brand-home {
  flex: 0 0 auto;
}

.brand-context {
  margin-left: 14px;
  margin-right: auto;
  display: grid;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid rgba(103, 188, 221, .13);
}

.brand-context span {
  color: #cfe8f3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.brand-context small {
  color: #58768a;
  font-size: 9px;
}

.identity span {
  color: #557287;
}

.identity strong {
  color: #e8f4fa;
  font-weight: 700;
}

.role-badge,
.toolbar-status,
.dispatcher-live-badge,
.module-status,
.admin-system-badge {
  border: 1px solid rgba(83, 193, 227, .15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

/* Main canvas */
.app-view {
  width: min(1500px, calc(100% - clamp(22px, 5vw, 84px)));
  margin-inline: auto;
}

.home-hero,
.monitoring-hero,
.dispatcher-hero,
.admin-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(6, 34, 60, .94), rgba(3, 22, 41, .94) 57%, rgba(4, 29, 52, .94));
  border: 1px solid rgba(80, 183, 219, .14);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.home-hero::after,
.monitoring-hero::after,
.dispatcher-hero::after,
.admin-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -250px;
  top: -310px;
  border-radius: 50%;
  border: 1px solid rgba(61, 197, 234, .12);
  box-shadow:
    0 0 0 54px rgba(44, 175, 219, .026),
    0 0 0 108px rgba(44, 175, 219, .018);
  pointer-events: none;
}

.home-hero-copy .micro-label,
.monitoring-hero .micro-label,
.dispatcher-hero .micro-label,
.admin-hero .micro-label,
.section-intro .micro-label,
.dispatcher-panel-head .micro-label {
  color: #5cc6e7;
  letter-spacing: .14em;
}

.home-hero h1,
.monitoring-hero h1,
.dispatcher-hero h1,
.admin-hero h1 {
  color: #f6fbfe;
  font-weight: 760;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.home-hero p,
.monitoring-hero p,
.dispatcher-hero p,
.admin-hero p {
  color: #8da9bb;
  max-width: 720px;
}

.system-line {
  width: fit-content;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(70, 194, 225, .12);
  background: rgba(0, 12, 25, .34);
}

/* Replace decorative radar with a cleaner dispatch/energy visual. */
.hero-visual {
  opacity: .95;
}

.radar-ring {
  border-color: rgba(57, 191, 228, .15);
}

.radar-core {
  background:
    radial-gradient(circle at 38% 28%, rgba(92, 226, 247, .25), transparent 24%),
    linear-gradient(145deg, #0a719f, #054766);
  border: 1px solid rgba(100, 222, 244, .28);
  box-shadow:
    0 0 60px rgba(41, 190, 226, .18),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* Module selection */
.module-grid {
  gap: 18px;
}

.module-card {
  position: relative;
  min-height: 238px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(6, 29, 52, .96), rgba(3, 19, 35, .96));
  border: 1px solid rgba(105, 185, 216, .12);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .16);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.module-card::before {
  width: 3px;
  inset: 18px auto 18px 0;
  border-radius: 0 6px 6px 0;
  opacity: .58;
  background: linear-gradient(180deg, var(--le-electric), var(--le-brand));
}

.module-card::after {
  opacity: .14;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(78, 202, 235, .30);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .24), 0 0 0 1px rgba(79, 205, 239, .04);
}

.module-icon {
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 123, 174, .22), rgba(4, 67, 104, .15));
  border: 1px solid rgba(74, 198, 230, .15);
}

.module-card h3 {
  color: #eaf5fa;
  letter-spacing: -.025em;
}

.module-card p {
  color: #7796aa;
}

/* Universal operational panels */
.glass-panel,
.admin-card,
.division-card,
.outage-counter-card,
.dispatcher-config-card,
.role-card,
.user-card {
  background:
    linear-gradient(145deg, rgba(5, 27, 48, .94), rgba(3, 19, 35, .96));
  border: 1px solid rgba(95, 180, 213, .12);
  box-shadow:
    0 16px 45px rgba(0, 0, 0, .15),
    inset 0 1px 0 rgba(255,255,255,.018);
}

.glass-panel:hover,
.outage-counter-card:hover,
.division-card:hover {
  border-color: rgba(83, 199, 232, .22);
}

.dispatcher-panel {
  border-radius: 18px;
  overflow: clip;
}

.dispatcher-panel-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(98, 178, 210, .08);
}

.dispatcher-panel-head h2 {
  color: #edf7fb;
  letter-spacing: -.03em;
}

.dispatcher-source-meta {
  border-radius: 10px;
  background: rgba(1, 13, 25, .36);
  border-color: rgba(93, 174, 204, .09);
}

/* Charts */
.dispatcher-workorders-donut,
.dispatcher-requests-donut {
  box-shadow:
    0 24px 55px rgba(0, 0, 0, .27),
    0 0 0 8px rgba(15, 108, 153, .035),
    inset 0 0 0 1px rgba(255,255,255,.04);
}

.dispatcher-workorders-donut::after {
  background:
    radial-gradient(circle at 50% 35%, rgba(21, 94, 128, .22), transparent 55%),
    #031625;
  border-color: rgba(100, 195, 224, .08);
}

.dispatcher-workorders-donut-center strong {
  color: #f8fcff;
  text-shadow: 0 0 24px rgba(78, 206, 235, .14);
}

.dispatcher-workorders-donut-center span {
  color: #66869a;
}

.dispatcher-donut-marker {
  border-width: 2px;
  border-color: #031625;
  box-shadow: 0 5px 18px rgba(0,0,0,.42);
}

.dispatcher-workorders-legend-item {
  border-radius: 10px;
  background: rgba(1, 14, 27, .43);
  border-color: rgba(255,255,255,.035);
}

.dispatcher-workorders-legend-item:hover {
  border-color: rgba(99, 187, 219, .13);
  background: rgba(4, 27, 47, .56);
}

/* Outages: premium compact command cards */
.outage-counter-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.outage-counter-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(53, 202, 235, .8), rgba(12, 112, 179, .2), transparent 80%);
}

.outage-counter-card strong {
  color: #f1f8fc;
}

.outage-counter-card .outage-count,
.outage-counter-card [class*="count"] {
  font-variant-numeric: tabular-nums;
}

.outage-source-toggle,
.dispatcher-breakdown-toggle,
.dispatcher-breakdown-chip {
  border-radius: 10px;
}

.outage-source-toggle,
.dispatcher-breakdown-toggle {
  background: rgba(1, 16, 29, .38);
  border-color: rgba(76, 180, 216, .10);
}

.outage-source-row {
  background: rgba(2, 18, 32, .46);
  border-color: rgba(94, 175, 205, .07);
}

/* Buttons / forms */
.primary-action {
  border: 1px solid rgba(95, 220, 244, .18);
  background:
    linear-gradient(135deg, #0a89bd, #0871ad 58%, #075d96);
  box-shadow: 0 12px 28px rgba(2, 111, 163, .25), inset 0 1px 0 rgba(255,255,255,.12);
}

.primary-action:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 34px rgba(2, 121, 176, .30), inset 0 1px 0 rgba(255,255,255,.14);
}

.secondary-action,
.role-action,
.back-button,
.icon-button,
.admin-refresh-button {
  background: rgba(4, 25, 44, .72);
  border-color: rgba(94, 181, 214, .12);
}

.secondary-action:hover,
.role-action:hover,
.back-button:hover,
.icon-button:hover,
.admin-refresh-button:hover {
  border-color: rgba(72, 202, 235, .26);
  background: rgba(7, 39, 66, .84);
}

.input-shell,
.dispatcher-select,
.form-field input,
textarea,
select {
  background: rgba(1, 14, 27, .55);
  border-color: rgba(105, 181, 210, .12);
}

.input-shell:focus-within,
.form-field input:focus,
textarea:focus,
select:focus {
  border-color: rgba(65, 201, 235, .42);
  box-shadow: 0 0 0 3px rgba(50, 182, 220, .07);
}

/* Admin center */
.admin-section,
.dispatcher-source-management {
  border-radius: 18px;
}

.admin-section-head,
.dispatcher-config-toolbar {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(96, 177, 209, .08);
}

.dispatcher-config-status,
.storage-warning,
.dispatcher-data-notice {
  border-radius: 10px;
}

/* Authentication: utility console, not a generic landing page */
.auth-screen {
  background:
    radial-gradient(circle at 65% 15%, rgba(15, 142, 193, .12), transparent 30%),
    linear-gradient(145deg, rgba(1, 10, 19, .38), rgba(1, 13, 24, .08));
}

.auth-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(5, 29, 51, .97), rgba(2, 17, 31, .985));
  border: 1px solid rgba(96, 191, 224, .16);
  box-shadow: 0 34px 95px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.025);
}

.auth-panel::before {
  content: "ОПЕРАТИВНЫЙ КОНТУР · 24/7";
  position: absolute;
  right: 18px;
  top: 16px;
  color: #4d7185;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.auth-copy h1 {
  letter-spacing: -.04em;
}

.secure-note {
  border-top-color: rgba(103, 181, 211, .08);
}

/* Micro-interactions kept restrained for an operational UI. */
@media (prefers-reduced-motion: no-preference) {
  .glass-panel,
  .outage-counter-card,
  .module-card,
  .dispatcher-config-card {
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  }

  .outage-counter-card:hover,
  .dispatcher-config-card:hover {
    transform: translateY(-2px);
  }
}

/* Tablet */
@media (max-width: 940px) {
  .brand-context {
    display: none;
  }

  .app-view {
    width: min(100% - 28px, 1500px);
  }

  .topbar {
    padding-inline: 14px;
  }

  .home-hero,
  .monitoring-hero,
  .dispatcher-hero,
  .admin-hero {
    border-radius: 20px;
  }
}

/* Mobile: denser, readable and designed for MAX WebView. */
@media (max-width: 620px) {
  body {
    background:
      radial-gradient(circle at 85% 4%, rgba(0, 159, 214, .12), transparent 24%),
      linear-gradient(180deg, #020d18, #031729 55%, #02111f);
  }

  .topbar {
    min-height: 64px;
    padding-block: 8px;
  }

  .logo-surface-header {
    width: 116px;
    min-width: 116px;
  }

  .logo-fallback span {
    font-size: 11px;
  }

  .logo-fallback small {
    font-size: 8px;
  }

  .topbar-user {
    margin-left: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .topbar-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100vw - 176px);
  }

  .identity {
    display: flex;
    align-items: flex-end;
    max-width: 100%;
  }

  .identity span {
    display: none;
  }

  .identity strong {
    margin-top: 0;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.15;
  }

  .role-badge {
    max-width: 100%;
    padding: 5px 8px;
    font-size: 7px;
    line-height: 1.1;
    letter-spacing: .045em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logout-button {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .app-view {
    width: calc(100% - 20px);
  }

  .home-hero,
  .monitoring-hero,
  .dispatcher-hero,
  .admin-hero {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .home-hero h1,
  .monitoring-hero h1,
  .dispatcher-hero h1,
  .admin-hero h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .module-card {
    min-height: 190px;
    padding: 18px;
    border-radius: 16px;
  }

  .glass-panel,
  .dispatcher-panel,
  .admin-card,
  .outage-counter-card,
  .dispatcher-config-card {
    border-radius: 14px;
  }

  .dispatcher-panel-head {
    gap: 10px;
  }

  .dispatcher-panel-head h2 {
    font-size: 20px;
  }

  .dispatcher-workorders-legend-item {
    min-height: 32px;
  }

  .dispatcher-donut-marker {
    box-shadow: 0 3px 12px rgba(0,0,0,.42);
  }

  .auth-panel {
    margin-inline: 10px;
    border-radius: 18px;
  }

  .auth-panel::before {
    display: none;
  }
}

/* Desktop large screens: give the dashboard more air, not more empty height. */
@media (min-width: 1440px) {
  .app-view {
    width: min(1540px, calc(100% - 96px));
  }

  .module-grid {
    gap: 22px;
  }

  .dispatcher-grid {
    gap: 20px;
  }
}

/* Login panel fix: the command-center label reused the old decorative
   ::before outline. Reset all inherited pseudo-element geometry/mask so
   the auth card has a single clean outer contour. */
.auth-panel::before {
  inset: auto;
  left: auto;
  bottom: auto;
  right: 18px;
  top: 16px;
  padding: 0;
  border-radius: 0;
  background: none;
  -webkit-mask: none;
  mask: none;
  pointer-events: none;
}

/* =========================================================
   UI FIX · 2026-09-30
   Prevent outage-card text collisions and give the dispatcher
   hero copy its own proper padded surface.
   ========================================================= */

/* Dispatcher hero: the text column previously sat directly on the
   outer edge of the hero, so the background/border looked as if it
   cut through the copy. Keep the decorative background, but give the
   copy a real content area and keep it above decorative rings. */
.dispatcher-hero {
  gap: 0;
  align-items: stretch;
}

.dispatcher-hero > div:first-child {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dispatcher-hero > div:first-child h1,
.dispatcher-hero > div:first-child p,
.dispatcher-hero > div:first-child .micro-label {
  position: relative;
  z-index: 1;
}

.dispatcher-assigned-tile {
  z-index: 2;
  margin: 0;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}

/* OMS outage cards: at three columns there was not enough horizontal
   room for title + counter + sources button in one row. Reserve a
   stable right column for controls and allow the text block to shrink
   and wrap only inside its own area. */
.outage-counter-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 122px;
}

.outage-counter-header .division-main {
  min-width: 0;
  width: 100%;
  align-items: center;
}

.outage-counter-header .division-main > div:last-child {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.outage-counter-header .division-main h2 {
  max-width: 100%;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

.outage-counter-header .division-main p {
  max-width: 170px;
  margin-top: 6px;
  font-size: 8px;
  line-height: 1.35;
  overflow-wrap: normal;
}

.outage-counter-actions {
  flex: 0 0 94px;
  width: 94px;
  min-width: 94px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
}

.outage-counter-value {
  width: 100%;
  min-width: 0;
  padding: 9px 8px;
}

.outage-counter-value span {
  white-space: nowrap;
  text-align: center;
}

.outage-counter-value strong {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.outage-sources-toggle {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 6px 8px;
  line-height: 1.15;
}

.outage-sources-toggle > span {
  min-width: 0;
  text-align: center;
  white-space: normal;
}

@media (max-width: 1180px) {
  .outage-counter-header .division-main h2 {
    font-size: 20px;
  }

  .outage-counter-header .division-main p {
    max-width: 210px;
  }
}

@media (max-width: 940px) {
  .dispatcher-hero {
    gap: 12px;
  }

  .dispatcher-hero > div:first-child {
    padding: 26px 26px 20px;
  }

  .dispatcher-assigned-tile {
    margin: 0 12px 12px;
    border-radius: 18px;
  }
}

@media (max-width: 620px) {
  .dispatcher-hero > div:first-child {
    padding: 22px 18px 16px;
  }

  .dispatcher-assigned-tile {
    margin: 0 10px 10px;
    padding: 18px;
  }

  .outage-counter-header {
    min-height: 112px;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 10px;
  }

  .outage-counter-header .division-main {
    gap: 10px;
  }

  .outage-counter-header .division-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .outage-counter-header .division-main h2 {
    font-size: 18px;
  }

  .outage-counter-header .division-main p {
    max-width: 150px;
    font-size: 7.5px;
  }

  .outage-counter-actions {
    flex-basis: 82px;
    width: 82px;
    min-width: 82px;
  }

  .outage-sources-toggle {
    font-size: 7.5px;
  }
}

/* =========================================================
   EXECUTIVE MONITORING
   ========================================================= */

.executive-shell {
  display: grid;
  gap: 24px;
}

.executive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: stretch;
}

.executive-hero-copy p {
  max-width: 72ch;
}

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

.executive-kpi-tile,
.executive-highlight-card,
.executive-total-tile {
  background: linear-gradient(180deg, rgba(7, 28, 52, 0.92), rgba(4, 19, 39, 0.88));
  border: 1px solid rgba(68, 186, 255, 0.18);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 40px rgba(0, 10, 25, 0.28);
}

.executive-kpi-tile span,
.executive-highlight-card span,
.executive-total-tile span,
.executive-meta-line {
  color: rgba(190, 215, 235, 0.72);
  font-size: 13px;
}

.executive-kpi-tile strong,
.executive-total-tile strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  color: #f4fbff;
}

.executive-kpi-tile small,
.executive-total-tile small,
.executive-highlight-card small {
  display: block;
  margin-top: 8px;
  color: rgba(190, 215, 235, 0.66);
}

.executive-filter-panel {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.executive-filter-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

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

.executive-panel {
  display: grid;
  gap: 18px;
  min-height: 100%;
}

.executive-overview-panel,
.executive-outages-panel {
  grid-column: span 6;
}

.executive-chart-panel,
.executive-ranking-panel {
  grid-column: span 6;
}

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

.executive-panel-head h2,
.executive-ranking-panel h3 {
  margin: 4px 0 0;
}

.executive-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.executive-highlight-card strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.2;
  color: #ffffff;
}

.executive-ranking-list {
  display: grid;
  gap: 10px;
}

.executive-ranking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(68, 186, 255, 0.14);
  background: rgba(5, 22, 42, 0.76);
}

.executive-ranking-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.executive-ranking-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 202, 255, 0.14);
  color: #7fe0ff;
  font-weight: 700;
  flex: 0 0 auto;
}

.executive-ranking-name {
  min-width: 0;
  color: #eaf7ff;
}

.executive-ranking-row strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.executive-ranking-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.executive-chart-layout {
  align-items: center;
}

.executive-donut {
  min-width: 240px;
  min-height: 240px;
}

.executive-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(132, 176, 210, 0.22);
  color: rgba(190, 215, 235, 0.68);
  text-align: center;
}

@media (max-width: 1180px) {
  .executive-hero,
  .executive-filter-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .executive-grid {
    grid-template-columns: 1fr;
  }

  .executive-overview-panel,
  .executive-outages-panel,
  .executive-chart-panel,
  .executive-ranking-panel {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .executive-hero-stats,
  .executive-highlight-grid,
  .executive-filter-controls,
  .executive-ranking-columns {
    grid-template-columns: 1fr;
  }

  .executive-donut {
    min-width: 220px;
    min-height: 220px;
  }
}

/* =========================================================
   EXECUTIVE MONITORING · AAA / COMMAND CENTER OVERRIDES
   ========================================================= */

#executiveView .glass-panel,
#executiveView .executive-kpi-tile,
#executiveView .executive-highlight-card,
#executiveView .executive-trend-card,
#executiveView .executive-ranking-row,
#executiveView .executive-total-tile,
#executiveView .dispatcher-select {
  border-radius: 26px;
}

#executiveView .glass-panel {
  overflow: hidden;
  border-color: rgba(91, 202, 255, 0.14);
  background:
    radial-gradient(circle at 0 0, rgba(27, 160, 216, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(4, 28, 51, 0.92), rgba(3, 17, 34, 0.94));
  box-shadow:
    0 30px 70px rgba(0, 7, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.executive-shell {
  gap: 20px;
}

.executive-hero {
  align-items: start;
  border-radius: 32px !important;
  padding: clamp(24px, 3vw, 38px);
  position: relative;
}

.executive-hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -160px;
  top: -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 209, 255, 0.12), transparent 67%);
  pointer-events: none;
}

.executive-hero-copy,
.executive-hero-stats {
  position: relative;
  z-index: 1;
}

.executive-hero-copy h1 {
  max-width: 760px;
  font-size: clamp(34px, 4.8vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.executive-hero-copy p {
  margin-top: 18px;
  color: rgba(193, 218, 235, 0.72);
  line-height: 1.65;
}

.executive-hero-stats {
  align-self: start;
}

.executive-kpi-tile {
  min-height: 0;
  padding: 18px 18px 16px;
  border-radius: 24px !important;
  position: relative;
  overflow: hidden;
}

.executive-kpi-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(61, 218, 255, 0.95), rgba(61, 218, 255, 0));
}

.executive-kpi-outages::before { background: linear-gradient(180deg, #ff6b89, rgba(255,107,137,0)); }
.executive-kpi-requests::before { background: linear-gradient(180deg, #53c8ff, rgba(83,200,255,0)); }
.executive-kpi-workorders::before { background: linear-gradient(180deg, #39e2c2, rgba(57,226,194,0)); }

.executive-kpi-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.executive-kpi-foot small {
  margin-top: 0;
}

.executive-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.035);
}

.executive-delta.is-up {
  color: #ff9aad !important;
  border-color: rgba(255, 93, 125, 0.17);
  background: rgba(255, 79, 115, 0.07);
}

.executive-delta.is-down {
  color: #64e7c9 !important;
  border-color: rgba(63, 225, 187, 0.17);
  background: rgba(39, 205, 168, 0.07);
}

.executive-delta.is-neutral,
.executive-delta.is-unavailable {
  color: #8ba8bc !important;
}

.executive-filter-panel {
  border-radius: 28px !important;
  padding: 22px 24px;
  align-items: center;
}

.executive-grid {
  align-items: start;
  grid-auto-rows: auto;
  gap: 20px;
}

.executive-panel {
  min-height: 0;
  height: auto;
  align-self: start;
  align-content: start;
  border-radius: 30px !important;
  padding: 24px;
  position: relative;
}

.executive-panel::before {
  content: "";
  position: absolute;
  inset: 0 12% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(83, 211, 255, 0.34), transparent);
  pointer-events: none;
}

.executive-overview-panel,
.executive-outages-panel,
.executive-chart-panel,
.executive-ranking-panel {
  grid-column: span 6;
}

.executive-trend-panel,
.executive-table-panel {
  grid-column: 1 / -1;
}

.executive-highlight-grid {
  align-items: start;
}

.executive-highlight-card {
  min-height: 0;
  padding: 16px;
  border-radius: 22px !important;
}

.executive-highlight-card strong {
  font-size: clamp(18px, 2.1vw, 25px);
  overflow-wrap: anywhere;
}

.executive-outage-ranking,
.executive-ranking-list {
  align-content: start;
}

.executive-outages-panel .executive-ranking-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.executive-ranking-columns .executive-ranking-list {
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.executive-ranking-row {
  min-height: 58px;
  border-radius: 20px !important;
}

.executive-chart-layout {
  align-items: center;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
}

.executive-donut {
  width: min(100%, 230px);
  min-width: 0;
  min-height: 0;
}

.executive-trend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.executive-trend-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(92, 203, 255, 0.13);
  background:
    radial-gradient(circle at 95% 0%, rgba(60, 202, 255, 0.10), transparent 40%),
    rgba(3, 20, 39, 0.72);
  border-radius: 24px !important;
}

.executive-trend-outages { color: #ff6485; }
.executive-trend-requests { color: #53c8ff; }
.executive-trend-workorders { color: #36dec0; }

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

.executive-trend-head > div > span {
  display: block;
  color: #89a9bf;
  font-size: 12px;
}

.executive-trend-head strong {
  display: block;
  margin-top: 6px;
  color: #f6fbff;
  font-size: 30px;
  line-height: 1;
}

.executive-history-hint,
.executive-table-caption {
  color: #7897ae;
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

.executive-sparkline {
  width: 100%;
  height: 138px;
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0));
}

.executive-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
}

.executive-sparkline-axis {
  stroke: rgba(151, 190, 215, 0.14);
  stroke-width: 1;
}

.executive-sparkline-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px currentColor);
}

.executive-sparkline-point {
  fill: #f7fdff;
  stroke: currentColor;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.executive-sparkline-label {
  fill: rgba(163, 194, 214, 0.63);
  font-size: 10px;
}

.executive-table-wrap {
  max-height: 560px;
  overflow: auto;
  border-radius: 24px;
  padding: 4px 8px 8px;
  background: rgba(1, 13, 27, 0.34);
  border: 1px solid rgba(78, 186, 230, 0.08);
}

.executive-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 820px;
}

.executive-table th {
  padding: 8px 14px;
  text-align: left;
  color: #6f90a7;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(3, 18, 35, 0.97);
}

.executive-table td {
  padding: 13px 14px;
  background: rgba(5, 27, 50, 0.72);
  border-top: 1px solid rgba(83, 184, 226, 0.08);
  border-bottom: 1px solid rgba(83, 184, 226, 0.08);
  vertical-align: middle;
}

.executive-table td:first-child {
  border-left: 1px solid rgba(83, 184, 226, 0.08);
  border-radius: 18px 0 0 18px;
}

.executive-table td:last-child {
  border-right: 1px solid rgba(83, 184, 226, 0.08);
  border-radius: 0 18px 18px 0;
}

.executive-table tr.is-selected td {
  background: rgba(13, 73, 104, 0.40);
  border-color: rgba(67, 204, 255, 0.20);
}

.executive-division-link {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.executive-division-link strong {
  color: #edf9ff;
  font-size: 14px;
}

.executive-division-link small {
  color: #7897ac;
  font-size: 9px;
  line-height: 1.35;
}

.executive-status-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.07);
}

.executive-status-chip.is-alert {
  color: #ff9aac;
  background: rgba(255, 75, 109, 0.08);
  border-color: rgba(255, 83, 116, 0.18);
}

.executive-status-chip.is-active {
  color: #77d8ff;
  background: rgba(62, 184, 241, 0.08);
  border-color: rgba(62, 184, 241, 0.17);
}

.executive-status-chip.is-ok {
  color: #64e7c9;
  background: rgba(48, 210, 173, 0.07);
  border-color: rgba(48, 210, 173, 0.16);
}

.executive-status-chip.is-muted {
  color: #8ba2b3;
  background: rgba(139, 162, 179, 0.06);
}

.executive-table-number {
  color: #f7fbff;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.executive-table-number.is-outage {
  color: #ff8fa5;
}

.executive-table-sub {
  display: block;
  margin-top: 3px;
  color: #738da1;
  font-size: 8px;
}

.executive-table-empty {
  text-align: center;
  color: #7894a8;
}

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

  .executive-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .executive-overview-panel,
  .executive-outages-panel,
  .executive-chart-panel,
  .executive-ranking-panel {
    grid-column: span 1;
  }

  .executive-trend-panel,
  .executive-table-panel {
    grid-column: 1 / -1;
  }

  .executive-trend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .executive-grid {
    grid-template-columns: 1fr;
  }

  .executive-overview-panel,
  .executive-outages-panel,
  .executive-chart-panel,
  .executive-ranking-panel,
  .executive-trend-panel,
  .executive-table-panel {
    grid-column: 1;
  }

  .executive-hero-stats {
    grid-template-columns: 1fr;
  }

  .executive-chart-layout {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .executive-hero,
  .executive-panel,
  .executive-filter-panel {
    border-radius: 24px !important;
  }

  .executive-hero,
  .executive-panel {
    padding: 18px;
  }

  .executive-filter-panel {
    padding: 18px;
  }

  .executive-filter-controls,
  .executive-highlight-grid,
  .executive-ranking-columns {
    grid-template-columns: 1fr;
  }

  .executive-chart-layout {
    grid-template-columns: minmax(116px, 135px) minmax(0, 1fr);
    gap: 10px;
  }

  .executive-donut {
    width: 132px;
  }

  .executive-panel-head {
    gap: 10px;
  }

  .executive-history-hint,
  .executive-table-caption {
    max-width: 150px;
  }

  .executive-trend-card {
    border-radius: 20px !important;
    padding: 15px;
  }
}

/* =========================================================
   EXECUTIVE MONITORING · POLISH / DESKTOP + MOBILE FIXES
   ========================================================= */

/* Unified professional scrollbars */
html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 178, 235, 0.46) rgba(4, 20, 36, 0.42);
}

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

*::-webkit-scrollbar-track {
  background: rgba(3, 18, 34, 0.5);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(65, 194, 241, 0.82), rgba(39, 117, 177, 0.78));
  border: 2px solid rgba(3, 18, 34, 0.72);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(95, 216, 255, 0.94), rgba(58, 143, 208, 0.9));
}

/* Prevent flex/grid text from pushing cards outside their bounds */
#executiveView *,
#executiveView *::before,
#executiveView *::after {
  min-width: 0;
}

#executiveView h1,
#executiveView h2,
#executiveView h3,
#executiveView p,
#executiveView span,
#executiveView strong,
#executiveView small {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

#executiveView .executive-kpi-tile strong,
#executiveView .executive-total-tile strong,
#executiveView .executive-ranking-row > strong,
#executiveView .executive-table-number,
#executiveView .executive-trend-head strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Hero KPI cards: more breathing room and predictable wrapping */
#executiveView .executive-hero {
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, 0.95fr);
  gap: 28px;
}

#executiveView .executive-hero-stats {
  gap: 14px;
}

#executiveView .executive-kpi-tile {
  padding: 20px 18px 18px;
}

#executiveView .executive-kpi-tile > span {
  min-height: 38px;
  line-height: 1.35;
}

#executiveView .executive-kpi-tile > strong {
  font-size: clamp(34px, 3.1vw, 50px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

#executiveView .executive-kpi-foot {
  align-items: flex-end;
}

#executiveView .executive-kpi-foot small {
  line-height: 1.35;
}

/* Overview cards: keep long names readable without exploding card height */
#executiveView .executive-highlight-grid {
  gap: 14px;
}

#executiveView .executive-highlight-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

#executiveView .executive-highlight-card > span {
  line-height: 1.35;
}

#executiveView .executive-highlight-card > strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

#executiveView .executive-highlight-card > small {
  margin-top: auto;
  line-height: 1.3;
}

/* Operational background: value never overlaps caption/title */
#executiveView .executive-outages-panel .executive-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  align-items: start;
  gap: 18px;
}

#executiveView .executive-total-tile {
  width: 164px;
  min-height: 132px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 7px;
}

#executiveView .executive-total-tile > span {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 1.28;
}

#executiveView .executive-total-tile > strong {
  display: block;
  margin: 0;
  font-size: clamp(38px, 3vw, 52px);
  line-height: 0.95;
}

#executiveView .executive-total-tile > small {
  display: block;
  margin: 0;
  font-size: 9px;
  line-height: 1.3;
}

/* Desktop: no default-looking inner scroll views. Lists become grids. */
@media (min-width: 901px) {
  #executiveView .executive-outages-panel .executive-ranking-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #executiveView .executive-ranking-panel {
    grid-column: 1 / -1;
  }

  #executiveView .executive-ranking-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  #executiveView .executive-ranking-columns > div {
    min-width: 0;
  }

  #executiveView .executive-ranking-columns > div > h3 {
    margin-bottom: 14px;
  }

  #executiveView .executive-ranking-columns .executive-ranking-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #executiveView .executive-ranking-row {
    min-height: 82px;
    padding: 14px 15px;
    align-items: center;
  }

  #executiveView .executive-ranking-name {
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  #executiveView .executive-table-wrap {
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
  }
}

/* Ranking rows: stable name/value columns */
#executiveView .executive-ranking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

#executiveView .executive-ranking-main {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

#executiveView .executive-ranking-index {
  width: 32px;
  height: 32px;
  flex: none;
}

#executiveView .executive-ranking-name {
  overflow-wrap: break-word;
}

#executiveView .executive-ranking-row > strong {
  align-self: center;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1;
}

/* Slightly softer, more consistent corners */
#executiveView .executive-ranking-row,
#executiveView .executive-highlight-card,
#executiveView .executive-trend-card,
#executiveView .executive-total-tile {
  border-radius: 22px !important;
}

#executiveView .executive-panel,
#executiveView .executive-filter-panel {
  border-radius: 28px !important;
}

/* Mobile alignment fixes */
@media (max-width: 900px) {
  #executiveView .executive-hero {
    grid-template-columns: 1fr;
  }

  #executiveView .executive-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #executiveView .executive-kpi-tile > strong {
    font-size: clamp(32px, 8vw, 44px);
  }

  #executiveView .executive-outages-panel .executive-panel-head {
    grid-template-columns: minmax(0, 1fr) 154px;
  }

  #executiveView .executive-total-tile {
    width: 154px;
  }
}

@media (max-width: 620px) {
  #executiveView .executive-hero-stats {
    grid-template-columns: 1fr;
  }

  #executiveView .executive-kpi-tile {
    min-height: 0;
  }

  #executiveView .executive-outages-panel .executive-panel-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #executiveView .executive-total-tile {
    width: 100%;
    min-height: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "scope value"
      "label value";
    align-items: center;
    column-gap: 18px;
    row-gap: 4px;
    padding: 15px 16px;
  }

  #executiveView .executive-total-tile > span {
    grid-area: scope;
    align-self: end;
    font-size: 12px;
    line-height: 1.3;
  }

  #executiveView .executive-total-tile > strong {
    grid-area: value;
    justify-self: end;
    align-self: center;
    font-size: clamp(40px, 14vw, 58px);
    line-height: 0.92;
  }

  #executiveView .executive-total-tile > small {
    grid-area: label;
    align-self: start;
    font-size: 9px;
    line-height: 1.3;
  }

  #executiveView .executive-highlight-card {
    min-height: 0;
  }

  #executiveView .executive-highlight-card > strong {
    -webkit-line-clamp: 3;
    font-size: 20px;
  }

  /* Keep mobile ranking behavior compact, but with styled scrollbars */
  #executiveView .executive-ranking-columns .executive-ranking-list,
  #executiveView .executive-outages-panel .executive-ranking-list {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }

  #executiveView .executive-ranking-row {
    min-height: 68px;
  }

  #executiveView .executive-ranking-name {
    line-height: 1.25;
  }

  #executiveView .executive-ranking-row > strong {
    font-size: 20px;
  }

  #executiveView .executive-table-wrap {
    max-height: 520px;
    overflow: auto;
  }
}

/* --- Executive hero KPI stability fix --- */
#executiveView .executive-hero-stats {
  align-items: stretch;
}

#executiveView .executive-kpi-tile {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 10px;
  min-height: 222px;
  padding: 20px 18px 18px;
}

#executiveView .executive-kpi-tile > span {
  display: block;
  min-height: 42px;
  max-width: 12ch;
  margin: 0;
  line-height: 1.32;
  font-size: 13px;
  overflow-wrap: anywhere;
}

#executiveView .executive-kpi-tile > strong {
  display: flex;
  align-items: flex-end;
  min-height: 78px;
  margin: 0;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

#executiveView .executive-kpi-foot {
  margin-top: auto;
  min-height: 64px;
  padding-top: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

#executiveView .executive-kpi-foot small {
  display: block;
  margin: 0;
  min-height: 38px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

#executiveView .executive-delta {
  justify-self: start;
  max-width: 100%;
  text-align: center;
}

@media (max-width: 1100px) {
  #executiveView .executive-kpi-tile {
    min-height: 210px;
  }

  #executiveView .executive-kpi-tile > strong {
    min-height: 72px;
  }
}

@media (max-width: 900px) {
  #executiveView .executive-kpi-tile {
    min-height: 196px;
  }

  #executiveView .executive-kpi-tile > span {
    min-height: 36px;
    max-width: none;
  }

  #executiveView .executive-kpi-tile > strong {
    min-height: 64px;
  }

  #executiveView .executive-kpi-foot {
    min-height: 58px;
  }

  #executiveView .executive-kpi-foot small {
    min-height: 34px;
  }
}

@media (max-width: 620px) {
  #executiveView .executive-kpi-tile {
    min-height: 0;
    gap: 8px;
  }

  #executiveView .executive-kpi-tile > span {
    min-height: 0;
  }

  #executiveView .executive-kpi-tile > strong {
    min-height: 0;
  }

  #executiveView .executive-kpi-foot {
    min-height: 0;
  }

  #executiveView .executive-kpi-foot small {
    min-height: 0;
  }
}

/* OUTAGE V2 */
.division-grid{align-items:start}.outage-counter-card.is-expanded{grid-column:1/-1}.outage-counter-actions{flex:0 0 150px;width:150px;min-width:150px}.outage-counter-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.outage-counter-metrics .outage-counter-value{width:auto;min-width:0;padding:8px 6px;border-radius:14px}.outage-counter-metrics .outage-counter-value span{font-size:7px}.outage-counter-metrics .outage-counter-value strong{margin-top:4px;font-size:24px}.outage-appeals-value{border-color:rgba(69,190,255,.13);background:rgba(47,154,220,.045)}.outage-appeals-value.has-appeals{border-color:rgba(255,191,76,.22);background:rgba(255,170,49,.07)}.outage-appeals-value.has-appeals strong{color:#ffd27a}
.outage-sources-detailed{margin:0 18px 18px;padding:14px;gap:10px;border-radius:20px;background:linear-gradient(180deg,rgba(3,19,38,.82),rgba(3,15,30,.72))}.outage-breakdown-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:4px 4px 10px}.outage-breakdown-head>div:first-child{display:grid;gap:4px}.outage-breakdown-head>div:first-child>span{color:#50d4f4;font-size:8px;font-weight:900;letter-spacing:.15em}.outage-breakdown-head>div:first-child>strong{color:#ecf8ff;font-size:15px}.outage-breakdown-head>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.outage-breakdown-head>div:last-child>span{padding:6px 9px;border:1px solid rgba(91,202,236,.12);border-radius:999px;color:#91b9ca;background:rgba(38,117,151,.06);font-size:9px;white-space:nowrap}
.outage-source-details{min-width:0;overflow:hidden;border:1px solid rgba(86,195,230,.105);border-radius:17px;background:rgba(8,34,62,.46)}.outage-source-details[open]{border-color:rgba(83,205,241,.2);background:rgba(8,38,68,.58)}.outage-source-details.is-missing{opacity:.62}.outage-source-details>summary{padding:13px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;list-style:none;cursor:pointer}.outage-source-details>summary::-webkit-details-marker,.outage-objects-more>summary::-webkit-details-marker{display:none}.outage-source-summary-main{min-width:0;display:grid;gap:4px}.outage-source-summary-main>span{color:#d8edf7;font-size:12px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}.outage-source-summary-main>small{color:#927782;font-size:8px}.outage-source-summary-metrics{display:flex;align-items:center;gap:7px}.outage-source-summary-metrics>span{padding:6px 8px;border:1px solid rgba(255,255,255,.055);border-radius:10px;color:#8da9ba;background:rgba(255,255,255,.022);font-size:8px;white-space:nowrap}.outage-source-summary-metrics>span b{margin-right:2px;color:#eef9ff;font-size:13px}.outage-source-summary-metrics>span.has-appeals{color:#d9ad5f;border-color:rgba(255,191,76,.15);background:rgba(255,170,49,.055)}.outage-source-summary-metrics>span.has-appeals b{color:#ffd27a}.outage-source-summary-metrics svg{width:17px;height:17px;fill:none;stroke:#6ebed7;stroke-width:2;transition:transform .18s ease}.outage-source-details[open] .outage-source-summary-metrics svg{transform:rotate(180deg)}
.outage-events-list{padding:0 12px 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.outage-event-card{min-width:0;padding:13px;display:grid;gap:11px;align-content:start;border:1px solid rgba(255,255,255,.055);border-radius:15px;background:linear-gradient(145deg,rgba(6,26,49,.92),rgba(3,18,35,.88))}.outage-event-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.outage-event-head>div:first-child{min-width:0;display:grid;gap:3px}.outage-event-kicker{color:#5acbe9;font-size:7px;font-weight:900;letter-spacing:.15em}.outage-event-head>div:first-child>strong{color:#f4fbff;font-size:18px;line-height:1}.outage-event-appeals{min-width:70px;padding:7px 9px;display:grid;justify-items:center;gap:3px;border:1px solid rgba(88,191,226,.1);border-radius:12px;background:rgba(38,117,151,.045)}.outage-event-appeals>span{color:#789aac;font-size:7px}.outage-event-appeals>strong{color:#edf9ff;font-size:18px;line-height:1}.outage-event-appeals.has-appeals{border-color:rgba(255,191,76,.18);background:rgba(255,170,49,.06)}.outage-event-appeals.has-appeals>strong{color:#ffd27a}.outage-event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.outage-detail-field{min-width:0;display:grid;gap:4px}.outage-detail-field>span{color:#6f8fa4;font-size:7px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.outage-detail-field>strong{color:#bcd2df;font-size:10px;font-weight:650;line-height:1.38;overflow-wrap:anywhere}.outage-objects-field{padding-top:8px;border-top:1px solid rgba(255,255,255,.045)}.outage-object-chips{display:flex;flex-wrap:wrap;gap:5px}.outage-object-chip{max-width:100%;padding:5px 7px;border:1px solid rgba(75,177,211,.1);border-radius:999px;color:#9ebdcd;background:rgba(35,118,150,.045);font-size:8px;line-height:1.2;overflow-wrap:anywhere}.outage-objects-more{margin-top:7px}.outage-objects-more>summary{width:max-content;max-width:100%;padding:6px 9px;list-style:none;border:1px solid rgba(76,190,226,.12);border-radius:999px;color:#62c9e6;background:rgba(37,125,159,.05);font-size:8px;font-weight:800;cursor:pointer}.outage-object-chips-more{margin-top:8px;padding:9px;border-radius:12px;background:rgba(1,12,25,.38)}
@media(min-width:1500px){.outage-counter-card.is-expanded .outage-events-list{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.outage-counter-header{grid-template-columns:minmax(0,1fr) 112px;align-items:start}.outage-counter-actions{flex-basis:112px;width:112px;min-width:112px}.outage-counter-metrics{grid-template-columns:1fr}.outage-counter-metrics .outage-counter-value strong{font-size:20px}.outage-sources-detailed{margin:0 10px 10px;padding:9px}.outage-breakdown-head{align-items:flex-start;flex-direction:column}.outage-breakdown-head>div:last-child{justify-content:flex-start}.outage-source-details>summary{grid-template-columns:1fr;gap:9px}.outage-source-summary-metrics{justify-content:flex-start;flex-wrap:wrap}.outage-events-list{grid-template-columns:1fr;padding:0 8px 8px}.outage-event-grid{grid-template-columns:1fr}}@media(max-width:430px){.outage-counter-header{grid-template-columns:minmax(0,1fr) 98px;gap:8px}.outage-counter-actions{flex-basis:98px;width:98px;min-width:98px}.outage-counter-header .division-main h2{font-size:16px}}

/* =========================================================
   EXECUTIVE MONITORING · APPEALS METRIC
   ========================================================= */

#executiveView .executive-hero-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

#executiveView .executive-kpi-appeals::before {
  background: linear-gradient(180deg, #f7b955, rgba(247,185,85,0));
}

#executiveView .executive-kpi-tile {
  min-height: 194px;
}

#executiveView .executive-highlight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#executiveView .executive-total-secondary {
  margin-top: 12px;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

#executiveView .executive-total-secondary span {
  font-size: 11px;
  color: rgba(188,213,231,.68);
}

#executiveView .executive-total-secondary b {
  font-size: 20px;
  line-height: 1;
  color: #ffd07a;
  font-variant-numeric: tabular-nums;
}

#executiveView .executive-trend-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#executiveView .executive-trend-appeals {
  color: #f7b955;
}

#executiveView .executive-table-number.is-appeal {
  color: #ffd07a;
}

@media (min-width: 901px) {
  #executiveView .executive-ranking-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  #executiveView .executive-ranking-columns .executive-ranking-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  #executiveView .executive-highlight-grid,
  #executiveView .executive-trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #executiveView .executive-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #executiveView .executive-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #executiveView .executive-trend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  #executiveView .executive-hero-stats,
  #executiveView .executive-highlight-grid {
    grid-template-columns: 1fr;
  }

  #executiveView .executive-kpi-tile {
    min-height: 0;
  }
}

/* =========================================================
   ROLE COLORS
   ========================================================= */

.role-card {
  --role-accent: #39c6e6;
  --role-accent-soft: rgba(57, 198, 230, .12);
  --role-accent-line: rgba(57, 198, 230, .32);
  overflow: hidden;
}

.role-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, var(--role-accent), transparent);
  box-shadow: 0 0 18px var(--role-accent-soft);
}

.role-card:hover {
  border-color: var(--role-accent-line);
}

.role-card-kind-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.role-color-swatch,
.role-choice-color {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 0 12px currentColor;
}

.role-color-action {
  color: var(--role-accent, #79cce5);
  border-color: var(--role-accent-line, rgba(91,202,236,.15));
  background: var(--role-accent-soft, rgba(57,198,230,.06));
}

.role-choice-title {
  display: flex !important;
  align-items: center;
  gap: 7px;
}

.role-color-editor {
  display: grid;
  gap: 12px;
}

.role-color-control {
  display: grid;
  grid-template-columns: 64px minmax(130px, 180px) minmax(170px, 1fr);
  align-items: end;
  gap: 12px;
}

.role-color-picker {
  width: 64px;
  height: 50px;
  padding: 4px;
  border: 1px solid rgba(100, 191, 223, .18);
  border-radius: 14px;
  background: rgba(2, 17, 31, .78);
  cursor: pointer;
}

.role-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.role-color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 9px;
}

.role-color-hex-field {
  margin: 0;
}

.role-color-preview {
  --role-preview: #39c6e6;
  --role-preview-soft: rgba(57,198,230,.12);
  --role-preview-line: rgba(57,198,230,.38);
  min-height: 50px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--role-preview-line);
  border-radius: 14px;
  background: var(--role-preview-soft);
  color: var(--role-preview);
}

.role-color-preview span {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  background: var(--role-preview);
  box-shadow: 0 0 16px var(--role-preview);
}

.role-color-preview strong {
  color: var(--role-preview);
  font-size: 10px;
}

.role-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.role-color-preset {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 16px rgba(0,0,0,.12);
  transition: transform .15s ease, border-color .15s ease;
}

.role-color-preset:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(255,255,255,.42);
}

@media (max-width: 620px) {
  .role-color-control {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .role-color-picker {
    width: 56px;
  }

  .role-color-preview {
    grid-column: 1 / -1;
  }

  .role-card-actions {
    flex-wrap: wrap;
  }
}


/* ===== Requests: ending-in-shift live metric ===== */
.dispatcher-ending-live-card {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid rgba(251, 113, 133, .18);
  background: linear-gradient(145deg, rgba(58, 20, 37, .38), rgba(5, 23, 41, .82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.dispatcher-ending-live-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dispatcher-ending-live-copy > i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 14px rgba(251,113,133,.55);
}

.dispatcher-ending-live-copy div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dispatcher-ending-live-copy span {
  color: #eef8fd;
  font-size: 12px;
  font-weight: 750;
}

.dispatcher-ending-live-copy small {
  color: #7d98aa;
  font-size: 9px;
}

.dispatcher-ending-live-card > strong {
  color: #fff2f4;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dispatcher-workorders-legend-item.is-ending {
  color: #fb7185;
}

.dispatcher-workorders-legend-item.is-ending i {
  background: #fb7185;
  box-shadow: 0 0 10px rgba(251,113,133,.4);
}

@media (max-width: 620px) {
  .dispatcher-ending-live-card {
    min-height: 62px;
    padding: 10px 12px;
  }

  .dispatcher-ending-live-card > strong {
    font-size: 24px;
  }
}

/* =========================================================
   EXECUTIVE TREND LABELS — DESKTOP CLARITY
   ========================================================= */
.executive-sparkline {
  height: auto;
  padding: 10px 12px 12px;
}

.executive-sparkline-canvas {
  width: 100%;
  height: 138px;
}

.executive-sparkline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.executive-sparkline-meta.is-single {
  justify-content: flex-end;
}

.executive-sparkline-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 195, 255, 0.16);
  background: rgba(7, 24, 45, 0.82);
  color: #cfe9ff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.executive-sparkline-chip.is-end {
  margin-left: auto;
}

@media (min-width: 1024px) {
  .executive-sparkline-chip {
    font-size: 12px;
    padding: 7px 12px;
  }
}

@media (max-width: 767px) {
  .executive-sparkline {
    padding: 8px 10px 10px;
  }

  .executive-sparkline-canvas {
    height: 126px;
  }

  .executive-sparkline-meta {
    gap: 6px;
  }

  .executive-sparkline-chip {
    width: 100%;
    justify-content: center;
    font-size: 10px;
    padding: 6px 9px;
  }

  .executive-sparkline-chip.is-end {
    margin-left: 0;
  }
}

/* =========================================================
   EXECUTIVE OVERVIEW PANEL — DESKTOP POLISH
   ========================================================= */
@media (min-width: 901px) {
  #executiveView .executive-overview-panel {
    grid-template-rows: auto auto 1fr;
    min-height: 632px;
  }

  #executiveView .executive-overview-panel .executive-panel-head {
    align-items: center;
  }

  #executiveView #executiveOverviewMeta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    width: fit-content;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(7, 27, 48, 0.72);
    border: 1px solid rgba(87, 184, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  #executiveView .executive-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(208px, 1fr);
    align-items: stretch;
    gap: 18px;
  }

  #executiveView .executive-highlight-card {
    position: relative;
    min-height: 208px;
    padding: 18px 18px 16px;
    gap: 12px;
    overflow: hidden;
    border-radius: 24px !important;
    border: 1px solid rgba(84, 189, 255, 0.14);
    background:
      linear-gradient(180deg, rgba(12, 53, 92, 0.18), rgba(4, 18, 36, 0.82)),
      rgba(5, 22, 42, 0.86);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.04),
      0 16px 36px rgba(2, 10, 22, 0.16);
  }

  #executiveView .executive-highlight-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(90, 214, 255, 0.95), rgba(90, 214, 255, 0));
    opacity: 0.9;
  }

  #executiveView .executive-highlight-card:nth-child(2)::before {
    background: linear-gradient(180deg, rgba(247, 185, 85, 0.95), rgba(247, 185, 85, 0));
  }

  #executiveView .executive-highlight-card:nth-child(3)::before {
    background: linear-gradient(180deg, rgba(89, 196, 255, 0.95), rgba(89, 196, 255, 0));
  }

  #executiveView .executive-highlight-card:nth-child(4)::before {
    background: linear-gradient(180deg, rgba(88, 245, 220, 0.95), rgba(88, 245, 220, 0));
  }

  #executiveView .executive-highlight-card > span {
    display: block;
    max-width: 92%;
    color: rgba(196, 219, 235, 0.76);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  #executiveView .executive-highlight-card > strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    min-height: 92px;
    margin-top: 0;
    font-size: clamp(24px, 1.85vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }

  #executiveView .executive-highlight-card > strong.is-long {
    font-size: clamp(21px, 1.55vw, 29px);
    line-height: 1.1;
  }

  #executiveView .executive-highlight-card > strong.is-xlong {
    font-size: clamp(18px, 1.3vw, 24px);
    line-height: 1.14;
    -webkit-line-clamp: 5;
    min-height: 104px;
  }

  #executiveView .executive-highlight-card > small {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: rgba(221, 237, 247, 0.92);
  }

  #executiveView .executive-highlight-card > small::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 12px currentColor;
    opacity: 0.7;
    flex: 0 0 auto;
  }

  #executiveView .executive-highlight-card:nth-child(1) > small { color: #7fe6ff; }
  #executiveView .executive-highlight-card:nth-child(2) > small { color: #ffd07a; }
  #executiveView .executive-highlight-card:nth-child(3) > small { color: #8dc9ff; }
  #executiveView .executive-highlight-card:nth-child(4) > small { color: #70f0e2; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  #executiveView .executive-highlight-card > strong {
    font-size: clamp(20px, 1.7vw, 28px);
  }
  #executiveView .executive-highlight-card > strong.is-long {
    font-size: clamp(18px, 1.45vw, 24px);
  }
  #executiveView .executive-highlight-card > strong.is-xlong {
    font-size: clamp(16px, 1.2vw, 21px);
  }
}

/* =========================================================
   MOBILE HEADER — FIO + ROLE INLINE
   ========================================================= */
@media (max-width: 700px) {
  .topbar-user { gap: 8px; }

  .topbar-user-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100vw - 156px);
  }

  .identity {
    max-width: min(44vw, 170px);
    align-items: flex-end;
  }

  .identity strong {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.12;
  }

  .role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(28vw, 120px);
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 7px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 620px) {
  .topbar-user-meta {
    max-width: calc(100vw - 154px);
    gap: 5px;
  }
  .identity { max-width: min(43vw, 150px); }
  .identity strong { font-size: 10px; }
  .role-badge {
    display: inline-flex;
    max-width: min(30vw, 110px);
    padding: 4px 7px;
    font-size: 6.8px;
    line-height: 1.04;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 420px) {
  .topbar-user-meta { max-width: calc(100vw - 150px); }
  .identity { max-width: min(40vw, 132px); }
  .identity strong { font-size: 9.5px; }
  .role-badge {
    max-width: min(28vw, 92px);
    padding: 4px 6px;
    font-size: 6.4px;
  }
}

/* Network-optimized lazy outage details */
.outage-detail-lazy-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(91, 190, 225, 0.10);
  border-radius: 14px;
  background: rgba(2, 18, 32, 0.38);
  color: #7f9bae;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.outage-detail-lazy-state.is-error {
  border-color: rgba(239, 119, 119, 0.16);
  color: #d69a9a;
}

/* Outage details: creator of the OMS event */
.outage-created-by-field {
  padding: 8px 10px;
  border: 1px solid rgba(93, 210, 244, 0.10);
  border-radius: 12px;
  background: rgba(42, 152, 190, 0.045);
}

.outage-created-by-field > strong {
  color: #d9edf6;
  font-weight: 750;
}


/* PC polish for long outage division titles (for example: "Не принявшие смену") */
@media (min-width: 1180px) {
  .outage-counter-card.has-long-title .outage-counter-header .division-main h2 {
    font-size: clamp(15px, 1.05vw, 19px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }

  .outage-counter-card.outage-card-shift-unassigned {
    grid-column: span 2;
  }

  .outage-counter-card.outage-card-shift-unassigned .outage-counter-header {
    min-height: 132px;
  }

  .outage-counter-card.outage-card-shift-unassigned .division-main > div:last-child {
    max-width: 260px;
  }

  .outage-counter-card.outage-card-shift-unassigned .outage-counter-header .division-main h2 {
    max-width: 10.8ch;
    font-size: clamp(24px, 1.65vw, 30px);
    line-height: 0.98;
    letter-spacing: -0.028em;
    overflow-wrap: normal;
    word-break: keep-all;
    text-wrap: balance;
  }

  .outage-counter-card.outage-card-shift-unassigned .outage-counter-header .division-main p {
    max-width: 190px;
  }
}

/* =========================================================
   ACTIVE OUTAGES · TYPE SELECTOR
   ========================================================= */
.active-outages-selector {
  display: grid;
  gap: 22px;
}

.active-outages-hero {
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 30px 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 10%, rgba(49, 198, 242, 0.10), transparent 28%),
    linear-gradient(140deg, rgba(7, 37, 64, 0.97), rgba(3, 22, 40, 0.97));
}

.active-outages-hero h1 {
  margin: 6px 0 10px;
  color: #f6fbff;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.active-outages-hero p {
  max-width: 760px;
  margin: 0;
  color: #87a6b9;
  font-size: 12px;
  line-height: 1.65;
}

.active-outages-hero-badge {
  min-width: 154px;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(80, 198, 231, 0.15);
  background: rgba(2, 18, 33, 0.54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.active-outages-hero-badge strong {
  color: #cceaf5;
  font-size: 11px;
  letter-spacing: 0.10em;
}

.active-outage-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.active-outage-type-card {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon copy count"
    "action action action";
  align-items: start;
  gap: 22px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(91, 188, 224, 0.14);
  border-radius: 28px;
  color: inherit;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(6, 31, 55, 0.97), rgba(3, 19, 35, 0.98));
  box-shadow:
    0 22px 58px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.025);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.active-outage-type-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #ff6687, rgba(255,102,135,0.15), transparent 74%);
}

.active-outage-type-card.is-planned::before {
  background: linear-gradient(90deg, #5de2cf, rgba(93,226,207,0.14), transparent 74%);
}

.active-outage-type-card:hover {
  transform: translateY(-3px);
  border-color: rgba(92, 206, 239, 0.28);
  box-shadow:
    0 28px 70px rgba(0,0,0,0.24),
    0 0 0 1px rgba(82, 202, 238, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.active-outage-type-card.is-not-configured {
  border-color: rgba(255, 190, 86, 0.18);
}

.active-outage-type-icon {
  grid-area: icon;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: #ff7594;
  border: 1px solid rgba(255, 105, 137, 0.20);
  background: rgba(255, 80, 115, 0.07);
}

.active-outage-type-card.is-planned .active-outage-type-icon {
  color: #65e8d8;
  border-color: rgba(91, 228, 211, 0.20);
  background: rgba(58, 204, 188, 0.07);
}

.active-outage-type-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.active-outage-type-copy {
  grid-area: copy;
  min-width: 0;
}

.active-outage-type-copy h2 {
  margin: 8px 0 10px;
  color: #f3f9fc;
  font-size: clamp(25px, 2.2vw, 36px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.active-outage-type-copy p {
  max-width: 420px;
  margin: 0 0 18px;
  color: #7898ac;
  font-size: 11px;
  line-height: 1.55;
}

.active-outage-type-copy small {
  display: block;
  max-width: 100%;
  color: #67869b;
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.active-outage-type-count {
  grid-area: count;
  min-width: 126px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(1, 14, 27, 0.52);
  text-align: center;
}

.active-outage-type-count span,
.active-outage-type-count small {
  display: block;
  color: #718fa3;
  font-size: 9px;
}

.active-outage-type-count strong {
  display: block;
  margin: 7px 0 5px;
  color: #ffffff;
  font-size: clamp(44px, 4vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.active-outage-type-card.is-emergency .active-outage-type-count strong {
  color: #ff8aa2;
}

.active-outage-type-card.is-planned .active-outage-type-count strong {
  color: #7cf0df;
}

.active-outage-type-action {
  grid-area: action;
  align-self: end;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(91, 188, 224, 0.10);
  background: rgba(2, 19, 35, 0.52);
  color: #a4cfdf;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.active-outage-type-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.outage-details-view {
  display: grid;
  gap: 22px;
}

.outage-details-view[hidden],
.active-outages-selector[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .active-outage-type-grid {
    grid-template-columns: 1fr;
  }

  .active-outages-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .active-outages-hero-badge {
    width: fit-content;
  }
}

@media (max-width: 620px) {
  .active-outages-selector {
    gap: 14px;
  }

  .active-outages-hero {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .active-outages-hero h1 {
    font-size: clamp(30px, 10vw, 40px);
  }

  .active-outages-hero p {
    font-size: 10px;
  }

  .active-outages-hero-badge {
    min-width: 0;
    min-height: 48px;
    padding: 10px 13px;
    border-radius: 14px;
  }

  .active-outage-type-grid {
    gap: 14px;
  }

  .active-outage-type-card {
    min-height: 0;
    grid-template-columns: 48px minmax(0, 1fr) 78px;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
  }

  .active-outage-type-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .active-outage-type-icon svg {
    width: 24px;
    height: 24px;
  }

  .active-outage-type-copy h2 {
    margin-top: 6px;
    font-size: 20px;
  }

  .active-outage-type-copy p {
    font-size: 9px;
    margin-bottom: 11px;
  }

  .active-outage-type-copy small {
    font-size: 8px;
  }

  .active-outage-type-count {
    min-width: 0;
    padding: 11px 8px;
    border-radius: 16px;
  }

  .active-outage-type-count strong {
    font-size: 34px;
  }

  .active-outage-type-action {
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 8px;
  }
}

@media (max-width: 430px) {
  .active-outage-type-card {
    grid-template-columns: 42px minmax(0, 1fr) 68px;
    gap: 9px;
    padding: 14px;
  }

  .active-outage-type-icon {
    width: 40px;
    height: 40px;
  }

  .active-outage-type-copy h2 {
    font-size: 18px;
  }

  .active-outage-type-count strong {
    font-size: 30px;
  }
}

/* =========================================================
   ACTIVE OUTAGES · ADMIN UNASSIGNED ROLES
   ========================================================= */

.outage-unassigned-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.outage-unassigned-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(251, 113, 133, .16);
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 63, 94, .08), transparent 38%),
    rgba(3, 18, 34, .52);
}

.outage-unassigned-card.is-planned {
  border-color: rgba(250, 204, 21, .14);
  background:
    radial-gradient(circle at 100% 0%, rgba(250, 204, 21, .07), transparent 38%),
    rgba(3, 18, 34, .52);
}

.outage-unassigned-card.is-clear {
  border-color: rgba(52, 211, 153, .11);
}

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

.outage-unassigned-head > div {
  display: grid;
  gap: 5px;
}

.outage-unassigned-head strong {
  color: #edf7fb;
  font-size: 15px;
}

.outage-unassigned-head b {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffd4dd;
  background: rgba(244, 63, 94, .10);
  border: 1px solid rgba(244, 63, 94, .13);
  font-size: 13px;
}

.outage-unassigned-card.is-planned .outage-unassigned-head b {
  color: #fde68a;
  background: rgba(234, 179, 8, .09);
  border-color: rgba(234, 179, 8, .13);
}

.outage-unassigned-card.is-clear .outage-unassigned-head b {
  color: #9cebcf;
  background: rgba(16, 185, 129, .08);
  border-color: rgba(16, 185, 129, .11);
}

.outage-unassigned-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.outage-unassigned-list > span:not(.is-clear-label) {
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeaf3;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .055);
  font-size: 11px;
  font-weight: 700;
}

.outage-unassigned-list .is-clear-label {
  color: #7897aa;
  font-size: 11px;
  line-height: 1.5;
}

.dispatcher-config-section-label {
  margin: 14px 0 7px;
  color: #7697ab;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dispatcher-config-section-label.is-outages {
  color: #d09b6f;
}

.dispatcher-config-outage-sources span:not(.is-empty) {
  border-color: rgba(249, 115, 22, .12);
  background: rgba(249, 115, 22, .055);
}

.dispatcher-outage-config-edit {
  border-color: rgba(249, 115, 22, .17) !important;
  color: #ffc58f !important;
}

/* =========================================================
   DISPATCHER · ACTIVE OUTAGES SUMMARY
   ========================================================= */

.dispatcher-outages-panel {
  margin-top: 0;
}

.dispatcher-outage-kpis {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dispatcher-outage-kpi {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(2, 15, 29, .48);
}

.dispatcher-outage-kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .7;
}

.dispatcher-outage-kpi.is-emergency::after {
  background: radial-gradient(circle at 100% 0%, rgba(244, 63, 94, .13), transparent 42%);
}

.dispatcher-outage-kpi.is-planned::after {
  background: radial-gradient(circle at 100% 0%, rgba(234, 179, 8, .12), transparent 42%);
}

.dispatcher-outage-kpi span,
.dispatcher-outage-kpi strong,
.dispatcher-outage-kpi small {
  position: relative;
  z-index: 1;
}

.dispatcher-outage-kpi > span {
  display: block;
  color: #88a5b8;
  font-size: 11px;
  font-weight: 700;
}

.dispatcher-outage-kpi > strong {
  display: block;
  margin-top: 8px;
  color: #f4f9fc;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.dispatcher-outage-kpi > small {
  display: block;
  margin-top: 10px;
  color: #7795a8;
  font-size: 11px;
}

.dispatcher-outage-kpi > small b {
  color: #dcebf3;
  font-size: 13px;
}

.dispatcher-outage-tables {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dispatcher-outage-table-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .055);
  background: rgba(2, 15, 29, .38);
}

.dispatcher-outage-table-card.is-emergency {
  border-color: rgba(244, 63, 94, .10);
}

.dispatcher-outage-table-card.is-planned {
  border-color: rgba(234, 179, 8, .10);
}

.dispatcher-outage-table-head {
  padding: 14px 15px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
}

.dispatcher-outage-table-head h3 {
  margin: 4px 0 0;
  color: #e9f3f8;
  font-size: 15px;
}

.dispatcher-table-scroll {
  overflow-x: auto;
}

.dispatcher-outage-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
}

.dispatcher-outage-table th,
.dispatcher-outage-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  text-align: left;
  vertical-align: middle;
}

.dispatcher-outage-table th {
  color: #67899f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(1, 12, 23, .28);
}

.dispatcher-outage-table th:nth-child(2),
.dispatcher-outage-table th:nth-child(3),
.dispatcher-outage-table td:nth-child(2),
.dispatcher-outage-table td:nth-child(3) {
  width: 100px;
  text-align: center;
}

.dispatcher-outage-table td {
  color: #dbe9f1;
  font-size: 12px;
}

.dispatcher-outage-table td strong {
  display: block;
  color: #e6f0f6;
  font-size: 12px;
}

.dispatcher-outage-table td small {
  display: block;
  margin-top: 3px;
  color: #a16c78;
  font-size: 9px;
}

.dispatcher-outage-table tr.is-missing td {
  opacity: .7;
}

.dispatcher-outage-table tr.is-empty td {
  padding: 20px 14px;
  color: #6f8ea2;
  text-align: center;
}

.dispatcher-outage-table tbody tr:last-child td {
  border-bottom: 0;
}

.dispatcher-outage-details {
  border-top: 1px solid rgba(255, 255, 255, .05);
}

.dispatcher-outage-details > summary {
  min-height: 48px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  color: #8fb0c3;
  background: rgba(1, 12, 23, .24);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.dispatcher-outage-details > summary::-webkit-details-marker {
  display: none;
}

.dispatcher-outage-details > summary svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: #69c5df;
  stroke-width: 2;
  transition: transform .18s ease;
}

.dispatcher-outage-details[open] > summary svg {
  transform: rotate(180deg);
}

.dispatcher-outage-details-body {
  padding: 12px;
  display: grid;
  gap: 10px;
  background: rgba(1, 10, 20, .22);
}

.dispatcher-outage-detail-division {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(83, 205, 241, .08);
  border-radius: 14px;
  background: rgba(4, 21, 39, .48);
}

.dispatcher-outage-detail-division-head {
  padding: 12px 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.dispatcher-outage-detail-division-head > div:first-child {
  min-width: 0;
}

.dispatcher-outage-detail-division-head h4 {
  margin: 3px 0 0;
  color: #eaf5fa;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dispatcher-outage-detail-division-head small {
  display: block;
  margin-top: 4px;
  color: #708fa3;
  font-size: 9px;
}

.dispatcher-outage-detail-division-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dispatcher-outage-detail-division-metrics span {
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 10px;
  color: #89a7b8;
  background: rgba(255, 255, 255, .02);
  font-size: 8px;
  white-space: nowrap;
}

.dispatcher-outage-detail-division-metrics b {
  margin-right: 2px;
  color: #eef8fc;
  font-size: 12px;
}

.dispatcher-outage-detail-division-metrics .has-appeals {
  color: #d5aa60;
  border-color: rgba(255, 191, 76, .14);
  background: rgba(255, 170, 49, .05);
}

.dispatcher-outage-role-details {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.dispatcher-outage-role-details .outage-events-list {
  grid-template-columns: 1fr;
}

.dispatcher-outage-detail-empty {
  padding: 16px 12px;
  color: #6f8ea2;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.dispatcher-outage-detail-empty.is-compact {
  padding: 12px;
}

@media (max-width: 940px) {
  .dispatcher-outage-tables,
  .outage-unassigned-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dispatcher-outage-kpis {
    grid-template-columns: 1fr;
  }

  .dispatcher-outages-panel {
    padding: 16px;
  }
}

.dispatcher-outage-division-picker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dispatcher-outage-division-option {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 115, 22, .10);
  background: rgba(3, 18, 34, .46);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.dispatcher-outage-division-option:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 22, .20);
}

.dispatcher-outage-division-option.is-selected {
  border-color: rgba(249, 115, 22, .28);
  background:
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, .08), transparent 38%),
    rgba(36, 24, 18, .42);
}

.dispatcher-outage-division-option-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.dispatcher-outage-division-master {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}

.dispatcher-outage-division-master input,
.dispatcher-outage-role-option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #e8843f;
}

.dispatcher-outage-division-master > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dispatcher-outage-division-master strong {
  color: #eaf3f8;
  font-size: 13px;
}

.dispatcher-outage-division-master small {
  color: #7896a8;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dispatcher-outage-role-count {
  min-width: 48px;
  padding: 6px 8px;
  border: 1px solid rgba(249, 115, 22, .12);
  border-radius: 999px;
  color: #dcaa80;
  background: rgba(249, 115, 22, .045);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.dispatcher-outage-role-picker {
  margin-left: 29px;
  padding-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  border-top: 1px solid rgba(255, 255, 255, .04);
}

.dispatcher-outage-role-option {
  min-width: 0;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 10px;
  color: #91adbd;
  background: rgba(1, 12, 24, .32);
  font-size: 9px;
  line-height: 1.4;
  cursor: pointer;
}

.dispatcher-outage-role-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dispatcher-outage-role-option:has(input:checked) {
  border-color: rgba(249, 115, 22, .18);
  color: #e5c0a0;
  background: rgba(249, 115, 22, .045);
}

@media (max-width: 640px) {
  .dispatcher-outage-role-picker {
    margin-left: 0;
    grid-template-columns: 1fr;
  }

  .dispatcher-outage-detail-division-head {
    flex-direction: column;
  }

  .dispatcher-outage-detail-division-metrics {
    justify-content: flex-start;
  }
}


/* Donut marker polish: readable pills with collision-safe placement */
.dispatcher-donut-marker {
  position: absolute;
  z-index: 3;
  min-width: 28px;
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--marker-color, #45c8f4) 78%, #ffffff 22%);
  background: linear-gradient(180deg, rgba(5, 20, 35, .97), rgba(2, 14, 27, .95));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255,255,255,.06);
  color: #f8fcff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  pointer-events: none;
}

.dispatcher-donut-marker::before {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--connector-width, 18px);
  height: 1px;
  transform-origin: center;
  transform: translateY(-50%) rotate(var(--connector-angle, 0rad));
  background: linear-gradient(90deg, rgba(255,255,255,.06), color-mix(in srgb, var(--marker-color, #45c8f4) 80%, white 20%));
  opacity: .82;
}

.dispatcher-donut-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--marker-color, #45c8f4);
  box-shadow: 0 0 0 2px rgba(4, 16, 30, .92), 0 0 12px color-mix(in srgb, var(--marker-color, #45c8f4) 55%, transparent 45%);
}

.dispatcher-donut-marker.is-right::before,
.dispatcher-donut-marker.is-right::after {
  right: 100%;
  margin-right: 6px;
}

.dispatcher-donut-marker.is-right::before {
  transform-origin: right center;
}

.dispatcher-donut-marker.is-left::before,
.dispatcher-donut-marker.is-left::after {
  left: 100%;
  margin-left: 6px;
}

.dispatcher-donut-marker.is-left::before {
  transform-origin: left center;
}

.dispatcher-donut-marker span {
  position: relative;
  z-index: 1;
}

.dispatcher-workorders-donut,
.dispatcher-requests-donut,
.executive-donut {
  overflow: visible;
}

@media (max-width: 760px) {
  .dispatcher-donut-marker {
    min-width: 24px;
    min-height: 20px;
    padding: 0 6px;
    font-size: 10px;
  }
}
