:root {
  --color-background: #ffffff;
  --color-background-soft: #e9f1fa;
  --color-surface-alt: #f4f8fc;
  --color-primary: #00abe4;
  --color-primary-hover: #0096c9;
  --color-text: #163a70;
  --color-text-secondary: #6b7a90;
  --color-border: #d9e4f2;
  --color-accent: #ff7a1a;
  --shadow-soft: 0 18px 60px rgba(22, 58, 112, 0.08);
  --shadow-card: 0 22px 70px rgba(22, 58, 112, 0.1);
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at top right, rgba(0, 171, 228, 0.12), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, #edf4fb 100%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

body.workspace-page .site-shell {
  width: calc(100% - 40px);
  max-width: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 171, 228, 0.88), rgba(0, 171, 228, 0.35));
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.48);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-size: 1.65rem;
  letter-spacing: 0.05em;
}

.brand-copy small,
.hero-copy p,
.section-heading p,
.feature-copy li,
.advantage-card p,
.site-footer p {
  color: var(--color-text-secondary);
}

.site-nav {
  display: flex;
  gap: 28px;
  font-weight: 700;
}

.site-nav a {
  border-radius: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions-internal {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-session-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.88);
}

.auth-session-box span {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-logout-button {
  min-width: 46px;
  width: 46px;
  min-height: 46px;
  padding: 0;
  color: #c44c59;
  border-color: rgba(211, 126, 137, 0.78);
  background: rgba(251, 223, 228, 0.98);
}

.auth-logout-button:hover,
.auth-logout-button:focus-visible {
  color: #a93b48;
  border-color: rgba(189, 87, 101, 0.82);
  background: rgba(247, 206, 214, 1);
}

.auth-logout-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-menu {
  position: relative;
}

.control-menu-trigger {
  min-width: 46px;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-color: rgba(188, 204, 222, 0.7);
}

.control-menu-trigger-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}

.control-menu-trigger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.control-menu.is-open .control-menu-trigger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.control-menu.is-open .control-menu-trigger-icon span:nth-child(2) {
  opacity: 0;
}

.control-menu.is-open .control-menu-trigger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.control-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  z-index: 50;
}

.control-menu-panel a,
.control-menu-action {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.control-menu-action {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.control-menu-panel a:hover,
.control-menu-panel a:focus-visible,
.control-menu-action:hover,
.control-menu-action:focus-visible {
  background: rgba(233, 241, 250, 0.5);
  outline: none;
}

.control-menu-action-danger {
  color: #b35662;
  background: rgba(244, 214, 219, 0.72);
}

.control-menu-action-danger:hover,
.control-menu-action-danger:focus-visible {
  background: rgba(238, 198, 206, 0.9);
}

.control-submenu {
  position: relative;
}

.control-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.control-submenu-trigger::after {
  content: ">";
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

.control-submenu-trigger:hover,
.control-submenu-trigger:focus-visible {
  background: rgba(233, 241, 250, 0.5);
  outline: none;
}

.control-submenu-panel {
  position: absolute;
  top: -10px;
  right: calc(100% - 1px);
  min-width: 180px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  z-index: 60;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.is-loading {
  cursor: wait;
}

.button.is-loading:hover {
  transform: none;
}

.button-loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  animation: processing-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.button-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: none;
}

.button-primary:hover {
  background: var(--color-primary-hover);
}

.button-secondary,
.button-ghost {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--color-border);
}

.button-soft-danger {
  background: linear-gradient(180deg, rgba(255, 239, 239, 0.98), rgba(255, 231, 231, 0.96));
  border-color: rgba(226, 126, 126, 0.46);
  color: #b74343;
}

.button-soft-danger:hover {
  background: linear-gradient(180deg, rgba(255, 229, 229, 0.98), rgba(255, 217, 217, 0.96));
  border-color: rgba(214, 98, 98, 0.58);
}

.button-soft-danger.is-active {
  background: linear-gradient(180deg, rgba(246, 201, 201, 0.98), rgba(242, 185, 185, 0.96));
  border-color: rgba(197, 78, 78, 0.58);
  color: #8f2626;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
  gap: 56px;
  align-items: center;
  padding: 56px 0 74px;
}

.hero-form-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
}

.eyebrow {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.12);
  color: var(--color-primary-hover);
  font-size: 0.86rem;
  font-weight: 800;
}

.hero h1,
.section-heading h2,
.feature-copy h2,
.cta-panel h2 {
  margin: 0;
  line-height: 1.06;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.8rem, 5.7vw, 5rem);
  max-width: 10.5ch;
}

.hero-copy p {
  margin: 22px 0 28px;
  max-width: 58ch;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.hero-badges li,
.pill,
.state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
}

.hero-badges li {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-border);
}

.hero-visual {
  position: relative;
  min-height: 530px;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(0, 171, 228, 0.22);
}

.orbit-one {
  right: 4%;
  top: 6%;
  width: 420px;
  height: 420px;
}

.orbit-two {
  right: 14%;
  top: 14%;
  width: 280px;
  height: 280px;
}

.visual-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.visual-glow-large {
  top: 2%;
  right: 6%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 171, 228, 0.24), rgba(233, 241, 250, 0.08));
}

.visual-glow-small {
  left: 8%;
  bottom: 8%;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.14), rgba(233, 241, 250, 0.05));
}

.showcase-card,
.ui-card,
.advantage-card,
.cta-panel,
.intro-band,
.feature-block {
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.showcase-card,
.ui-card {
  border-radius: 34px;
}

.showcase-device {
  position: absolute;
  left: 16%;
  top: 4%;
  width: 290px;
  min-height: 470px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 255, 0.92));
  box-shadow: var(--shadow-card);
}

.device-topbar {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
}

.device-camera {
  width: 62px;
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 58, 112, 0.16);
}

.device-screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 430px;
  padding: 20px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(233, 241, 250, 0.7), rgba(255, 255, 255, 0.94));
}

.device-summary strong,
.panel-heading strong {
  display: block;
  font-size: 1.15rem;
}

.device-summary small,
.panel-heading span,
.timeline-step span {
  color: var(--color-text-secondary);
}

