:root {
  --navy-950: #081426;
  --navy-900: #0b1830;
  --navy-800: #112441;
  --blue-700: #175cd3;
  --blue-600: #2474e5;
  --blue-100: #eaf2ff;
  --cyan-600: #0e88a8;
  --cyan-100: #e5f6fa;
  --green-700: #087f5b;
  --green-100: #e6f6ef;
  --orange-700: #b54708;
  --orange-100: #fff1df;
  --red-700: #b42318;
  --red-100: #feeceb;
  --purple-700: #6d4aff;
  --purple-100: #efebff;
  --ink-950: #101828;
  --ink-700: #344054;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --line: #e3e8ef;
  --line-strong: #d0d7e2;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --page: #eef2f7;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 4px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 14px 34px rgba(16, 24, 40, 0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --topbar-h: 72px;
  --sidebar-w: 244px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink-950);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
body.login-active { overflow: hidden; }

.login-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(22px, 5vw, 70px);
  background:
    linear-gradient(100deg, rgba(4, 22, 45, .9) 0%, rgba(4, 28, 58, .76) 42%, rgba(4, 22, 45, .46) 100%),
    url("./assets/login-background.png") center / cover no-repeat;
  overflow-y: auto;
}
.login-screen::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 86, 157, .14), rgba(0, 0, 0, .28));
  pointer-events: none;
  content: "";
}
.login-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
}
.login-presentation { max-width: 670px; color: white; text-shadow: 0 2px 18px rgba(0, 0, 0, .18); }
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(7, 29, 58, .32);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.login-presentation h1 { display: flex; flex-direction: column; margin: 0; line-height: 1; }
.login-presentation h1 strong { font-size: clamp(64px, 9vw, 112px); letter-spacing: -.065em; }
.login-presentation h1 span { max-width: 650px; margin-top: 14px; font-size: clamp(23px, 3.4vw, 43px); font-weight: 650; letter-spacing: -.035em; line-height: 1.08; }
.login-presentation > p { max-width: 610px; margin: 24px 0 0; color: #e3edf9; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.6; }
.login-highlights { display: flex; gap: 18px; margin-top: 32px; flex-wrap: wrap; }
.login-highlights span { display: inline-flex; align-items: center; gap: 8px; color: #e8f2ff; font-size: 11px; font-weight: 650; }
.login-highlights i { width: 7px; height: 7px; border-radius: 50%; background: #51d3bd; box-shadow: 0 0 0 4px rgba(81, 211, 189, .14); }
.login-panel {
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 70px rgba(2, 15, 34, .32);
  backdrop-filter: blur(16px);
}
.login-panel-tag { color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.login-panel h2 { margin: 8px 0 7px; color: var(--navy-950); font-size: 28px; letter-spacing: -.04em; }
.login-panel > p { margin: 0; color: var(--ink-500); font-size: 12px; line-height: 1.55; }
.device-recognition { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; border: 1px solid #b9e6d8; border-radius: 10px; background: #eefbf6; color: #145c48; }
.device-recognition[hidden] { display: none; }
.device-recognition-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #25a77a; box-shadow: 0 0 0 4px rgba(37, 167, 122, .12); }
.device-recognition > span:last-child { display: grid; gap: 2px; }
.device-recognition strong { font-size: 10px; }
.device-recognition small { color: #3d7868; font-size: 9px; }
.login-form { display: grid; gap: 16px; margin-top: 26px; }
.login-field { display: grid; gap: 7px; }
.login-field > span:first-child { color: var(--ink-700); font-size: 11px; font-weight: 800; }
.login-input { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: white; transition: border-color 130ms ease, box-shadow 130ms ease; }
.login-input:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(36, 116, 229, .11); }
.login-input i { color: var(--ink-400); font-style: normal; }
.login-input i svg { width: 18px; height: 18px; }
.login-input input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink-950); font-size: 13px; }
.login-input input::placeholder { color: var(--ink-400); }
.login-error { margin: -4px 0 0; padding: 9px 10px; border-radius: 8px; background: var(--red-100); color: var(--red-700); font-size: 10px; font-weight: 700; }
.login-submit { height: 48px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #175cd3, #0b3b72); color: white; cursor: pointer; font-size: 12px; font-weight: 800; box-shadow: 0 9px 20px rgba(23, 92, 211, .24); transition: transform 120ms ease, box-shadow 120ms ease; }
.login-submit:hover { box-shadow: 0 12px 26px rgba(23, 92, 211, .31); transform: translateY(-1px); }
.login-submit:active { transform: translateY(1px); }
.login-submit svg { width: 16px; height: 16px; }
.login-footnote { display: block; margin-top: 22px; color: var(--ink-400); font-size: 9px; text-align: center; }

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

button {
  color: inherit;
}

button,
a,
select,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
}

.brand {
  width: auto;
  min-width: 390px;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
}

.brand-symbol {
  width: 58px;
  height: 44px;
  flex: 0 0 58px;
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.brand-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.brand-copy strong {
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-copy small {
  max-width: none;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small i { margin-right: 5px; color: #a9b9ce; font-style: normal; }

.logout-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: #dce7f5;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.logout-button:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .11); color: white; }
.logout-button svg { width: 15px; height: 15px; }

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

.global-search {
  width: min(520px, 46vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.075);
  color: #9eb0c8;
}

.global-search:focus-within {
  border-color: rgba(115, 174, 255, 0.7);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 3px rgba(74, 139, 230, 0.15);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
}

.global-search input::placeholder { color: #9eb0c8; }

kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  font-size: 10px;
}

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
}

.icon-button:hover { background: rgba(255, 255, 255, 0.12); }
.icon-button svg { width: 19px; height: 19px; }

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--navy-900);
  border-radius: 50%;
  background: #ff7a59;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.connection-indicator {
  width: 22px;
  height: 40px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
}
.connection-indicator > i {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, .78);
  border-radius: 50%;
  background: #e8a62b;
  box-shadow: 0 0 0 4px rgba(232, 166, 43, .14);
  transition: background .18s ease, box-shadow .18s ease;
}
.connection-indicator.is-connected > i { background: #28c590; box-shadow: 0 0 0 4px rgba(40, 197, 144, .16); }
.connection-indicator.is-disconnected > i { background: #ef4e5f; box-shadow: 0 0 0 4px rgba(239, 78, 95, .16); }

.profile-button {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px 0 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: white;
  cursor: pointer;
}

.profile-button:hover { background: rgba(255, 255, 255, 0.07); }
.profile-button > span:nth-child(2) { display: flex; flex-direction: column; text-align: left; }
.profile-button strong { max-width: 128px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-button small { color: #9eb0c8; font-size: 10px; }
.profile-button svg { width: 16px; }

.avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: #1e4f87;
  font-size: 12px;
  font-weight: 800;
}

.mobile-menu { display: none; }

.sidebar {
  position: fixed;
  z-index: 40;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow-y: auto;
}

#main-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-section { display: grid; gap: 4px; padding: 4px 0; }
.nav-section + .nav-section { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

.nav-item {
  position: relative;
  width: 100%;
  height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
  transition: background 130ms ease, color 130ms ease;
}

.nav-item:hover { background: var(--surface-soft); color: var(--ink-950); }
.nav-item.active { background: var(--blue-100); color: var(--blue-700); font-weight: 800; }
.nav-item.active::before {
  position: absolute;
  inset: 9px auto 9px -12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--blue-600);
  content: "";
}
.nav-item svg { width: 19px; height: 19px; flex: 0 0 19px; }
.nav-item .construction-tag {
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--orange-100);
  color: var(--orange-700);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-footer { display: grid; gap: 12px; }

.system-status {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
}

.system-status > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.system-status strong { font-size: 11px; }
.system-status small { overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.system-status svg { width: 15px; }

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17b26a;
  box-shadow: 0 0 0 4px rgba(23, 178, 106, 0.12);
}

.sidebar-version {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.55;
}
.sidebar-version small { color: var(--ink-400); font-size: 9px; }
.admin-files-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: default;
}
.admin-files-trigger:hover,
.admin-files-trigger:active { background: transparent; color: var(--ink-500); }
.admin-files-trigger:focus-visible { outline: 1px dashed var(--line-strong); outline-offset: 3px; }

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 28px) clamp(22px, 3vw, 44px) 44px;
  outline: none;
}

body.calendar-standalone .sidebar,
body.calendar-standalone .mobile-overlay,
body.calendar-standalone .mobile-menu {
  display: none;
}

body.calendar-standalone .main-content {
  margin-left: 0;
}

body.calendar-standalone .calendar-page {
  width: 100%;
  max-width: none;
}

body.coordinator-scale-standalone .coordinator-scale-page {
  width: 100%;
  max-width: none;
}

body.coordinator-scale-standalone .coordinator-scale-page .heading-actions,
body.coordinator-scale-standalone [data-open-route="escala-coordenador"] {
  display: none;
}

body.programmer-scale-standalone .programmer-scale-page {
  width: 100%;
  max-width: none;
}

body.programmer-scale-standalone .programmer-scale-page .heading-actions,
body.programmer-scale-standalone [data-open-route="escala"] {
  display: none;
}

body.program-list-standalone .topbar,
body.program-list-standalone .program-general-hero {
  display: none;
}

body.program-list-standalone .main-content {
  min-height: 100vh;
  padding: 10px;
}

body.program-list-standalone .program-general-page {
  width: 100%;
  max-width: none;
}

body.program-list-standalone .program-general-card {
  min-height: calc(100vh - 20px);
  border-radius: 8px;
}

body.mso-standalone .sidebar,
body.mso-standalone .mobile-overlay,
body.mso-standalone .mobile-menu {
  display: none;
}

body.mso-standalone .main-content {
  margin-left: 0;
}

body.mso-standalone .mso-page {
  width: 100%;
  max-width: none;
}

body.me-standalone .me-budget-page {
  width: 100%;
  max-width: none;
}

body.mso-standalone .mso-open-window,
body.me-standalone .me-open-window {
  display: none;
}

.page {
  width: min(1500px, 100%);
  margin: 0 auto;
  animation: page-in 180ms ease-out;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.page-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-heading { margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -0.035em; }
.page-heading p { max-width: 720px; margin: 7px 0 0; color: var(--ink-500); line-height: 1.55; }
.home-page .page-heading p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.home-computer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #9ce0ca;
  border-radius: 999px;
  background: #ecfaf5;
  color: #157a60;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.home-computer-badge svg { width: 13px; height: 13px; flex: 0 0 13px; }
.home-computer-badge strong { color: #0b5f4a; font-weight: 850; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.date-label { color: var(--ink-500); font-size: 12px; font-weight: 600; white-space: nowrap; }

.button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 100ms ease, background 120ms ease, border-color 120ms ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--blue-700); color: white; }
.button-primary:hover { background: #134fae; }
.button-secondary { border-color: var(--line-strong); background: white; color: var(--ink-700); }
.button-secondary:hover { border-color: #aeb9c8; background: #fafbfc; }
.button-dark { background: var(--navy-800); color: white; }
.button-dark:hover { background: var(--navy-950); }
.button-danger { border-color: #f7b6b2; background: var(--red-100); color: var(--red-700); }
.button-ghost { background: transparent; color: var(--ink-500); }
.button-ghost:hover { background: var(--surface-soft); color: var(--ink-950); }
.button-icon { width: 38px; padding: 0; }

.select,
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: white;
  color: var(--ink-950);
  font-size: 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.select,
.input { height: 40px; padding: 0 11px; }
.select { padding-right: 30px; cursor: pointer; }
.textarea { min-height: 90px; padding: 10px 11px; line-height: 1.5; resize: vertical; }
.select:focus,
.input:focus,
.textarea:focus { border-color: #76a9ef; box-shadow: 0 0 0 3px rgba(36, 116, 229, 0.1); }
.input::placeholder,
.textarea::placeholder { color: var(--ink-400); }

.field { display: grid; gap: 6px; }
.field label { color: var(--ink-700); font-size: 11px; font-weight: 800; }
.field small { color: var(--ink-500); font-size: 10px; }
.field.span-2 { grid-column: span 2; }

.filter-field { min-width: 150px; display: grid; gap: 5px; }
.filter-field > span { color: var(--ink-500); font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 126px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.metric-icon svg { width: 20px; height: 20px; }
.metric-card[data-tone="blue"] .metric-icon { background: var(--blue-100); color: var(--blue-700); }
.metric-card[data-tone="green"] .metric-icon { background: var(--green-100); color: var(--green-700); }
.metric-card[data-tone="orange"] .metric-icon { background: var(--orange-100); color: var(--orange-700); }
.metric-card[data-tone="purple"] .metric-icon { background: var(--purple-100); color: var(--purple-700); }
.metric-card[data-tone="red"] .metric-icon { background: var(--red-100); color: var(--red-700); }
.metric-trend { display: inline-flex; align-items: center; gap: 3px; color: var(--green-700); font-size: 10px; font-weight: 800; }
.metric-trend.neutral { color: var(--ink-400); }
.metric-trend.negative { color: var(--red-700); }
.metric-value { margin-top: 13px; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.metric-label { margin-top: 6px; color: var(--ink-700); font-size: 11px; font-weight: 700; }
.metric-note { margin-top: 3px; color: var(--ink-400); font-size: 9px; line-height: 1.4; }

.home-page .metrics-grid { gap: 16px; }
.home-page .metric-card {
  --metric-accent: var(--blue-600);
  --metric-soft: var(--blue-100);
  position: relative;
  min-height: 150px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(150deg, #ffffff 0%, #ffffff 70%, var(--metric-soft) 155%);
  box-shadow: 0 7px 20px rgba(18, 38, 68, .07);
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.home-page .metric-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--metric-accent), color-mix(in srgb, var(--metric-accent) 35%, white));
  content: "";
}
.home-page .metric-card:hover { border-color: color-mix(in srgb, var(--metric-accent) 28%, var(--line)); box-shadow: 0 12px 28px rgba(18, 38, 68, .1); transform: translateY(-2px); }
.home-page .metric-card[data-tone="green"] { --metric-accent: var(--green-700); --metric-soft: var(--green-100); }
.home-page .metric-card[data-tone="orange"] { --metric-accent: var(--orange-700); --metric-soft: var(--orange-100); }
.home-page .metric-card[data-tone="purple"] { --metric-accent: var(--purple-700); --metric-soft: var(--purple-100); }
.home-page .metric-card[data-tone="red"] { --metric-accent: var(--red-700); --metric-soft: var(--red-100); }
.home-page .metric-icon { width: 42px; height: 42px; border: 1px solid color-mix(in srgb, var(--metric-accent) 12%, white); background: var(--metric-soft) !important; color: var(--metric-accent) !important; }
.home-page .metric-icon svg { width: 21px; height: 21px; }
.home-page .metric-trend { padding: 4px 7px; border-radius: 999px; background: var(--metric-soft); color: var(--metric-accent); font-size: 8px; letter-spacing: .025em; text-transform: uppercase; }
.home-page .metric-value { margin-top: 16px; color: var(--ink-950); font-size: 30px; }
.home-page .metric-label { margin-top: 7px; color: var(--ink-950); font-size: 12px; font-weight: 800; }
.home-page .metric-note { margin-top: 5px; color: var(--ink-500); }

.home-insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.home-insight-card {
  min-width: 0;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 7px 20px rgba(18, 38, 68, .06);
}
.insight-card-header { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.insight-card-header > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.insight-card-header > span:nth-child(2) small { color: var(--ink-400); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.insight-card-header > span:nth-child(2) strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.insight-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; }
.insight-icon svg { width: 19px; height: 19px; }
.insight-icon.blue { background: var(--blue-100); color: var(--blue-700); }
.insight-icon.orange { background: var(--orange-100); color: var(--orange-700); }
.insight-icon.purple { background: var(--purple-100); color: var(--purple-700); }
.insight-chip,
.sync-state { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 850; white-space: nowrap; }
.insight-chip.blue { background: var(--blue-100); color: var(--blue-700); }
.insight-chip.orange { background: var(--orange-100); color: var(--orange-700); }
.sync-state.warning { background: var(--orange-100); color: var(--orange-700); }
.sync-state.success { background: var(--green-100); color: var(--green-700); }
.sync-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(181, 71, 8, .1); }
.daily-summary-main { display: flex; align-items: center; gap: 14px; margin: 20px 0 17px; }
.daily-summary-main > span { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.daily-summary-main > span strong { font-size: 16px; }
.daily-summary-main > span small { color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.progress-ring { --progress: 0%; position: relative; width: 76px; height: 76px; flex: 0 0 76px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue-600) var(--progress), #e8eef6 0); }
.progress-ring::after { position: absolute; inset: 8px; border-radius: 50%; background: white; content: ""; }
.progress-ring strong { position: relative; z-index: 1; color: var(--blue-700); font-size: 16px; }
.summary-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: auto; }
.summary-mini-grid span { display: flex; flex-direction: column; gap: 3px; padding: 9px; border-radius: 9px; background: var(--surface-soft); }
.summary-mini-grid strong { font-size: 13px; }
.summary-mini-grid small { overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.critical-alert-list { display: grid; gap: 7px; margin: 17px 0 13px; }
.critical-alert-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.critical-alert-item > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 11px; font-weight: 850; }
.critical-alert-item strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.critical-alert-item small { color: var(--ink-400); font-size: 7px; white-space: nowrap; }
.critical-alert-item.orange > span { background: var(--orange-100); color: var(--orange-700); }
.critical-alert-item.red > span { background: var(--red-100); color: var(--red-700); }
.critical-alert-item.blue > span { background: var(--blue-100); color: var(--blue-700); }
.data-status-list { display: grid; gap: 8px; margin: 17px 0 13px; }
.data-status-list > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.data-status-list > span:last-child { border-bottom: 0; }
.data-status-list small { color: var(--ink-500); font-size: 8px; }
.data-status-list strong { color: var(--ink-700); font-size: 9px; text-align: right; }
.insight-link { min-height: 32px; display: inline-flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: auto; padding: 0; border: 0; background: transparent; color: var(--blue-700); cursor: pointer; font-size: 9px; font-weight: 850; text-align: left; }
.insight-link.purple { color: var(--purple-700); }
.insight-link svg { width: 14px; height: 14px; transition: transform 130ms ease; }
.insight-link:hover svg { transform: translateX(3px); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.82fr); gap: 16px; margin-bottom: 16px; }
.content-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid.wide-right { grid-template-columns: minmax(270px, 0.75fr) minmax(0, 1.7fr); }

.card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card.compact { padding: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.accent-blue { border-top: 3px solid var(--blue-600); }
.card.accent-green { border-top: 3px solid var(--green-700); }
.card.accent-orange { border-top: 3px solid #e88528; }
.card.accent-purple { border-top: 3px solid var(--purple-700); }

.card-header {
  min-height: 35px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-header h2,
.card-header h3 { margin: 0; font-size: 14px; letter-spacing: -0.015em; }
.card-header p { margin: 4px 0 0; color: var(--ink-500); font-size: 10px; line-height: 1.45; }
.card-header > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--ink-400); }
.card-link { border: 0; background: transparent; color: var(--blue-700); cursor: pointer; font-size: 10px; font-weight: 800; }
.card-link svg { width: 13px; height: 13px; }

.home-card { border-radius: 14px; box-shadow: 0 7px 20px rgba(18, 38, 68, .06); }
.home-quick-card { margin-bottom: 16px; }
.home-quick-card .quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-card-heading { min-height: 42px; align-items: center; justify-content: flex-start; }
.home-card-heading > div { min-width: 0; flex: 1; }
.home-card-heading .card-link { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
.home-heading-icon { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border-radius: 10px; }
.home-heading-icon svg { width: 18px; height: 18px; }
.home-heading-icon.blue { background: var(--blue-100); color: var(--blue-700); }
.home-heading-icon.green { background: var(--green-100); color: var(--green-700); }
.home-heading-icon.orange { background: var(--orange-100); color: var(--orange-700); }
.home-heading-icon.purple { background: var(--purple-100); color: var(--purple-700); }
.home-table-heading { padding: 18px 18px 0; }

.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.quick-action {
  --action-accent: var(--blue-700);
  --action-soft: var(--blue-100);
  min-height: 94px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-soft), white);
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.quick-action[data-tone="purple"] { --action-accent: var(--purple-700); --action-soft: var(--purple-100); }
.quick-action[data-tone="green"] { --action-accent: var(--green-700); --action-soft: var(--green-100); }
.quick-action[data-tone="orange"] { --action-accent: var(--orange-700); --action-soft: var(--orange-100); }
.quick-action:hover { border-color: color-mix(in srgb, var(--action-accent) 35%, var(--line)); box-shadow: 0 8px 18px rgba(18, 38, 68, .07); transform: translateY(-2px); }
.quick-action-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--action-soft); color: var(--action-accent); box-shadow: none; }
.quick-action-icon svg { width: 18px; height: 18px; }
.quick-action strong { display: block; color: var(--ink-950); font-size: 11px; }
.quick-action small { display: block; margin-top: 5px; color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.quick-action-arrow { display: grid; place-items: center; color: var(--action-accent); opacity: .58; transition: transform 140ms ease, opacity 140ms ease; }
.quick-action-arrow svg { width: 15px; height: 15px; }
.quick-action:hover .quick-action-arrow { opacity: 1; transform: translateX(3px); }

.pending-list,
.event-list,
.status-list,
.activity-feed { display: grid; }
.pending-row,
.event-row,
.status-row,
.activity-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.pending-row:first-child,
.event-row:first-child,
.status-row:first-child,
.activity-row:first-child { border-top: 0; }
.pending-count { width: 32px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; }
.pending-count.orange { background: var(--orange-100); color: var(--orange-700); }
.pending-count.red { background: var(--red-100); color: var(--red-700); }
.pending-count.blue { background: var(--blue-100); color: var(--blue-700); }
.home-page .pending-list { gap: 7px; }
.home-page .pending-row { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.home-page .pending-row:first-child { border-top: 1px solid var(--line); }
.pending-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.pending-copy strong { color: var(--ink-950); font-size: 10px; }
.pending-copy small { color: var(--ink-500); font-size: 8px; line-height: 1.4; }

.event-date { width: 43px; flex: 0 0 43px; display: flex; flex-direction: column; align-items: center; padding: 6px 3px; border-radius: 8px; background: var(--surface-soft); }
.event-date strong { font-size: 15px; line-height: 1; }
.event-date small { margin-top: 3px; color: var(--ink-500); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.event-info { min-width: 0; flex: 1; }
.event-info strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.event-info small { display: block; margin-top: 3px; overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.home-page .event-list { gap: 6px; }
.home-page .event-row { width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; transition: border-color 130ms ease, background 130ms ease, transform 130ms ease; }
.home-page .event-row:first-child { border-top: 1px solid transparent; }
.home-page .event-row:hover { border-color: var(--line); background: var(--surface-soft); transform: translateX(2px); }
.home-page .event-date { background: var(--blue-100); color: var(--blue-700); }
.home-page .event-date small { color: var(--blue-700); }
.home-page .event-info strong { color: var(--ink-950); font-size: 10px; }
.home-page .home-table-card .data-table thead { background: #f7f9fc; }
.home-page .home-table-card .data-table tbody tr { transition: background 120ms ease; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--ink-700);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.badge.blue { background: var(--blue-100); color: var(--blue-700); }
.badge.green { background: var(--green-100); color: var(--green-700); }
.badge.orange { background: var(--orange-100); color: var(--orange-700); }
.badge.red { background: var(--red-100); color: var(--red-700); }
.badge.purple { background: var(--purple-100); color: var(--purple-700); }
.badge.gray { background: #eef1f5; color: #667085; }

.table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.toolbar-filters { min-width: 0; display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.toolbar-search { position: relative; min-width: min(300px, 100%); }
.toolbar-search svg { position: absolute; top: 12px; left: 11px; width: 16px; color: var(--ink-400); pointer-events: none; }
.toolbar-search .input { padding-left: 35px; }
.table-actions { display: flex; gap: 7px; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; background: white; font-size: 10px; }
.data-table th {
  height: 40px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line-strong);
  background: #f7f9fc;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { height: 49px; padding: 8px 11px; border-top: 1px solid var(--line); color: var(--ink-700); vertical-align: middle; }
.data-table tr:first-child td { border-top: 0; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table .primary-cell { color: var(--ink-950); font-weight: 800; }
.data-table .muted-cell { color: var(--ink-500); }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-action { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--ink-500); cursor: pointer; }
.row-action:hover { background: var(--blue-100); color: var(--blue-700); }
.row-action.danger:hover { background: var(--red-100); color: var(--red-700); }
.row-action svg { width: 15px; height: 15px; }

.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; color: var(--ink-500); font-size: 10px; }

/* Programação Geral — área restrita */
.program-general-page { width: min(1700px, 100%); }
.program-general-hero {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) minmax(420px, auto);
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d6e0ed;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 5px 18px rgba(15, 35, 63, .06);
}
.program-general-back {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #2468da, #174fae);
  color: white;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 92, 211, .2);
}
.program-general-back:hover { background: linear-gradient(135deg, #1d5fcf, #123f91); }
.program-general-back svg { width: 18px; }
.program-general-back span { font-size: 10px; line-height: 1.35; }
.program-general-back strong { font-size: 12px; }
.program-general-title { min-width: 0; display: flex; align-items: center; gap: 13px; }
.program-general-title-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; border-radius: 12px; background: var(--blue-100); color: var(--blue-700); }
.program-general-title-icon svg { width: 22px; }
.program-general-title small { display: block; color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.program-general-title h1 { margin: 3px 0 2px; color: var(--navy-950); font-size: 24px; letter-spacing: -.035em; }
.program-general-title p { max-width: 520px; margin: 0; color: var(--ink-500); font-size: 11px; line-height: 1.45; }
.program-general-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.program-general-top-actions .button { min-height: 38px; padding-inline: 11px; font-size: 10px; }
.program-general-pending {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #a7ddc9;
  border-radius: 9px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.program-general-pending.has-pending { border-color: #f3c98f; background: var(--orange-100); color: var(--orange-700); }
.program-general-pending svg { width: 15px; }
.program-general-card { border: 1px solid #d6e0ed; border-radius: 15px; background: white; box-shadow: 0 5px 18px rgba(15, 35, 63, .055); overflow: hidden; }
.program-general-card-header { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.program-general-card-header > span:first-child { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 37px; border-radius: 10px; background: var(--blue-100); color: var(--blue-700); }
.program-general-card-header > span:first-child svg { width: 18px; }
.program-general-card-header h2 { margin: 0; color: var(--navy-900); font-size: 17px; letter-spacing: -.02em; text-transform: none; }
.program-general-card-header p { margin: 3px 0 0; color: var(--ink-500); font-size: 11px; }
.program-general-card-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.program-general-card-actions .button { min-height: 37px; padding-inline: 12px; font-size: 10px; }
.program-general-session { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: 10px; font-weight: 800; }
.program-general-session svg { width: 14px; }
.program-general-filter-panel { margin: 0 12px 12px; padding: 14px; border: 1px solid #dce5f1; border-radius: 12px; background: linear-gradient(135deg, #f8fbff, #f4f7fb); }
.program-general-filter-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr 1fr 1.1fr; gap: 11px; }
.program-general-filter-grid .filter-field { min-width: 0; gap: 6px; }
.program-general-filter-grid .filter-field > span:first-child { color: var(--ink-700); font-size: 10px; letter-spacing: .035em; }
.program-general-filter-grid .input,
.program-general-filter-grid .select { width: 100%; height: 42px; background-color: white; color: var(--ink-700); font-size: 12px; }
.program-search-filter { grid-column: span 2; }
.program-general-search { position: relative; display: block; }
.program-general-search svg { position: absolute; z-index: 1; top: 50%; left: 12px; width: 16px; color: var(--ink-400); transform: translateY(-50%); pointer-events: none; }
.program-general-search .input { padding-left: 37px; }
.program-general-filter-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #dce5f1; }
.program-general-legend { min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.program-general-legend > strong { margin-right: 3px; color: var(--ink-500); font-size: 11px; }
.program-row-legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink-700); font-size: 10px; font-weight: 800; }
.program-row-legend-item i { width: 10px; height: 10px; border-radius: 2px; }
.program-row-legend-item[data-program-tone="maintenance"] i { background: #57a982; }
.program-row-legend-item[data-program-tone="extra"] i { background: #eeb06f; }
.program-row-legend-item[data-program-tone="maneuver"] i { background: #7b8794; }
.program-row-legend-item[data-program-tone="lines"] i { background: #76529a; }
.program-row-legend-item[data-program-tone="services"] i { background: #65b9ad; }
.program-row-legend-item[data-program-tone="team"] i { background: #e2b52c; }
.program-row-legend-item[data-program-tone="justification"] i { background: #e18c93; }
.program-row-legend-item[data-program-tone="default"] i { background: #9fb1c7; }
.program-general-filter-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.program-general-table-scroll-top { width: 100%; height: 17px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--line); background: #f4f7fb; scrollbar-color: #7891ad #e6edf6; scrollbar-width: auto; }
.program-general-table-scroll-top[hidden] { display: none; }
.program-general-table-scroll-top > div { height: 1px; }
.program-general-table-scroll-top::-webkit-scrollbar { height: 14px; }
.program-general-table-scroll-top::-webkit-scrollbar-track { background: #e6edf6; }
.program-general-table-scroll-top::-webkit-scrollbar-thumb { border: 3px solid #e6edf6; border-radius: 999px; background: #7891ad; }
.program-general-table-wrap { width: 100%; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.program-general-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: #173a61; font-size: 10px; }
.program-general-table.is-compact { width: max-content; min-width: 0; margin-inline: auto; }
.program-general-table.is-compact th,
.program-general-table.is-compact td { text-align: center; }
.program-general-table.is-compact [data-program-column="team"],
.program-general-table.is-compact [data-program-column="observations"] { min-width: 170px; }
.program-general-table th { height: 36px; padding: 0 9px; border-right: 1px solid #cfdbeb; border-bottom: 1px solid #b8c9df; background: #e6f0ff; color: #003f82; font-size: 9px; font-weight: 850; letter-spacing: 0; text-align: center; white-space: nowrap; }
.program-general-table th i { margin-left: 3px; color: #075499; font-size: 9px; font-style: normal; }
.program-general-table th.program-column-header { padding: 0; }
.program-column-header > button { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: inherit; white-space: nowrap; }
.program-column-header > button:hover,
.program-column-header > button[aria-expanded="true"] { background: #d6e8ff; color: #00356e; }
.program-column-header.has-filter > button { background: #d8eaff; box-shadow: inset 0 -3px 0 #1466d3; }
.program-column-header > button b { min-width: 16px; height: 16px; display: inline-grid; place-items: center; padding: 0 4px; border-radius: 999px; background: #1466d3; color: white; font-size: 8px; }
.program-column-filter-popover { position: fixed; z-index: 1800; max-height: min(610px, calc(100vh - 24px)); display: flex; flex-direction: column; padding: 14px; border: 1px solid #bfd0e4; border-radius: 12px; background: white; color: #173a61; box-shadow: 0 20px 55px rgba(10, 40, 79, .24); }
.program-column-filter-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; color: #0b3f76; font-size: 12px; font-weight: 850; }
.program-column-filter-popover > header button { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: #eef4fb; color: #47637f; cursor: pointer; }
.program-column-filter-popover > header button:hover { background: #dfeafb; color: #084c94; }
.program-column-filter-popover > header svg { width: 14px; }
.program-column-filter-search { position: relative; display: block; }
.program-column-filter-search svg { position: absolute; top: 50%; left: 11px; width: 15px; color: #7890aa; transform: translateY(-50%); pointer-events: none; }
.program-column-filter-search input { width: 100%; height: 38px; padding: 0 11px 0 35px; border: 1px solid #c7d5e6; border-radius: 8px; outline: 0; background: #fff; color: #173a61; font: 600 11px/1 inherit; }
.program-column-filter-search input:focus { border-color: #1466d3; box-shadow: 0 0 0 3px rgba(20, 102, 211, .12); }
.program-column-filter-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 8px 0; }
.program-column-filter-tools button { min-height: 35px; padding: 0 9px; border: 1px solid #c6d5e8; border-radius: 8px; background: #fff; color: #064783; cursor: pointer; font-size: 10px; font-weight: 800; }
.program-column-filter-tools button:hover { border-color: #7da9df; background: #edf5ff; }
.program-column-filter-values { min-height: 105px; max-height: 285px; display: grid; align-content: start; gap: 2px; padding: 5px; border: 1px solid #c8d6e7; border-radius: 8px; overflow-y: auto; scrollbar-color: #7998bc #edf3f9; scrollbar-width: thin; }
.program-column-filter-values label { min-width: 0; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 7px; padding: 5px 6px; border-radius: 5px; cursor: pointer; font-size: 10px; }
.program-column-filter-values label:hover { background: #edf5ff; }
.program-column-filter-values label[hidden] { display: none; }
.program-column-filter-values input { width: 14px; height: 14px; margin: 0; accent-color: #1466d3; }
.program-column-filter-values span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.program-column-filter-empty { margin: auto; color: #71859c; font-size: 10px; text-align: center; }
.program-column-filter-count { margin: 7px 0 8px; color: #627991; font-size: 9px; }
.program-column-filter-popover > footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.program-column-filter-popover > footer .button { min-height: 38px; justify-content: center; }
.program-general-table .program-column-filter-row th { height: 38px; padding: 4px 6px; background: #f3f7fc; }
.program-general-table .program-column-filter-cell input { width: 100%; min-width: 76px; height: 28px; padding: 0 8px; border: 1px solid #bdcde0; border-radius: 6px; outline: 0; background: white; color: #173a61; font: inherit; font-weight: 650; }
.program-general-table .program-column-filter-cell input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(20, 102, 211, .14); }
.program-general-table .program-column-filter-cell input::placeholder { color: #71859c; }
.program-general-table .program-column-filter-cell.is-empty { background: #edf3fb; }
.program-general-table td { height: 30px; max-width: 250px; padding: 5px 8px; border-top: 1px solid #d2dfed; border-right: 1px solid #e2eaf3; background: var(--program-row-bg, #fff); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.program-general-table tbody tr:first-child td { border-top: 0; }
.program-general-table tbody tr:hover td { filter: brightness(.975); }
.program-general-table tbody tr.program-row-maintenance { --program-row-bg: #d6eee2; }
.program-general-table tbody tr.program-row-extra { --program-row-bg: #fae2c8; }
.program-general-table tbody tr.program-row-maneuver { --program-row-bg: #dfe3e7; }
.program-general-table tbody tr.program-row-lines { --program-row-bg: #e7daf2; }
.program-general-table tbody tr.program-row-services { --program-row-bg: #d6eeea; }
.program-general-table tbody tr.program-row-team { --program-row-bg: #fff0b8; }
.program-general-table tbody tr.program-row-justification { --program-row-bg: #f5d7da; }
.program-general-table tbody tr.program-row-default { --program-row-bg: #e0e9f2; }
.program-general-table [data-program-column="select"] { position: sticky; left: 0; z-index: 2; width: 38px; min-width: 38px; max-width: 38px; text-align: center; }
.program-general-table th[data-program-column="select"] { z-index: 3; background: #eaf2ff; }
.program-general-table [data-program-column="edit"] { position: sticky; left: 0; z-index: 2; width: 72px; min-width: 72px; max-width: 72px; text-align: center; }
.program-general-table.has-select-column [data-program-column="edit"] { left: 38px; }
.program-general-table th[data-program-column="edit"] { z-index: 3; background: #eaf2ff; }
.program-general-table [data-program-column="base"] { min-width: 120px; }
.program-general-table [data-program-column="activityType"] { min-width: 190px; }
.program-general-table [data-program-column="equipment"] { min-width: 150px; }
.program-general-table [data-program-column="denomination"] { min-width: 190px; }
.program-general-table [data-program-column="location"] { min-width: 155px; }
.program-general-table [data-program-column="status"] { min-width: 110px; }
.program-general-table [data-program-column="programmedDate"] { min-width: 125px; }
.program-general-table [data-program-column="document"] { min-width: 120px; }
.program-general-table [data-program-column="note"] { min-width: 95px; }
.program-general-table [data-program-column="team"],
.program-general-table [data-program-column="observations"] { min-width: 230px; }
.program-general-table [data-program-column="plannedDate"],
.program-general-table [data-program-column="completionDate"] { min-width: 130px; }
.program-general-table .primary-cell { color: var(--ink-950); font-weight: 800; }
.program-general-description strong { display: block; color: var(--ink-950); font-size: 12px; }
.program-general-description small,
.program-general-time { display: block; margin-top: 4px; color: var(--ink-500); font-size: 10px; }
.program-general-select input,
.program-select-column input { width: 13px; height: 13px; margin: 0; accent-color: var(--blue-700); }
.program-edit-button { min-width: 56px; padding: 4px 9px; border: 1px solid #9eb1c8; border-radius: 2px; background: linear-gradient(#fff, #eef2f6); color: #003f82; cursor: pointer; font-size: 9px; font-weight: 750; }
.program-edit-button:hover { border-color: #4b79b3; background: #e7f0fb; }
.program-delete-button { min-width: 56px; padding: 4px 9px; border: 1px solid #e4a7a3; border-radius: 2px; background: linear-gradient(#fff, #fff0ef); color: var(--red-700); cursor: pointer; font-size: 9px; font-weight: 750; }
.program-delete-button:hover { border-color: var(--red-700); background: var(--red-100); }
.program-status-text { color: #234c70; font-weight: 650; }
.program-row-readonly { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--blue-100); color: var(--blue-700); }
.program-row-readonly svg { width: 15px; }
.program-viewer-readonly { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid #b8cfee; border-radius: 9px; background: var(--blue-100); color: var(--blue-700); font-size: 10px; font-weight: 850; }
.program-viewer-readonly svg { width: 15px; }
.program-viewer-search { display: flex; align-items: center; gap: 9px; margin: 0 12px 12px; padding: 12px 14px; border: 1px solid #dce5f1; border-radius: 12px; background: linear-gradient(135deg, #f8fbff, #f4f7fb); }
.program-viewer-search > span { color: var(--blue-700); }
.program-viewer-search > span svg { width: 18px; }
.program-viewer-search .input { min-width: 0; flex: 1; background: white; }
.program-viewer-filter-note { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-500); font-size: 10px; line-height: 1.45; }
.program-viewer-filter-note svg { width: 15px; flex: 0 0 15px; color: var(--blue-700); }
.program-viewer-table { min-width: 1620px; }
.program-viewer-table th:first-child,
.program-viewer-table td:first-child { width: auto; text-align: left; }
.program-viewer-table td:last-child { text-align: center; }
.jse-viewer-table { min-width: 1900px; }
.jse-viewer-table th:nth-child(1) { min-width: 190px; }
.jse-viewer-table th:nth-child(2) { min-width: 140px; }
.jse-viewer-table th:nth-child(3) { min-width: 190px; }
.jse-viewer-table th:nth-child(4) { min-width: 130px; }
.jse-viewer-table th:nth-child(5) { min-width: 180px; }
.jse-viewer-table th:nth-child(6),
.jse-viewer-table th:nth-child(7),
.jse-viewer-table th:nth-child(8) { min-width: 300px; }
.jse-viewer-table td { height: auto; min-height: 46px; max-width: 360px; padding: 10px 12px; line-height: 1.45; vertical-align: top; white-space: normal; }
.jse-viewer-table .jse-text-cell { color: var(--ink-700); }
.jse-viewer-table .jse-text-cell strong { color: var(--ink-950); font-weight: 800; }
.program-general-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 12px 16px; color: var(--ink-500); font-size: 10px; }
.program-general-table-footer span { display: inline-flex; align-items: center; gap: 7px; }
.program-general-table-footer svg { width: 14px; color: var(--blue-700); }
.program-general-pagination { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.program-general-pagination strong { color: var(--ink-700); font-size: 9px; white-space: nowrap; }
.program-general-pagination .button { min-height: 31px; padding-inline: 9px; font-size: 8px; }

.program-column-picker-toolbar { display: flex; justify-content: flex-end; gap: 7px; margin-bottom: 11px; }
.program-column-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.program-column-picker label { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-700); cursor: pointer; font-size: 11px; font-weight: 750; }
.program-column-picker label:nth-child(2n) { border-right: 0; }
.program-column-picker label:hover { background: var(--blue-50, #f4f8ff); }
.program-column-picker input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue-700); }

.djt-quest-hero { min-height: 220px; display: flex; align-items: center; gap: 22px; padding: clamp(24px, 4vw, 44px); border: 1px solid #bdd3f0; border-radius: 18px; background: radial-gradient(circle at 88% 20%, rgba(75, 143, 232, .18), transparent 28%), linear-gradient(135deg, #fff, #edf5ff); box-shadow: var(--shadow-sm); }
.djt-quest-icon { width: 78px; height: 78px; display: grid; place-items: center; flex: 0 0 78px; border-radius: 22px; background: linear-gradient(135deg, #175cd3, #0b3b72); color: white; box-shadow: 0 15px 32px rgba(23, 92, 211, .25); }
.djt-quest-icon svg { width: 38px; height: 38px; }
.djt-quest-copy { flex: 1; }
.djt-quest-copy small { color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.djt-quest-copy h2 { margin: 7px 0 6px; color: var(--navy-950); font-size: clamp(22px, 3vw, 34px); letter-spacing: -.04em; }
.djt-quest-copy p { max-width: 620px; margin: 0; color: var(--ink-500); font-size: 12px; line-height: 1.65; }
.djt-quest-action { flex: 0 0 auto; text-decoration: none; }

.program-module-restricted { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; padding: 3px 6px; border-radius: 999px; background: var(--orange-100); color: var(--orange-700); font-size: 8px; font-style: normal; font-weight: 850; vertical-align: middle; }
.program-module-restricted svg { width: 10px; height: 10px; }
.program-module-readonly { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; padding: 3px 6px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 8px; font-style: normal; font-weight: 850; vertical-align: middle; }
.program-module-readonly svg { width: 10px; height: 10px; }

.restricted-access { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid #d9e6f7; border-radius: 12px; background: linear-gradient(135deg, #f5f9ff, #eef4fd); }
.restricted-access-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; border-radius: 12px; background: var(--blue-700); color: white; box-shadow: 0 8px 20px rgba(23, 92, 211, .2); }
.restricted-access-icon svg { width: 22px; }
.restricted-access-copy strong { color: var(--navy-900); font-size: 14px; }
.restricted-access-copy p { margin: 4px 0 0; color: var(--ink-500); font-size: 11px; line-height: 1.5; }
.restricted-access-form { display: grid; gap: 11px; margin-top: 16px; }
.restricted-access-form .input { height: 46px; font-size: 14px; }
.restricted-access-error { margin: 0; padding: 10px 11px; border-radius: 9px; background: var(--red-100); color: var(--red-700); font-size: 11px; font-weight: 750; }
.restricted-access-note { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.restricted-access-note svg { width: 15px; flex: 0 0 15px; color: var(--green-700); }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
}
.module-card .module-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-100); color: var(--blue-700); }
.module-card .module-icon.green { background: var(--green-100); color: var(--green-700); }
.module-card .module-icon.orange { background: var(--orange-100); color: var(--orange-700); }
.module-card .module-icon.purple { background: var(--purple-100); color: var(--purple-700); }
.module-card .module-icon.red { background: var(--red-100); color: var(--red-700); }
.module-card .module-icon.cyan { background: var(--cyan-100); color: var(--cyan-600); }
.module-card .module-icon svg { width: 21px; height: 21px; }
.module-card h3 { margin: 14px 0 5px; font-size: 14px; }
.module-card p { flex: 1; margin: 0 0 14px; color: var(--ink-500); font-size: 10px; line-height: 1.55; }
.module-card .button { align-self: flex-start; }

/* Programação: painel decisório */
.programming-page .page-heading { margin-bottom: 18px; }
.programming-page .page-heading h1 { font-size: 31px; }
.database-sync-card {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-700);
  border-radius: 15px;
  background: white;
  box-shadow: 0 7px 24px rgba(15, 35, 63, .055);
  overflow: hidden;
}
.database-sync-card.has-errors { border-left-color: var(--orange-700); }
.database-sync-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fbfdff, #f4f8fd);
}
.database-sync-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-700); }
.database-sync-card.has-errors .database-sync-icon { background: var(--orange-100); color: var(--orange-700); }
.database-sync-icon svg { width: 20px; height: 20px; }
.database-sync-title { min-width: 0; display: grid; gap: 3px; }
.database-sync-title > small { color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.database-sync-title h2 { margin: 0; color: var(--navy-900); font-size: 17px; letter-spacing: -.015em; }
.database-sync-title p { margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.4; }
.database-sync-summary { min-width: 82px; display: grid; justify-items: center; gap: 1px; padding: 8px 11px; border: 1px solid #b9e4d4; border-radius: 10px; background: var(--green-100); color: var(--green-700); }
.database-sync-card.has-errors .database-sync-summary { border-color: #f0d0a4; background: var(--orange-100); color: var(--orange-700); }
.database-sync-summary strong { font-size: 18px; line-height: 1; }
.database-sync-summary small { font-size: 8px; font-weight: 800; text-transform: uppercase; }
.database-sync-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
.database-sync-source { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.database-sync-source.has-error { border-color: #f0caa0; background: #fffaf2; }
.database-sync-dot { width: 9px; height: 9px; align-self: start; margin-top: 3px; border-radius: 50%; background: var(--green-700); box-shadow: 0 0 0 4px rgba(20, 143, 101, .1); }
.database-sync-source.has-error .database-sync-dot { background: var(--orange-700); box-shadow: 0 0 0 4px rgba(217, 107, 8, .1); }
.database-sync-copy { min-width: 0; display: grid; gap: 2px; }
.database-sync-copy strong { overflow: hidden; color: var(--ink-950); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.database-sync-copy small { overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.database-sync-copy em { overflow: hidden; color: var(--green-700); font-size: 8px; font-style: normal; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.database-sync-source.has-error .database-sync-copy em { color: var(--orange-700); }
.database-sync-count { display: grid; justify-items: end; gap: 1px; }
.database-sync-count strong { color: var(--navy-900); font-size: 13px; }
.database-sync-count small { color: var(--ink-400); font-size: 7px; text-transform: uppercase; }
.database-sync-empty { grid-column: 1 / -1; min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--blue-700); }
.database-sync-empty > svg { width: 19px; animation: coordinator-spin 900ms linear infinite; }
.database-sync-empty > span { display: grid; gap: 3px; }
.database-sync-empty strong { font-size: 11px; }
.database-sync-empty small { color: var(--ink-500); font-size: 9px; }
.database-sync-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 15px; border-top: 1px solid var(--line); background: #fbfcfe; color: var(--ink-500); font-size: 9px; }
.database-sync-card > footer span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--green-700); font-weight: 800; }
.database-sync-card.has-errors > footer span:first-child { color: var(--orange-700); }
.database-sync-card > footer svg { width: 14px; height: 14px; }
.program-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 16px;
}
.decision-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 7px 24px rgba(15, 35, 63, .055);
}
.decision-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.decision-kicker {
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.decision-panel-top h2 { margin: 6px 0 5px; font-size: 20px; letter-spacing: -.025em; }
.decision-panel-top p { margin: 0; color: var(--ink-500); font-size: 12px; line-height: 1.5; }
.decision-period {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #dce8f8;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff, #eff5fd);
  color: var(--blue-700);
}
.decision-period > svg { width: 18px; flex: 0 0 18px; }
.decision-period > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.decision-period small { color: var(--ink-500); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.decision-period strong { overflow: hidden; color: var(--navy-900); font-size: 12px; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.program-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(96px, .55fr) minmax(150px, .9fr) auto;
  align-items: end;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #f2f6fc 100%);
}
.program-filter-field { min-width: 0; display: grid; gap: 6px; }
.program-filter-field > span { color: var(--ink-700); font-size: 10px; font-weight: 800; }
.program-filter-field .select { width: 100%; background-color: white; }
.program-filter-action { height: 38px; white-space: nowrap; }
.program-demand-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  margin-top: 14px;
  padding: 34px;
  border: 1px dashed #c7d8ed;
  border-radius: 14px;
  background: #f8fbff;
  color: var(--blue-700);
  text-align: center;
}
.program-demand-empty > svg { width: 30px; height: 30px; }
.program-demand-empty > span { display: grid; gap: 6px; }
.program-demand-empty strong { color: var(--navy-900); font-size: 15px; }
.program-demand-empty small { color: var(--ink-500); font-size: 11px; line-height: 1.5; }
.decision-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 11px;
  color: var(--ink-500);
  font-size: 10px;
}
.decision-context > span { display: inline-flex; align-items: center; gap: 5px; }
.decision-context svg { width: 14px; color: var(--blue-700); }
.decision-context strong { color: var(--ink-700); }
.decision-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.decision-kpi {
  --kpi-accent: var(--blue-700);
  --kpi-soft: var(--blue-100);
  position: relative;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(155deg, white 55%, var(--kpi-soft) 155%);
  overflow: hidden;
}
.decision-kpi::before { position: absolute; inset: 0 0 auto; height: 3px; background: var(--kpi-accent); content: ""; }
.decision-kpi.green { --kpi-accent: var(--green-700); --kpi-soft: var(--green-100); }
.decision-kpi.purple { --kpi-accent: var(--purple-700); --kpi-soft: var(--purple-100); }
.decision-kpi.orange { --kpi-accent: var(--orange-700); --kpi-soft: var(--orange-100); }
.decision-kpi-icon { position: absolute; top: 12px; right: 12px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--kpi-soft); color: var(--kpi-accent); }
.decision-kpi-icon svg { width: 15px; }
.decision-kpi-value { margin-top: 4px; color: var(--navy-900); font-size: 29px; font-weight: 850; letter-spacing: -.045em; }
.decision-kpi > strong { margin-top: 5px; color: var(--ink-950); font-size: 12px; }
.decision-kpi > small { margin-top: 5px; color: var(--ink-500); font-size: 10px; line-height: 1.4; }
.program-section { margin-top: 20px; }
.program-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.program-section-heading span { color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.program-section-heading h3 { margin: 4px 0 0; font-size: 15px; }
.program-section-heading > small { color: var(--ink-500); font-size: 10px; }
.program-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.program-type-card {
  --type-accent: var(--blue-700);
  --type-soft: var(--blue-100);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.program-type-card:hover { border-color: var(--type-accent); box-shadow: 0 7px 18px rgba(15, 35, 63, .07); transform: translateY(-2px); }
.program-type-card.orange { --type-accent: #d96b08; --type-soft: var(--orange-100); }
.program-type-card.purple { --type-accent: var(--purple-700); --type-soft: var(--purple-100); }
.program-type-card.cyan { --type-accent: var(--cyan-600); --type-soft: var(--cyan-100); }
.program-type-card.green { --type-accent: var(--green-700); --type-soft: var(--green-100); }
.program-type-card.navy { --type-accent: var(--navy-800); --type-soft: #e9eef5; }
.program-type-card.gray { --type-accent: #667085; --type-soft: #eef1f4; }
.program-type-card.blue { --type-accent: var(--blue-700); --type-soft: var(--blue-100); }
.program-type-top { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.program-type-top strong { overflow: hidden; color: var(--ink-700); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.program-type-top b { padding: 4px 6px; border-radius: 999px; background: var(--type-soft); color: var(--type-accent); font-size: 9px; }
.program-type-value { display: block; margin-top: 10px; color: var(--type-accent); font-size: 23px; font-weight: 850; line-height: 1; }
.program-type-card > small { display: block; margin-top: 5px; color: var(--ink-500); font-size: 9px; }
.program-type-meter { height: 4px; display: block; margin-top: 10px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.program-type-meter i { height: 100%; display: block; border-radius: inherit; background: var(--type-accent); }
.program-count-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 35, 63, .045);
}
.program-count-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.program-count-heading > span:last-child { min-width: 0; }
.program-count-heading h3 { margin: 0; color: var(--navy-900); font-size: 17px; letter-spacing: -.015em; }
.program-count-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: 12px; text-transform: capitalize; }
.program-count-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 10px; background: var(--blue-100); color: var(--blue-700); }
.program-count-icon svg { width: 18px; }
.program-count-search { position: relative; display: block; margin-bottom: 10px; }
.program-count-search > span { position: absolute; z-index: 1; top: 50%; left: 12px; color: var(--ink-400); transform: translateY(-50%); pointer-events: none; }
.program-count-search svg { width: 17px; }
.program-count-search .input { height: 44px; padding-left: 39px; font-size: 13px; }
.program-count-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 10px; }
.program-count-table { width: 100%; min-width: 1080px; border-collapse: collapse; background: white; color: var(--ink-700); font-size: 12px; }
.program-count-table th {
  min-width: 92px;
  padding: 11px 10px;
  border-left: 1px solid #aebbd0;
  border-bottom: 1px solid #8ea1bd;
  background: #eaf2ff;
  color: #0b3b72;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}
.program-count-table th:first-child { min-width: 210px; border-left: 0; text-align: left; }
.program-count-table td { height: 48px; padding: 10px 11px; border-top: 1px solid var(--line); text-align: center; }
.program-count-table tbody tr:first-child td { border-top: 0; }
.program-count-table tbody tr:hover { background: #f8fbff; }
.program-count-table td:first-child { text-align: left; }
.program-count-type { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-950); font-size: 12px; font-weight: 700; white-space: nowrap; }
.program-count-type i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--blue-600); }
.program-count-type.orange i { background: #e88824; }
.program-count-type.purple i { background: #7a5af8; }
.program-count-type.cyan i { background: #14a1b8; }
.program-count-type.green i { background: #13a376; }
.program-count-type.navy i { background: #27466c; }
.program-count-percent { color: var(--blue-700); font-size: 11px; }
.program-count-empty { padding: 25px !important; color: var(--ink-500); font-size: 12px; text-align: center !important; }
.program-module-rail {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 7px 24px rgba(15, 35, 63, .055);
}
.program-module-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 12px; }
.program-module-heading small { color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.program-module-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.02em; }
.program-module-heading > i { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-100); color: var(--blue-700); font-size: 11px; font-style: normal; font-weight: 850; }
.program-module-list { display: grid; gap: 8px; }
.program-module-link {
  --module-accent: var(--blue-700);
  --module-soft: var(--blue-100);
  width: 100%;
  min-height: 94px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(135deg, #fff 65%, var(--module-soft) 150%);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.program-module-link:hover { border-color: var(--module-accent); box-shadow: 0 8px 20px rgba(15, 35, 63, .09); transform: translateX(-2px); }
.program-module-link:focus-visible { outline: 3px solid rgba(36, 116, 229, .18); outline-offset: 2px; }
.program-module-link.green { --module-accent: var(--green-700); --module-soft: var(--green-100); }
.program-module-link.orange { --module-accent: var(--orange-700); --module-soft: var(--orange-100); }
.program-module-link.purple { --module-accent: var(--purple-700); --module-soft: var(--purple-100); }
.program-module-link.cyan { --module-accent: var(--cyan-600); --module-soft: var(--cyan-100); }
.program-module-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--module-soft); color: var(--module-accent); }
.program-module-icon svg { width: 18px; }
.program-module-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.program-module-copy strong { color: var(--ink-950); font-size: 12px; }
.program-module-copy small { color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.program-module-arrow { color: var(--ink-400); transition: color 140ms ease, transform 140ms ease; }
.program-module-arrow svg { width: 15px; }
.program-module-link:hover .program-module-arrow { color: var(--module-accent); transform: translateX(2px); }

.dashboard-directory-page .page-heading { margin-bottom: 16px; }
.dashboard-directory-page .eyebrow { display: none; }
.dashboard-directory-page .page-heading h1 { font-size: 30px; }
.dashboard-directory-page .page-heading p { margin-top: 4px; }
.dashboard-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-link-card {
  --card-accent: #2e61d2;
  --card-soft: #edf3ff;
  position: relative;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px 19px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(155deg, #ffffff 0%, #ffffff 68%, var(--card-soft) 145%);
  color: var(--ink-950);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 35, 63, .055);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.dashboard-link-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 38%, white));
  content: "";
}
.dashboard-link-card:hover {
  z-index: 1;
  border-color: color-mix(in srgb, var(--card-accent) 46%, #d5deea);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--card-accent) 15%, transparent);
  transform: translateY(-4px);
}
.dashboard-link-card:focus-visible { outline: 3px solid rgba(46, 97, 210, .22); outline-offset: 2px; }
.dashboard-link-card[data-tone="green"] { --card-accent: #009f72; --card-soft: #e7f8f2; }
.dashboard-link-card[data-tone="orange"] { --card-accent: #ef9300; --card-soft: #fff5df; }
.dashboard-link-card[data-tone="purple"] { --card-accent: #7c3aed; --card-soft: #f3edff; }
.dashboard-link-card[data-tone="red"] { --card-accent: #e12d39; --card-soft: #ffedef; }
.dashboard-link-card[data-tone="teal"] { --card-accent: #00a4a0; --card-soft: #e7f8f8; }
.dashboard-link-card[data-tone="navy"] { --card-accent: #0b3b72; --card-soft: #eaf1f8; }
.dashboard-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 16%, white);
  border-radius: 12px;
  background: var(--card-soft);
  color: var(--card-accent);
}
.dashboard-card-icon svg { width: 22px; height: 22px; }
.dashboard-card-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 6px; padding-top: 15px; }
.dashboard-card-copy strong { font-size: 15px; line-height: 1.2; letter-spacing: -.015em; }
.dashboard-card-copy small { color: #51698f; font-size: 10px; font-weight: 650; line-height: 1.45; }
.dashboard-card-open {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink-400);
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}
.dashboard-card-open svg { width: 15px; height: 15px; }
.dashboard-link-card:hover .dashboard-card-open,
.dashboard-link-card:focus-visible .dashboard-card-open { background: var(--card-soft); color: var(--card-accent); transform: translate(2px, -2px); }
.dashboard-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
  color: var(--card-accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.dashboard-card-action svg { width: 14px; height: 14px; transition: transform 140ms ease; }
.dashboard-link-card:hover .dashboard-card-action svg { transform: translateX(3px); }

/* Orçamento — Hub e Acompanhamento MSO */
.budget-hub-page,
.mso-page { max-width: 1680px; }
.budget-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.budget-module-card {
  position: relative;
  min-height: 205px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 0%, #fff 68%, var(--budget-soft) 150%);
  color: var(--ink-950);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(18, 49, 87, .08);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.budget-module-card::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--budget-accent); content: ""; }
.budget-module-card.mso { --budget-accent: #00656c; --budget-soft: #e5f6f5; }
.budget-module-card.me { --budget-accent: #7048b8; --budget-soft: #f0ecfb; }
.budget-module-card.pafe { --budget-accent: #7146c6; --budget-soft: #f1edfb; }
.budget-module-card:hover { border-color: color-mix(in srgb, var(--budget-accent) 42%, var(--line)); box-shadow: 0 16px 34px color-mix(in srgb, var(--budget-accent) 15%, transparent); transform: translateY(-3px); }
.budget-module-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--budget-soft); color: var(--budget-accent); }
.budget-module-icon svg { width: 26px; height: 26px; }
.budget-module-copy { min-width: 0; display: grid; gap: 5px; }
.budget-module-copy small { color: var(--budget-accent); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.budget-module-copy strong { color: var(--ink-950); font-size: 27px; line-height: 1.1; }
.budget-module-copy p { max-width: 470px; margin: 4px 0 0; color: var(--ink-500); font-size: 11px; line-height: 1.55; }
.budget-module-status { grid-column: 2; width: fit-content; margin-top: 10px; padding: 6px 9px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.budget-module-status.available { background: #dff6ed; color: #087b5c; }
.budget-module-status.soon { background: #fff1d7; color: #a05c00; }
.budget-module-arrow { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--budget-soft); color: var(--budget-accent); }
.budget-module-arrow svg { width: 17px; }

.mso-dashboard {
  --mso-dark: #00363c;
  --mso-dark-2: #08484e;
  --mso-muted: #647b7e;
  --mso-soft: #e8ecec;
  border: 1px solid #ccd6d8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(4, 46, 54, .13);
  overflow: hidden;
}
.mso-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) auto minmax(150px, .45fr) minmax(270px, .9fr);
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  background: var(--mso-dark);
  color: white;
}
.mso-title { display: flex; align-items: center; gap: 13px; }
.mso-title > span { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .11); }
.mso-title > span svg { width: 24px; }
.mso-title small { display: block; margin-bottom: 2px; color: #96d9d5; font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.mso-title h1 { margin: 0; color: white; font-size: clamp(21px, 2vw, 30px); line-height: 1.1; letter-spacing: -.025em; }
.mso-management-button { min-height: 42px; padding: 0 22px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: white; font: 800 10px/1 inherit; cursor: pointer; }
.mso-month { display: grid; gap: 3px; }
.mso-month > span { font-size: 11px; font-weight: 850; }
.mso-month select { min-height: 31px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .7); background: var(--mso-dark); color: white; font: 700 10px/1 inherit; }
.mso-brands { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.mso-brands span { display: grid; gap: 2px; min-width: 112px; }
.mso-brands i,
.mso-company-columns footer i { width: 48px; height: 5px; display: block; border-radius: 999px; background: linear-gradient(165deg, #ef3c2f 0 38%, #f1c300 39% 62%, #3aa956 63%); transform: skewX(-24deg); }
.mso-brands strong { color: white; font-size: 12px; line-height: 1.15; white-space: nowrap; }
.mso-navigation { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; background: #f8f9f9; }
.mso-navigation nav { min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(115px, 1fr)); border-radius: 999px; background: var(--mso-muted); overflow: hidden; }
.mso-navigation nav button { min-height: 43px; padding: 0 12px; border: 0; background: transparent; color: white; font: 800 9px/1 inherit; cursor: pointer; }
.mso-navigation nav button.active { background: rgba(0, 54, 60, .22); }
.mso-year { min-height: 43px; display: inline-flex; align-items: center; gap: 11px; padding: 0 18px; border: 0; border-radius: 999px; background: #aeb3b4; color: white; font: inherit; cursor: pointer; }
.mso-year svg { width: 25px; height: 25px; padding: 4px; border: 2px solid #5b6263; border-radius: 50%; color: #5b6263; }
.mso-year strong { font-size: 15px; }
.mso-layout { display: grid; grid-template-columns: minmax(0, 1fr) 225px; align-items: stretch; gap: 14px; padding: 0 8px 8px; }
.mso-main { min-width: 0; }
.mso-kpis { display: grid; grid-template-columns: 1fr .9fr 1.4fr 1.4fr .85fr; gap: 10px; margin-top: 5px; }
.mso-kpis article { min-height: 68px; display: grid; align-content: center; gap: 6px; padding: 9px 12px; border: 1px solid #e3e7e8; background: #fff; box-shadow: 5px 6px 12px rgba(28, 49, 55, .2); }
.mso-kpis article > small { color: #111d21; font-size: 14px; line-height: 1; }
.mso-kpis article > small svg { width: 13px; margin-left: 4px; color: #e39b00; }
.mso-kpis article > strong { padding-left: 8px; border-left: 2px solid #b8bcbc; color: #343b3d; font-size: 11px; font-weight: 500; }
.mso-kpis article > strong b { margin-left: 25px; font-size: 10px; }
.mso-kpis .mso-execution { display: flex; align-items: center; gap: 10px; }
.mso-execution > span:last-child { display: grid; gap: 2px; }
.mso-execution strong { color: #202527; font-size: 19px; }
.mso-execution small { color: #202527; font-size: 8px; font-weight: 750; }
.mso-pie { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: conic-gradient(#000 0 78.55%, #efefef 78.55% 100%); }
.mso-budget-chart { padding: 10px 10px 13px; }
.mso-budget-chart h2 { margin: 0; color: #11191b; font-size: 14px; }
.mso-budget-chart h2 span { font-weight: 600; }
.mso-budget-chart header p { display: flex; align-items: center; gap: 5px; margin: 10px 0 14px; color: #555f61; font-size: 8px; }
.mso-budget-chart header p i { width: 8px; height: 8px; border-radius: 50%; background: #e2e4e4; }
.mso-budget-chart header p i.realized { background: var(--mso-dark); }
.mso-progress-list { display: grid; gap: 8px; }
.mso-progress-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 9px; }
.mso-progress-row > strong { color: #666f71; font-size: 8px; font-weight: 600; text-align: right; }
.mso-progress-track { height: 26px; display: flex; overflow: hidden; background: #e1e3e3; }
.mso-progress-realized,
.mso-progress-available { min-width: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; }
.mso-progress-realized { background: var(--mso-dark); color: white; }
.mso-progress-available { flex: 1; color: #151a1c; }
.mso-progress-track b { overflow: hidden; font-size: 8px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.mso-detail-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); align-items: end; gap: 18px; padding: 14px 10px 10px; }
.mso-company-columns { min-height: 245px; display: grid; grid-template-columns: repeat(2, 1fr); align-items: end; gap: 25px; padding: 0 18px; }
.mso-company-columns article { height: 230px; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; }
.mso-company-available { min-height: 48px; display: grid; place-items: center; align-content: center; background: #e6e7e7; color: #13191b; font-size: 8px; line-height: 1.25; }
.mso-company-used { min-height: 90px; display: grid; place-items: center; padding: 8px; background: var(--mso-dark); color: white; font-size: 8px; line-height: 1.3; }
.mso-company-columns footer { display: grid; place-items: center; gap: 3px; min-height: 32px; color: #1195c4; font-size: 8px; font-weight: 800; }
.mso-company-columns footer i { width: 40px; height: 3px; }
.mso-table-wrap { min-width: 0; overflow: auto; }
.mso-table { width: 100%; min-width: 720px; border-collapse: collapse; color: #283337; font-size: 8px; }
.mso-table th { padding: 8px 5px; border-right: 1px solid white; background: var(--mso-dark); color: white; font-size: 9px; font-weight: 650; text-align: center; }
.mso-table th svg { width: 10px; color: #efb71f; }
.mso-table td { padding: 3px 5px; border-right: 1px solid white; background: #f7f7f7; text-align: right; white-space: nowrap; }
.mso-table tbody tr:nth-child(even) td { background: #e5e6e6; }
.mso-table td:first-child { text-align: left; }
.mso-table tr.total td { border-top: 1px solid #1e9cca; background: #fff; font-weight: 850; }
.mso-table td:nth-last-child(-n+2) { text-align: center; }
.mso-status-dot { width: 12px; height: 12px; display: inline-block; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .18); }
.mso-status-dot.green { background: linear-gradient(#72e7b6, #16b878); }
.mso-status-dot.red { background: linear-gradient(#ff7488, #d91e46); }
.mso-status-dot.yellow { background: linear-gradient(#ffd45f, #e4a50c); }
.mso-filters { display: flex; flex-direction: column; gap: 12px; padding: 18px 14px 12px; border-radius: 34px 34px 30px 30px; background: #b2b7b8; }
.mso-filters > header { display: grid; gap: 2px; color: var(--mso-dark); }
.mso-filters > header span { font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mso-filters > header strong { font-size: 16px; }
.mso-filter { display: grid; gap: 5px; }
.mso-filter > span { color: var(--mso-dark); font-size: 12px; font-weight: 700; }
.mso-filter .select { min-height: 28px; padding: 0 8px; border: 0; border-radius: 0; background: var(--mso-dark); color: white; font-size: 9px; }
.mso-clear-filters { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto; padding: 7px 8px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .18); color: white; font: 750 8px/1.2 inherit; cursor: pointer; }
.mso-clear-filters svg { width: 15px; }

@media (max-width: 1320px) {
  .mso-header { grid-template-columns: minmax(280px, 1.4fr) auto minmax(150px, .5fr); }
  .mso-brands { grid-column: 1 / -1; justify-content: flex-start; padding-left: 58px; }
  .mso-layout { grid-template-columns: 1fr; }
  .mso-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 24px; }
  .mso-filters > header { grid-column: 1 / -1; }
  .mso-clear-filters { margin-top: 0; }
}
@media (max-width: 980px) {
  .mso-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mso-kpis .mso-execution { grid-column: span 2; }
  .mso-detail-grid { grid-template-columns: 1fr; }
  .mso-company-columns { max-width: 320px; }
  .mso-navigation { align-items: stretch; grid-template-columns: minmax(0, 1fr); }
  .mso-navigation nav { overflow-x: auto; }
  .mso-year { width: fit-content; justify-self: end; }
  .mso-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .budget-module-grid { grid-template-columns: 1fr; }
  .budget-module-card { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .budget-module-status { grid-column: 2; }
  .budget-module-arrow { display: none; }
  .mso-page { margin-inline: -12px; }
  .mso-dashboard { border-radius: 14px; }
  .mso-header { grid-template-columns: 1fr; padding: 16px; }
  .mso-management-button { width: 100%; }
  .mso-brands { grid-column: auto; flex-wrap: wrap; padding-left: 0; }
  .mso-navigation nav { grid-template-columns: repeat(5, 118px); border-radius: 12px; }
  .mso-kpis { grid-template-columns: 1fr; }
  .mso-kpis .mso-execution { grid-column: auto; }
  .mso-progress-row { grid-template-columns: 1fr; gap: 3px; }
  .mso-progress-row > strong { text-align: left; }
  .mso-progress-track { height: 30px; }
  .mso-detail-grid { padding-inline: 4px; }
  .mso-company-columns { width: 100%; max-width: none; padding-inline: 18px; }
  .mso-filters { grid-template-columns: 1fr; }
}

/* Central de Segurança */
.safety-page { max-width: 1600px; }
.safety-intro-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 19px;
  padding: 20px 22px;
  border: 1px solid #174f82;
  border-radius: 15px;
  background:
    radial-gradient(circle at 88% 20%, rgba(49, 199, 169, .22), transparent 26%),
    linear-gradient(130deg, #062c55 0%, #0b477f 58%, #0c6575 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(8, 50, 91, .16);
  overflow: hidden;
}
.safety-intro-card::after { position: absolute; inset: auto -35px -70px auto; width: 190px; height: 190px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; content: ""; }
.safety-intro-icon { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 15px; background: rgba(255, 255, 255, .11); color: #70e0c3; }
.safety-intro-icon svg { width: 29px; height: 29px; }
.safety-intro-copy { min-width: 0; }
.safety-intro-copy small,
.safety-intro-copy strong { display: block; }
.safety-intro-copy small { color: #91ead3; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.safety-intro-copy strong { margin-top: 4px; font-size: 19px; letter-spacing: -.015em; }
.safety-intro-copy p { max-width: 760px; margin: 5px 0 0; color: #d7e7f6; font-size: 10px; line-height: 1.55; }
.safety-intro-meta { position: relative; z-index: 1; min-width: 116px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; background: rgba(255, 255, 255, .09); text-align: center; }
.safety-intro-meta b,
.safety-intro-meta small { display: block; }
.safety-intro-meta b { font-size: 24px; }
.safety-intro-meta small { margin-top: 2px; color: #d7e7f6; font-size: 8px; font-weight: 750; }
.safety-directory-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 13px; }
.safety-directory-heading h2 { margin: 3px 0 0; color: var(--ink-950); font-size: 17px; }
.safety-directory-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: 10px; }
.safety-directory-note { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-500); font-size: 9px; font-weight: 700; }
.safety-directory-note svg { width: 14px; color: var(--blue-700); }
.safety-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.safety-link-card {
  --safety-accent: #2e61d2;
  --safety-soft: #edf3ff;
  position: relative;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 17px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(150deg, #fff 0%, #fff 70%, var(--safety-soft) 145%);
  color: var(--ink-950);
  font: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 35, 63, .05);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.safety-link-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--safety-accent); content: ""; }
.safety-link-card:hover { border-color: color-mix(in srgb, var(--safety-accent) 42%, #d4deea); box-shadow: 0 13px 28px color-mix(in srgb, var(--safety-accent) 13%, transparent); transform: translateY(-3px); }
.safety-link-card:focus-visible { outline: 3px solid rgba(46, 97, 210, .2); outline-offset: 2px; }
.safety-link-card[data-tone="green"] { --safety-accent: #009f72; --safety-soft: #e7f8f2; }
.safety-link-card[data-tone="orange"] { --safety-accent: #ef9300; --safety-soft: #fff5df; }
.safety-link-card[data-tone="purple"] { --safety-accent: #7c3aed; --safety-soft: #f3edff; }
.safety-link-card[data-tone="red"] { --safety-accent: #e12d39; --safety-soft: #ffedef; }
.safety-link-card[data-tone="teal"] { --safety-accent: #00a4a0; --safety-soft: #e7f8f8; }
.safety-link-card[data-tone="navy"] { --safety-accent: #0b3b72; --safety-soft: #eaf1f8; }
.safety-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.safety-card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--safety-soft); color: var(--safety-accent); }
.safety-card-icon svg { width: 21px; height: 21px; }
.safety-card-open { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-400); transition: background 140ms ease, color 140ms ease, transform 140ms ease; }
.safety-card-open svg { width: 15px; height: 15px; }
.safety-link-card:hover .safety-card-open { background: var(--safety-soft); color: var(--safety-accent); transform: translateX(2px); }
.safety-card-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 13px 0 12px; }
.safety-card-copy strong { color: var(--ink-950); font-size: 13px; line-height: 1.25; }
.safety-card-copy small { color: #51698f; font-size: 9px; font-weight: 650; line-height: 1.5; }
.safety-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid #edf1f6; color: var(--safety-accent); font-size: 8px; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.safety-card-footer svg { width: 13px; height: 13px; transition: transform 140ms ease; }
.safety-link-card:hover .safety-card-footer svg { transform: translateX(3px); }

.connection-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #bad5fb;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f5f9ff 0%, #eaf2ff 100%);
}
.connection-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: white; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.connection-icon svg { width: 21px; height: 21px; }
.connection-strip > span:nth-child(2) { min-width: 0; }
.connection-strip strong { display: block; font-size: 12px; }
.connection-strip small { display: block; margin-top: 3px; color: var(--ink-500); font-size: 10px; line-height: 1.45; }

.database-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.database-card {
  position: relative;
  min-height: 265px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue-600);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
}
.database-card[data-tone="orange"] { border-top-color: #e88528; }
.database-card[data-tone="purple"] { border-top-color: var(--purple-700); }
.database-card[data-tone="green"] { border-top-color: var(--green-700); }
.database-card[data-tone="red"] { border-top-color: var(--red-700); }
.database-card[data-tone="cyan"] { border-top-color: var(--cyan-600); }
.database-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.database-code { width: 50px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--navy-900); color: white; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.database-card h2 { margin: 15px 0 5px; font-size: 15px; letter-spacing: -.02em; }
.database-card > p { min-height: 45px; margin: 0 0 13px; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.database-meta { display: grid; gap: 7px; margin: 0 0 15px; }
.database-meta div { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: baseline; gap: 8px; }
.database-meta dt { color: var(--ink-400); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.database-meta dd { min-width: 0; margin: 0; overflow: hidden; color: var(--ink-700); font-family: Consolas, "Courier New", monospace; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.database-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.database-card-footer > span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: 9px; font-weight: 700; }
.database-card-footer i { width: 7px; height: 7px; border-radius: 50%; background: #f79009; box-shadow: 0 0 0 3px rgba(247, 144, 9, .12); }
.database-card-footer .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.integration-roadmap-grid { margin-top: 0; }
.data-flow { min-height: 112px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.data-flow > span { min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); text-align: center; }
.data-flow > span svg { width: 20px; height: 20px; margin-bottom: 7px; color: var(--blue-700); }
.data-flow strong { font-size: 10px; }
.data-flow small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.data-flow > b { color: var(--ink-400); }
.data-flow > b svg { width: 16px; height: 16px; }

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}
.segment { height: 31px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-500); cursor: pointer; font-size: 10px; font-weight: 800; }
.segment.active { background: white; color: var(--blue-700); box-shadow: var(--shadow-sm); }

.chart { min-height: 230px; display: flex; align-items: flex-end; gap: 12px; padding: 20px 6px 0; border-bottom: 1px solid var(--line); }
.chart-column { min-width: 46px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.chart-bar-wrap { width: min(42px, 65%); height: 175px; display: flex; align-items: flex-end; border-radius: 6px 6px 0 0; background: #eef2f7; overflow: hidden; }
.chart-bar { width: 100%; min-height: 3px; border-radius: 6px 6px 0 0; background: var(--blue-600); }
.chart-bar.green { background: var(--green-700); }
.chart-bar.orange { background: #e88528; }
.chart-column strong { color: var(--ink-700); font-size: 9px; }
.chart-column small { max-width: 80px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.progress-list { display: grid; gap: 13px; }
.progress-row { display: grid; gap: 6px; }
.progress-info { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-700); font-size: 10px; font-weight: 700; }
.progress-track { height: 7px; border-radius: 999px; background: #edf1f5; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--blue-600); }
.progress-fill.green { background: var(--green-700); }
.progress-fill.orange { background: #e88528; }
.progress-fill.purple { background: var(--purple-700); }

.calendar-page { width: min(1700px, 100%); }
.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(390px, 1fr);
  align-items: center;
  gap: 14px 22px;
  margin-bottom: 14px;
  padding: 14px 16px 12px;
}
.calendar-navigation,
.calendar-view-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.calendar-view-actions { justify-content: flex-end; }
.calendar-access-state { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #efc894; border-radius: 8px; background: #fff8ec; color: #9a5608; font-size: 9px; font-weight: 850; white-space: nowrap; }
button.calendar-access-state { cursor: pointer; }
button.calendar-access-state:hover { border-color: #e3a750; background: #fff2dc; }
.calendar-access-state.is-unlocked { border-color: #addfcb; background: #eefbf5; color: #087052; }
.calendar-access-state.is-readonly { border-color: #b8cfee; background: var(--blue-100); color: var(--blue-700); }
.calendar-access-state svg { width: 14px; height: 14px; }
.calendar-navigation .button,
.calendar-view-actions .button { min-height: 36px; padding-inline: 13px; font-size: 10px; }
.calendar-period { text-align: center; }
.calendar-period > span { display: block; margin-bottom: 3px; color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.calendar-period h1 { margin: 0; font-size: clamp(17px, 1.45vw, 22px); letter-spacing: -.025em; white-space: nowrap; }
.calendar-period small { display: block; margin-top: 4px; color: var(--ink-500); font-size: 9px; }
.calendar-context-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(230px, 330px) 1fr;
  align-items: end;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.calendar-context-bar label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.calendar-context-bar label > span { color: var(--ink-700); font-size: 10px; font-weight: 800; }
.calendar-context-bar .input,
.calendar-context-bar .select { height: 36px; }
.calendar-view-switcher { justify-self: end; display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; border: 1px solid #cbd9eb; border-radius: 10px; background: #eef3f9; }
.calendar-view-switcher button { min-width: 84px; height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-600); cursor: pointer; font-size: 10px; font-weight: 850; transition: background 130ms ease, color 130ms ease, box-shadow 130ms ease; }
.calendar-view-switcher button:hover { background: white; color: var(--blue-700); }
.calendar-view-switcher button.is-active { background: var(--blue-700); color: white; box-shadow: 0 3px 9px rgba(25, 86, 178, .22); }
.calendar-view-actions .button.is-active { border-color: var(--blue-700); background: var(--blue-100); color: var(--blue-700); }

.calendar-service-panel { display: grid; grid-template-columns: minmax(220px, .35fr) minmax(0, 1fr); align-items: center; gap: 15px; margin-bottom: 14px; padding: 14px 16px; }
.calendar-service-panel > div:first-child { display: grid; gap: 3px; }
.calendar-service-panel > div:first-child span { color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.calendar-service-panel > div:first-child strong { font-size: 11px; }
.calendar-service-options { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.calendar-service-options button { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink-700); cursor: pointer; font-size: 8px; font-weight: 800; }
.calendar-service-options button:hover, .calendar-service-options button.is-active { border-color: var(--blue-600); background: var(--blue-100); color: var(--blue-700); }
.calendar-service-options i, .calendar-count-table td:first-child i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #9fb1c7; }
.calendar-service-options [data-calendar-type="maintenance"] i, .calendar-count-table [data-calendar-type="maintenance"] i { background: #57a982; }
.calendar-service-options [data-calendar-type="extra"] i, .calendar-count-table [data-calendar-type="extra"] i { background: #ef7d4e; }
.calendar-service-options [data-calendar-type="team"] i, .calendar-count-table [data-calendar-type="team"] i { background: #e2b52c; }
.calendar-service-options [data-calendar-type="maneuver"] i, .calendar-count-table [data-calendar-type="maneuver"] i { background: #7b8794; }
.calendar-service-options [data-calendar-type="lines"] i, .calendar-count-table [data-calendar-type="lines"] i { background: #76529a; }
.calendar-service-options [data-calendar-type="services"] i, .calendar-count-table [data-calendar-type="services"] i { background: #27919c; }

.calendar-count-panel { margin-bottom: 14px; padding: 0; overflow: hidden; }
.calendar-count-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.calendar-count-panel > header span { color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.calendar-count-panel > header h2 { margin: 3px 0 0; font-size: 16px; text-transform: capitalize; }
.calendar-count-panel > header small { color: var(--ink-500); font-size: 9px; }
.calendar-count-table-wrap { overflow-x: auto; }
.calendar-count-table { width: 100%; min-width: 1050px; border-collapse: collapse; font-size: 9px; }
.calendar-count-table th { padding: 10px 8px; border-bottom: 1px solid var(--line-strong); background: var(--surface-soft); color: var(--ink-700); text-align: center; white-space: nowrap; }
.calendar-count-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--ink-700); text-align: center; }
.calendar-count-table tbody tr:last-child td { border-bottom: 0; }
.calendar-count-table td:first-child { min-width: 210px; text-align: left; font-weight: 800; }
.calendar-count-table td:first-child span { display: inline-flex; align-items: center; gap: 7px; }
.calendar-count-table td strong { color: var(--blue-700); }

.weekly-calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.weekly-calendar-layout.filters-hidden { grid-template-columns: minmax(0, 1fr); }
.weekly-calendar-scroll { min-width: 0; padding: 0; overflow-x: auto; }
.weekly-calendar-grid {
  min-width: 1120px;
  height: max(920px, calc(100vh - var(--topbar-h) - 40px));
  min-height: 920px;
  max-height: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(155px, 1fr));
  overflow: hidden;
}
.weekly-calendar-grid.is-day-view { min-width: 0; grid-template-columns: minmax(320px, 1fr); }

.calendar-month-board { min-width: 0; padding: 0; overflow-x: auto; }
.calendar-month-weekdays,
.calendar-month-grid { min-width: 920px; display: grid; grid-template-columns: repeat(7, minmax(125px, 1fr)); }
.calendar-month-weekdays { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid #cbd9eb; background: #0f4b88; color: white; }
.calendar-month-weekdays span { padding: 8px; border-right: 1px solid rgba(255, 255, 255, .2); font-size: 9px; font-weight: 850; text-align: center; text-transform: uppercase; }
.calendar-month-day { min-height: 184px; padding: 7px; border-right: 1px solid #d8e4f2; border-bottom: 1px solid #d8e4f2; background: white; }
.calendar-month-day:nth-child(7n) { border-right: 0; }
.calendar-month-day.is-outside { background: #f5f7fa; opacity: .58; }
.calendar-month-day.is-today { box-shadow: inset 0 0 0 2px var(--blue-600); }
.calendar-month-date { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; padding: 0 1px 5px; border: 0; border-bottom: 1px solid #edf1f6; background: transparent; color: var(--ink-700); cursor: pointer; text-align: left; }
.calendar-month-date span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 850; }
.calendar-month-day.is-today .calendar-month-date span { background: var(--blue-700); color: white; }
.calendar-month-date b { min-width: 20px; padding: 3px 6px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 8px; text-align: center; }
.calendar-month-events { display: grid; gap: 4px; }
.calendar-month-events > button:not(.calendar-month-more) { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 5px; padding: 5px 6px; border: 0; border-radius: 6px; background: #4f82bd; color: white; cursor: pointer; text-align: left; }
.calendar-month-events time { grid-row: span 2; align-self: center; font-size: 7px; font-weight: 850; }
.calendar-month-events span,
.calendar-month-events small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-month-events small { color: rgba(255, 255, 255, .8); font-size: 7px; }
.calendar-month-more { padding: 4px 6px; border: 0; background: transparent; color: var(--blue-700); cursor: pointer; font-size: 8px; font-weight: 800; text-align: left; }
.calendar-month-events [data-calendar-type="maintenance"] { background: #57a982 !important; }
.calendar-month-events [data-calendar-type="extra"] { background: #ef7d4e !important; }
.calendar-month-events [data-calendar-type="maneuver"] { background: #7289aa !important; }
.calendar-month-events [data-calendar-type="lines"] { background: #76529a !important; }
.calendar-month-events [data-calendar-type="services"] { background: #27919c !important; }
.calendar-month-events [data-calendar-type="team"] { background: #e2b52c !important; color: #382c05; }
.calendar-month-events [data-calendar-type="team"] small { color: rgba(56, 44, 5, .78); }
.calendar-month-events [data-calendar-type="justification"] { background: #d85f66 !important; }

.calendar-year-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calendar-year-card { min-height: 190px; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 4px 10px; padding: 18px; border: 1px solid var(--line); color: var(--ink-800); cursor: pointer; text-align: left; transition: transform 130ms ease, border-color 130ms ease, box-shadow 130ms ease; }
.calendar-year-card:hover { border-color: #9cbcec; box-shadow: 0 10px 24px rgba(28, 73, 131, .1); transform: translateY(-2px); }
.calendar-year-card.is-current { border-color: var(--blue-600); box-shadow: inset 0 0 0 1px var(--blue-600); }
.calendar-year-card > span { color: var(--blue-800); font-size: 14px; font-weight: 850; text-transform: capitalize; }
.calendar-year-card > strong { grid-row: span 2; color: var(--navy-900); font-size: 30px; line-height: 1; }
.calendar-year-card > small { color: var(--ink-500); font-size: 9px; }
.calendar-year-card > div { grid-column: 1 / -1; display: grid; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.calendar-year-card em { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; color: var(--ink-600); font-size: 8px; font-style: normal; }
.calendar-year-card em i { width: 7px; height: 7px; border-radius: 50%; background: #4f82bd; }
.calendar-year-card em b { color: var(--ink-800); }
.calendar-year-card em[data-calendar-type="maintenance"] i { background: #57a982; }
.calendar-year-card em[data-calendar-type="extra"] i { background: #ef7d4e; }
.calendar-year-card em[data-calendar-type="maneuver"] i { background: #7289aa; }
.calendar-year-card em[data-calendar-type="lines"] i { background: #76529a; }
.calendar-year-card em[data-calendar-type="services"] i { background: #27919c; }
.calendar-year-card em[data-calendar-type="team"] i { background: #e2b52c; }
.calendar-year-card em[data-calendar-type="justification"] i { background: #d85f66; }
.schedule-day { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid #cbd9eb; background: #f8fbff; overflow: hidden; }
.schedule-day:last-child { border-right: 0; }
.schedule-day.is-today { box-shadow: inset 0 0 0 2px var(--blue-600); }
.schedule-day-header { position: relative; flex: 0 0 auto; display: grid; gap: 4px; padding: 8px 9px 9px; border-top: 5px solid #0f4b88; background: white; text-align: center; }
.schedule-day-header > span { color: #174a82; font-size: 10px; font-weight: 850; text-transform: capitalize; }
.schedule-day-header > strong { color: var(--ink-950); font-size: 13px; text-transform: capitalize; }
.schedule-day-header > em { position: absolute; top: 7px; right: 6px; padding: 3px 5px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.schedule-day-section { min-height: 0; display: flex; flex-direction: column; border-top: 1px solid #d8e4f2; }
.vacant-section { flex: 0 0 24%; }
.programmed-section { flex: 1; }
.schedule-section-title { flex: 0 0 auto; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 9px; background: #eaf3ff; color: #0b477f; font-size: 10px; font-weight: 850; }
.schedule-section-title > span { min-width: 0; display: flex; align-items: center; gap: 6px; }
.schedule-section-title svg { width: 14px; height: 14px; }
.schedule-section-title > button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--blue-700); cursor: pointer; }
.schedule-section-title > button svg { transition: transform 140ms ease; }
.schedule-section-title > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.schedule-section-title b { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: white; color: var(--blue-700); font-size: 9px; text-align: center; }
.schedule-day-section.is-collapsed { flex: 0 0 auto; }
.schedule-day-section.is-collapsed .vacant-team-list,
.schedule-day-section.is-collapsed .programmed-card-list { display: none; }
.vacant-team-list,
.programmed-card-list { min-height: 0; flex: 1; display: grid; align-content: start; gap: 7px; padding: 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9fb0c6 transparent; }
.vacant-team-chip {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #d1deed;
  border-radius: 8px;
  background: white;
  color: #0b477f;
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.vacant-team-chip:hover { border-color: var(--blue-600); box-shadow: 0 5px 14px rgba(23, 92, 211, .1); transform: translateY(-1px); }
.vacant-team-chip strong { font-size: 11px; letter-spacing: .015em; }
.vacant-team-chip small { overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-team-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.calendar-team-summary > div { min-height: 82px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.calendar-team-summary > div > span { color: var(--ink-500); font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.calendar-team-summary > div > strong { color: var(--ink-950); font-size: 11px; line-height: 1.4; }
.calendar-visual-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 11px 12px; border: 1px solid #bad5fb; border-radius: 10px; background: var(--blue-100); color: #174c8d; }
.calendar-visual-notice.compact { margin: 11px 0 0; }
.calendar-visual-notice > svg { width: 18px; flex: 0 0 18px; margin-top: 1px; }
.calendar-visual-notice > span { display: grid; gap: 2px; font-size: 9px; line-height: 1.45; }
.calendar-visual-notice strong { font-size: 10px; }
.calendar-team-members { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.calendar-team-members-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.calendar-team-members-heading span { color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.calendar-team-members-heading h3 { margin: 3px 0 0; font-size: 16px; }
.calendar-team-members-heading > b { min-width: 30px; padding: 6px 9px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 11px; text-align: center; }
.calendar-team-member-list { display: grid; gap: 8px; margin-top: 12px; }
.calendar-team-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.calendar-team-member.is-working { border-left: 4px solid var(--green-700); }
.calendar-team-member.is-unavailable { border-left: 4px solid #e88528; }
.calendar-team-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-100); color: var(--blue-700); font-size: 11px; font-weight: 900; }
.calendar-team-member-copy { min-width: 0; display: grid; gap: 3px; }
.calendar-team-member-copy strong { overflow: hidden; color: var(--ink-950); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-team-member-copy span { color: var(--ink-700); font-size: 10px; }
.calendar-team-member-copy small { color: var(--ink-500); font-size: 9px; }
.calendar-member-actions { display: grid; justify-items: end; gap: 6px; }
.calendar-member-move,
.calendar-member-restore { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 27px; padding: 5px 8px; border: 1px solid #b9d0ef; border-radius: 7px; background: white; color: var(--blue-700); cursor: pointer; font-size: 8px; font-weight: 800; white-space: nowrap; }
.calendar-member-move:hover,
.calendar-member-restore:hover { border-color: var(--blue-600); background: var(--blue-100); }
.calendar-member-move svg { width: 13px; height: 13px; }
.calendar-temporary-members { margin-top: 12px; padding: 15px; border: 1px dashed #e0ad67; border-radius: 12px; background: #fffaf1; }
.calendar-temporary-list { display: grid; gap: 7px; margin-top: 11px; }
.calendar-temporary-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid #f0d8b7; border-radius: 9px; background: white; }
.calendar-temporary-list > div > span { min-width: 0; display: grid; gap: 3px; }
.calendar-temporary-list strong { color: var(--ink-800); font-size: 10px; }
.calendar-temporary-list small { color: #9a5608; font-size: 8px; }
.calendar-member-move-form { display: grid; gap: 14px; margin-top: 14px; }
.calendar-member-move-form .detail-item { min-height: 62px; }
.calendar-program-removed { display: grid; gap: 7px; margin: 0 10px 10px; padding: 10px; border: 1px dashed #e0ad67; border-radius: 9px; background: #fffaf1; }
.calendar-program-removed > strong { color: #8a510d; font-size: 9px; }
.calendar-program-removed > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-700); font-size: 9px; }
.calendar-program-removed button { padding: 4px 7px; border: 1px solid #e5bf8d; border-radius: 6px; background: white; color: #94530c; cursor: pointer; font-size: 8px; font-weight: 800; }
.calendar-team-no-members { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--ink-500); text-align: center; }
.calendar-team-no-members svg { width: 28px; color: var(--ink-400); }
.calendar-team-no-members strong { color: var(--ink-700); font-size: 12px; }
.calendar-team-no-members span { max-width: 460px; font-size: 10px; line-height: 1.5; }
.calendar-team-conflicts { display: grid; gap: 7px; margin-top: 12px; padding: 12px; border: 1px solid #f3c78d; border-radius: 10px; background: var(--orange-100); color: #8a3c0d; }
.calendar-team-conflicts strong { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.calendar-team-conflicts strong svg { width: 16px; }
.calendar-team-conflicts > span { font-size: 9px; }
.program-team-composition { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f8faff; }
.programmed-team-block { margin-top: 12px; border: 1px solid #cfdbeb; border-radius: 11px; background: white; overflow: hidden; }
.programmed-team-block > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); background: #f3f7fc; }
.programmed-team-block > header > div { min-width: 0; display: grid; gap: 3px; }
.programmed-team-block > header strong { color: var(--navy-900); font-size: 12px; }
.programmed-team-block > header span:not(.badge) { overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.programmed-team-block .calendar-team-member-list { margin: 0; padding: 10px; }
.program-access-note { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; color: var(--ink-500); font-size: 9px; font-weight: 750; }
.program-access-note.is-unlocked { color: var(--green-700); }
.program-access-note svg { width: 15px; height: 15px; }
.schedule-program-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #4f82bd;
  color: white;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  transition: filter 120ms ease, transform 120ms ease;
}
.schedule-program-card:hover { filter: brightness(.96); transform: translateY(-1px); }
.schedule-program-card > span { min-width: 0; overflow: hidden; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.schedule-program-top { display: flex; justify-content: space-between; gap: 7px; padding-right: 22px; }
.schedule-program-top strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.schedule-program-top time { font-size: 8px; font-weight: 800; }
.schedule-program-card small { margin-top: 2px; overflow: hidden; color: rgba(255, 255, 255, .85); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-program-card[data-calendar-type="maintenance"], .calendar-legend [data-calendar-type="maintenance"] { background: #57a982; }
.schedule-program-card[data-calendar-type="extra"], .calendar-legend [data-calendar-type="extra"] { background: #ef7d4e; }
.schedule-program-card[data-calendar-type="maneuver"], .calendar-legend [data-calendar-type="maneuver"] { background: #7b8794; }
.schedule-program-card[data-calendar-type="lines"], .calendar-legend [data-calendar-type="lines"] { background: #76529a; }
.schedule-program-card[data-calendar-type="services"], .calendar-legend [data-calendar-type="services"] { background: #27919c; }
.schedule-program-card[data-calendar-type="team"], .calendar-legend [data-calendar-type="team"] { background: #e2b52c; color: #382c05; }
.schedule-program-card[data-calendar-type="team"] small { color: rgba(56, 44, 5, .78); }
.schedule-program-card[data-calendar-type="justification"], .calendar-legend [data-calendar-type="justification"] { background: #d85f66; }
@keyframes justification-border-alert {
  0%, 100% { box-shadow: 0 0 0 1px #ffb0b6, 0 0 0 0 rgba(255, 54, 72, .75); }
  50% { box-shadow: 0 0 0 2px #ff2337, 0 0 0 5px rgba(255, 35, 55, .24); }
}
.schedule-program-card[data-calendar-type="justification"],
.calendar-month-events [data-calendar-type="justification"],
.calendar-legend [data-calendar-type="justification"],
.calendar-year-card em[data-calendar-type="justification"] {
  border-color: #ff2337 !important;
  animation: justification-border-alert 1.05s ease-in-out infinite;
}
.calendar-loading,
.calendar-empty { padding: 13px 8px; color: var(--ink-500); font-size: 9px; line-height: 1.45; text-align: center; }
.calendar-loading { color: var(--blue-700); font-weight: 750; }
.calendar-empty.error { color: var(--red-700); }

.calendar-filter-rail { display: grid; gap: 14px; position: sticky; top: calc(var(--topbar-h) + 14px); }
.calendar-filter-card { padding: 15px; }
.calendar-filter-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.calendar-filter-heading > div > span { color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.calendar-filter-heading h2,
.calendar-legend-card h2 { margin: 3px 0 0; font-size: 16px; }
.calendar-filter-heading > svg { width: 20px; color: var(--blue-700); }
.calendar-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
.calendar-filter-grid .field { gap: 5px; }
.calendar-filter-grid .field > label { font-size: 9px; }
.calendar-filter-grid .input,
.calendar-filter-grid .select { min-width: 0; height: 36px; padding-inline: 9px; font-size: 10px; }
.calendar-filter-grid .span-2 { grid-column: span 2; }
.calendar-filter-buttons { display: grid; gap: 8px; margin-top: 13px; }
.calendar-filter-buttons .button { width: 100%; min-height: 39px; justify-content: center; }
.calendar-legend-card { padding: 15px; }
.calendar-legend-card h2 { margin: 0; }
.calendar-legend-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-bottom: 11px; }
.calendar-legend-heading > span { min-width: 0; display: grid; gap: 3px; }
.calendar-legend-heading small { color: var(--ink-500); font-size: 9px; line-height: 1.35; }
.calendar-legend-heading > button { flex: 0 0 auto; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--blue-700); cursor: pointer; font-size: 8px; font-weight: 800; }
.calendar-legend { display: grid; gap: 5px; }
.calendar-legend-filter { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 9px; border: 1px solid transparent; border-radius: 6px; color: white; cursor: pointer; font-family: inherit; font-size: 10px; font-weight: 800; text-align: center; transition: filter 120ms ease, transform 120ms ease, box-shadow 120ms ease; }
.calendar-legend-filter:hover { filter: brightness(.94); transform: translateY(-1px); }
.calendar-legend-filter.is-active { box-shadow: 0 0 0 3px rgba(24, 86, 178, .24), inset 0 0 0 2px white; }
.calendar-legend-filter svg { width: 13px; height: 13px; stroke-width: 3; }
.calendar-pending-notes { position: relative; }
.calendar-pending-notes > span { min-width: 19px; height: 19px; display: inline-grid; place-items: center; margin-left: 2px; padding: 0 5px; border-radius: 999px; background: #f5c84a; color: #3a2d04; font-size: 8px; font-weight: 900; }
.pending-notes-table-wrap { max-height: min(560px, 66vh); overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.pending-notes-table { width: 100%; min-width: 1420px; border-collapse: separate; border-spacing: 0; font-size: 9px; }
.pending-notes-table th { position: sticky; top: 0; z-index: 3; padding: 9px 8px; border-right: 1px solid #c6d4e4; border-bottom: 1px solid #b7c8db; background: #dce8f7; color: #244664; font-size: 8px; font-weight: 900; text-align: left; text-transform: uppercase; white-space: nowrap; }
.pending-notes-table th.program-column-header { padding: 0; }
.pending-note-column-header > button { min-height: 38px; justify-content: flex-start; }
.pending-notes-table .pending-notes-filter-row th { top: 35px; z-index: 2; padding: 5px; background: #eef4fb; }
.pending-notes-filter-row .input { width: 100%; min-width: 110px; height: 32px; padding: 0 8px; background: white; font-size: 9px; }
.pending-notes-table td { padding: 8px; border-right: 1px solid #dbe3ec; border-bottom: 1px solid #dbe3ec; color: var(--ink-700); vertical-align: middle; }
.pending-notes-table tbody tr:nth-child(even) td { background: #f7f9fc; }
.pending-notes-table tbody tr:hover td { background: #edf4ff; }
.pending-notes-table th:last-child,
.pending-notes-table td:last-child { border-right: 0; }
.pending-notes-table td:first-child strong { color: var(--navy-900); font-size: 10px; font-variant-numeric: tabular-nums; }
.pending-note-description { min-width: 0; display: grid; gap: 2px; }
.pending-note-description strong { color: var(--navy-900); font-size: 9px; }
.pending-note-description small { max-width: 220px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.pending-note-status { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: #fff1cc; color: #9a6500; font-size: 8px; font-weight: 850; white-space: nowrap; }
.pending-notes-table .button { min-height: 30px; padding-inline: 8px; font-size: 8px; white-space: nowrap; }
.pending-notes-table .button svg { width: 13px; }
.pending-filter-limit { margin: 7px 5px 3px; color: #6b7f94; font-size: 9px; line-height: 1.35; }
body.theme-dark .pending-notes-table th { border-color: #30455a; background: #1b3046; color: #c8d8e6; }
body.theme-dark .pending-notes-table .pending-notes-filter-row th { background: #20364e; }
body.theme-dark .pending-notes-filter-row .input { border-color: #3b5065; background: #101e31; color: #eaf2f8; }
body.theme-dark .pending-notes-table td { border-color: #30455a; background: #142238; color: #c6d4df; }
body.theme-dark .pending-notes-table tbody tr:nth-child(even) td { background: #17283c; }
body.theme-dark .pending-notes-table tbody tr:hover td { background: #20364e; }
body.theme-dark .pending-note-description strong,
body.theme-dark .pending-notes-table td:first-child strong { color: #eef5fb; }

@keyframes calendarReprogramBlink {
  0%, 42% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px rgba(255, 255, 255, .38), 0 0 0 0 rgba(142, 20, 31, .55); }
  55%, 100% { opacity: .48; transform: scale(.88); box-shadow: 0 0 0 2px rgba(255, 255, 255, .2), 0 0 0 7px rgba(142, 20, 31, 0); }
}
.schedule-program-flags { display: inline-flex; align-items: center; gap: 6px; }
.calendar-reprogram-badge { width: 18px; height: 18px; display: inline-grid; flex: 0 0 18px; place-items: center; border: 1px solid rgba(255, 255, 255, .82); border-radius: 50%; background: #8e141f; color: #fff; font-size: 9px; font-style: normal; font-weight: 950; line-height: 1; animation: calendarReprogramBlink 1.25s ease-in-out infinite; }
.schedule-program-card .calendar-reprogram-badge { position: absolute; top: 6px; right: 6px; }
.calendar-month-events > button { position: relative; }
.calendar-month-events .calendar-reprogram-badge { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; font-size: 8px; }

.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #bad5fb; border-radius: 10px; background: var(--blue-100); color: #174c8d; font-size: 10px; line-height: 1.5; }
.notice.warning { border-color: #f3c78d; background: var(--orange-100); color: #8a3c0d; }
.notice.success { border-color: #a6dfc7; background: var(--green-100); color: #086045; }
.notice svg { width: 18px; flex: 0 0 18px; margin-top: 1px; }

.empty-state { min-height: 210px; display: grid; place-items: center; padding: 30px; text-align: center; }
.empty-state-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 15px; background: var(--surface-soft); color: var(--ink-400); }
.empty-state-icon svg { width: 25px; height: 25px; }
.empty-state h3 { margin: 0 0 6px; font-size: 14px; }
.empty-state p { max-width: 420px; margin: 0 auto 16px; color: var(--ink-500); font-size: 10px; line-height: 1.55; }

.roadmap { position: relative; display: grid; gap: 0; }
.roadmap-item { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 11px; padding-bottom: 20px; }
.roadmap-item:not(:last-child)::after { position: absolute; top: 28px; bottom: 0; left: 14px; width: 1px; background: var(--line-strong); content: ""; }
.roadmap-marker { z-index: 1; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-size: 10px; font-weight: 800; }
.roadmap-item.done .roadmap-marker { background: var(--green-100); color: var(--green-700); }
.roadmap-copy strong { display: block; font-size: 11px; }
.roadmap-copy small { display: block; margin-top: 4px; color: var(--ink-500); font-size: 9px; line-height: 1.5; }

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 12, 26, 0.62);
  backdrop-filter: blur(2px);
  animation: fade-in 130ms ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  width: min(760px, 100%);
  max-height: min(870px, 92vh);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.modal.narrow { width: min(520px, 100%); }
.modal.wide { width: min(1040px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; letter-spacing: -0.025em; }
.modal-header p { margin: 5px 0 0; color: var(--ink-500); font-size: 10px; }
.modal-close { width: 33px; height: 33px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--surface-soft); color: var(--ink-500); cursor: pointer; }
.modal-close svg { width: 17px; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfc; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.program-date-field { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.program-date-field > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.program-date-field > header > span { min-width: 0; display: grid; gap: 4px; }
.program-date-field > header .button { min-height: 34px; flex: 0 0 auto; white-space: nowrap; }
.program-date-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.program-reprogram-option { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #b9d2f2; border-radius: 9px; background: #eef6ff; color: #164f8e; cursor: pointer; }
.program-reprogram-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--blue-700); }
.program-reprogram-option > span { display: grid; gap: 1px; }
.program-reprogram-option strong { font-size: 10px; }
.program-reprogram-option small { color: #4b6f98; font-size: 8px; line-height: 1.25; }
.program-date-list { display: grid; gap: 8px; }
.program-date-row { display: grid; grid-template-columns: 94px minmax(0, 1fr) 34px; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.program-date-row.is-primary { grid-template-columns: 94px minmax(0, 1fr); }
.program-date-row > span { color: var(--ink-500); font-size: 9px; font-weight: 800; }
.program-date-remove { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--red-700); cursor: pointer; }
.program-date-remove svg { width: 15px; height: 15px; }
.program-date-count { color: var(--blue-700); font-size: 9px; }
.team-program-field { padding: 12px; border: 1px solid #cfe0f7; border-radius: 11px; background: #f7faff; }
.team-program-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.team-program-input .button { min-height: 38px; white-space: nowrap; }
.team-picker-panel { grid-column: 1 / -1; padding: 14px; border: 1px solid #bcd2f2; border-radius: 13px; background: #f7faff; box-shadow: inset 0 1px 0 white; }
.team-picker-panel[hidden] { display: none; }
.team-picker-loading { min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--blue-700); font-size: 11px; font-weight: 750; }
.team-picker-loading svg { width: 18px; animation: team-spin 850ms linear infinite; }
@keyframes team-spin { to { transform: rotate(360deg); } }
.team-picker-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid #d7e3f3; }
.team-picker-header > span { display: grid; gap: 3px; }
.team-picker-header strong { color: var(--navy-900); font-size: 14px; }
.team-picker-header small { color: var(--ink-500); font-size: 10px; }
.team-picker-header > div { display: flex; gap: 7px; }
.team-picker-help { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; padding: 9px 10px; border-radius: 8px; background: var(--blue-100); color: var(--blue-900); font-size: 10px; line-height: 1.5; }
.team-picker-help svg { width: 16px; flex: 0 0 16px; }
.team-scale-source { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 9px 10px; border: 1px solid; border-radius: 8px; font-size: 9px; line-height: 1.45; }
.team-scale-source svg { width: 15px; flex: 0 0 15px; }
.team-scale-source span { display: grid; gap: 2px; }
.team-scale-source.connected { border-color: #b8e5d4; background: #effbf6; color: #126b52; }
.team-scale-source.pending { border-color: #f0d4a8; background: #fff9ee; color: #8b560c; }
.team-region-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.team-region { border: 1px solid var(--line); border-radius: 10px; background: white; overflow: hidden; }
.team-region summary { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 10px 11px; color: var(--navy-900); cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.team-region summary::-webkit-details-marker { display: none; }
.team-region summary small { color: var(--ink-500); font-size: 9px; font-weight: 650; }
.team-region[open] summary { border-bottom: 1px solid var(--line); background: #fbfdff; }
.team-region-list { display: grid; }
.team-choice { display: grid; grid-template-columns: auto minmax(115px, 1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border-top: 1px solid #edf1f6; cursor: pointer; }
.team-choice:first-child { border-top: 0; }
.team-choice:hover { background: #f8fbff; }
.team-choice.busy { background: #fffaf2; }
.team-choice.busy:hover { background: #fff5e6; }
.team-choice input { width: 16px; height: 16px; accent-color: var(--blue-700); }
.team-choice-code { display: grid; gap: 2px; color: var(--navy-900); font-size: 11px; font-weight: 850; }
.team-choice-code small { color: var(--ink-500); font-size: 8px; font-weight: 600; line-height: 1.35; }
.team-choice-code .team-scale-summary { margin-top: 2px; color: var(--blue-700); font-weight: 750; }
.team-choice .badge { justify-self: end; }
.team-conflicts { grid-column: 2 / -1; display: grid; gap: 3px; color: var(--ink-500); }
.team-conflicts small { font-size: 9px; line-height: 1.4; }
.team-choice.busy .team-conflicts { color: #9a5200; }
.team-members { grid-column: 2 / -1; display: grid; gap: 3px; padding-top: 6px; border-top: 1px dashed #d7e3f3; color: var(--ink-500); }
.team-members small { font-size: 9px; line-height: 1.4; }
.team-members .working { color: #157258; }
.team-members .unavailable { color: #b44545; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.detail-item { min-height: 68px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.detail-item.wide { grid-column: span 3; }
.detail-item span { display: block; color: var(--ink-500); font-size: 8px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.detail-item strong { display: block; margin-top: 5px; color: var(--ink-700); font-size: 10px; line-height: 1.45; }

.admin-files-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-files-summary article { min-height: 78px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.admin-files-summary article > span { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 10px; background: var(--blue-100); color: var(--blue-700); }
.admin-files-summary article > span svg { width: 18px; }
.admin-files-summary article > div { min-width: 0; display: grid; gap: 3px; }
.admin-files-summary strong { color: var(--ink-950); font-size: 17px; }
.admin-files-summary small { color: var(--ink-500); font-size: 9px; line-height: 1.35; }
.admin-files-summary code { overflow: hidden; color: var(--ink-700); font: 700 9px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.admin-files-storage > div { width: 100%; }
.admin-presence-card { margin-top: 12px; padding: 13px 14px; border: 1px solid #b9dfd4; border-radius: 12px; background: linear-gradient(135deg, #f6fffc, #ecf9f5); }
.admin-presence-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-presence-card > header > div { display: flex; align-items: center; gap: 10px; }
.admin-presence-card > header > div > span:last-child { display: grid; gap: 3px; }
.admin-presence-card header strong { color: var(--ink-950); font-size: 12px; }
.admin-presence-card header small { color: var(--ink-500); font-size: 9px; }
.admin-presence-icon { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 37px; border-radius: 10px; background: #d9f5eb; color: #087d5f; }
.admin-presence-icon svg { width: 18px; }
.admin-presence-count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: #d9f5eb; color: #087d5f; font-size: 9px; font-weight: 850; white-space: nowrap; }
.admin-presence-count i,
.admin-presence-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #18b786; box-shadow: 0 0 0 3px rgba(24, 183, 134, .13); }
.admin-presence-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.admin-presence-user { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #d7ebe5; border-radius: 9px; background: rgba(255, 255, 255, .78); }
.admin-presence-user > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.admin-presence-user strong { overflow: hidden; color: var(--ink-950); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-presence-user small { overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-presence-user time { color: #087d5f; font-size: 7px; font-weight: 800; white-space: nowrap; }
.admin-presence-meta { display: grid; justify-items: end; gap: 4px; }
.admin-presence-meta button { display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border: 0; border-radius: 5px; background: #d9f5eb; color: #087d5f; font: inherit; font-size: 7px; font-weight: 850; cursor: pointer; }
.admin-presence-meta button svg { width: 9px; height: 9px; }
.admin-presence-empty { grid-column: 1 / -1; margin: 0; padding: 10px; color: var(--ink-500); font-size: 9px; text-align: center; }
.admin-files-upload-card { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: 10px 12px; margin-top: 12px; padding: 14px; border: 1px solid #bfd6f2; border-radius: 12px; background: linear-gradient(135deg, #f7fbff, #edf5ff); }
.admin-files-upload-card > div { display: flex; align-items: center; gap: 10px; }
.admin-files-upload-card > div > span:last-child { display: grid; gap: 3px; }
.admin-files-upload-card strong { color: var(--navy-900); font-size: 12px; }
.admin-files-upload-card small { color: var(--ink-500); font-size: 9px; line-height: 1.4; }
.admin-files-upload-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 10px; background: var(--blue-700); color: white; }
.admin-files-upload-icon svg { width: 18px; }
.admin-files-picker { position: relative; overflow: hidden; cursor: pointer; }
.admin-files-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-files-selection { color: var(--ink-500); font-size: 9px; font-weight: 700; }
.admin-files-upload-card > .button-primary { justify-self: end; }
.admin-files-table-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.admin-files-table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--surface); color: var(--ink-700); font-size: 9px; }
.admin-files-table th { padding: 10px 11px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--ink-500); font-size: 8px; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.admin-files-table td { padding: 10px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-files-table tbody tr:last-child td { border-bottom: 0; }
.admin-files-table td:nth-child(3) strong,
.admin-files-table td:nth-child(3) small { display: block; }
.admin-files-table td:nth-child(3) small { margin-top: 2px; color: var(--ink-400); font-size: 8px; }
.admin-file-name { display: flex; align-items: center; gap: 9px; min-width: 220px; }
.admin-file-name > svg { width: 19px; flex: 0 0 19px; color: var(--blue-700); }
.admin-file-name > span { min-width: 0; display: grid; gap: 2px; }
.admin-file-name strong { max-width: 330px; overflow: hidden; color: var(--ink-950); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-file-name small { color: var(--ink-400); font-size: 7px; font-weight: 800; letter-spacing: .05em; }
.admin-file-download { min-height: 30px; padding: 6px 9px; white-space: nowrap; }
.admin-file-download svg { width: 14px; }
.admin-file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.admin-file-delete { min-height: 30px; padding: 6px 9px; white-space: nowrap; }
.admin-file-delete svg { width: 14px; }
.admin-files-tabs { display: flex; align-items: center; gap: 4px; margin: -4px 0 14px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.admin-files-tabs button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-500); font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.admin-files-tabs button svg { width: 15px; }
.admin-files-tabs button:hover { background: var(--surface); color: var(--ink-950); }
.admin-files-tabs button.is-active { background: var(--blue-700); color: white; box-shadow: 0 5px 13px rgba(24, 91, 192, .2); }
.admin-files-pane[hidden] { display: none; }
.admin-jse-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-jse-status article { min-height: 75px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.admin-jse-status article > span { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 10px; background: #dcf5eb; color: #087d5f; }
.admin-jse-status article > span svg { width: 17px; }
.admin-jse-status article > div { min-width: 0; display: grid; gap: 3px; }
.admin-jse-status strong { overflow: hidden; color: var(--ink-950); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-jse-status small { color: var(--ink-500); font-size: 8px; }
.admin-jse-import-card { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: center; gap: 10px 12px; margin-top: 12px; padding: 15px; border: 1px solid #b9dfd4; border-radius: 12px; background: linear-gradient(135deg, #f6fffc, #eefaf6); }
.admin-jse-import-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.admin-jse-import-copy > span:last-child { display: grid; gap: 3px; }
.admin-jse-import-copy strong { color: var(--ink-950); font-size: 12px; }
.admin-jse-import-copy small { max-width: 560px; color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.admin-jse-import-icon,
.admin-jse-preview-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 10px; background: #087d5f; color: white; }
.admin-jse-import-icon svg,
.admin-jse-preview-icon svg { width: 18px; }
.admin-jse-import-card > .button-primary { justify-self: end; }
.admin-jse-preview { margin-top: 12px; padding: 15px; border: 1px solid #9ed9c7; border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px rgba(8, 125, 95, .08); }
.admin-jse-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-jse-preview > header > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.admin-jse-preview > header > div > span:last-child { min-width: 0; display: grid; gap: 3px; }
.admin-jse-preview header strong { overflow: hidden; color: var(--ink-950); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-jse-preview header small { color: var(--ink-500); font-size: 8px; }
.admin-jse-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.admin-jse-metrics article { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.admin-jse-metrics article.is-warning { border-color: #f2c27f; background: #fff8ec; }
.admin-jse-metrics strong { display: block; color: var(--ink-950); font-size: 16px; }
.admin-jse-metrics small { display: block; margin-top: 3px; color: var(--ink-500); font-size: 8px; line-height: 1.3; }
.admin-jse-notice { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 11px; border: 1px solid #f2c27f; border-radius: 9px; background: #fff8ec; color: #7b4b0b; font-size: 9px; line-height: 1.45; }
.admin-jse-notice svg { width: 16px; flex: 0 0 16px; }
.admin-jse-preview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.admin-jse-history { margin-top: 15px; }
.admin-jse-history > header { display: flex; align-items: center; justify-content: space-between; }
.admin-jse-history > header > div { display: grid; gap: 3px; }
.admin-jse-history > header strong { color: var(--ink-950); font-size: 11px; }
.admin-jse-history > header small { color: var(--ink-500); font-size: 8px; }
.admin-jse-history .admin-files-table-wrap { margin-top: 8px; }
.admin-jse-history-table { min-width: 650px; }

@media (max-width: 680px) {
  .admin-files-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-presence-card > header { align-items: flex-start; flex-direction: column; }
  .admin-presence-list { grid-template-columns: 1fr; }
  .admin-files-upload-card { grid-template-columns: 1fr; }
  .admin-files-upload-card > .button,
  .admin-files-upload-card > .button-primary { width: 100%; justify-self: stretch; }
  .admin-files-tabs { align-items: stretch; flex-direction: column; }
  .admin-files-tabs button { width: 100%; }
  .admin-jse-status { grid-template-columns: 1fr; }
  .admin-jse-import-card { grid-template-columns: 1fr; }
  .admin-jse-import-card > .button,
  .admin-jse-import-card > .button-primary { width: 100%; justify-self: stretch; }
  .admin-jse-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-jse-preview > header { align-items: flex-start; flex-direction: column; }
  .admin-jse-preview-actions { align-items: stretch; flex-direction: column; }
}

.toast-root { position: fixed; z-index: 150; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 280px; max-width: 400px; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 13px 14px; border: 1px solid #2f405b; border-radius: 11px; background: var(--navy-900); color: white; box-shadow: var(--shadow-md); animation: toast-in 180ms ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast svg { width: 18px; color: #65d6ad; }
.toast strong { display: block; font-size: 11px; }
.toast small { display: block; margin-top: 3px; color: #b8c5d8; font-size: 9px; line-height: 1.4; }

.mobile-overlay { display: none; }

.coordinator-scale-page { max-width: 1600px; }
.coordinator-scale-source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 15px 17px;
  border-left: 4px solid var(--blue-600);
}
.coordinator-scale-source-copy,
.coordinator-scale-source-actions,
.coordinator-source { display: flex; align-items: center; }
.coordinator-scale-source-copy { min-width: 0; gap: 12px; }
.coordinator-scale-source-copy .metric-icon { width: 42px; height: 42px; flex: 0 0 42px; background: var(--blue-100); color: var(--blue-700); }
.coordinator-scale-source-copy strong,
.coordinator-scale-source-copy small { display: block; }
.coordinator-scale-source-copy strong { font-size: 14px; }
.coordinator-scale-source-copy small { margin-top: 4px; color: var(--ink-500); font-size: 11px; line-height: 1.4; }
.coordinator-scale-source-actions { justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.coordinator-source { gap: 6px; margin-right: 4px; color: var(--ink-500); font-size: 10px; font-weight: 750; }
.coordinator-source svg { width: 15px; height: 15px; }
.coordinator-source.connected { color: var(--green-700); }
.coordinator-source.error { color: var(--red-700); }
.coordinator-source.loading svg,
.coordinator-scale-loading svg { animation: coordinator-spin 900ms linear infinite; }
@keyframes coordinator-spin { to { transform: rotate(360deg); } }

.coordinator-legend-card {
  display: grid;
  grid-template-columns: auto repeat(6, minmax(105px, 1fr));
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 11px 14px;
}
.coordinator-legend-title { margin-right: 4px; color: var(--ink-700); font-size: 11px; font-weight: 850; }
.coordinator-legend {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-700);
  font-size: 10px;
  font-weight: 800;
}
.coordinator-legend i,
.scale-situation i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; }
.coordinator-legend.working { background: #e7f6ee; color: #067a55; }
.coordinator-legend.off { background: #edf1f6; color: #53657f; }
.coordinator-legend.training { background: #e7f1ff; color: #2672d8; }
.coordinator-legend.vacation { background: #fff4df; color: #b6630b; }
.coordinator-legend.leave { background: #feebeb; color: #c42a25; }
.coordinator-legend.other { background: #f1eaff; color: #7047c7; }

.coordinator-scale-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}
.coordinator-calendar-card { padding: 0; overflow-x: auto; }
.coordinator-calendar-header {
  min-width: 650px;
  min-height: 82px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #0c3f79, #175cd3);
  color: white;
}
.coordinator-calendar-header > div { text-align: center; }
.coordinator-calendar-header span { display: block; margin-bottom: 2px; color: #cfe2ff; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.coordinator-calendar-header h2 { margin: 0; font-size: 20px; text-transform: capitalize; }
.coordinator-calendar-header small { display: block; margin-top: 4px; color: #e7f0ff; font-size: 10px; }
.coordinator-calendar-header .button { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.12); color: white; }
.coordinator-calendar-weekdays,
.coordinator-calendar-grid { min-width: 650px; display: grid; grid-template-columns: repeat(7, minmax(86px, 1fr)); }
.coordinator-calendar-weekdays { border-bottom: 1px solid var(--line-strong); background: #f4f7fb; }
.coordinator-calendar-weekdays span { padding: 9px 5px; color: var(--ink-700); font-size: 10px; font-weight: 850; text-align: center; text-transform: uppercase; }
.coordinator-calendar-weekdays span:first-child,
.coordinator-calendar-weekdays span:last-child { color: var(--red-700); }
.coordinator-day {
  position: relative;
  min-height: 91px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.coordinator-day:nth-child(7n) { border-right: 0; }
.coordinator-day:hover { z-index: 1; background: #f6f9fe; box-shadow: inset 0 0 0 2px #a8c9f7; }
.coordinator-day.outside { background: #fafbfd; color: var(--ink-400); }
.coordinator-day.selected { z-index: 2; background: #edf5ff; box-shadow: inset 0 0 0 2px var(--blue-600); }
.coordinator-day.has-records { color: white; }
.coordinator-day.has-records.status-working { background: #76ad8f; }
.coordinator-day.has-records.status-off { background: #788da9; }
.coordinator-day.has-records.status-training { background: #4f8fdc; }
.coordinator-day.has-records.status-vacation { background: #d4953e; }
.coordinator-day.has-records.status-leave { background: #d95650; }
.coordinator-day.has-records.status-other { background: #76529d; }
.coordinator-day.has-records:hover { filter: brightness(.96); box-shadow: inset 0 0 0 2px rgba(255,255,255,.72); }
.coordinator-day.has-records.selected { box-shadow: inset 0 0 0 3px #082f65, 0 0 0 2px white; }
.coordinator-day-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-950); font-size: 12px; font-weight: 850; }
.coordinator-day.outside .coordinator-day-number { color: var(--ink-400); }
.coordinator-day.today .coordinator-day-number { background: var(--blue-700); color: white; }
.coordinator-day.has-records .coordinator-day-number,
.coordinator-day.has-records .coordinator-day-summary,
.coordinator-day.has-records .coordinator-day-summary strong { color: white; }
.coordinator-day.has-records.today .coordinator-day-number { background: white; color: var(--navy-900); }
.coordinator-day-summary { display: inline-flex; align-items: baseline; gap: 4px; color: var(--ink-500); font-size: 9px; font-weight: 650; }
.coordinator-day-summary strong { color: var(--ink-950); font-size: 16px; }
.coordinator-day-summary.working strong { color: var(--green-700); }
.coordinator-day-summary.off strong { color: #53657f; }
.coordinator-day-summary.training strong { color: var(--blue-700); }
.coordinator-day-summary.vacation strong { color: var(--orange-700); }
.coordinator-day-summary.leave strong { color: var(--red-700); }
.coordinator-day-summary.other strong { color: var(--purple-700); }
.coordinator-day.has-records .coordinator-day-summary,
.coordinator-day.has-records .coordinator-day-summary strong { color: white; }
.coordinator-day-dots { display: flex; gap: 4px; margin-top: auto; }
.coordinator-day-dots i { width: 16px; height: 4px; border-radius: 999px; }
.coordinator-day-dots .working { background: #2c9a73; }
.coordinator-day-dots .off { background: #7589a5; }
.coordinator-day-dots .training { background: #4b8fe8; }
.coordinator-day-dots .vacation { background: #df962d; }
.coordinator-day-dots .leave { background: #df4740; }
.coordinator-day-dots .other { background: #7953c7; }
.coordinator-day-empty { margin-top: auto; color: var(--ink-400); font-size: 9px; }

.coordinator-filter-card { display: grid; gap: 13px; position: sticky; top: calc(var(--topbar-h) + 18px); }
.coordinator-filter-card .card-header { margin-bottom: 0; }
.coordinator-filter-card .metric-icon { width: 34px; height: 34px; background: var(--purple-100); color: var(--purple-700); }
.coordinator-filter-card .field { gap: 6px; }
.coordinator-filter-card .field > span { color: var(--ink-700); font-size: 10px; font-weight: 800; }
.coordinator-filter-card .button { width: 100%; margin-top: 2px; }
.coordinator-roster-card { padding: 0; overflow: hidden; }
.coordinator-roster-card > .card-header { margin: 0; padding: 17px 18px 13px; border-bottom: 1px solid var(--line); }
.coordinator-roster-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.coordinator-roster-table { min-width: 1120px; }
.coordinator-select-column { width: 76px; text-align: center !important; }
.coordinator-select-column input { width: 16px; height: 16px; accent-color: var(--blue-700); cursor: pointer; }
.coordinator-roster-row { cursor: pointer; transition: background 100ms ease; }
.coordinator-roster-row:hover td { background: #f5f9ff; }
.coordinator-roster-row.is-selected td { background: #e9f2ff; box-shadow: inset 0 1px 0 #bad4f7, inset 0 -1px 0 #bad4f7; }
.coordinator-roster-row.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--blue-700), inset 0 1px 0 #bad4f7, inset 0 -1px 0 #bad4f7; }
.scale-situation { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.scale-situation.working { color: var(--green-700); }
.scale-situation.off { color: #53657f; }
.scale-situation.training { color: var(--blue-700); }
.scale-situation.vacation { color: var(--orange-700); }
.scale-situation.leave { color: var(--red-700); }
.scale-situation.other { color: var(--purple-700); }
.coordinator-scale-loading { min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--ink-500); font-size: 12px; font-weight: 750; }
.coordinator-scale-loading svg { width: 20px; height: 20px; color: var(--blue-700); }

/* Escala Programador — visão mensal somente para consulta */
.programmer-scale-page { max-width: none; }
.programmer-scale-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-color: #ccdaeb;
  background: linear-gradient(135deg, #fff 0%, #f7faff 100%);
}
.programmer-month-nav,
.programmer-toolbar-summary,
.programmer-filter-actions,
.programmer-section-header { display: flex; align-items: center; }
.programmer-month-nav { gap: 10px; }
.programmer-month-nav > span { min-width: 180px; text-align: center; }
.programmer-month-picker { min-width: 155px; display: grid; gap: 4px; margin-left: 6px; }
.programmer-month-picker small { color: var(--ink-500); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.programmer-month-picker .input { height: 36px; }
.programmer-month-nav small,
.programmer-month-nav strong { display: block; }
.programmer-month-nav small { color: var(--ink-500); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.programmer-month-nav strong { margin-top: 2px; color: var(--ink-950); font-size: 16px; text-transform: capitalize; }
.programmer-toolbar-summary { justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.programmer-toolbar-summary > span:not(.programmer-source) { padding: 7px 10px; border: 1px solid #d8e3f0; border-radius: 8px; background: white; color: var(--ink-600); font-size: 10px; }
.programmer-toolbar-summary > span strong { color: var(--ink-950); font-size: 13px; }
.programmer-source { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; }
.programmer-source svg { width: 15px; height: 15px; }
.programmer-source.connected { color: var(--green-700); }
.programmer-source.loading { color: var(--orange-700); }
.programmer-source.loading svg { animation: coordinator-spin 900ms linear infinite; }
.programmer-source.error { color: var(--red-700); }
.programmer-filter-card { padding: 16px; }
.programmer-section-header { justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.programmer-section-header h2 { margin: 3px 0 0; color: var(--ink-950); font-size: 16px; }
.programmer-section-header p { margin: 4px 0 0; color: var(--ink-500); font-size: 10px; }
.programmer-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 11px; }
.programmer-filter-actions { justify-content: flex-end; gap: 9px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #e3eaf3; }
.programmer-filter-actions > span { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; color: var(--ink-500); font-size: 10px; }
.programmer-filter-actions > span svg { width: 15px; height: 15px; color: var(--blue-700); }
.programmer-legend-card { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 6px; padding: 10px; }
.programmer-legend { display: flex; align-items: center; justify-content: center; min-height: 30px; border-radius: 7px; color: white; font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.programmer-legend.working,
.programmer-status-cell.working { background: #78b091; }
.programmer-legend.off,
.programmer-status-cell.off { background: #91a1b7; }
.programmer-legend.vacation,
.programmer-status-cell.vacation { background: #dda15c; }
.programmer-legend.training,
.programmer-status-cell.training { background: #5896ed; }
.programmer-legend.leave,
.programmer-status-cell.leave { background: #e23232; }
.programmer-legend.other,
.programmer-status-cell.other { background: #785397; }
.programmer-matrix-card { overflow: hidden; padding: 0; }
.programmer-matrix-card > .programmer-section-header { margin: 0; padding: 14px 16px; border-bottom: 1px solid #d7e2ef; background: #fbfdff; }
.programmer-matrix-wrap { max-width: 100%; max-height: max(720px, calc(100vh - var(--topbar-h) - 120px)); overflow: auto; scrollbar-color: #9eb4ce #edf3f9; scrollbar-width: thin; }
.programmer-matrix { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: var(--ink-800); font-size: 9px; }
.programmer-matrix th,
.programmer-matrix td { height: 40px; padding: 7px 8px; border-right: 1px solid #d5e0ec; border-bottom: 1px solid #d5e0ec; text-align: center; }
.programmer-matrix thead th { position: sticky; top: 0; z-index: 5; min-width: 90px; background: #eaf2fd; color: #073c78; font-weight: 850; }
.programmer-matrix thead th strong,
.programmer-matrix thead th small { display: block; }
.programmer-matrix thead th small { margin-top: 2px; font-size: 8px; text-transform: capitalize; }
.programmer-matrix thead th.weekend { color: #d92d2d; background: #fff1f1; }
.programmer-matrix .programmer-sticky-team { left: 0; z-index: 8; width: 145px; min-width: 145px; text-align: left; }
.programmer-matrix .programmer-sticky-person { left: 145px; z-index: 8; width: 245px; min-width: 245px; text-align: left; }
.programmer-team-row th { position: sticky; left: 0; z-index: 4; height: 32px; padding: 7px 10px; border-right: 0; background: #0b477f; color: white; text-align: left; }
.programmer-team-row th span { font-size: 11px; }
.programmer-team-row th small { margin-left: 8px; color: #c9ddf5; font-size: 8px; font-weight: 750; }
.programmer-team-cell,
.programmer-person-cell { position: sticky; z-index: 3; background: white; text-align: left !important; }
.programmer-team-cell { left: 0; width: 145px; min-width: 145px; }
.programmer-person-cell { left: 145px; width: 245px; min-width: 245px; box-shadow: 4px 0 8px rgba(31, 57, 89, .07); }
.programmer-team-cell strong,
.programmer-team-cell small,
.programmer-person-cell strong,
.programmer-person-cell small { display: block; }
.programmer-team-cell strong { color: #0b477f; font-size: 10px; }
.programmer-team-cell small,
.programmer-person-cell small { margin-top: 3px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.programmer-person-cell strong { max-width: 220px; overflow: hidden; color: var(--ink-950); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.programmer-status-cell { width: 90px; min-width: 90px; color: white; font-size: 8px; font-weight: 850; }
.programmer-status-cell span { display: block; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.programmer-status-cell.empty { background: #f5f8fc; color: #a8b5c6; }
.programmer-person-row:hover .programmer-team-cell,
.programmer-person-row:hover .programmer-person-cell { background: #f4f8fe; }
.coordinator-edit-warning { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #f0c98e; border-radius: 9px; background: #fff8eb; color: #8b4b0b; }
.coordinator-edit-warning svg { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 1px; }
.coordinator-edit-warning span,
.coordinator-edit-warning strong { display: block; }
.coordinator-edit-warning span { font-size: 10px; line-height: 1.5; }
.coordinator-edit-warning strong { margin-bottom: 2px; font-size: 11px; }

@media (max-width: 1380px) {
  .programmer-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .coordinator-legend-card { grid-template-columns: auto repeat(3, minmax(105px, 1fr)); }
  .coordinator-legend-title { grid-row: span 2; }
  .calendar-toolbar { grid-template-columns: 1fr auto; }
  .calendar-period { grid-column: 1 / -1; grid-row: 1; }
  .calendar-navigation { grid-column: 1; grid-row: 2; }
  .calendar-view-actions { grid-column: 2; grid-row: 2; }
  .calendar-context-bar { grid-row: 3; }
  .weekly-calendar-layout { grid-template-columns: minmax(0, 1fr) 285px; }
  .program-dashboard-layout { grid-template-columns: minmax(0, 1fr) 292px; }
  .program-filter-bar { grid-template-columns: minmax(150px, 1.1fr) 96px minmax(125px, .8fr) auto; }
  .decision-kpi { padding: 12px; }
  .program-general-hero { grid-template-columns: auto minmax(280px, 1fr); }
  .program-general-top-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .program-general-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .safety-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --sidebar-w: 216px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-quick-card .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { min-width: 190px; }
  .brand-copy small { display: none; }
  .program-dashboard-layout { grid-template-columns: 1fr; }
  .database-sync-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-module-rail { position: static; }
  .program-module-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-general-filter-footer { align-items: flex-start; flex-direction: column; }
  .program-general-filter-actions { width: 100%; justify-content: flex-start; }
  .weekly-calendar-layout { grid-template-columns: 1fr; }
  .calendar-filter-rail { position: static; grid-template-columns: minmax(0, 1fr) 260px; }
  .coordinator-scale-layout { grid-template-columns: 1fr; }
  .coordinator-filter-card { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coordinator-filter-card .card-header { grid-column: 1 / -1; }
  .coordinator-filter-card .button { align-self: end; }
}

@media (max-width: 900px) {
  .programmer-scale-toolbar { align-items: stretch; flex-direction: column; }
  .programmer-month-nav { flex-wrap: wrap; }
  .programmer-month-picker { width: 100%; margin-left: 0; }
  .programmer-toolbar-summary { justify-content: flex-start; }
  .programmer-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .programmer-legend-card { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .home-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-status-card { grid-column: span 2; min-height: 230px; }
  .login-layout { grid-template-columns: 1fr; gap: 30px; }
  .login-presentation { max-width: 620px; }
  .login-presentation h1 strong { font-size: clamp(54px, 13vw, 82px); }
  .login-presentation h1 span { font-size: clamp(21px, 5vw, 34px); }
  .login-panel { width: min(460px, 100%); }
  .mobile-menu { display: inline-grid; }
  .brand { width: auto; min-width: 0; }
  .sidebar { transform: translateX(-102%); transition: transform 180ms ease; box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay { position: fixed; z-index: 35; inset: var(--topbar-h) 0 0 0; display: block; background: rgba(4, 12, 26, 0.42); opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
  .mobile-overlay.open { opacity: 1; pointer-events: auto; }
  .main-content { margin-left: 0; }
  .coordinator-scale-source-card { align-items: flex-start; flex-direction: column; }
  .coordinator-scale-source-actions { width: 100%; justify-content: flex-start; }
  .coordinator-source { width: 100%; }
  .coordinator-filter-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search { width: min(420px, 48vw); }
  .profile-button > span:nth-child(2),
  .profile-button > svg { display: none; }
  .content-grid,
  .content-grid.equal,
  .content-grid.wide-right { grid-template-columns: 1fr; }
  .calendar-toolbar { grid-template-columns: 1fr; }
  .calendar-period,
  .calendar-navigation,
  .calendar-view-actions { grid-column: 1; grid-row: auto; justify-content: center; }
  .calendar-context-bar { grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-view-switcher { grid-column: 1 / -1; justify-self: stretch; }
  .calendar-view-switcher button { width: 100%; }
  .calendar-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-filter-rail { grid-template-columns: 1fr; }
  .decision-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-filter-bar { grid-template-columns: minmax(150px, 1fr) 90px minmax(130px, 1fr); }
  .program-filter-action { grid-column: span 3; justify-self: end; }
  .program-general-hero { grid-template-columns: 1fr; }
  .program-general-top-actions { grid-column: auto; justify-content: flex-start; }
  .program-general-back { width: fit-content; }
  .program-general-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .safety-intro-card { grid-template-columns: auto minmax(0, 1fr); padding: 17px; }
  .safety-intro-meta { grid-column: 1 / -1; width: 100%; }
  .safety-directory-heading { align-items: flex-start; flex-direction: column; }
  .safety-directory { grid-template-columns: 1fr; }
  .programmer-filter-grid { grid-template-columns: 1fr; }
  .programmer-filter-actions { align-items: stretch; flex-direction: column; }
  .programmer-filter-actions > span { margin-right: 0; }
  .programmer-filter-actions .button { width: 100%; }
  .programmer-legend-card { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .programmer-month-nav { justify-content: space-between; }
  .programmer-month-nav > span { min-width: 0; }
  .programmer-matrix .programmer-sticky-team { width: 110px; min-width: 110px; }
  .programmer-matrix .programmer-sticky-person { left: 110px; width: 190px; min-width: 190px; }
  .programmer-team-cell { width: 110px; min-width: 110px; }
  .programmer-person-cell { left: 110px; width: 190px; min-width: 190px; }
  .programmer-person-cell strong { max-width: 165px; }
  .login-screen { align-items: start; padding: 26px 16px; }
  .login-layout { gap: 24px; }
  .login-presentation h1 strong { font-size: 54px; }
  .login-presentation h1 span { margin-top: 9px; font-size: 23px; }
  .login-presentation > p { margin-top: 15px; font-size: 13px; }
  .login-highlights { display: none; }
  .login-panel { padding: 25px 21px; border-radius: 16px; }
  .logout-button span:last-child { display: none; }
  .logout-button { width: 38px; justify-content: center; padding: 0; }
  :root { --topbar-h: 64px; }
  .topbar { gap: 9px; padding: 0 12px; }
  .brand-symbol { width: 48px; height: 36px; flex-basis: 48px; }
  .brand-copy strong { font-size: 17px; }
  .global-search { display: none; }
  .topbar-actions { gap: 5px; }
  .profile-button { padding-right: 0; }
  .main-content { padding: calc(var(--topbar-h) + 20px) 12px 30px; }
  .coordinator-scale-source-actions .button { width: 100%; }
  .coordinator-legend-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coordinator-legend-title { grid-column: 1 / -1; grid-row: auto; }
  .coordinator-filter-card { grid-template-columns: 1fr; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 13px; }
  .heading-actions { justify-content: flex-start; }
  .date-label { white-space: normal; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 119px; padding: 14px; }
  .metric-value { font-size: 22px; }
  .module-grid { grid-template-columns: 1fr; }
  .database-grid { grid-template-columns: 1fr; }
  .dashboard-directory { grid-template-columns: 1fr; }
  .dashboard-link-card { min-height: 164px; padding: 16px; }
  .quick-actions { grid-template-columns: 1fr; }
  .home-insight-grid { grid-template-columns: 1fr; }
  .data-status-card { grid-column: span 1; }
  .home-quick-card .quick-actions { grid-template-columns: 1fr; }
  .decision-panel { padding: 15px; }
  .database-sync-header { grid-template-columns: auto minmax(0, 1fr); }
  .database-sync-summary { grid-column: 1; grid-row: 2; }
  .database-sync-header .button { grid-column: 2; grid-row: 2; width: 100%; justify-content: center; }
  .database-sync-grid { grid-template-columns: 1fr; }
  .database-sync-card > footer { align-items: flex-start; flex-direction: column; }
  .decision-panel-top { align-items: stretch; flex-direction: column; gap: 12px; }
  .decision-period { width: 100%; min-width: 0; }
  .program-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-filter-field:first-child { grid-column: span 2; }
  .program-filter-action { grid-column: span 2; width: 100%; justify-content: center; }
  .program-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-count-card { padding: 12px; }
  .program-count-heading h3 { font-size: 15px; }
  .program-module-list { grid-template-columns: 1fr; }
  .program-general-hero { padding: 12px; }
  .program-general-title { align-items: flex-start; }
  .program-general-title h1 { font-size: 21px; }
  .program-general-title p { font-size: 10px; }
  .program-general-filter-grid { grid-template-columns: 1fr; }
  .program-search-filter { grid-column: span 1; }
  .program-general-card-header { align-items: flex-start; flex-wrap: wrap; }
  .program-general-card-actions { width: 100%; margin-left: 48px; justify-content: flex-start; flex-wrap: wrap; }
  .program-general-session { width: fit-content; }
  .program-general-filter-panel { margin: 0 8px 8px; padding: 11px; }
  .program-general-filter-actions { flex-direction: column; }
  .program-general-filter-actions .button { width: 100%; }
  .program-general-table-footer { align-items: flex-start; flex-direction: column; }
  .decision-context { align-items: flex-start; flex-direction: column; gap: 5px; }
  .insight-card-header { grid-template-columns: auto minmax(0, 1fr); }
  .insight-chip,
  .sync-state { grid-column: 2; justify-self: start; }
  .connection-strip { grid-template-columns: auto minmax(0, 1fr); }
  .connection-strip > .badge { grid-column: span 2; justify-self: start; }
  .data-flow { grid-template-columns: 1fr; }
  .data-flow > b { display: none; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-filters { align-items: stretch; flex-direction: column; }
  .filter-field,
  .toolbar-search { width: 100%; min-width: 0; }
  .table-actions { justify-content: flex-end; }
  .calendar-toolbar { padding: 12px; }
  .calendar-navigation,
  .calendar-view-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .calendar-navigation .button,
  .calendar-view-actions .button { justify-content: center; }
  .calendar-period h1 { font-size: 16px; white-space: normal; }
  .calendar-context-bar { grid-template-columns: 1fr; }
  .calendar-context-bar label { grid-template-columns: 74px minmax(0, 1fr); }
  .calendar-view-switcher { grid-column: auto; width: 100%; }
  .calendar-year-grid { grid-template-columns: 1fr; }
  .weekly-calendar-grid { height: 660px; min-height: 660px; }
  .calendar-filter-grid { grid-template-columns: 1fr; }
  .calendar-filter-grid .span-2 { grid-column: span 1; }
  .calendar-team-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-team-member { grid-template-columns: auto minmax(0, 1fr); }
  .calendar-team-member > .badge { grid-column: 2; justify-self: start; }
  .calendar-member-actions { grid-column: 2; justify-items: start; }
  .calendar-temporary-list > div { align-items: flex-start; flex-direction: column; }
  .programmed-team-block > header { align-items: flex-start; flex-direction: column; }
  .program-access-note { width: 100%; margin-right: 0; }
  .form-grid,
  .detail-grid { grid-template-columns: 1fr; }
  .field.span-2,
  .detail-item.wide { grid-column: span 1; }
  .team-program-input,
  .team-region-grid { grid-template-columns: 1fr; }
  .program-date-field > header { align-items: stretch; flex-direction: column; }
  .program-date-row,
  .program-date-row.is-primary { grid-template-columns: minmax(0, 1fr) 34px; }
  .program-date-row > span { grid-column: 1 / -1; }
  .program-date-row.is-primary > input { grid-column: 1 / -1; }
  .team-picker-header { align-items: stretch; flex-direction: column; }
  .team-picker-header > div { flex-wrap: wrap; }
  .team-choice { grid-template-columns: auto minmax(0, 1fr); }
  .team-choice .badge { grid-column: 2; justify-self: start; }
  .team-conflicts { grid-column: 2; }
  .modal-backdrop { padding: 8px; }
  .modal { max-height: 96vh; }
  .modal-header,
  .modal-body { padding-left: 15px; padding-right: 15px; }
  .modal-footer { padding: 12px 15px; }
  .toast-root { right: 10px; bottom: 10px; left: 10px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 430px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .brand-copy { display: none; }
  .metric-card { min-height: 112px; }
  .page-heading h1 { font-size: 24px; }
  .decision-kpi-grid,
  .program-type-grid { grid-template-columns: 1fr; }
  .program-filter-bar { grid-template-columns: 1fr; }
  .program-filter-field:first-child,
  .program-filter-action { grid-column: span 1; }
  .program-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}

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

body.theme-dark {
  color-scheme: dark;
  --ink-950: #eef4fb;
  --ink-700: #ced8e5;
  --ink-500: #93a4b8;
  --ink-400: #718399;
  --line: #2b3c52;
  --line-strong: #3a4c64;
  --surface: #142238;
  --surface-soft: #1a2a41;
  --page: #0d192b;
  --blue-100: #172f52;
  --green-100: #14382f;
  --orange-100: #402b18;
  --red-100: #442323;
  --purple-100: #2d2850;
  --cyan-100: #173a45;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 18px 38px rgba(0, 0, 0, .42);
}
body.theme-dark .topbar { background: #071224; }
body.theme-dark .sidebar,
body.theme-dark .card,
body.theme-dark .decision-panel,
body.theme-dark .program-general-card,
body.theme-dark .modal,
body.theme-dark .toast { background-color: var(--surface); color: var(--ink-950); }
body.theme-dark .modal-footer { border-color: var(--line); background: #101e32; }
body.theme-dark .input,
body.theme-dark .select,
body.theme-dark .textarea,
body.theme-dark .program-general-filter-grid .input,
body.theme-dark .program-general-filter-grid .select,
body.theme-dark .calendar-service-options button { border-color: var(--line-strong); background-color: #101e32; color: var(--ink-950); }
body.theme-dark .program-general-filter-panel { border-color: var(--line); background: linear-gradient(135deg, #16263c, #111f33); }
body.theme-dark .program-row-legend-item { border-color: var(--line); background: #101e32; color: var(--ink-700); }
body.theme-dark .program-general-table { color: #d8e5f2; }
body.theme-dark .program-general-table th { border-color: #3a4f69; background: #193452; color: #8fc0f4; }
body.theme-dark .program-general-table th[data-program-column="select"],
body.theme-dark .program-general-table th[data-program-column="edit"] { background: #193452; }
body.theme-dark .program-column-header > button:hover,
body.theme-dark .program-column-header > button[aria-expanded="true"],
body.theme-dark .program-column-header.has-filter > button { background: #244a73; color: #d8ebff; }
body.theme-dark .program-column-filter-popover { border-color: #3a5878; background: #142238; color: #eaf2fb; box-shadow: 0 22px 60px rgba(0, 0, 0, .55); }
body.theme-dark .program-column-filter-popover > header { color: #b8d9ff; }
body.theme-dark .program-column-filter-popover > header button,
body.theme-dark .program-column-filter-tools button { border-color: #3a5878; background: #101e32; color: #d8eaff; }
body.theme-dark .program-column-filter-search input { border-color: #3a5878; background: #101e32; color: #edf5ff; }
body.theme-dark .program-column-filter-values { border-color: #3a5878; background: #101e32; scrollbar-color: #6687aa #101e32; }
body.theme-dark .program-column-filter-values label:hover { background: #1d3857; }
body.theme-dark .program-column-filter-count { color: #9eb2c8; }
body.theme-dark .program-general-table-scroll-top { border-color: #33475f; background: #101e32; scrollbar-color: #6f8cab #1a2a40; }
body.theme-dark .program-general-table .program-column-filter-row th,
body.theme-dark .program-general-table .program-column-filter-cell.is-empty { background: #142b45; }
body.theme-dark .program-general-table .program-column-filter-cell input { border-color: #3a5878; background: #101e32; color: #edf5ff; }
body.theme-dark .program-general-table .program-column-filter-cell input::placeholder { color: #8ea4bd; }
body.theme-dark .program-general-table td { border-color: #33475f; background: color-mix(in srgb, var(--program-row-bg, #142238) 72%, #142238); color: #eef4fb; }
body.theme-dark .program-general-table tbody tr.program-row-maintenance { --program-row-bg: #245b48; }
body.theme-dark .program-general-table tbody tr.program-row-extra,
body.theme-dark .program-general-table tbody tr.program-row-team { --program-row-bg: #66551f; }
body.theme-dark .program-general-table tbody tr.program-row-maneuver { --program-row-bg: #495462; }
body.theme-dark .program-general-table tbody tr.program-row-lines { --program-row-bg: #543e71; }
body.theme-dark .program-general-table tbody tr.program-row-services { --program-row-bg: #1d5a5c; }
body.theme-dark .program-general-table tbody tr.program-row-justification { --program-row-bg: #6a3439; }

/* Justificativas SE — leitura executiva */
.justification-insights { padding: 22px 24px 8px; background: linear-gradient(180deg, #f8fbff 0%, #fff 100%); border-top: 1px solid #dce6f2; }
.justification-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.justification-kpis article { display: flex; align-items: center; gap: 13px; min-height: 108px; padding: 18px; border: 1px solid #dce6f2; border-radius: 16px; background: #fff; box-shadow: 0 9px 28px rgba(24, 55, 96, .07); }
.justification-kpis article > span { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; color: #155ab6; background: #eaf3ff; }
.justification-kpis article > span svg { width: 21px; height: 21px; }
.justification-kpis div { display: grid; gap: 2px; }
.justification-kpis small, .justification-chart-card header small, .justification-coverage-card small { color: #718198; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.justification-kpis strong { color: #0c2340; font-size: 28px; line-height: 1; }
.justification-kpis em { color: #6b7b91; font-size: 12px; font-style: normal; }
.justification-charts { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(260px, .8fr); gap: 14px; margin-top: 14px; }
.justification-chart-card, .justification-coverage-card { min-height: 250px; padding: 20px; border: 1px solid #dce6f2; border-radius: 16px; background: #fff; box-shadow: 0 9px 28px rgba(24, 55, 96, .06); }
.justification-chart-card header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.justification-chart-card h3, .justification-coverage-card h3 { margin: 3px 0 0; color: #102b4c; font-size: 16px; }
.justification-chart-card header > span { align-self: flex-start; padding: 5px 9px; border-radius: 999px; color: #1e5fae; background: #eaf3ff; font-size: 11px; font-weight: 800; }
.justification-chart-row { display: grid; grid-template-columns: minmax(95px, 130px) minmax(80px, 1fr) 34px; align-items: center; gap: 9px; margin: 12px 0; }
.justification-chart-row > span { overflow: hidden; color: #44566d; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.justification-chart-row > div { height: 10px; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.justification-chart-row i { display: block; height: 100%; min-width: 5px; border-radius: inherit; background: linear-gradient(90deg, #1b66c8, #53a2ff); }
.justification-chart-row i.base { background: linear-gradient(90deg, #0a8c75, #46c3a6); }
.justification-chart-row strong { color: #142f51; font-size: 13px; text-align: right; }
.justification-coverage-card { display: flex; align-items: center; justify-content: center; gap: 20px; }
.justification-donut { --coverage: 0%; display: grid; place-items: center; width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; background: conic-gradient(#1a67ca var(--coverage), #e4eaf2 0); }
.justification-donut::before { content: ""; grid-area: 1 / 1; width: 96px; height: 96px; border-radius: 50%; background: #fff; }
.justification-donut span { z-index: 1; grid-area: 1 / 1; display: grid; text-align: center; }
.justification-donut strong { color: #0f315a; font-size: 24px; }
.justification-donut small { font-size: 9px; }
.justification-coverage-card p { max-width: 210px; color: #627289; font-size: 12px; line-height: 1.55; }
.justification-coverage-card > div:last-child > span { display: flex; align-items: center; gap: 6px; color: #607087; font-size: 11px; }
.justification-coverage-card > div:last-child > span i { width: 9px; height: 9px; border-radius: 50%; background: #1a67ca; }
.justification-coverage-card > div:last-child > span i:nth-of-type(2) { margin-left: 8px; background: #e4eaf2; }

/* Escala — período, observação e espelhamento */
.coordinator-period-switch { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid #cddbeb; border-radius: 13px; background: #f5f9ff; cursor: pointer; }
.coordinator-period-switch input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1763c6; }
.coordinator-period-switch span { display: grid; gap: 3px; }
.coordinator-period-switch strong { color: #183654; font-size: 13px; }
.coordinator-period-switch small { color: #6c7d91; font-size: 11px; }
.coordinator-period-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; border: 1px dashed #b9cce2; border-radius: 13px; background: #fbfdff; }
.coordinator-period-fields[hidden], .coordinator-scale-date-field[hidden] { display: none !important; }
.coordinator-weekday-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.coordinator-weekday-options label { cursor: pointer; }
.coordinator-weekday-options input { position: absolute; opacity: 0; pointer-events: none; }
.coordinator-weekday-options span { display: grid; place-items: center; min-width: 44px; height: 34px; padding: 0 10px; border: 1px solid #cbd9e9; border-radius: 9px; color: #53677f; background: #fff; font-size: 12px; font-weight: 800; }
.coordinator-weekday-options input:checked + span { border-color: #1b66c8; color: #fff; background: #1b66c8; box-shadow: 0 5px 14px rgba(27, 102, 200, .2); }

body.theme-dark .justification-insights { border-color: #283d58; background: linear-gradient(180deg, #101d2e, #0e1928); }
body.theme-dark .justification-kpis article, body.theme-dark .justification-chart-card, body.theme-dark .justification-coverage-card { border-color: #2b415e; background: #152438; box-shadow: none; }
body.theme-dark .justification-kpis strong, body.theme-dark .justification-chart-card h3, body.theme-dark .justification-coverage-card h3, body.theme-dark .justification-chart-row strong { color: #eef6ff; }
body.theme-dark .justification-kpis em, body.theme-dark .justification-chart-row > span, body.theme-dark .justification-coverage-card p { color: #9fb1c8; }
body.theme-dark .justification-chart-row > div { background: #263950; }
body.theme-dark .justification-donut::before { background: #152438; }
body.theme-dark .coordinator-period-switch, body.theme-dark .coordinator-period-fields { border-color: #37506d; background: #14253a; }
body.theme-dark .coordinator-period-switch strong { color: #edf5ff; }
body.theme-dark .coordinator-weekday-options span { border-color: #3a5270; color: #b7c8da; background: #172a40; }

@media (max-width: 1100px) {
  .justification-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .justification-charts { grid-template-columns: 1fr 1fr; }
  .justification-coverage-card { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .justification-kpis, .justification-charts { grid-template-columns: 1fr; }
  .justification-coverage-card { grid-column: auto; flex-direction: column; text-align: center; }
  .coordinator-period-fields { grid-template-columns: 1fr; }
}
body.theme-dark .program-general-table tbody tr.program-row-default { --program-row-bg: #334a64; }
body.theme-dark .calendar-month-weekdays { border-color: #34506d; background: #153b64; color: #eef6ff; }
body.theme-dark .calendar-month-day.is-outside { background: #0c1728; }
body.theme-dark .calendar-month-date { border-color: #2b3c52; }
body.theme-dark .schedule-day-header { border-top-color: #2a6aa6; background: #13263c; }
body.theme-dark .schedule-day-header > span { color: #8fc0f4; }
body.theme-dark .schedule-day-header > strong { color: #eef4fb; }
body.theme-dark .schedule-day-header > em { background: #17365f; color: #a9d3ff; }
body.theme-dark .schedule-section-title { background: #1a3552; color: #a9d3ff; }
body.theme-dark .schedule-section-title > button { color: #a9d3ff; }
body.theme-dark .schedule-section-title b { background: #0d1c2f; color: #8fc0f4; }
body.theme-dark .program-reprogram-option { border-color: #345b85; background: #142d49; color: #d8eaff; }
body.theme-dark .program-reprogram-option small { color: #9fb9d7; }
body.theme-dark .calendar-view-switcher { border-color: var(--line-strong); background: #101e32; }
body.theme-dark .calendar-view-switcher button:hover { background: var(--surface-soft); }
body.theme-dark .calendar-month-day,
body.theme-dark .schedule-day,
body.theme-dark .vacant-team-chip,
body.theme-dark .calendar-year-card { border-color: var(--line); background: #101e32; color: var(--ink-950); }
body.theme-dark .calendar-count-table th { background: #101e32; }
body.theme-dark .calendar-count-table th,
body.theme-dark .calendar-count-table td { border-color: var(--line); color: var(--ink-700); }
body.theme-dark .calendar-access-state.is-readonly,
body.theme-dark .calendar-view-actions .button.is-active,
body.theme-dark .calendar-service-options button:hover,
body.theme-dark .calendar-service-options button.is-active { background: #17365f; color: #8fc0f4; }
body.theme-dark .button-secondary,
body.theme-dark .button-ghost { border-color: var(--line-strong); background: #142238; color: var(--ink-700); }
body.theme-dark .button-secondary:hover,
body.theme-dark .button-ghost:hover { background: #1d304a; color: white; }
body.theme-dark .admin-files-upload-card { border-color: #345b85; background: linear-gradient(135deg, #172a42, #122238); }
body.theme-dark .admin-files-upload-card strong { color: var(--ink-950); }
body.theme-dark .admin-files-tabs { border-color: var(--line-strong); background: #101e32; }
body.theme-dark .admin-files-tabs button:hover { background: #1d304a; }
body.theme-dark .admin-jse-status article { border-color: var(--line); background: #101e32; }
body.theme-dark .admin-jse-status article > span { background: #173e34; color: #72dfbc; }
body.theme-dark .admin-jse-import-card { border-color: #28664f; background: linear-gradient(135deg, #142e2a, #102621); }
body.theme-dark .admin-jse-preview { border-color: #28664f; background: #101e32; }
body.theme-dark .admin-jse-metrics article { border-color: var(--line); background: #142238; }
body.theme-dark .admin-jse-metrics article.is-warning,
body.theme-dark .admin-jse-notice { border-color: #7c5c29; background: #392d1b; color: #ffd08a; }
body.theme-dark .admin-presence-card { border-color: #28664f; background: linear-gradient(135deg, #142e2a, #102621); }
body.theme-dark .admin-presence-card header strong,
body.theme-dark .admin-presence-user strong { color: var(--ink-950); }
body.theme-dark .admin-presence-icon,
body.theme-dark .admin-presence-count { background: #173e34; color: #72dfbc; }
body.theme-dark .admin-presence-user { border-color: #285347; background: rgba(15, 34, 31, .78); }
body.theme-dark .admin-presence-user time { color: #72dfbc; }
body.theme-dark .admin-presence-meta button { background: #173e34; color: #72dfbc; }
body.theme-dark .budget-module-card { border-color: var(--line); background: linear-gradient(145deg, #142238 0%, #142238 68%, color-mix(in srgb, var(--budget-accent) 22%, #142238) 150%); }
body.theme-dark .budget-module-copy strong { color: var(--ink-950); }
body.theme-dark .budget-module-copy p { color: #a9b9cc; }
body.theme-dark .budget-module-card.mso { --budget-accent: #59d0cd; --budget-soft: #173b43; }
body.theme-dark .budget-module-card.me { --budget-accent: #c2a8f2; --budget-soft: #2b2848; }
body.theme-dark .budget-module-card.pafe { --budget-accent: #b49bff; --budget-soft: #28294c; }
body.theme-dark .budget-module-status.available { background: #173e34; color: #72dfbc; }
body.theme-dark .budget-module-status.soon { background: #49391f; color: #ffd08a; }
body.theme-dark .mso-dashboard { border-color: var(--line); background: #101d2d; }
body.theme-dark .mso-navigation { background: #122136; }
body.theme-dark .mso-kpis article { border-color: #314156; background: #16263a; box-shadow: 5px 6px 12px rgba(0, 0, 0, .28); }
body.theme-dark .mso-kpis article > small,
body.theme-dark .mso-kpis article > strong,
body.theme-dark .mso-execution strong,
body.theme-dark .mso-execution small,
body.theme-dark .mso-budget-chart h2 { color: #e8f0f8; }
body.theme-dark .mso-budget-chart header p,
body.theme-dark .mso-progress-row > strong { color: #a9b9cc; }
body.theme-dark .mso-progress-track { background: #34445a; }
body.theme-dark .mso-progress-available { color: #e8f0f8; }
body.theme-dark .mso-company-available { background: #34445a; color: #e8f0f8; }
body.theme-dark .mso-table { color: #dce6f1; }
body.theme-dark .mso-table td { border-color: #26384d; background: #16263a; }
body.theme-dark .mso-table tbody tr:nth-child(even) td { background: #1c3047; }
body.theme-dark .mso-table tr.total td { background: #122136; }
body.theme-dark .mso-filters { background: #344a56; }
body.theme-dark .mso-filters > header,
body.theme-dark .mso-filter > span { color: #e8f0f8; }
body.theme-dark .mso-clear-filters { background: rgba(255, 255, 255, .1); }
body.theme-dark .admin-files-summary article,
body.theme-dark .admin-files-table { border-color: var(--line); background: #101e32; }
body.theme-dark .admin-files-table th { border-color: var(--line-strong); background: #1a3049; color: #aac8ea; }
body.theme-dark .admin-files-table td { border-color: var(--line); color: var(--ink-700); }
body.theme-dark .admin-files-restricted { border-color: #345b85; background: linear-gradient(135deg, #172a42, #122238); }
body.theme-dark .admin-files-restricted strong { color: var(--ink-950); }
body.theme-dark .home-page .metric-card {
  border-color: var(--line);
  background: linear-gradient(150deg, #142238 0%, #142238 70%, color-mix(in srgb, var(--metric-accent) 18%, #142238) 155%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
}
body.theme-dark .home-insight-card,
body.theme-dark .module-card,
body.theme-dark .database-sync-card,
body.theme-dark .program-module-rail,
body.theme-dark .program-count-card {
  border-color: var(--line);
  background: #142238;
  color: var(--ink-950);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
}
body.theme-dark .critical-alert-item {
  border-color: #344a64;
  background: #101e32;
}
body.theme-dark .critical-alert-item strong { color: #eef4fb; }
body.theme-dark .critical-alert-item small { color: #a9b9cc; }
body.theme-dark .quick-action {
  border-color: var(--line);
  background: linear-gradient(145deg, #17273d, #132136);
  color: var(--ink-700);
}
body.theme-dark .dashboard-link-card {
  --card-accent: #78adff;
  border-color: var(--line);
  background: linear-gradient(155deg, #142238 0%, #142238 68%, color-mix(in srgb, var(--card-accent) 22%, #142238) 145%);
  color: var(--ink-950);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
}
body.theme-dark .dashboard-link-card[data-tone="green"] { --card-accent: #4ed6ac; }
body.theme-dark .dashboard-link-card[data-tone="orange"] { --card-accent: #ffb45f; }
body.theme-dark .dashboard-link-card[data-tone="purple"] { --card-accent: #b49bff; }
body.theme-dark .dashboard-link-card[data-tone="red"] { --card-accent: #ff858e; }
body.theme-dark .dashboard-link-card[data-tone="teal"] { --card-accent: #50d4d1; }
body.theme-dark .dashboard-link-card[data-tone="navy"] { --card-accent: #91b8df; }
body.theme-dark .dashboard-card-icon { border-color: color-mix(in srgb, var(--card-accent) 50%, #34475f); background: color-mix(in srgb, var(--card-accent) 18%, #17273d); }
body.theme-dark .dashboard-card-copy small,
body.theme-dark .safety-card-copy small { color: #a9b9cc; }
body.theme-dark .dashboard-card-action,
body.theme-dark .safety-card-footer { border-color: var(--line); }
body.theme-dark .safety-link-card {
  --safety-accent: #78adff;
  border-color: var(--line);
  background: linear-gradient(150deg, #142238 0%, #142238 70%, color-mix(in srgb, var(--safety-accent) 22%, #142238) 145%);
  color: var(--ink-950);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
}
body.theme-dark .safety-link-card[data-tone="green"] { --safety-accent: #4ed6ac; }
body.theme-dark .safety-link-card[data-tone="orange"] { --safety-accent: #ffb45f; }
body.theme-dark .safety-link-card[data-tone="purple"] { --safety-accent: #b49bff; }
body.theme-dark .safety-link-card[data-tone="red"] { --safety-accent: #ff858e; }
body.theme-dark .safety-link-card[data-tone="teal"] { --safety-accent: #50d4d1; }
body.theme-dark .safety-link-card[data-tone="navy"] { --safety-accent: #91b8df; }
body.theme-dark .safety-card-icon { background: color-mix(in srgb, var(--safety-accent) 18%, #17273d); }
body.theme-dark .program-general-hero { border-color: var(--line); background: linear-gradient(135deg, #17273d, #122035); }
body.theme-dark .program-general-title h1,
body.theme-dark .program-general-card-header h2 { color: var(--ink-950); }
body.theme-dark .database-sync-header,
body.theme-dark .database-sync-card > footer,
body.theme-dark .decision-period,
body.theme-dark .program-filter-bar { border-color: var(--line); background: linear-gradient(135deg, #17273d, #122035); }
body.theme-dark .database-sync-source,
body.theme-dark .program-type-card { border-color: var(--line); background: #17273d; }
body.theme-dark .program-demand-empty { border-color: #3a5878; background: #13243a; }
body.theme-dark .decision-kpi {
  border-color: var(--line);
  background: linear-gradient(155deg, #17273d 55%, color-mix(in srgb, var(--kpi-accent) 20%, #17273d) 155%);
}
body.theme-dark .program-module-link {
  --module-accent: #78adff;
  border-color: var(--line);
  background: linear-gradient(135deg, #17273d 65%, color-mix(in srgb, var(--module-accent) 20%, #17273d) 150%);
}
body.theme-dark .program-module-link.green { --module-accent: #4ed6ac; }
body.theme-dark .program-module-link.orange { --module-accent: #ffb45f; }
body.theme-dark .program-module-link.purple { --module-accent: #b49bff; }
body.theme-dark .program-module-link.cyan { --module-accent: #50d4d1; }
body.theme-dark .program-count-table,
body.theme-dark .data-table { background: #142238; color: var(--ink-700); }
body.theme-dark .program-count-table th,
body.theme-dark .data-table th { border-color: var(--line-strong); background: #1a3049; color: #aac8ea; }
body.theme-dark .program-count-table td,
body.theme-dark .data-table td { border-color: var(--line); color: var(--ink-700); }
body.theme-dark .program-count-table tbody tr:hover,
body.theme-dark .data-table tbody tr:hover { background: #1a2c44; }
body.theme-dark .progress-track,
body.theme-dark .program-type-meter { background: #25374e; }
body.theme-dark .decision-period strong,
body.theme-dark .decision-kpi-value,
body.theme-dark .program-demand-empty strong,
body.theme-dark .program-count-heading h3,
body.theme-dark .database-sync-title h2,
body.theme-dark .database-sync-count strong { color: var(--ink-950); }
body.theme-dark .empty-state-icon { background: #1d304a; color: #9db0c5; }

@media (max-width: 780px) {
  .calendar-service-panel { grid-template-columns: 1fr; }
  .calendar-service-options { justify-content: flex-start; }
  .calendar-count-panel > header { align-items: flex-start; flex-direction: column; }
}

/* MSO — gestão profissional de orçamento */
.mso-professional {
  --mso-brand: #003d43;
  --mso-brand-strong: #002f34;
  --mso-brand-soft: #e9f4f3;
  --mso-blue: #0759b6;
  --mso-track: #e7edf4;
  --mso-low: #0d8c63;
  --mso-attention: #e7a313;
  --mso-critical: #d63b3f;
  overflow: hidden;
  border: 1px solid #dbe4e8;
  border-radius: 24px;
  background: #f7f9fa;
  box-shadow: 0 18px 48px rgba(21, 48, 55, .12);
}
.mso-pro-header {
  min-height: 118px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(125deg, var(--mso-brand-strong), var(--mso-brand) 60%, #0d6868);
  color: white;
}
.mso-pro-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: white;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.mso-pro-back:hover { background: rgba(255, 255, 255, .17); transform: translateX(-2px); }
.mso-pro-back svg { width: 19px; }
.mso-pro-title { min-width: 0; display: flex; align-items: center; gap: 16px; }
.mso-pro-title > span {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.mso-pro-title > span svg { width: 27px; }
.mso-pro-title small { display: block; margin-bottom: 3px; color: #9ddbd7; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.mso-pro-title h1 { margin: 0; color: white; font-size: clamp(24px, 2.3vw, 34px); line-height: 1.05; letter-spacing: -.035em; }
.mso-pro-title p { margin: 6px 0 0; color: rgba(255, 255, 255, .72); font-size: 11px; line-height: 1.4; }
.mso-pro-meta { display: flex; gap: 8px; }
.mso-pro-meta > span { min-width: 86px; display: grid; gap: 3px; padding: 10px 13px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; background: rgba(255, 255, 255, .08); }
.mso-pro-meta small { color: #9ddbd7; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.mso-pro-meta strong { color: white; font-size: 13px; }

.mso-pro-filter-card { margin: 18px; padding: 20px; border: 1px solid #dbe4e8; border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(28, 54, 61, .07); }
.mso-pro-filter-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.mso-pro-filter-card h2 { margin: 3px 0 4px; color: #102d33; font-size: 18px; letter-spacing: -.02em; }
.mso-pro-filter-card header p { margin: 0; color: #6b7c82; font-size: 10px; }
.mso-source-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 999px; background: var(--mso-brand-soft); color: #176a68; font-size: 9px; font-weight: 850; white-space: nowrap; }
.mso-source-badge svg { width: 14px; }
.mso-pro-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mso-pro-filter { min-width: 0; display: grid; gap: 6px; }
.mso-pro-filter > span { color: #31464c; font-size: 9px; font-weight: 850; }
.mso-pro-filter .select { min-width: 0; height: 38px; border-color: #d7e1e5; border-radius: 10px; background: #fbfcfd; color: #1d383e; font-size: 10px; }
.mso-pro-filter .select:focus { border-color: #4a9897; box-shadow: 0 0 0 3px rgba(49, 139, 137, .12); }
.mso-multi-filter { min-width: 0; border: 1px solid #d7e1e5; border-radius: 11px; background: #fbfcfd; }
.mso-multi-filter > summary { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; color: #31464c; cursor: pointer; list-style: none; }
.mso-multi-filter > summary::-webkit-details-marker { display: none; }
.mso-multi-filter > summary > span { min-width: 0; display: grid; gap: 2px; }
.mso-multi-filter > summary b { font-size: 10px; font-weight: 850; }
.mso-multi-filter > summary small { overflow: hidden; color: #718087; font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.mso-multi-filter > summary svg { width: 14px; flex: 0 0 14px; color: #438783; transition: transform 160ms ease; }
.mso-multi-filter[open] { border-color: #79aaa8; box-shadow: 0 0 0 3px rgba(49, 139, 137, .1); }
.mso-multi-filter[open] > summary svg { transform: rotate(180deg); }
.mso-multi-filter-panel { padding: 0 8px 8px; border-top: 1px solid #e4ebed; }
.mso-multi-filter-toolbar { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mso-multi-filter-toolbar span { color: #829197; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.mso-multi-filter-toolbar button { padding: 0; border: 0; background: transparent; color: #177872; font: 850 9px/1 inherit; cursor: pointer; }
.mso-multi-filter-toolbar button:hover { text-decoration: underline; }
.mso-multi-filter-options { max-height: 190px; display: grid; gap: 2px; overflow-y: auto; overscroll-behavior: contain; }
.mso-multi-filter-options label { min-width: 0; display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 7px; padding: 7px 6px; border-radius: 7px; color: #2d454b; font-size: 10px; line-height: 1.3; cursor: pointer; }
.mso-multi-filter-options label:hover { background: #edf5f5; }
.mso-multi-filter-options input { width: 14px; height: 14px; margin: 0; accent-color: var(--mso-brand); }
.mso-multi-filter-options label span { overflow-wrap: anywhere; }
.mso-pro-filter-card > footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e7edef; }
.mso-pro-filter-card > footer > span { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: #718087; font-size: 10px; }
.mso-pro-filter-card > footer > span svg { width: 14px; color: #328884; }
.mso-pro-filter-card .button-primary { background: var(--mso-brand); box-shadow: 0 6px 16px rgba(0, 61, 67, .2); }

.mso-pro-results { padding: 0 18px 18px; }
.mso-awaiting-filter { min-height: 250px; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 42px; border: 1px dashed #b9cccf; border-radius: 18px; background: linear-gradient(145deg, #fff, #f1f6f6); text-align: left; }
.mso-awaiting-filter > span { width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; border-radius: 22px; background: var(--mso-brand-soft); color: #167773; }
.mso-awaiting-filter > span svg { width: 32px; }
.mso-awaiting-filter > div { max-width: 560px; }
.mso-awaiting-filter small { color: #13817a; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.mso-awaiting-filter h2 { margin: 5px 0 8px; color: #123137; font-size: 23px; letter-spacing: -.025em; }
.mso-awaiting-filter p { margin: 0; color: #6a7d82; font-size: 11px; line-height: 1.6; }
.mso-awaiting-filter.empty > span { background: #fff2df; color: #bc7608; }

.mso-pro-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.mso-pro-kpis article,
.mso-pro-kpis .mso-kpi-card { min-width: 0; min-height: 102px; display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid #dce5e8; border-radius: 16px; background: white; box-shadow: 0 8px 22px rgba(26, 53, 60, .07); }
.mso-pro-kpis article > span:last-child,
.mso-pro-kpis .mso-kpi-card > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.mso-kpi-card { position: relative; width: 100%; color: inherit; font: inherit; text-align: left; }
.mso-kpi-action { cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.mso-kpi-action:hover { border-color: #b6a0e0; box-shadow: 0 13px 27px rgba(85, 59, 136, .15); transform: translateY(-2px); }
.mso-kpi-link { width: 22px; height: 22px; display: grid; flex: 0 0 22px; place-items: center; margin-left: auto; border-radius: 7px; background: #f0ecfb; color: #7048b8; }
.mso-kpi-link svg { width: 13px; }
.mso-pro-kpis small { color: #728087; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.mso-pro-kpis strong { overflow: hidden; color: #14343a; font-size: clamp(14px, 1.3vw, 19px); text-overflow: ellipsis; white-space: nowrap; }
.mso-pro-kpis strong.negative { color: var(--mso-critical); }
.mso-pro-kpis em { color: #829096; font-size: 9px; font-style: normal; }
.mso-kpi-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; background: var(--mso-brand-soft); color: #13746f; }
.mso-kpi-icon.realized { background: #e9f1fb; color: #176ac2; }
.mso-kpi-icon.available { background: #e9f7f0; color: #18865f; }
.mso-kpi-icon svg { width: 19px; }
.mso-pro-kpis article.execution { background: linear-gradient(145deg, #fff, #edf6f5); }
.mso-pro-donut { --execution: 0%; width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--mso-brand) 0 var(--execution), #dbe6e8 var(--execution) 100%); }
.mso-pro-donut::before { width: 36px; height: 36px; grid-area: 1 / 1; border-radius: 50%; background: white; content: ""; }
.mso-pro-donut i { position: relative; grid-area: 1 / 1; color: #17454a; font-size: 7px; font-style: normal; font-weight: 900; }

.mso-result-context { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #dce6e8; border-radius: 12px; background: white; }
.mso-result-context > span { display: inline-flex; align-items: center; gap: 6px; color: #496066; font-size: 10px; font-weight: 850; }
.mso-result-context > span svg { width: 13px; color: #267f7b; }
.mso-result-context b { max-width: 230px; overflow: hidden; padding: 5px 8px; border-radius: 999px; background: var(--mso-brand-soft); color: #176d69; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mso-result-context small { margin-left: auto; color: #7d8b90; font-size: 10px; font-weight: 800; }

.mso-package-list { display: grid; gap: 14px; }
.mso-package-card { overflow-x: auto; border: 1px solid rgba(0, 81, 83, .34); border-radius: 16px; background: white; box-shadow: 0 9px 26px rgba(25, 51, 58, .08); }
.mso-package-card-header { min-width: 980px; display: flex; align-items: center; gap: 11px; padding: 13px 15px; background: linear-gradient(90deg, var(--mso-brand-strong), var(--mso-brand)); }
.mso-package-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .13); color: white; }
.mso-package-icon svg { width: 17px; }
.mso-package-card-header > span:nth-child(2) { display: grid; gap: 1px; }
.mso-package-card-header small { color: #93d6d1; font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mso-package-card-header strong { color: white; font-size: 13px; letter-spacing: .01em; text-transform: uppercase; }
.mso-package-records { margin-left: auto; padding: 5px 8px; border: 1px solid #dbe4e7; border-radius: 999px; background: white; color: #62747a; font-size: 8px; font-weight: 800; }
.mso-package-row { min-width: 980px; display: grid; grid-template-columns: minmax(145px, .8fr) minmax(230px, 1.55fr) repeat(3, minmax(88px, .66fr)) minmax(74px, .5fr) minmax(72px, .48fr); align-items: center; gap: 10px; padding: 9px 13px; border-top: 1px solid #edf1f3; }
.mso-package-heading { min-height: 39px; border-top: 0; background: #f8fafb; color: #596b71; font-size: 7px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.mso-package-heading > span:not(:first-child) { text-align: center; }
.mso-package-heading > span:nth-child(2) { display: flex; align-items: center; justify-content: center; gap: 5px; }
.mso-package-heading i { width: 7px; height: 7px; display: inline-block; border-radius: 2px; background: var(--mso-track); }
.mso-package-heading i.budget { border: 1px solid #90a3ae; background: transparent; }
.mso-package-heading i.realized { background: var(--mso-brand); }
.mso-package-body .mso-package-row:hover { background: #fbfdfd; }
.mso-row-label { min-width: 0; display: grid; gap: 3px; }
.mso-row-label strong { overflow: hidden; color: #243a40; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mso-row-label small { color: #89969b; font-size: 7px; }
.mso-row-progress { min-width: 0; display: grid; gap: 4px; }
.mso-row-track { height: 18px; display: flex; overflow: hidden; border-radius: 4px; background: var(--mso-track); box-shadow: inset 0 0 0 1px rgba(71, 97, 106, .06); }
.mso-row-track i { display: block; min-width: 0; }
.mso-row-realized { background: linear-gradient(90deg, var(--mso-brand-strong), #08756f); }
.mso-row-available { background: linear-gradient(90deg, #dce5ee, #edf1f6); }
.mso-row-progress-values { display: flex; justify-content: space-between; gap: 8px; font-size: 7px; }
.mso-row-progress-values b { color: #075cac; }
.mso-row-progress-values small { color: #65777e; font-size: inherit; }
.mso-row-value { color: #34484e; font-size: 8px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mso-row-value.realized { color: #0860bd; font-weight: 850; }
.mso-row-value.negative { color: var(--mso-critical); font-weight: 850; }
.mso-row-value.execution { font-size: 9px; font-weight: 900; }
.mso-row-value.execution.low { color: var(--mso-low); }
.mso-row-value.execution.attention { color: var(--mso-attention); }
.mso-row-value.execution.critical { color: var(--mso-critical); }
.mso-row-status { display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; font-size: 8px; font-weight: 850; white-space: nowrap; }
.mso-row-status i { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .13); }
.mso-row-status.low { color: var(--mso-low); }
.mso-row-status.low i { background: var(--mso-low); }
.mso-row-status.attention { color: var(--mso-attention); }
.mso-row-status.attention i { background: var(--mso-attention); }
.mso-row-status.critical { color: var(--mso-critical); }
.mso-row-status.critical i { background: var(--mso-critical); }
.mso-row-status.pending { color: #819097; }
.mso-row-status.pending i { background: #aebac0; }
.mso-package-total { min-height: 52px; border-top-color: #cbdcde; background: linear-gradient(90deg, #edf5f5, #f8fafb); }
.mso-package-total .mso-row-label strong { color: #173f44; font-size: 9px; text-transform: uppercase; }
.mso-package-total .mso-row-value { font-weight: 900; }

.mso-pro-guide { display: grid; grid-template-columns: 1.25fr 1.15fr .9fr; gap: 10px; margin-top: 14px; }
.mso-pro-guide > article { min-height: 86px; display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid #dbe4e7; border-radius: 14px; background: white; }
.mso-pro-guide > article > strong { color: #2f464c; font-size: 8px; text-transform: uppercase; }
.mso-pro-guide > article > span:not(.mso-pro-mini-donut) { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 5px; }
.mso-pro-guide > article > span > i { width: 10px; height: 10px; grid-row: span 2; border-radius: 50%; }
.mso-pro-guide > article > span > b { font-size: 8px; }
.mso-pro-guide > article > span > small { color: #849197; font-size: 7px; }
.mso-pro-guide .low i { background: var(--mso-low); }
.mso-pro-guide .attention i { background: var(--mso-attention); }
.mso-pro-guide .critical i { background: var(--mso-critical); }
.mso-pro-guide p { margin: 0; color: #6e7c82; font-size: 8px; line-height: 1.55; }
.mso-pro-guide article.summary { gap: 11px; background: linear-gradient(145deg, white, #edf5f5); }
.mso-pro-guide article.summary > span:last-child { display: grid; gap: 2px; }
.mso-pro-guide article.summary small { color: #6c7e84; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.mso-pro-guide article.summary strong { color: #173f45; font-size: 16px; }
.mso-pro-guide article.summary em { color: #74858a; font-size: 7px; font-style: normal; }
.mso-pro-mini-donut { --execution: 0%; width: 42px; height: 42px; flex: 0 0 42px; border: 7px solid #edf2f3; border-radius: 50%; background: conic-gradient(var(--mso-brand) 0 var(--execution), #dbe6e8 var(--execution) 100%); box-shadow: inset 0 0 0 5px white; }

body.theme-dark .mso-professional { --mso-brand-soft: #163937; --mso-track: #2a3c4f; border-color: var(--line); background: #0f1d2d; }
body.theme-dark .mso-pro-filter-card,
body.theme-dark .mso-awaiting-filter,
body.theme-dark .mso-pro-kpis article,
body.theme-dark .mso-pro-kpis .mso-kpi-card,
body.theme-dark .mso-result-context,
body.theme-dark .mso-package-card,
body.theme-dark .mso-pro-guide > article { border-color: #2d4357; background: #142438; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
body.theme-dark .mso-pro-filter-card h2,
body.theme-dark .mso-awaiting-filter h2,
body.theme-dark .mso-pro-kpis strong,
body.theme-dark .mso-row-label strong,
body.theme-dark .mso-package-total .mso-row-label strong,
body.theme-dark .mso-pro-guide > article > strong { color: #eef5fb; }
body.theme-dark .mso-pro-filter-card header p,
body.theme-dark .mso-awaiting-filter p,
body.theme-dark .mso-pro-kpis em,
body.theme-dark .mso-result-context > span,
body.theme-dark .mso-row-label small,
body.theme-dark .mso-row-progress-values small,
body.theme-dark .mso-pro-guide p { color: #9fb1c2; }
body.theme-dark .mso-pro-filter > span { color: #c9d7e4; }
body.theme-dark .mso-pro-filter .select { border-color: #324a61; background: #101e31; color: #e7eff7; }
body.theme-dark .mso-multi-filter { border-color: #324a61; background: #101e31; }
body.theme-dark .mso-multi-filter > summary { color: #e7eff7; }
body.theme-dark .mso-multi-filter > summary small { color: #9fb1c2; }
body.theme-dark .mso-multi-filter-panel { border-color: #2b4055; }
body.theme-dark .mso-multi-filter-toolbar span { color: #8fa4b6; }
body.theme-dark .mso-multi-filter-toolbar button { color: #72d0c8; }
body.theme-dark .mso-multi-filter-options label { color: #dbe6ef; }
body.theme-dark .mso-multi-filter-options label:hover { background: #1a3044; }
body.theme-dark .mso-pro-filter-card > footer { border-color: #2a3e53; }
body.theme-dark .mso-source-badge,
body.theme-dark .mso-result-context b { background: #163937; color: #73d5ca; }
body.theme-dark .mso-awaiting-filter { background: linear-gradient(145deg, #142438, #112033); }
body.theme-dark .mso-pro-kpis article.execution,
body.theme-dark .mso-pro-guide article.summary { background: linear-gradient(145deg, #142438, #132d33); }
body.theme-dark .mso-pro-donut::before { background: #142438; }
body.theme-dark .mso-pro-donut i { color: #d8efec; }
body.theme-dark .mso-package-card-header { background: linear-gradient(90deg, var(--mso-brand-strong), var(--mso-brand)); }
body.theme-dark .mso-package-records { border-color: #334b61; background: #132237; color: #a9bbca; }
body.theme-dark .mso-package-heading { background: #192b3f; color: #aebdca; }
body.theme-dark .mso-package-row { border-color: #263a4f; }
body.theme-dark .mso-package-body .mso-package-row:hover { background: #17283c; }
body.theme-dark .mso-row-value { color: #c8d4de; }
body.theme-dark .mso-row-progress-values b { color: #72b2f2; }
body.theme-dark .mso-package-total { background: linear-gradient(90deg, #163237, #182a3c); }
body.theme-dark .mso-pro-mini-donut { border-color: #22374b; box-shadow: inset 0 0 0 5px #142438; }

@media (max-width: 1120px) {
  .mso-pro-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mso-pro-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mso-pro-guide { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .mso-page { margin-inline: -12px; }
  .mso-professional { border-radius: 0; }
  .mso-pro-header { grid-template-columns: auto minmax(0, 1fr); padding: 20px 16px; }
  .mso-pro-title > span { display: none; }
  .mso-pro-title p { display: none; }
  .mso-pro-meta { grid-column: 2; justify-content: flex-start; }
  .mso-pro-filter-card { margin: 12px; padding: 16px; }
  .mso-pro-filter-card > header { align-items: flex-start; flex-direction: column; }
  .mso-pro-filter-grid { grid-template-columns: 1fr; }
  .mso-pro-filter-card > footer { align-items: stretch; flex-wrap: wrap; }
  .mso-pro-filter-card > footer > span { width: 100%; margin-bottom: 4px; }
  .mso-pro-filter-card > footer .button { flex: 1; }
  .mso-pro-results { padding: 0 12px 12px; }
  .mso-awaiting-filter { min-height: 220px; align-items: flex-start; flex-direction: column; padding: 28px 22px; }
  .mso-pro-kpis { grid-template-columns: 1fr; }
  .mso-result-context { align-items: flex-start; flex-wrap: wrap; }
  .mso-result-context small { width: 100%; margin-left: 0; }
  .mso-pro-guide > article { align-items: flex-start; flex-wrap: wrap; }
}

/* MSO v2 — indicadores no topo, resumo central e filtros laterais */
.mso-pro-header-actions { display: grid; justify-items: end; gap: 9px; }
.mso-open-window {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  color: white;
  font: 800 10px/1 inherit;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.mso-open-window:hover { background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.mso-open-window svg { width: 15px; }
.mso-pro-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 18px 18px 14px;
}
.mso-pro-kpis article,
.mso-pro-kpis .mso-kpi-card { min-height: 108px; padding: 18px 15px; }
.mso-pro-kpis small { font-size: 9px; }
.mso-pro-kpis strong { overflow: visible; font-size: clamp(15px, 1.12vw, 18px); line-height: 1.12; text-overflow: clip; white-space: normal; }
.mso-pro-kpis em { font-size: 9px; }
.mso-kpi-icon.me { background: #f0ecfb; color: #7048b8; }
.mso-kpi-icon.controladoria { background: #e9eef8; color: #34598f; }
.mso-pro-kpis article.pending,
.mso-pro-kpis .mso-kpi-card.pending { border-style: dashed; background: linear-gradient(145deg, #fff, #f7f9fc); }
.mso-pro-kpis article.pending strong,
.mso-pro-kpis .mso-kpi-card.pending strong { color: #8b9aa6; }
.mso-pro-donut i { font-size: 8px; }

.mso-pro-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  align-items: start;
  gap: 14px;
  padding: 0 18px 18px;
}
.mso-pro-results { min-width: 0; padding: 0; }
.mso-pro-workspace.filters-hidden { grid-template-columns: 1fr; }
.mso-filters-collapsed { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: -2px; }
.mso-filters-collapsed > span { color: #7a8a91; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.mso-filters-collapsed .button { min-height: 34px; padding-inline: 11px; font-size: 9px; }
.mso-filter-sidebar {
  position: sticky;
  top: 82px;
  margin: 0;
  padding: 17px;
  border-radius: 17px;
}
.mso-filter-sidebar > header { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.mso-filter-header-actions { width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mso-hide-filters { min-height: 29px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid #d7e2e6; border-radius: 8px; background: #f7fafb; color: #53676e; font: 800 8px/1 inherit; cursor: pointer; }
.mso-hide-filters:hover { border-color: #b9cbd1; background: #eef4f5; color: #174f51; }
.mso-hide-filters svg { width: 12px; }
.mso-filter-sidebar h2 { font-size: 20px; }
.mso-filter-sidebar header p { font-size: 11px; line-height: 1.5; }
.mso-filter-sidebar .mso-source-badge { font-size: 9px; }
.mso-filter-sidebar .mso-pro-filter-grid { grid-template-columns: 1fr; gap: 10px; }
.mso-filter-sidebar .mso-pro-filter > span { font-size: 10px; }
.mso-filter-sidebar .mso-pro-filter .select { height: 39px; font-size: 11px; }
.mso-filter-sidebar > footer { align-items: stretch; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; }
.mso-filter-sidebar > footer > span { width: 100%; margin: 0 0 3px; font-size: 9px; }
.mso-filter-sidebar > footer .button { min-width: 0; flex: 1; padding-inline: 8px; font-size: 9px; }

.mso-overview-card { overflow: hidden; border: 1px solid #d8e2e6; border-radius: 17px; background: white; box-shadow: 0 9px 26px rgba(25, 51, 58, .08); }
.mso-overview-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 14px; }
.mso-overview-card h2 { margin: 4px 0 5px; color: #17353b; font-size: 21px; letter-spacing: -.025em; }
.mso-general-overview h2 > span { color: #526a70; font-size: .78em; font-weight: 750; }
.mso-general-overview .mso-overview-row { grid-template-columns: minmax(120px, .55fr) minmax(360px, 2.5fr) minmax(112px, .6fr) 78px; }
.mso-general-overview .mso-center-track { height: 36px; border-radius: 6px; }
.mso-general-overview .mso-center-realized { background: linear-gradient(90deg, #032f35, #064f53); }
.mso-general-overview .mso-center-available { background: #e3e5e7; }
.mso-general-overview .mso-center-track > b { font-size: 11px; }
.mso-overview-card header p { margin: 0; color: #718188; font-size: 11px; line-height: 1.5; }
.mso-overview-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; background: var(--mso-brand-soft); color: #1a7772; font-size: 10px; font-weight: 850; white-space: nowrap; }
.mso-overview-badge svg { width: 14px; }
.mso-overview-legend { display: flex; justify-content: flex-end; gap: 15px; padding: 0 22px 11px; color: #65777d; font-size: 10px; font-weight: 800; }
.mso-overview-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mso-overview-legend i { width: 10px; height: 10px; border-radius: 3px; background: #dbe4eb; }
.mso-overview-legend .realized i { background: var(--mso-brand); }
.mso-overview-legend .available i { background: #dfe7ed; }
.mso-overview-list { border-top: 1px solid #e5ebee; }
.mso-overview-row { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(320px, 2fr) minmax(105px, .6fr) 78px; align-items: center; gap: 16px; padding: 18px; border-bottom: 1px solid #edf1f3; }
.mso-overview-row:last-child { border-bottom: 0; }
.mso-overview-row:hover { background: #fbfdfd; }
.mso-overview-name { min-width: 0; display: grid; gap: 4px; }
.mso-overview-name strong { overflow: hidden; color: #243d43; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mso-overview-name small { color: #819197; font-size: 10px; }
.mso-overview-name em { color: #4c6a70; font-size: 10px; font-style: normal; font-weight: 750; }
.mso-center-progress { min-width: 0; display: grid; gap: 7px; }
.mso-center-track { position: relative; height: 32px; display: flex; overflow: hidden; border: 1px solid #d8e2e8; border-radius: 8px; background: #e5ebef; }
.mso-center-track > i { display: block; height: 100%; transition: width 180ms ease; }
.mso-center-realized { background: linear-gradient(90deg, var(--mso-brand-strong), #08756f); }
.mso-center-available { background: linear-gradient(90deg, #d8e2e9, #e9eef2); }
.mso-center-track > b { position: absolute; inset: 4px 6px 4px auto; z-index: 2; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .93); color: #174d50; font-size: 10px; font-weight: 900; box-shadow: 0 1px 4px rgba(12, 52, 56, .14); }
.mso-center-values { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 10px; font-variant-numeric: tabular-nums; }
.mso-center-values b { color: #08706c; }
.mso-center-values small { color: #718188; font-size: inherit; font-weight: 750; }
.mso-center-values small.negative { color: #c43d51; }
.mso-center-budget { display: grid; gap: 4px; text-align: right; font-variant-numeric: tabular-nums; }
.mso-center-budget small { color: #819197; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.mso-center-budget strong { color: #243d43; font-size: 12px; }
.mso-overview-comparison { min-width: 0; display: grid; gap: 6px; }
.mso-overview-track { position: relative; height: 26px; display: block; overflow: hidden; border-radius: 6px; background: #eef2f5; }
.mso-overview-track i { position: absolute; inset: 0 auto 0 0; min-width: 2px; border-radius: inherit; }
.mso-overview-track.budget i { background: linear-gradient(90deg, #cad6df, #dfe7ed); }
.mso-overview-track.realized i { background: linear-gradient(90deg, var(--mso-brand-strong), #08756f); }
.mso-overview-track b { position: absolute; inset: 0 auto 0 10px; display: flex; align-items: center; color: #344c52; font-size: 9px; font-variant-numeric: tabular-nums; }
.mso-overview-track.realized b { color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.mso-overview-track.realized.short b { color: #0b5a5d; text-shadow: none; }
.mso-overview-track em { position: absolute; inset: 4px 6px 4px auto; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #174d50; font-size: 9px; font-style: normal; font-weight: 900; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.mso-initial-summary { display: grid; gap: 14px; }
.mso-secondary-summary-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr); align-items: stretch; gap: 14px; }
.mso-company-summary-card { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid #d8e2e6; border-radius: 17px; background: white; box-shadow: 0 9px 26px rgba(25, 51, 58, .08); }
.mso-company-summary-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 16px; border-bottom: 1px solid #e5ebee; }
.mso-company-summary-card h2 { margin: 4px 0 5px; color: #17353b; font-size: 21px; letter-spacing: -.025em; }
.mso-company-summary-card header p { margin: 0; color: #718188; font-size: 11px; line-height: 1.5; }
.mso-company-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px; padding: 18px; }
.mso-secondary-summary-grid .mso-company-summary-grid { height: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mso-company-summary-item { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid #dfe7ea; border-radius: 14px; background: linear-gradient(145deg, #fff, #f8fbfb); }
.mso-company-summary-item > header { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e7edef; }
.mso-company-summary-item > header > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.mso-company-summary-item > header small { color: #819197; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.mso-company-summary-item > header strong { overflow: hidden; color: #203c42; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.mso-company-logo { width: min(100%, 175px); height: 54px; display: block; object-fit: contain; object-position: left center; }
.mso-company-summary-body { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: stretch; gap: 16px; padding: 16px; }
.mso-secondary-summary-grid .mso-company-summary-body { grid-template-columns: 1fr; grid-template-rows: minmax(190px, 1fr) auto; }
.mso-company-stack { height: 230px; display: flex; overflow: hidden; flex-direction: column; border: 1px solid #d4dfe4; border-radius: 10px; background: #e5e8ea; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65); }
.mso-secondary-summary-grid .mso-company-stack { width: 100%; height: 100%; min-height: 240px; }
.mso-company-stack > span { min-height: 0; display: flex; overflow: hidden; flex-direction: column; align-items: center; justify-content: center; padding: 5px; text-align: center; transition: height .2s ease; }
.mso-company-stack > span b { font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.mso-company-stack > span strong { margin-top: 2px; font-size: 11px; font-variant-numeric: tabular-nums; }
.mso-company-stack > span em { margin-top: 1px; font-size: 10px; font-style: normal; font-weight: 900; }
.mso-company-stack .available { background: #e3e5e7; color: #304a50; }
.mso-company-stack .realized { background: linear-gradient(180deg, #075a5d, #032f35); color: white; }
.mso-company-summary-body dl { display: grid; align-content: center; gap: 8px; margin: 0; }
.mso-secondary-summary-grid .mso-company-summary-body dl { grid-template-columns: 1fr; gap: 0; }
.mso-secondary-summary-grid .mso-company-summary-body dl > div { padding: 6px 0; }
.mso-company-summary-body dl > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #e7edef; }
.mso-company-summary-body dl > div:last-child { border-bottom: 0; }
.mso-company-summary-body dt { color: #74868c; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.mso-company-summary-body dd { margin: 0; color: #203c42; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.mso-company-summary-body dd.negative { color: #cf334b; }

.mso-package-summary-card { overflow: hidden; border: 1px solid #d8e2e6; border-radius: 17px; background: white; box-shadow: 0 9px 26px rgba(25, 51, 58, .08); }
.mso-package-summary-card > header { min-height: 108px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 18px 15px; border-bottom: 1px solid #e5ebee; }
.mso-package-summary-card h2 { margin: 4px 0 5px; color: #17353b; font-size: 18px; letter-spacing: -.025em; }
.mso-package-summary-card header p { margin: 0; color: #718188; font-size: 10px; line-height: 1.45; }
.mso-package-summary-list { display: grid; }
.mso-package-summary-row { display: grid; grid-template-columns: minmax(88px, .7fr) minmax(155px, 1.35fr) auto; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid #edf1f3; }
.mso-package-summary-row:last-child { border-bottom: 0; }
.mso-package-summary-row:hover { background: #fbfdfd; }
.mso-package-summary-heading { min-width: 0; display: grid; gap: 3px; }
.mso-package-summary-heading strong { overflow: hidden; color: #243d43; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mso-package-summary-heading small { overflow: hidden; color: #829197; font-size: 8px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.mso-package-summary-progress { min-width: 0; display: grid; gap: 4px; }
.mso-package-summary-progress > span { position: relative; height: 21px; overflow: hidden; border-radius: 7px; background: #e1e8ed; }
.mso-package-summary-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--mso-brand-strong), #08756f); }
.mso-package-summary-progress b { position: absolute; inset: 0 5px 0 auto; display: flex; align-items: center; padding: 0 5px; color: #183e42; font-size: 8px; font-weight: 950; }
.mso-package-summary-progress small { overflow: hidden; color: #718188; font-size: 8px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.mso-package-summary-row .mso-row-status > span { display: none; }
.mso-package-summary-empty { padding: 26px 18px; color: #718188; font-size: 11px; text-align: center; }

.mso-package-card-header,
.mso-package-row { min-width: 980px; }
.mso-package-row { grid-template-columns: minmax(128px, .72fr) minmax(290px, 1.65fr) minmax(88px, .52fr) minmax(88px, .52fr) minmax(94px, .56fr) minmax(72px, .42fr) minmax(88px, .5fr); gap: 8px; padding: 10px 11px; }
.mso-package-card-header small { font-size: 9px; }
.mso-package-card-header strong { font-size: 15px; }
.mso-package-records { font-size: 10px; }
.mso-package-heading { font-size: 9px; }
.mso-row-label strong { font-size: 11px; }
.mso-row-label small { font-size: 9px; }
.mso-row-track { position: relative; height: 21px; }
.mso-row-track > b { position: absolute; inset: 0 6px 0 auto; display: flex; align-items: center; z-index: 2; color: #153f43; font-size: 9px; font-weight: 900; text-shadow: 0 1px 1px rgba(255, 255, 255, .7); }
.mso-row-progress-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; font-size: 9px; }
.mso-row-progress-values > span { min-width: 0; display: grid; gap: 2px; }
.mso-row-progress-values > span:nth-child(2) { text-align: center; }
.mso-row-progress-values > span:last-child { text-align: right; }
.mso-row-progress-values em { color: #89979d; font-size: 8px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.mso-row-progress-values b { overflow: hidden; color: #34484e; font-size: 9px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.mso-row-progress-values .realized b { color: #075cac; }
.mso-row-progress-values .available b { color: #65777e; }
.mso-row-progress-values .available.negative b { color: var(--mso-critical); }
.mso-row-value { font-size: 10px; }
.mso-row-value.me { color: #7048b8; font-weight: 850; }
.mso-row-value.pending { color: #98a5ab; font-weight: 800; }
.mso-row-value.execution { font-size: 11px; }
.mso-row-status { font-size: 10px; }
.mso-row-status.attention,
.mso-row-status.critical { padding: 4px 6px; border-radius: 999px; animation: mso-status-blink 1.15s ease-in-out infinite; }
.mso-row-status.attention { --mso-alert-glow: rgba(238, 166, 17, .34); background: rgba(238, 166, 17, .09); }
.mso-row-status.critical { --mso-alert-glow: rgba(215, 54, 76, .34); background: rgba(215, 54, 76, .09); }
.mso-row-status.pending { font-size: 8px; }
.mso-package-total .mso-row-label strong { font-size: 11px; }
.mso-pro-guide > article > strong { font-size: 10px; }
.mso-pro-guide > article > span > b,
.mso-pro-guide p { font-size: 10px; }
.mso-pro-guide > article > span > small,
.mso-pro-guide article.summary small,
.mso-pro-guide article.summary em { font-size: 9px; }

/* Orçamento — edição da Melhor Estimativa */
.me-budget-page { --me-accent: #7048b8; --me-soft: #f0ecfb; }
.me-budget-page .page-heading { margin-bottom: 16px; }
.me-loading-card { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--me-accent); font-size: 12px; font-weight: 800; }
.me-loading-card svg { width: 20px; animation: coordinator-spin 900ms linear infinite; }
.me-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.me-kpi-grid article { min-width: 0; min-height: 105px; display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 22px rgba(25, 48, 77, .06); }
.me-kpi-grid article > span:last-child { min-width: 0; display: grid; gap: 3px; }
.me-kpi-grid small { color: var(--ink-500); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.me-kpi-grid strong { overflow: hidden; color: var(--navy-900); font-size: clamp(15px, 1.25vw, 20px); text-overflow: ellipsis; white-space: nowrap; }
.me-kpi-grid strong.negative { color: var(--red-700); }
.me-kpi-grid em { color: var(--ink-500); font-size: 9px; font-style: normal; }
.me-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 14px; }
.me-data-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.me-data-card h2,
.me-filter-sidebar h2 { margin: 5px 0; color: var(--navy-900); font-size: 20px; }
.me-data-card header p,
.me-filter-sidebar header p { margin: 0; color: var(--ink-500); font-size: 11px; line-height: 1.45; }
.me-filter-sidebar { position: sticky; top: 82px; padding: 18px; }
.me-filter-sidebar header { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.me-view-switch { width: 100%; display: inline-flex; flex: 0 0 auto; margin-top: 14px; padding: 3px; border: 1px solid #d8ddec; border-radius: 8px; background: #f7f6fb; }
.me-view-switch button { min-height: 36px; flex: 1; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: #6f7482; font: 800 10px/1 inherit; cursor: pointer; }
.me-view-switch button.active { background: var(--me-accent); color: white; box-shadow: 0 5px 12px rgba(112, 72, 184, .2); }
.me-filter-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.me-filter-grid label { min-width: 0; display: grid; gap: 6px; }
.me-filter-grid label > span { color: var(--ink-700); font-size: 10px; font-weight: 850; }
.me-column-button { width: 100%; margin-top: 14px; justify-content: center; }
.me-data-card { overflow: hidden; padding: 0; }
.me-data-card > header { padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.me-grid-count { display: inline-flex; align-items: center; padding: 7px 10px; border: 1px solid #c9d4e2; border-radius: 6px; background: #f5f8fc; color: #415b74; font-size: 9px; font-weight: 850; white-space: nowrap; }
.me-table-wrap { width: 100%; max-height: max(300px, calc(100vh - 455px)); overflow: auto; border-top: 1px solid #cbd6e2; }
.me-budget-table { width: 100%; min-width: 1050px; border-collapse: separate; border-spacing: 0; background: white; font-size: 10px; }
.me-monthly-table { min-width: 1280px; }
.me-annual-table { min-width: 2520px; table-layout: auto; }
.me-annual-table th[data-me-column="center"],
.me-annual-table td[data-me-column="center"] { min-width: 175px; }
.me-annual-table th[data-me-column="package"],
.me-annual-table td[data-me-column="package"] { min-width: 145px; }
.me-annual-table th[data-me-column="account"],
.me-annual-table td[data-me-column="account"] { min-width: 190px; }
.me-annual-table th[data-me-column="controlBudget"],
.me-annual-table td[data-me-column="controlBudget"],
.me-annual-table th[data-me-column="me"],
.me-annual-table td[data-me-column="me"],
.me-annual-table th[data-me-column="realized"],
.me-annual-table td[data-me-column="realized"],
.me-annual-table th[data-me-column="available"],
.me-annual-table td[data-me-column="available"] { min-width: 125px; }
.me-annual-month-header { width: 96px; min-width: 96px; background: #dcd5f1 !important; color: #513684 !important; text-align: center !important; }
.me-annual-month-cell { width: 96px; min-width: 96px; padding: 0 !important; color: #7b8794; text-align: center; }
.me-annual-month-cell button { position: relative; width: 100%; min-height: 38px; display: grid; place-items: center; padding: 5px 7px; border: 0; background: transparent; color: var(--me-accent); font: 850 9px/1.15 inherit; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; }
.me-annual-month-cell button:hover,
.me-annual-month-cell button:focus-visible { outline: 0; background: #eee8fa; box-shadow: inset 0 0 0 2px rgba(112, 72, 184, .42); }
.me-annual-month-cell button i { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 999px; background: #f09b19; box-shadow: 0 0 0 2px white; }
.me-annual-edit-hint { display: inline-flex; padding: 5px 7px; border-radius: 6px; background: var(--me-soft); color: var(--me-accent); font-size: 8px; font-weight: 800; white-space: nowrap; }
.me-budget-table th { position: sticky; top: 0; z-index: 2; height: 36px; padding: 7px 9px; border-right: 1px solid #bfcddd; border-bottom: 1px solid #aebfd2; background: #dce8f7; color: #244664; font-size: 8px; font-weight: 900; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.me-budget-table td { height: 38px; padding: 6px 9px; border-right: 1px solid #d4dde8; border-bottom: 1px solid #d4dde8; background: white; color: var(--ink-700); vertical-align: middle; }
.me-budget-table th:last-child,
.me-budget-table td:last-child { border-right: 0; }
.me-budget-table tbody tr:nth-child(even) td { background: #f6f9fc; }
.me-budget-table tbody tr:hover td { background: #edf4ff; }
.me-budget-table .me-row-number { width: 38px; min-width: 38px; padding-inline: 6px; background: #e7eef7; color: #61758a; font-weight: 800; text-align: center; }
.me-budget-table thead .me-row-number { left: 0; z-index: 4; background: #cfddec; }
.me-budget-table tbody .me-row-number { position: sticky; left: 0; z-index: 1; }
.me-budget-table tbody tr:nth-child(even) .me-row-number { background: #dde7f2; }
.me-budget-table tbody tr:hover .me-row-number { background: #d8e7fb; }
.me-month-divider td { position: sticky; top: 36px; z-index: 1; height: 34px; padding: 6px 10px !important; border-bottom-color: #b9c9dc !important; background: #eaf1fb !important; color: #244664 !important; text-align: left !important; }
.me-month-divider td span { display: inline-grid; width: 23px; height: 23px; place-items: center; margin-right: 7px; border-radius: 5px; background: #1b5fc5; color: white; font-size: 8px; font-weight: 900; }
.me-month-divider td strong { font-size: 10px; letter-spacing: .02em; text-transform: uppercase; }
.me-month-divider td small { margin-left: 8px; color: #6b7f92; font-size: 8px; font-weight: 750; }
.me-month-empty td { height: 36px; color: #8292a2; font-size: 9px; font-style: italic; text-align: center; }
.me-center-name,
.me-account-cell { min-width: 0; display: grid; gap: 3px; }
.me-center-name strong,
.me-account-cell strong { color: var(--navy-900); font-size: 10px; }
.me-center-name small,
.me-account-cell small { max-width: 260px; overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.me-package-cell { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-money { color: var(--navy-900) !important; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.me-money > strong { display: block; color: inherit; font: inherit; }
.me-money.me-highlight { color: var(--me-accent) !important; }
.me-money.negative { color: var(--red-700) !important; }
.me-history-link { display: block; margin: 3px 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--me-accent); font: 800 7px/1.2 inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.me-execution-pill { display: inline-flex; min-width: 57px; align-items: center; justify-content: center; padding: 6px 7px; border-radius: 999px; background: #e9f7f0; color: #18865f; font-size: 9px; font-weight: 900; }
.me-execution-pill.attention { background: #fff3d8; color: #b26d04; }
.me-execution-pill.critical { background: #ffe5e9; color: #c7354c; }
.me-adjustment-count { display: inline-flex; padding: 5px 7px; border-radius: 7px; background: var(--me-soft); color: var(--me-accent); font-size: 8px; font-weight: 800; white-space: nowrap; }
.me-edit-field { min-width: 155px; height: 36px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; overflow: hidden; border: 1px solid #cfd9e6; border-radius: 9px; background: white; }
.me-edit-field:focus-within { border-color: var(--me-accent); box-shadow: 0 0 0 3px rgba(112, 72, 184, .1); }
.me-edit-field > span:not(.sr-only) { padding-left: 9px; color: #7c8190; font-size: 9px; font-weight: 800; }
.me-edit-field input { min-width: 0; width: 100%; height: 100%; padding: 0 9px 0 5px; border: 0; outline: 0; background: transparent; color: var(--navy-900); font: 850 10px/1 inherit; text-align: right; }
.me-edited-note { display: block; max-width: 160px; margin-top: 4px; overflow: hidden; color: var(--me-accent); font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.me-row-action { min-height: 31px; padding: 0 9px; font-size: 8px; white-space: nowrap; }
.me-row-action svg { width: 13px; }
.me-modal-loading { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--me-accent); font-size: 11px; font-weight: 800; }
.me-modal-loading svg { width: 18px; animation: coordinator-spin 900ms linear infinite; }
.me-record-summary { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 9px; margin-bottom: 14px; }
.me-record-summary article { min-width: 0; display: grid; align-content: start; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.me-record-summary small { color: var(--ink-500); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.me-record-summary strong { overflow: hidden; color: var(--navy-900); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.me-record-summary span { color: var(--ink-500); font-size: 9px; line-height: 1.4; }
.me-record-summary .description span { max-height: 38px; overflow: auto; }
.me-new-value-field { margin-bottom: 14px; }
.me-new-value-field .input { max-width: 260px; font-weight: 850; text-align: right; }
.me-adjustment-review { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 15px; }
.me-adjustment-review article { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.me-adjustment-review article.next { border-color: #c9b7ea; background: var(--me-soft); }
.me-adjustment-review small { color: var(--ink-500); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.me-adjustment-review strong { color: var(--navy-900); font-size: 14px; font-variant-numeric: tabular-nums; }
.me-adjustment-review strong.negative { color: var(--red-700); }
.me-justification { min-height: 78px; height: auto; padding: 10px 12px; resize: vertical; }
.me-adjustment-help { margin: 10px 0 0; color: var(--ink-500); font-size: 9px; line-height: 1.5; }
.me-history-panel { margin-top: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.me-history-panel > header { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.me-history-panel > header > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--me-soft); color: var(--me-accent); }
.me-history-panel > header svg { width: 15px; }
.me-history-panel > header div { display: grid; gap: 2px; }
.me-history-panel > header strong { color: var(--navy-900); font-size: 10px; }
.me-history-panel > header small { color: var(--ink-500); font-size: 8px; }
.me-history-list { max-height: 210px; overflow: auto; }
.me-history-list article { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.me-history-list article:last-child { border-bottom: 0; }
.me-history-list article > span { display: grid; gap: 3px; }
.me-history-list strong { color: var(--navy-900); font-size: 10px; font-variant-numeric: tabular-nums; }
.me-history-list small { color: var(--ink-500); font-size: 8px; }
.me-history-list p { margin: 0; color: var(--ink-700); font-size: 9px; line-height: 1.45; }
.me-history-empty { min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink-500); font-size: 9px; }
.me-history-empty svg { width: 15px; }

body.theme-dark .me-kpi-grid article,
body.theme-dark .me-filter-sidebar,
body.theme-dark .me-data-card { border-color: var(--line); background: #142238; }
body.theme-dark .me-kpi-grid strong,
body.theme-dark .me-filter-sidebar h2,
body.theme-dark .me-data-card h2,
body.theme-dark .me-center-name strong,
body.theme-dark .me-account-cell strong,
body.theme-dark .me-money,
body.theme-dark .me-edit-field input,
body.theme-dark .me-adjustment-review strong { color: #eef5fb !important; }
body.theme-dark .me-view-switch { border-color: #34475d; background: #101d30; }
body.theme-dark .me-view-switch button { color: #a8bacb; }
body.theme-dark .me-view-switch button.active { color: white; }
body.theme-dark .me-budget-table th { border-color: #30455a; background: #1b3046; color: #c8d8e6; }
body.theme-dark .me-budget-table td { border-color: #30455a; background: #142238; color: #c6d4df; }
body.theme-dark .me-budget-table tbody tr:nth-child(even) td { background: #17283c; }
body.theme-dark .me-budget-table tbody tr:hover td { background: #20364e; }
body.theme-dark .me-budget-table .me-row-number { background: #1c3147; color: #a9bccd; }
body.theme-dark .me-grid-count { border-color: #354b60; background: #101d30; color: #b6c7d6; }
body.theme-dark .me-annual-month-header { border-color: #4e466a !important; background: #302b50 !important; color: #d9ccef !important; }
body.theme-dark .me-annual-month-cell button { color: #c8b5ee; }
body.theme-dark .me-annual-month-cell button:hover,
body.theme-dark .me-annual-month-cell button:focus-visible { background: #292548; box-shadow: inset 0 0 0 2px rgba(171, 139, 229, .45); }
body.theme-dark .me-annual-month-cell button i { box-shadow: 0 0 0 2px #142238; }
body.theme-dark .me-month-divider td { border-color: #40566c !important; background: #233b54 !important; color: #e2edf6 !important; }
body.theme-dark .me-month-divider td small { color: #a9bccd; }
body.theme-dark .me-edit-field { border-color: #3b5065; background: #101e31; }
body.theme-dark .me-adjustment-review article { border-color: #31475b; background: #17283c; }
body.theme-dark .me-adjustment-review article.next { border-color: #6f5b9f; background: #292548; }
body.theme-dark .me-record-summary article,
body.theme-dark .me-history-panel > header { border-color: #31475b; background: #17283c; }
body.theme-dark .me-record-summary strong,
body.theme-dark .me-history-panel > header strong,
body.theme-dark .me-history-list strong { color: #eef5fb; }
body.theme-dark .me-history-panel,
body.theme-dark .me-history-list article { border-color: #31475b; }
body.theme-dark .me-history-list p { color: #c6d4df; }

@media (max-width: 1280px) {
  .me-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .me-workspace { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 980px) {
  .me-workspace { grid-template-columns: 1fr; }
  .me-filter-sidebar { position: static; grid-row: 1; }
  .me-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .me-kpi-grid { grid-template-columns: 1fr; }
  .me-data-card > header { flex-direction: column; }
  .me-filter-grid { grid-template-columns: 1fr; }
  .me-view-switch { width: 100%; }
  .me-view-switch button { flex: 1; }
  .me-adjustment-review { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-record-summary { grid-template-columns: 1fr; }
  .me-history-list article { grid-template-columns: 1fr; }
}

body.theme-dark .mso-overview-card { border-color: #2d4357; background: #142438; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
body.theme-dark .mso-overview-card h2,
body.theme-dark .mso-overview-name strong { color: #eef5fb; }
body.theme-dark .mso-general-overview h2 > span { color: #a9bccb; }
body.theme-dark .mso-general-overview .mso-center-realized { background: linear-gradient(90deg, #08726f, #12a39a); }
body.theme-dark .mso-general-overview .mso-center-available { background: #405367; }
body.theme-dark .mso-overview-card header p,
body.theme-dark .mso-overview-name small,
body.theme-dark .mso-overview-legend { color: #9fb1c2; }
body.theme-dark .mso-overview-name em { color: #afc3d3; }
body.theme-dark .mso-overview-list { border-color: #2a3e53; }
body.theme-dark .mso-overview-row { border-color: #263a4f; }
body.theme-dark .mso-overview-row:hover { background: #17283c; }
body.theme-dark .mso-overview-track { background: #26394d; }
body.theme-dark .mso-overview-track.budget i { background: linear-gradient(90deg, #485d70, #5c7081); }
body.theme-dark .mso-overview-track b { color: #e6eef5; }
body.theme-dark .mso-overview-track.realized b { color: white; }
body.theme-dark .mso-overview-track.realized.short b { color: #b4ebe5; }
body.theme-dark .mso-overview-track em { background: rgba(17, 34, 50, .94); color: #aee3dd; }
body.theme-dark .mso-company-summary-card { border-color: #2d4357; background: #142438; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
body.theme-dark .mso-company-summary-card > header,
body.theme-dark .mso-company-summary-item > header { border-color: #2a3e53; }
body.theme-dark .mso-company-summary-card h2,
body.theme-dark .mso-company-summary-item > header strong,
body.theme-dark .mso-company-summary-body dd { color: #eef5fb; }
body.theme-dark .mso-company-summary-card header p,
body.theme-dark .mso-company-summary-item > header small,
body.theme-dark .mso-company-summary-body dt { color: #9fb1c2; }
body.theme-dark .mso-company-summary-item { border-color: #2d4357; background: linear-gradient(145deg, #17283c, #142438); }
body.theme-dark .mso-company-stack { border-color: #344b60; background: #405367; box-shadow: none; }
body.theme-dark .mso-company-stack .available { background: #405367; color: #eef5fb; }
body.theme-dark .mso-company-stack .realized { background: linear-gradient(180deg, #12a39a, #08726f); }
body.theme-dark .mso-company-summary-body dl > div { border-color: #2a3e53; }
body.theme-dark .mso-company-summary-body dd.negative { color: #ff8294; }
body.theme-dark .mso-package-summary-card { border-color: #2d4357; background: #142438; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
body.theme-dark .mso-package-summary-card > header,
body.theme-dark .mso-package-summary-row { border-color: #2a3e53; }
body.theme-dark .mso-package-summary-card h2,
body.theme-dark .mso-package-summary-heading strong { color: #eef5fb; }
body.theme-dark .mso-package-summary-card header p,
body.theme-dark .mso-package-summary-heading small,
body.theme-dark .mso-package-summary-progress small { color: #9fb1c2; }
body.theme-dark .mso-package-summary-row:hover { background: #17283c; }
body.theme-dark .mso-package-summary-progress > span { background: #405367; }
body.theme-dark .mso-package-summary-progress b { color: #e9f5f4; }
body.theme-dark .mso-center-track { border-color: #344b60; background: #24384c; }
body.theme-dark .mso-center-available { background: linear-gradient(90deg, #405367, #526578); }
body.theme-dark .mso-center-track > b { background: rgba(17, 34, 50, .94); color: #aee3dd; }
body.theme-dark .mso-center-values b { color: #7bd5cd; }
body.theme-dark .mso-center-values small,
body.theme-dark .mso-center-budget small { color: #9fb1c2; }
body.theme-dark .mso-center-budget strong { color: #eef5fb; }
body.theme-dark .mso-row-progress-values em { color: #91a5b5; }
body.theme-dark .mso-row-progress-values .budget b,
body.theme-dark .mso-row-progress-values .available b { color: #c1cfda; }
body.theme-dark .mso-row-value.me { color: #c2a8f2; }
body.theme-dark .mso-row-value.pending,
body.theme-dark .mso-row-status.pending { color: #91a3b1; }
body.theme-dark .mso-pro-kpis article.pending,
body.theme-dark .mso-pro-kpis .mso-kpi-card.pending { border-color: #3a5064; background: linear-gradient(145deg, #142438, #18283b); }
body.theme-dark .mso-hide-filters { border-color: #344a5e; background: #1a2c40; color: #bfd0de; }
body.theme-dark .mso-hide-filters:hover { background: #22364a; color: #eef5fb; }
body.theme-dark .mso-filters-collapsed > span { color: #9fb1c2; }

@keyframes mso-status-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--mso-alert-glow); }
  50% { opacity: .48; box-shadow: 0 0 0 4px var(--mso-alert-glow); }
}

@media (prefers-reduced-motion: reduce) {
  .mso-row-status.attention,
  .mso-row-status.critical { animation: none; }
}

@media (max-width: 1280px) {
  .mso-pro-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mso-pro-workspace { grid-template-columns: minmax(0, 1fr) 235px; }
  .mso-secondary-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1120px) {
  .mso-pro-workspace { grid-template-columns: 1fr; }
  .mso-filter-sidebar { position: static; grid-row: 1; }
  .mso-filter-sidebar .mso-pro-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mso-filter-sidebar > footer > span { width: auto; margin-right: auto; }
  .mso-filter-sidebar > footer .button { flex: 0 0 auto; }
  .mso-company-summary-grid { grid-template-columns: 1fr; }
  .mso-secondary-summary-grid .mso-company-summary-grid { grid-template-columns: 1fr; }
  .mso-secondary-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .mso-pro-header-actions { grid-column: 2; justify-items: start; }
  .mso-open-window span { display: none; }
  .mso-pro-kpis { grid-template-columns: 1fr; margin: 12px; }
  .mso-pro-workspace { padding: 0 12px 12px; }
  .mso-filter-sidebar { margin: 0; }
  .mso-filter-sidebar .mso-pro-filter-grid { grid-template-columns: 1fr; }
  .mso-filter-sidebar > footer > span { width: 100%; }
  .mso-filter-sidebar > footer .button { flex: 1; }
  .mso-overview-card > header { align-items: flex-start; flex-direction: column; padding: 18px; }
  .mso-overview-legend { justify-content: flex-start; padding-inline: 18px; }
  .mso-overview-row,
  .mso-general-overview .mso-overview-row { grid-template-columns: 1fr; gap: 9px; padding: 14px 16px; }
  .mso-center-budget { text-align: left; }
  .mso-overview-row > .mso-row-status { justify-self: start; }
  .mso-company-summary-card > header { align-items: flex-start; flex-direction: column; padding: 18px; }
  .mso-company-summary-grid { padding: 12px; }
  .mso-company-summary-body { grid-template-columns: 105px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .mso-secondary-summary-grid .mso-company-summary-body { grid-template-columns: 1fr; }
  .mso-company-stack { height: 205px; }
}