.device-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.device-stats article {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.device-stats strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.device-stats span {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.device-timeline {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 22px;
}

.timeline-line {
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(0, 171, 228, 0.22), rgba(0, 171, 228, 0.72));
}

.timeline-step {
  position: relative;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b2c7e3;
  border: 2px solid #ffffff;
}

.timeline-step.current::before {
  background: var(--color-primary);
  box-shadow: 0 0 0 6px rgba(0, 171, 228, 0.16);
}

.timeline-step strong {
  display: block;
  margin-bottom: 4px;
}

.showcase-panel {
  position: absolute;
  right: 2%;
  top: 20%;
  width: 320px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
  height: 140px;
  margin-bottom: 18px;
}

.panel-bar {
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, rgba(0, 171, 228, 0.2), rgba(0, 171, 228, 0.92));
}

.p1 { height: 48%; }
.p2 { height: 78%; }
.p3 { height: 62%; }

.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill-info {
  background: rgba(0, 171, 228, 0.14);
  color: var(--color-primary-hover);
}

.pill-warn {
  background: rgba(255, 122, 26, 0.12);
  color: #d7640e;
}

.pill-neutral {
  background: rgba(22, 58, 112, 0.08);
  color: var(--color-text-secondary);
}

.showcase-floating {
  position: absolute;
  right: 0;
  bottom: 6%;
  width: min(310px, 72%);
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
}

.highlight-card {
  border-top-right-radius: 14px;
}

.showcase-floating strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.showcase-floating p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.hero-card,
.pqrs-form,
.info-card {
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  padding: 28px;
  border-radius: 28px;
}

.card-eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--color-primary-hover);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-card h2,
.info-card h3,
.result-content h4 {
  margin-top: 0;
}

.hero-card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.hero-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.hero-card-metrics article,
.hero-card-note {
  padding: 18px;
  border-radius: 22px;
  background: rgba(233, 241, 250, 0.72);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.hero-card-metrics strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.4rem;
}

.hero-card-metrics span,
.hero-card-note p,
.info-card p,
.info-card li,
.result-content p {
  color: var(--color-text-secondary);
}

.form-section {
  padding: 10px 0 34px;
}

.status-section {
  padding: 4px 0 34px;
}

.page-top-space {
  padding-top: 28px;
}

.inbox-heading-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.inbox-heading-bar .section-heading {
  flex: 0 0 auto;
  max-width: none;
}

.inbox-admin-alert-shell {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.inbox-admin-alert-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.inbox-admin-alert-trigger:hover,
.inbox-admin-alert-trigger:focus-visible,
.inbox-admin-alert-shell.is-open .inbox-admin-alert-trigger {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 171, 228, 0.28);
  box-shadow: 0 10px 24px rgba(22, 58, 112, 0.08);
  outline: none;
}

.inbox-admin-alert-trigger:hover .inbox-admin-alert-trigger-label,
.inbox-admin-alert-trigger:focus-visible .inbox-admin-alert-trigger-label,
.inbox-admin-alert-shell.is-open .inbox-admin-alert-trigger-label {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inbox-admin-alert-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(230, 99, 99, 0.14);
  color: #b94d12;
  font-size: 0.82rem;
  font-weight: 800;
}

.inbox-admin-alert-trigger-label {
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.inbox-admin-alert-trigger-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(230, 99, 99, 0.12);
  color: #9f3416;
  font-size: 0.8rem;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--color-primary-hover);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  text-decoration: underline;
}

.breadcrumb span[aria-current="page"] {
  color: var(--color-text);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.status-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.areas-layout,
.maestras-grid {
  display: grid;
  gap: 22px;
}

.areas-layout {
  grid-template-columns: 1fr;
  align-items: start;
}

.maestras-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.reports-shell {
  display: grid;
  gap: 22px;
}

.reports-content {
  display: grid;
  gap: 22px;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.report-kpi-card,
.report-panel {
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.report-kpi-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
}

.report-kpi-card strong {
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1;
}

.report-kpi-label {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.report-kpi-card small {
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.report-kpi-card-warn {
  background: linear-gradient(180deg, rgba(255, 250, 250, 0.98), rgba(252, 243, 243, 0.96));
}

.report-kpi-card-soft {
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(244, 248, 252, 0.96));
}

.report-kpi-card-alert {
  background: linear-gradient(180deg, rgba(255, 249, 242, 0.98), rgba(255, 243, 229, 0.96));
}

.reports-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

.reports-secondary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.report-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.report-panel-head h4 {
  margin: 0;
}

.report-panel-head span {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.report-bar-list {
  display: grid;
  gap: 14px;
}

.report-bar-item {
  display: grid;
  gap: 8px;
}

.report-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.report-bar-head strong {
  font-size: 0.98rem;
}

.report-bar-head span {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
}

.report-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(224, 234, 246, 0.9);
  overflow: hidden;
}

.report-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8f0, #0b63ce);
}

.report-bar-fill-muted {
  background: linear-gradient(90deg, #f0b4b4, #d67878);
}

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

.report-alert-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(245, 248, 252, 0.92);
}

.report-alert-item strong {
  font-size: 0.98rem;
}

.report-alert-item span {
  font-size: 1.3rem;
  font-weight: 800;
}

.report-alert-item small,
.report-area-meta,
.report-recent-item small {
  color: var(--color-text-secondary);
}

.report-alert-warning {
  background: rgba(255, 247, 247, 0.96);
}

.report-alert-critical {
  background: rgba(255, 238, 238, 0.98);
  border-color: rgba(230, 99, 99, 0.28);
}

.report-alert-info {
  background: rgba(245, 249, 255, 0.96);
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.compliance-badge-overdue {
  background: rgba(228, 74, 74, 0.14);
  color: #a82b2b;
}

.compliance-badge-due-soon {
  background: rgba(245, 145, 34, 0.16);
  color: #9a4d00;
}

.compliance-badge-suspended {
  background: rgba(64, 131, 219, 0.14);
  color: #1b5ea9;
}

.compliance-badge-finalized {
  background: rgba(116, 132, 155, 0.16);
  color: #45576f;
}

.compliance-badge-in-term {
  background: rgba(28, 167, 102, 0.14);
  color: #0f7a49;
}

.compliance-inline-row {
  margin-top: 6px;
}

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

.report-mini-metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
  display: grid;
  gap: 4px;
}

.report-mini-metric strong {
  font-size: 1.5rem;
}

.report-mini-metric span {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

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

.report-recent-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.report-recent-item p {
  margin: 0;
  line-height: 1.55;
}

.report-recent-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.report-recent-top span {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.report-empty-panel {
  min-height: 120px;
}

.maestra-card {
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.maestra-card h3 {
  margin: 0 0 10px;
}

.maestra-card p {
  margin: 0 0 18px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.maestra-card .form-actions {
  margin-top: 24px;
}

.collapsible-panel {
  padding: 0;
  overflow: hidden;
}

.collapsible-trigger {
  display: block;
  width: 100%;
  padding: 10px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.collapsible-trigger::after {
  content: "+";
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.2s ease;
}

.collapsible-panel {
  position: relative;
}

.collapsible-panel:not(.is-collapsed) .collapsible-trigger::after {
  content: "−";
}

.collapsible-panel.is-collapsed .section-heading-compact {
  margin-bottom: 0;
}

.collapsible-panel.is-collapsed .section-heading-compact .eyebrow {
  margin-bottom: 8px;
}

.collapsible-panel.is-collapsed .section-heading-compact h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.collapsible-content {
  padding: 0 28px 28px;
}

.section-heading-compact {
  margin-bottom: 18px;
}

.section-heading-compact h3 {
  margin: 10px 0 0;
}

.auth-copy-card,
.auth-form-card {
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
}

.auth-copy-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.auth-copy-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.auth-copy-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.auth-form-grid {
  margin-top: 18px;
}

.auth-note {
  margin-top: 8px;
}

.pqrs-form,
.info-card,
.status-form,
.status-result-card {
  padding: 28px;
  border-radius: 30px;
}

.status-form,
.status-result-card {
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
}

.inbox-spacing {
  margin-top: -4px;
}

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

.field {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.field span,
.checkbox-row span {
  font-size: 0.95rem;
}

.field-hint {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 500;
}

.department-scope-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.department-scope-hint {
  margin: 0;
  max-width: 72ch;
}

.department-scope-ai-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  white-space: nowrap;
}

.department-scope-ai-icon,
.department-scope-ai-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.department-scope-ai-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.department-scope-ai-spinner {
  border-radius: 50%;
  border: 2px solid rgba(0, 171, 228, 0.18);
  border-top-color: var(--color-primary);
  border-right-color: rgba(0, 171, 228, 0.58);
  animation: processing-spin 0.9s linear infinite;
  display: none;
}

.department-scope-ai-button.is-loading .department-scope-ai-spinner {
  display: inline-flex;
}

.department-scope-ai-button.is-loading .department-scope-ai-icon {
  opacity: 0.7;
}

.department-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.department-keyword-list-full {
  margin-top: 0;
}

.department-keyword-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(0, 171, 228, 0.28);
  border-radius: 999px;
  background: rgba(232, 247, 253, 0.9);
  color: #075985;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.required-mark {
  color: #b91c1c;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #ffffff;
  padding: 14px 16px;
  font: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: none;
}

.field input[type="email"]:invalid:not(.field-invalid),
.field input[type="email"]:user-invalid:not(.field-invalid),
.field input[type="email"]:valid {
  border-color: var(--color-border);
  box-shadow: none;
}

.field :is(input, select, textarea).field-invalid {
  border-color: #b91c1c;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.field :is(input, select, textarea).field-invalid:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.field.field-required-missing > span,
.checkbox-row.field-required-missing > span {
  color: #991b1b;
}

.field-full {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 20px 0 0;
}

.checkbox-row input {
  margin-top: 4px;
}

.checkbox-row.field-required-missing {
  padding: 14px 16px;
  border: 1px solid rgba(185, 28, 28, 0.32);
  border-radius: 16px;
  background: rgba(185, 28, 28, 0.05);
}

.checkbox-row.compact {
  margin: 0;
  align-items: center;
}

.department-closure-card {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(0, 171, 228, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 171, 228, 0.08) 0%, rgba(22, 58, 112, 0.05) 100%),
    #f8fcff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.department-closure-card-copy {
  display: grid;
  gap: 8px;
}

.department-closure-card-copy strong {
  font-size: 1.08rem;
  color: var(--color-text);
}

.department-closure-card-copy p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.65;
  font-size: 0.94rem;
}

.department-closure-card-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.14);
  color: #0b76a6;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.department-closure-card-toggle {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 171, 228, 0.14);
}

.pqrs-type-form-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(180px, 0.8fr) minmax(160px, 0.6fr);
  gap: 18px;
  align-items: end;
}

.pqrs-type-active-field .checkbox-row.compact {
  min-height: 50px;
  padding: 0 16px;
  border: none;
  border-radius: 16px;
  background: #ffffff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.form-helper-copy {
  margin: 14px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.96rem;
  line-height: 1.55;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 4px;
}

.form-status {
  min-height: 24px;
  margin-top: 16px;
  font-weight: 700;
}

#management-message.form-status {
  min-height: 0;
  margin-top: 4px;
}

#management-message.form-status:empty {
  margin-top: 0;
}

#management-message.form-status.subtle {
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--color-text-secondary);
}

#management-message.form-status.subtle.success {
  color: var(--color-text-secondary);
}

#department-list-message.form-status {
  min-height: 0;
  margin-top: 2px;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}

#department-list-message.form-status.success {
  color: var(--color-text-secondary);
}

#user-list-message.form-status {
  min-height: 0;
  margin-top: 2px;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}

#user-list-message.form-status.success {
  color: var(--color-text-secondary);
}

#inbox-message.form-status {
  min-height: 0;
  margin-top: 10px;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.92rem;
}

#inbox-message.form-status.success {
  color: var(--color-text-secondary);
}

.form-status.success {
  color: #15803d;
}

.form-status.error {
  color: #b91c1c;
}

.mail-settings-layout {
  align-items: start;
}

.section-heading .mail-settings-intro {
  max-width: none;
  width: 100%;
}

.mail-settings-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mail-settings-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  border-radius: 22px;
  background: rgba(244, 248, 252, 0.92);
}

.mail-settings-summary-card strong {
  font-size: 1rem;
  color: var(--color-text);
}

.mail-settings-summary-card small {
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.mail-settings-summary-card-wide {
  grid-column: 1 / -1;
}

.mail-settings-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.mail-settings-source-db {
  background: rgba(0, 171, 228, 0.14);
  color: #0a6e98;
}

.mail-settings-source-env {
  background: rgba(22, 58, 112, 0.1);
  color: #163a70;
}

.mail-settings-summary-shell {
  display: grid;
  gap: 22px;
}

.mail-settings-summary {
  margin-bottom: 18px;
}

.mail-settings-note {
  margin-top: 18px;
}

.info-panel {
  display: grid;
  gap: 18px;
}

.internal-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) auto auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.inbox-toolbar {
  margin-bottom: 8px;
}

.inbox-toolbar-actions {
  flex-wrap: wrap;
}

.inbox-filter-field {
  min-width: 180px;
}

.inbox-checkbox {
  margin: 0;
  min-height: 40px;
  padding-bottom: 2px;
}

.areas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.areas-toolbar-copy h3 {
  margin: 0;
}

.areas-toolbar-copy {
  display: grid;
  gap: 4px;
}

.section-heading .areas-last-updated {
  display: inline-block;
  margin-top: 12px;
}

.areas-last-updated {
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  margin-top: 8px;
}

.holiday-source-note {
  color: var(--color-text-secondary);
  display: block;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 6px;
}

.areas-toolbar-actions {
  display: flex;
  align-items: end;
  gap: 14px;
}

.compact-actions-inline {
  margin-top: 0;
}

.areas-search-field {
  min-width: 260px;
}

.areas-search-field span {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.areas-search-field input {
  min-height: 40px;
}

.internal-role-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 0;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.internal-role-panel strong {
  display: block;
  margin-bottom: 6px;
}

.internal-role-panel p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.internal-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(22, 58, 112, 0.08);
  color: var(--color-text-secondary);
  font-weight: 800;
  white-space: nowrap;
}

.internal-role-badge.role-edit {
  background: rgba(0, 171, 228, 0.14);
  color: var(--color-primary-hover);
}

.internal-role-badge.role-readonly {
  background: rgba(255, 122, 26, 0.12);
  color: #d7640e;
}

.compact-actions {
  margin-top: 0;
}

.inbox-list {
  display: grid;
  gap: 16px;
}

.empty-panel {
  padding: 20px;
  border-radius: 20px;
  background: rgba(244, 248, 252, 0.95);
  border: 1px dashed rgba(0, 171, 228, 0.24);
  color: var(--color-text-secondary);
}

.table-shell {
  overflow-x: hidden;
  overflow-y: visible;
  border: 1px solid rgba(217, 228, 242, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.inbox-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.inbox-table th,
.inbox-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(217, 228, 242, 0.95);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
  word-break: break-word;
}

.inbox-table th {
  position: sticky;
  top: 0;
  background: #f4f8fc;
  color: var(--color-text);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.inbox-table th:nth-child(1),
.inbox-table td:nth-child(1) {
  width: 18%;
}

.inbox-table th:nth-child(2),
.inbox-table td:nth-child(2) {
  width: 14%;
}

.inbox-table th:nth-child(3),
.inbox-table td:nth-child(3) {
  width: 14%;
}

.inbox-table th:nth-child(4),
.inbox-table td:nth-child(4) {
  width: 16%;
}

.inbox-table th:nth-child(5),
.inbox-table td:nth-child(5) {
  width: 30%;
}

.inbox-table th:nth-child(6),
.inbox-table td:nth-child(6) {
  width: 8%;
}

.inbox-worklist-table th:nth-child(1),
.inbox-worklist-table td:nth-child(1) {
  width: 17%;
}

.inbox-worklist-table th:nth-child(2),
.inbox-worklist-table td:nth-child(2) {
  width: 13%;
}

.inbox-worklist-table th:nth-child(3),
.inbox-worklist-table td:nth-child(3) {
  width: 14%;
}

.inbox-worklist-table th:nth-child(4),
.inbox-worklist-table td:nth-child(4) {
  width: 15%;
}

.inbox-worklist-table th:nth-child(5),
.inbox-worklist-table td:nth-child(5) {
  width: 18%;
}

.inbox-worklist-table th:nth-child(6),
.inbox-worklist-table td:nth-child(6) {
  width: 13%;
}

.inbox-worklist-table th:nth-child(7),
.inbox-worklist-table td:nth-child(7) {
  width: 10%;
}

.inbox-worklist-table td:nth-child(6),
.inbox-worklist-table td:nth-child(7) {
  white-space: nowrap;
}

.inbox-worklist-table td:nth-child(7) .table-actions {
  flex-wrap: nowrap;
  justify-content: center;
}

.inbox-table tbody tr:last-child td {
  border-bottom: 0;
}

.inbox-record-row td {
  border-bottom: 0;
}

.inbox-table tbody tr.table-row-even td {
  background: rgba(255, 255, 255, 0.96);
}

.inbox-table tbody tr.table-row-odd td {
  background: rgba(245, 245, 247, 0.96);
}

.inbox-table tbody tr.department-row-editing td {
  background: rgba(233, 241, 250, 0.92);
}

.inbox-table tbody tr:not(.table-subject-row):hover td,
.inbox-table tbody tr:not(.table-subject-row):hover + .table-subject-row td,
.table-subject-row:hover td {
  background: rgba(233, 241, 250, 0.7);
}

.table-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.12);
  color: var(--color-primary-hover);
  font-weight: 800;
}

.table-status-subtle {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
  background: rgba(22, 58, 112, 0.06);
  color: var(--color-text-secondary);
}

.table-status-muted {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}

.table-status-closed {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.table-subject {
  max-width: 280px;
  min-width: 240px;
}

.table-subject-row td {
  padding: 4px 12px 12px;
  border-top: 0;
}

.table-subject-label {
  margin-bottom: 6px;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-subject-full {
  color: var(--color-text);
  line-height: 1.6;
}

.table-description-label {
  margin-top: 10px;
}

.table-description-block {
  display: block;
}

.table-description-preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.table-description-block.is-expanded .table-description-preview {
  display: block;
  overflow: visible;
}

.table-inline-toggle {
  display: inline-flex;
  margin-top: 6px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary-hover);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.table-inline-toggle:hover,
.table-inline-toggle:focus-visible {
  text-decoration: underline;
  outline: none;
}

.table-primary {
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.45;
}

.table-secondary {
  margin-top: 2px;
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  line-height: 1.4;
}

.table-pending-primary {
  color: #b44a4a;
}

.table-pending-secondary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #8f6666;
}

.table-pending-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: #f9e8e8;
  color: #a24343;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pqrs-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.pqrs-type-emoji {
  font-size: 0.95rem;
  line-height: 1;
}

.type-peticion {
  background: rgba(0, 171, 228, 0.1);
}

.type-queja {
  background: rgba(255, 122, 26, 0.12);
}

.type-reclamo {
  background: rgba(239, 68, 68, 0.12);
}

.type-sugerencia {
  background: rgba(34, 197, 94, 0.12);
}

.type-denuncia {
  background: rgba(15, 23, 42, 0.08);
}

.type-felicitacion {
  background: rgba(147, 51, 234, 0.1);
}

.type-consulta {
  background: rgba(245, 158, 11, 0.12);
}

.type-default {
  background: rgba(148, 163, 184, 0.12);
}

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

.table-actions-menu {
  position: relative;
  justify-content: center;
}

.table-actions-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  display: none;
  min-width: 220px;
  max-height: min(420px, calc(100vh - 32px));
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  overflow-y: auto;
}

.table-actions-menu.is-open .table-actions-dropdown {
  display: grid;
  gap: 6px;
}

.table-action-menu-item {
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.table-action-menu-item .action-button-icon {
  width: 16px;
  height: 16px;
}

.table-action-menu-item .action-button-icon svg {
  width: 16px;
  height: 16px;
}

.table-actions .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.action-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-size: 0;
  font-weight: 800;
  line-height: 1;
}

.action-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-text);
}

.action-button-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-icon-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(22, 58, 112, 0.96);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 8;
}

.action-icon-button[data-tooltip]:hover::after,
.action-icon-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.action-icon-danger {
  color: #b91c1c;
}

.action-icon-disabled,
.action-icon-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid rgba(217, 228, 242, 0.95);
  background: #f8fbff;
}

.departments-table th:nth-child(1),
.departments-table td:nth-child(1) {
  width: 30%;
}

.departments-table th:nth-child(2),
.departments-table td:nth-child(2) {
  width: 24%;
}

.departments-table th:nth-child(3),
.departments-table td:nth-child(3) {
  width: 10%;
}

.departments-table th:nth-child(4),
.departments-table td:nth-child(4) {
  width: 20%;
}

.departments-table th:nth-child(5),
.departments-table td:nth-child(5) {
  width: 16%;
}

.closure-causes-table th:nth-child(1),
.closure-causes-table td:nth-child(1) {
  width: 18%;
}

.closure-causes-table th:nth-child(2),
.closure-causes-table td:nth-child(2) {
  width: 58%;
}

.closure-causes-table th:nth-child(3),
.closure-causes-table td:nth-child(3) {
  width: 12%;
}

.closure-causes-table th:nth-child(4),
.closure-causes-table td:nth-child(4) {
  width: 10%;
}

.closure-causes-table td:nth-child(3),
.closure-causes-table td:nth-child(4) {
  white-space: nowrap;
}

.closure-causes-table td:nth-child(4) .table-actions {
  flex-wrap: nowrap;
}

.pqrs-types-table th:nth-child(1),
.pqrs-types-table td:nth-child(1) {
  width: 14%;
}

.pqrs-types-table th:nth-child(2),
.pqrs-types-table td:nth-child(2) {
  width: 58%;
}

.pqrs-types-table th:nth-child(3),
.pqrs-types-table td:nth-child(3) {
  width: 20%;
}

.pqrs-types-table th:nth-child(4),
.pqrs-types-table td:nth-child(4) {
  width: 1%;
}

.pqrs-types-table td:nth-child(4),
.pqrs-types-table th:nth-child(4) {
  white-space: nowrap;
}

.pqrs-types-table td:nth-child(3) {
  white-space: normal;
}

.pqrs-types-table td:nth-child(3),
.pqrs-types-table td:nth-child(4) {
  vertical-align: top;
}

.pqrs-types-table td:nth-child(4) .table-actions {
  flex-wrap: nowrap;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 26%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  width: 20%;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  width: 22%;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  width: 14%;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
  width: 8%;
}

.users-table th:nth-child(6),
.users-table td:nth-child(6) {
  width: 10%;
}

.users-table td:nth-child(4) .table-primary,
.users-table td:nth-child(4) .table-secondary {
  word-break: normal;
  overflow-wrap: anywhere;
}

.users-table td:nth-child(6) {
  white-space: nowrap;
}

.users-table td:nth-child(6) .table-actions {
  flex-wrap: nowrap;
}

.table-page-summary,
.table-page-indicator {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
}

.table-page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-page-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}


.inbox-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.inbox-card h3 {
  margin: 10px 0 0;
}

.inbox-card p {
  margin: 10px 0 0;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.inbox-card p strong {
  color: var(--color-text);
}

.inbox-card-head,
.inbox-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.inbox-card-actions {
  margin-top: 18px;
}

.assignment-form {
  display: grid;
  gap: 14px;
}

.assignment-panel-shell {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.assignment-panel-card {
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.9);
}

.assignment-panel-card-soft {
  background: rgba(244, 248, 252, 0.92);
}

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

.assignment-collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.assignment-collapsible-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.assignment-collapsible-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 171, 228, 0.24);
  background: rgba(233, 241, 250, 0.72);
  color: var(--color-primary-dark);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.assignment-collapsible-content {
  margin-top: 12px;
}

.assignment-panel-hint {
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

.assignment-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.12);
  color: var(--color-primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.assignment-summary-card,
.assignment-routing-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(233, 241, 250, 0.72);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.assignment-summary-card strong,
.assignment-routing-card strong {
  color: var(--color-text);
}

.assignment-summary-card small,
.assignment-routing-card small {
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.assignment-summary-card-wide,
.assignment-routing-card-wide {
  grid-column: 1 / -1;
}

.assignment-case-summary,
.assignment-routing-info {
  color: var(--color-text-secondary);
}

.field-help {
  display: block;
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.info-card ol {
  padding-left: 20px;
  margin: 16px 0 0;
}

.info-card li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.result-content {
  min-height: 120px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(244, 248, 252, 0.95);
  border: 1px dashed rgba(0, 171, 228, 0.24);
}

.result-content.empty {
  display: flex;
  align-items: center;
  color: var(--color-text-secondary);
}

.result-content.success {
  border-style: solid;
  background: rgba(233, 241, 250, 0.72);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 30, 58, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.modal-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.96));
  box-shadow: var(--shadow-card);
}

.assignment-modal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
}

.management-modal-card {
  width: min(860px, 100%);
  max-height: min(88vh, 940px);
  display: flex;
  flex-direction: column;
}

.management-modal-card .modal-body {
  padding: 24px 24px 22px;
}

.followup-modal-card {
  width: min(820px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
}

.summary-modal-card {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
}

.confirm-modal-card {
  width: min(640px, 100%);
}

.confirm-modal-body {
  padding: 34px 32px 30px;
}

.confirm-modal-layout {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.confirm-modal-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 236, 236, 0.98), rgba(255, 244, 244, 0.96));
  color: #cf3a3a;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(224, 87, 87, 0.14);
}

.confirm-modal-content {
  display: grid;
  gap: 12px;
}

.confirm-modal-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.12);
  color: var(--color-primary-hover);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.confirm-modal-title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.confirm-modal-message {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.confirm-modal-danger-button {
  background: linear-gradient(180deg, #f56c6c, #e45252);
  border-color: rgba(213, 83, 83, 0.68);
  box-shadow: 0 14px 30px rgba(228, 82, 82, 0.22);
}

.confirm-modal-danger-button:hover {
  background: linear-gradient(180deg, #ef5f5f, #d74242);
}

@media (max-width: 780px) {
  .assignment-summary-grid,
  .assignment-routing-grid,
  .management-summary-grid,
  .management-closure-context-grid,
  .management-closure-draft-meta {
    grid-template-columns: 1fr;
  }

  .department-scope-header {
    align-items: flex-start;
  }

  .department-scope-ai-button {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

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

  .confirm-modal-icon {
    width: 64px;
    height: 64px;
  }

  .confirm-modal-actions {
    flex-direction: column-reverse;
  }

  .management-closure-assistant-head,
  .management-closure-step-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
}

.management-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.management-panel-card {
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.92);
}

.management-panel-card.is-closure-focused {
  border-color: rgba(0, 171, 228, 0.28);
  box-shadow: 0 18px 44px rgba(22, 58, 112, 0.1);
}

.management-panel-card-soft {
  margin-top: 10px;
  background: rgba(244, 248, 252, 0.96);
}

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

.management-panel-hint {
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

.management-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.12);
  color: var(--color-primary-hover);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.management-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(233, 241, 250, 0.72);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.management-summary-card strong {
  color: var(--color-text);
}

.management-summary-card small {
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.management-summary-card-wide {
  grid-column: 1 / -1;
}

.management-case-summary {
  color: var(--color-text-secondary);
}

.management-notify-toggle {
  margin-top: -4px;
}

.management-guidance-shell {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(233, 241, 250, 0.56);
  border: 1px dashed rgba(0, 171, 228, 0.28);
}

.management-guidance-copy {
  display: grid;
  gap: 6px;
}

.management-guidance-copy strong {
  color: var(--color-text);
}

.management-guidance-copy p,
.management-quick-actions-empty {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.management-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.management-citizen-shell {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.management-internal-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.management-citizen-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.management-notify-tools-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.management-notify-toggle {
  margin: 0;
  flex: 1 1 auto;
}

.management-citizen-editor-shell {
  position: relative;
}

.management-citizen-editor-shell .management-rich-editor {
  min-height: 160px;
  padding-right: 58px;
  overflow-y: auto;
  resize: vertical;
}

.management-citizen-ai-button {
  min-height: 34px;
  width: 34px;
  padding: 0;
  border-radius: 11px;
  color: #537198;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(196, 211, 230, 0.92);
  flex: 0 0 auto;
}

.management-citizen-ai-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.management-citizen-ai-button:hover {
  color: var(--color-primary-hover);
  background: rgba(243, 249, 255, 0.96);
  border-color: rgba(0, 171, 228, 0.22);
}

.management-internal-note-ai-button {
  margin-left: 8px;
}

.management-summary-ai-button {
  min-height: 34px;
  margin-left: auto;
  border-radius: 11px;
  padding: 0 12px;
  color: #537198;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(196, 211, 230, 0.92);
  font-weight: 700;
}

.management-summary-ai-button:hover {
  color: var(--color-primary-hover);
  background: rgba(243, 249, 255, 0.96);
  border-color: rgba(0, 171, 228, 0.22);
}

.summary-modal-panel {
  margin-top: 18px;
}

.summary-modal-content {
  display: grid;
  gap: 14px;
}

.summary-modal-text {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(240, 246, 252, 0.96));
  color: var(--color-text);
  line-height: 1.75;
  white-space: normal;
}

.management-citizen-edit-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1;
  z-index: 1;
}

#management-citizen-edit-button {
  display: none;
}

.management-citizen-edit-button.is-active {
  background: rgba(0, 171, 228, 0.12);
  border-color: rgba(0, 171, 228, 0.28);
  color: var(--color-primary-hover);
}

.management-citizen-editor-shell .management-rich-editor:focus {
  outline: none;
}

.management-citizen-editor-shell .management-rich-editor.is-readonly-preview {
  background: rgba(255, 255, 255, 0.94);
  cursor: default;
}

.management-closure-assistant-shell {
  display: grid;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(240, 246, 252, 0.94));
  border: 1px solid rgba(0, 171, 228, 0.18);
}

.management-closure-assistant-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.management-closure-assistant-head p,
.management-closure-confirm-copy {
  margin: 10px 0 20px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-weight: 400;
}

.management-closure-assistant-badge {
  background: rgba(0, 171, 228, 0.1);
  align-self: flex-start;
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.management-closure-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.management-closure-step-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.management-closure-step-chip.is-active {
  background: rgba(0, 171, 228, 0.12);
  border-color: rgba(0, 171, 228, 0.24);
  color: var(--color-primary-hover);
}

.management-closure-step-chip.is-complete {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.18);
  color: #15803d;
}

.management-closure-step-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.management-closure-step-panel:not([hidden]) {
  box-shadow: 0 14px 34px rgba(22, 58, 112, 0.08);
}

.management-closure-step-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.management-closure-step-status {
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.management-closure-context-grid,
.management-closure-draft-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.management-closure-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(233, 241, 250, 0.56);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.management-closure-summary-card small {
  color: var(--color-text-secondary);
}

.management-closure-summary-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.management-closure-draft-preview {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.management-closure-draft-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.management-closure-draft-preview-head .management-citizen-edit-button {
  position: static;
}

.management-closure-draft-preview strong {
  color: var(--color-text);
}

.management-closure-draft-preview .management-rich-editor {
  width: 100%;
  min-height: 240px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  line-height: 1.7;
  overflow-y: auto;
  resize: vertical;
}

.management-rich-editor {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-text-secondary);
  line-height: 1.7;
  white-space: normal;
}

.management-rich-editor[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--color-text-muted);
  pointer-events: none;
}

.management-rich-editor p {
  margin: 0 0 16px;
}

.management-rich-editor p:last-child {
  margin-bottom: 0;
}

.management-rich-editor ul,
.management-rich-editor ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.management-rich-editor li + li {
  margin-top: 6px;
}

.management-closure-draft-preview .management-rich-editor:focus {
  outline: none;
}

.management-closure-draft-preview .management-rich-editor.is-readonly-preview {
  cursor: default;
}

.management-closure-checklist {
  display: grid;
  gap: 8px;
}

.management-closure-check-item {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(248, 251, 255, 0.92);
  overflow: hidden;
}

.management-closure-check-item.is-required-missing {
  border-color: rgba(185, 28, 28, 0.42);
  background: rgba(254, 242, 242, 0.92);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.08);
}

.management-closure-check-item.is-required-missing .management-closure-check-label span {
  color: #991b1b;
}

.management-closure-check-label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  width: 100%;
  align-items: start;
  column-gap: 10px;
  row-gap: 0;
  margin: 0;
}

.management-closure-check-label input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
}

.management-closure-check-label span {
  display: block;
  min-width: 0;
  line-height: 1.5;
  font-weight: 600;
}

.management-closure-warnings {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 243, 224, 0.55);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.management-closure-warnings strong {
  color: #a16207;
}

.management-closure-warnings ul {
  margin: 0;
  padding-left: 18px;
  color: #9a6700;
}

.management-followups-list {
  display: grid;
  gap: 10px;
}

.management-followup-item {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.management-followup-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.management-followup-head span,
.management-followup-meta {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
}

.management-followup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.management-followup-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.12);
  color: var(--color-primary-hover);
  font-weight: 700;
}

.management-followup-note {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.management-followup-note strong {
  color: var(--color-text);
}

.management-followup-rich-text {
  margin-top: 8px;
}

.management-followup-rich-text p {
  margin: 0 0 12px;
}

.management-followup-rich-text p:last-child {
  margin-bottom: 0;
}

.management-followup-rich-text ul,
.management-followup-rich-text ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

#management-internal-note {
  resize: vertical;
  overflow-y: hidden;
}

.modal-copy {
  margin: 10px 0 20px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 22px;
  gap: 12px;
}

.modal-backdrop-processing {
  background: rgba(12, 30, 58, 0.34);
  backdrop-filter: blur(2px);
}

.processing-modal-card {
  width: min(420px, 100%);
}

.processing-modal-body {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 34px 30px;
}

.processing-copy {
  margin: 0;
  max-width: 28ch;
}

.processing-spinner {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 4px solid rgba(0, 171, 228, 0.16);
  border-top-color: var(--color-primary);
  border-right-color: rgba(0, 171, 228, 0.52);
  animation: processing-spin 0.9s linear infinite;
}

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

.detail-shell {
  display: grid;
  gap: 22px;
  margin-top: 10px;
}

.detail-report-card {
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(217, 228, 242, 0.95);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.detail-report.empty {
  display: flex;
  align-items: center;
  min-height: 140px;
  color: var(--color-text-secondary);
}

.detail-report-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.detail-report-header h3,
.detail-block h4 {
  margin: 0;
}

.detail-meta {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.detail-meta span {
  color: var(--color-text-secondary);
}

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

.detail-table-shell {
  margin-top: 18px;
  border-radius: 20px;
  box-shadow: none;
}

.detail-table {
  table-layout: fixed;
}

.detail-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.detail-table td[colspan="4"],
.detail-table td[colspan="2"] {
  word-break: break-word;
}

.detail-timeline-table {
  margin-top: 16px;
}

.detail-timeline-table .inbox-table th:nth-child(1),
.detail-timeline-table .inbox-table td:nth-child(1) {
  width: 22%;
}

.detail-timeline-table .inbox-table th:nth-child(2),
.detail-timeline-table .inbox-table td:nth-child(2) {
  width: 24%;
}

.detail-timeline-table .inbox-table th:nth-child(3),
.detail-timeline-table .inbox-table td:nth-child(3) {
  width: 54%;
}

.detail-block {
  padding: 22px;
  border-radius: 24px;
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(217, 228, 242, 0.95);
}

.detail-block h4 {
  margin-bottom: 14px;
}

.detail-block p {
  margin: 0 0 12px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.detail-block p strong {
  color: var(--color-text);
}

.detail-timeline {
  margin-top: 18px;
}

.detail-timeline ul {
  padding-left: 18px;
  margin: 14px 0 0;
}

.detail-timeline li {
  margin-bottom: 14px;
}

.detail-timeline li span {
  display: block;
  margin: 4px 0 6px;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
}

.timeline-output {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(217, 228, 242, 0.95);
}

.timeline-output ul {
  padding-left: 18px;
  margin: 14px 0 0;
}

.timeline-output li {
  margin-bottom: 14px;
}

.timeline-output li span {
  display: block;
  margin: 4px 0 6px;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
}

.timeline-output li p {
  margin: 0;
}

.result-pill {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.14);
  color: var(--color-primary-hover);
  font-weight: 800;
}

.intro-band {
  margin: 0 0 26px;
  padding: 42px 28px;
  border-radius: 32px;
}

.section-heading {
  max-width: 780px;
}

.inbox-admin-alert-panel {
  display: grid;
  gap: 6px;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(460px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(230, 99, 99, 0.14);
  background: linear-gradient(180deg, rgba(255, 249, 244, 0.82), rgba(255, 252, 249, 0.78));
  box-shadow: 0 10px 30px rgba(22, 58, 112, 0.04);
  z-index: 30;
}

.inbox-admin-alert-eyebrow {
  color: #c96b1b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inbox-admin-alert-panel strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.inbox-admin-alert-panel p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.5;
  font-size: 0.86rem;
}

.inbox-admin-alert-panel .button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  justify-self: start;
}

.section-heading.centered {
  margin: 0 auto;
  text-align: center;
}

.section-heading h2,
.feature-copy h2,
.cta-panel h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.section-heading p {
  margin: 18px auto 0;
  max-width: 62ch;
  line-height: 1.75;
}


.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  margin: 20px 0;
  padding: 30px;
  border-radius: 32px;
}

.feature-block.reverse .feature-copy {
  order: 2;
}

.feature-block.reverse .feature-visual {
  order: 1;
}

.feature-kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.feature-copy ul {
  padding-left: 20px;
  margin: 18px 0 0;
}

.feature-copy li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.feature-visual {
  min-height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ui-card {
  width: min(100%, 470px);
  min-height: 280px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.92));
}

.ui-card-header {
  height: 18px;
  width: 42%;
  border-radius: 999px;
  background: rgba(0, 171, 228, 0.18);
}

.form-preview,
.detail-preview {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.form-preview span,
.detail-preview span {
  height: 18px;
  border-radius: 999px;
  background: rgba(22, 58, 112, 0.08);
}

.form-preview .wide,
.detail-preview .wide {
  width: 100%;
}

.preview-button {
  width: 42%;
  height: 44px;
  margin-top: 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 171, 228, 0.8), rgba(0, 171, 228, 1));
}

.timeline-preview {
  position: relative;
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.timeline-preview div {
  height: 54px;
  border-radius: 18px;
  background: rgba(0, 171, 228, 0.12);
}

.state-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.state-chip {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.state-chip.active {
  background: rgba(0, 171, 228, 0.14);
  color: var(--color-primary-hover);
}

.kanban-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
  height: 220px;
}

.kanban-preview div {
  padding: 14px;
  border-radius: 20px;
  background: rgba(22, 58, 112, 0.05);
}

.kanban-preview span {
  display: block;
  height: 110px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0, 171, 228, 0.26), rgba(0, 171, 228, 0.9));
}

.kanban-preview small {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.detail-title {
  width: 48%;
}

.detail-row {
  width: 86%;
}

.advantages {
  padding: 34px 0 10px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.advantage-card {
  padding: 28px 24px;
  border-radius: 26px;
}

.advantage-card h3 {
  margin-top: 0;
}

.advantage-card p,
.site-footer p {
  line-height: 1.7;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 54px;
  padding: 30px;
  border-radius: 30px;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 0 0 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .hero,
  .feature-block,
  .advantages-grid,
  .cta-panel,
  .form-layout,
  .status-layout,
  .auth-layout,
  .detail-report-grid,
  .areas-layout,
  .reports-main-grid,
  .reports-secondary-grid {
    grid-template-columns: 1fr;
  }

  .reports-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    gap: 28px;
  }

  .hero-card-metrics,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .internal-toolbar {
    grid-template-columns: 1fr;
  }

  .internal-role-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-visual {
    min-height: 420px;
  }

  .orbit-one,
  .orbit-two {
    display: none;
  }

  .feature-block.reverse .feature-copy,
  .feature-block.reverse .feature-visual {
    order: initial;
  }

  .advantages-grid,
  .cta-panel {
    display: grid;
  }

}

@media (max-width: 768px) {
  .site-shell {
    width: min(100% - 22px, var(--container));
  }

  body.workspace-page .site-shell {
    width: min(100% - 22px, var(--container));
  }

  .site-header,
  .inbox-heading-bar,
  .site-nav,
  .site-footer,
  .cta-panel,
  .cta-actions,
  .form-actions,
  .areas-toolbar,
  .areas-toolbar-actions,
  .detail-report-header,
  .inbox-card-head,
  .inbox-card-actions,
  .table-actions,
  .table-pagination,
  .table-page-controls,
  .auth-session-box,
  .header-actions,
  .report-panel-head,
  .report-bar-head,
  .report-recent-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .reports-kpi-grid,
  .report-mini-metrics {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(217, 228, 242, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(217, 228, 242, 0.95);
    background: #ffffff;
    color: var(--color-text);
    font-size: 0.95rem;
    text-align: center;
  }

  .desktop-only {
    display: none;
  }

  .hero {
    padding: 26px 0 48px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .showcase-device {
    left: 0;
    top: 0;
    width: 72%;
    min-height: 360px;
  }

  .device-screen {
    min-height: 320px;
  }

  .showcase-panel {
    right: 0;
    top: 18%;
    width: 60%;
  }

  .showcase-floating {
    width: 74%;
    bottom: -6%;
  }

  .feature-block,
  .intro-band,
  .advantage-card,
  .cta-panel,
  .pqrs-form,
  .info-card,
  .hero-card {
    padding: 22px;
  }

  .button {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    gap: 10px;
  }

  .header-actions-internal {
    align-items: flex-end;
  }

  .control-menu {
    width: auto;
    align-self: flex-end;
  }

  .control-menu-panel {
    position: absolute;
    margin-top: 8px;
    width: min(260px, calc(100vw - 32px));
  }

  .areas-search-field {
    min-width: 0;
    width: 100%;
  }

  .control-submenu-panel {
    position: static;
    margin-top: 8px;
    width: 100%;
    min-width: 0;
  }

  .header-actions .button {
    min-height: 48px;
  }

  .brand {
    width: 100%;
  }

  .brand-copy strong {
    font-size: 1.45rem;
  }

  .brand-copy small {
    font-size: 0.92rem;
  }

  .breadcrumb {
    margin-top: 14px;
    flex-wrap: wrap;
  }

  .modal-body {
    padding: 24px 20px;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .hero-card-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .kanban-preview {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* ── Attachments viewer (detalle + bandeja) ───────────────────── */
.detail-attachments-section {
  margin-top: 1.25rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 0.5rem);
  overflow: hidden;
}

.detail-attachments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: var(--color-surface-alt, #f9fafb);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  font-size: 0.875rem;
}

.detail-attachments-count {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary, #9ca3af);
}

.detail-attachments-list {
  list-style: none;
  margin: 0;
  padding: 0.375rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-attachments-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border, #f3f4f6);
}

.detail-attachments-item:last-child {
  border-bottom: none;
}

.detail-attachments-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
}

.detail-attachments-size {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary, #9ca3af);
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-attachments-open {
  flex-shrink: 0;
  font-size: 0.8125rem;
  padding: 0.25rem 0.625rem;
}

.detail-attachments-empty,
.detail-attachments-loading {
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--color-text-tertiary, #9ca3af);
  text-align: center;
}

.attachments-modal-card {
  max-width: 560px;
  width: 100%;
}

/* ── File upload ──────────────────────────────────────────────── */
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary, #4b5563);
  margin-bottom: 0.375rem;
}

.field-hint {
  font-weight: 400;
  color: var(--color-text-tertiary, #9ca3af);
}

.file-upload-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.file-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--color-border, #d1d5db);
  border-radius: var(--radius-md, 0.5rem);
  background: var(--color-surface-alt, #f9fafb);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.file-upload-area:hover,
.file-upload-area:focus-within {
  border-color: var(--color-primary, #2563eb);
  background: var(--color-primary-ghost, #eff6ff);
}

.file-upload-icon {
  font-size: 2rem;
  line-height: 1;
}

.file-upload-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text, #111827);
}

.file-upload-hint {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary, #9ca3af);
}

.file-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: var(--color-surface-alt, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-sm, 0.375rem);
  font-size: 0.8125rem;
  color: var(--color-text, #111827);
  overflow: hidden;
}

.file-list-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list-item-size {
  color: var(--color-text-tertiary, #9ca3af);
  white-space: nowrap;
}

.file-list-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-danger, #dc2626);
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.125rem;
  flex-shrink: 0;
}

.file-list-item-remove:hover {
  color: var(--color-danger-dark, #991b1b);
}
