:root {
  --bg: #e9f0ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(245, 249, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --text: #10244d;
  --muted: #5f739d;
  --line: rgba(91, 129, 220, 0.18);
  --primary: #2b45ff;
  --primary-dark: #10208c;
  --primary-soft: rgba(43, 69, 255, 0.12);
  --success: #17885b;
  --warning: #c47d00;
  --danger: #c53d48;
  --shadow: 0 26px 70px rgba(33, 66, 158, 0.15);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-sans: "Segoe UI Variable", "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI Variable", "Segoe UI", sans-serif;
  --page-glow: radial-gradient(circle at top left, rgba(43, 69, 255, 0.24), transparent 36%);
  --page-gradient: linear-gradient(180deg, #fbfdff 0%, #e4ecff 100%);
  --panel-blur: blur(14px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background:
    var(--page-glow),
    var(--page-gradient);
  color: var(--text);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.is-loading {
  cursor: progress;
}

body.is-loading::after {
  content: attr(data-loading-label);
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(16, 36, 77, 0.92);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 36px rgba(16, 36, 77, 0.24);
}

.app-shell {
  min-height: 100vh;
  padding: 18px 14px 40px;
  position: relative;
}

.app-shell__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.app-brandbar {
  max-width: 1180px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  color: var(--primary-dark);
}

.brand-lockup__wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.brand-lockup__cam {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 66px);
  line-height: 0.82;
  font-weight: 900;
  letter-spacing: -0.09em;
  text-transform: lowercase;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-lockup__broker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--primary);
  margin-bottom: 2px;
}

.brand-lockup__signature {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-card,
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
}

.hero-card {
  padding: 22px 18px;
}

.hero-card--admin,
.hero-card--employee {
  margin-bottom: 18px;
}

.hero-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hero-card__topline h1 {
  margin-bottom: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

.hero-card,
.panel-card {
  border-color: rgba(73, 103, 214, 0.14);
  box-shadow: 0 26px 80px rgba(42, 69, 168, 0.14);
}

.hero-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 252, 255, 0.84)),
    radial-gradient(circle at top right, rgba(43, 69, 255, 0.08), transparent 40%);
}

.btn--ghost,
.scope-chip,
.app-tabs__button,
.filters-collapsible__toggle {
  background: rgba(255, 255, 255, 0.88);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 800;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
}

h1 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 0.98;
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.subtitle,
.muted,
.hint {
  color: var(--muted);
}

.subtitle {
  margin: 0 0 12px;
  max-width: 720px;
}

.hint {
  font-size: 14px;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.compact-form {
  align-content: start;
}

.two-column-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
}

.field input,
.field select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 15px;
  padding: 13px 15px;
  font: inherit;
  color: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.attachment-repeater {
  display: grid;
  gap: 10px;
}

.address-lookup {
  position: relative;
}

.address-lookup__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 20px 40px rgba(20, 46, 118, 0.14);
  backdrop-filter: blur(10px);
}

.address-lookup__option {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: rgba(239, 245, 255, 0.95);
  color: var(--text);
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.address-lookup__option strong {
  font-size: 14px;
  line-height: 1.3;
}

.address-lookup__option span,
.address-lookup__empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.address-lookup__option:hover,
.address-lookup__option:focus-visible {
  outline: none;
  background: rgba(46, 101, 242, 0.11);
}

.address-lookup__empty {
  padding: 8px 6px 4px;
}

.attachment-repeater__row[hidden] {
  display: none;
}

.field input:focus,
.field select:focus,
.textarea:focus {
  outline: 2px solid rgba(46, 101, 242, 0.18);
  border-color: rgba(46, 101, 242, 0.45);
}

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

.field--checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

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

.btn {
  border: 0;
  border-radius: 16px;
  padding: 11px 15px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

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

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

.btn--big {
  min-height: 52px;
}

.btn--small {
  padding: 9px 12px;
  font-size: 14px;
}

.btn--employee-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  min-height: 88px;
  padding: 18px;
  font-size: 20px;
  line-height: 1.15;
  border-radius: 22px;
  box-shadow: 0 18px 32px rgba(18, 49, 112, 0.14);
}

.btn--employee-main__copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.btn--employee-main__title {
  display: block;
}

.btn--employee-main__meta {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  opacity: 0.9;
}

.btn--employee-main__arrow {
  font-size: 26px;
  line-height: 1;
  opacity: 0.9;
  flex: 0 0 auto;
}

.btn--danger-soft {
  background: rgba(197, 61, 72, 0.1);
  color: #9f2230;
  border: 1px solid rgba(197, 61, 72, 0.2);
}

.btn--primary {
  background: linear-gradient(180deg, #3a74ff 0%, #2e65f2 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(46, 101, 242, 0.18);
}

.btn--secondary {
  background: rgba(46, 101, 242, 0.1);
  color: var(--primary-dark);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.link-cta {
  display: inline-flex;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.message {
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.message--success {
  background: rgba(23, 136, 91, 0.12);
  color: var(--success);
}

.message--warning {
  background: rgba(196, 125, 0, 0.12);
  color: #9c6300;
}

.message--danger {
  background: rgba(197, 61, 72, 0.12);
  color: var(--danger);
}

.message--info {
  background: rgba(46, 101, 242, 0.09);
  color: var(--primary-dark);
}

.panel-card {
  padding: 16px;
  margin-bottom: 16px;
}

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

.panel-card__head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.panel-card__head h2 {
  margin: 0;
}

.panel-card__head-action {
  flex: 0 0 auto;
}

.panel-card__head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.panel-card__head-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.info-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}

.panel-split,
.panel-triplet,
.stats-grid,
.summary-list,
.detail-actions,
.filters-grid {
  display: grid;
  gap: 12px;
}

.settings-form h3,
.settings-form__actions {
  grid-column: 1 / -1;
}

.settings-form__actions {
  margin-top: 4px;
}

.settings-form--general .field--checkbox {
  align-self: center;
}

.panel-split--wide {
  gap: 16px;
}

.panel-split--wide > .stack-form.compact-form:not(form) {
  display: contents;
}

.panel-split--wide .settings-form,
.panel-split--wide .exchange-test-form,
.panel-split--wide > .stack-form.compact-form:not(form) > form:not(.settings-form) {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.9));
  box-shadow: 0 18px 48px rgba(27, 62, 150, 0.08);
  padding: 18px;
}

.settings-form--general {
  order: 1;
}

.settings-form--exchange {
  order: 2;
}

.exchange-test-form {
  order: 3;
}

.settings-form--weekly {
  order: 4;
}

.panel-split--wide > .stack-form.compact-form:not(form) > form[action="/admin/weekly-summary/send"] {
  order: 5;
}

.panel-split--wide > .stack-form.compact-form:not(form) > form[action="/admin/monthly-summary/send"] {
  order: 6;
}

.settings-form h3,
.exchange-test-form h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.settings-form h3::before,
.exchange-test-form h3::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(43, 69, 255, 0.08);
}

.settings-form__actions {
  align-self: end;
}

.settings-form__actions .btn,
.exchange-test-form .btn,
.panel-split--wide > .stack-form.compact-form:not(form) > form[action="/admin/weekly-summary/send"] .btn,
.panel-split--wide > .stack-form.compact-form:not(form) > form[action="/admin/monthly-summary/send"] .btn {
  width: 100%;
}

.settings-form--weekly {
  gap: 14px;
}

.settings-form--weekly > h3,
.settings-form--weekly > p {
  grid-column: 1 / -1;
}

.settings-form--weekly > p {
  max-width: 680px;
  margin-bottom: 2px;
}

.settings-form--weekly .field--checkbox {
  justify-content: flex-start;
  min-height: auto;
  border: 1px solid rgba(91, 129, 220, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px 14px;
}

.settings-form--weekly .field--checkbox + .field,
.settings-form--weekly .field--checkbox + .field + .field {
  margin-top: -2px;
}

.settings-form--general {
  grid-template-columns: 1fr;
}

.settings-form--general h3 {
  margin-bottom: 2px;
}

.settings-form--general > label,
.settings-form--general > .field.field--wide {
  border: 1px solid rgba(91, 129, 220, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 14px;
}

.settings-form--general > label:nth-of-type(1)::before,
.settings-form--general > label:nth-of-type(2)::before,
.settings-form--general > label:nth-of-type(3)::before,
.settings-form--general > label:nth-of-type(4)::before,
.settings-form--general > .field.field--wide::before {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-form--general > label:nth-of-type(1)::before {
  content: "Empresa";
}

.settings-form--general > label:nth-of-type(2)::before {
  content: "Domicilios";
}

.settings-form--general > label:nth-of-type(3)::before {
  content: "Edici\00f3n";
}

.settings-form--general > label:nth-of-type(4)::before {
  content: "Acceso empleado";
}

.settings-form--general > .field.field--wide::before {
  content: "Aviso por caso nuevo";
}

.settings-form--general > label:nth-of-type(5) {
  border-top: 0;
  margin-top: -12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.settings-form--general > label:nth-of-type(4) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.settings-form--general > label:nth-of-type(6) {
  margin-top: -12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.exchange-status,
.exchange-summary,
.exchange-test-form {
  border-radius: 18px;
}

.exchange-status {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.exchange-status p,
.exchange-summary p {
  margin: 0;
}

.exchange-status--success {
  background: rgba(23, 136, 91, 0.08);
  border-color: rgba(23, 136, 91, 0.18);
}

.exchange-status--warning {
  background: rgba(196, 125, 0, 0.08);
  border-color: rgba(196, 125, 0, 0.18);
}

.exchange-status__pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(16, 36, 77, 0.1);
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 10px;
}

.exchange-summary {
  padding: 14px 16px;
  border: 1px dashed rgba(91, 129, 220, 0.3);
  background: rgba(240, 245, 255, 0.9);
  display: grid;
  gap: 8px;
}

.exchange-test-form {
  padding: 16px;
  border: 1px solid rgba(91, 129, 220, 0.16);
  background: rgba(255, 255, 255, 0.76);
}

.stats-grid,
.stats-grid--ops,
.panel-triplet {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.toolbar,
.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.table-actions {
  display: grid;
  gap: 8px;
  min-width: 74px;
}

.table-actions__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-actions__row--compact {
  gap: 6px;
}

.table-actions__password {
  gap: 8px;
}

.table-actions__password input {
  min-width: 0;
  width: 100%;
  max-width: 170px;
}

.action-icon-link,
.action-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  color: var(--muted);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(17, 44, 96, 0.08);
}

.action-icon-button {
  cursor: pointer;
}

.action-icon-button--danger {
  width: 46px;
  min-width: 46px;
  height: 42px;
  border-radius: 12px;
  border-color: rgba(197, 61, 72, 0.22);
  background: linear-gradient(180deg, rgba(255, 242, 244, 0.99), rgba(255, 233, 237, 0.98));
  box-shadow: 0 10px 22px rgba(197, 61, 72, 0.14);
}

.action-icon-link:hover,
.action-icon-button:hover {
  transform: translateY(-1px);
}

.action-icon-button--danger:hover {
  border-color: rgba(197, 61, 72, 0.3);
  background: linear-gradient(180deg, rgba(255, 241, 243, 1), rgba(255, 231, 235, 0.98));
  box-shadow: 0 14px 28px rgba(197, 61, 72, 0.16);
}

.action-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

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

.action-icon--view {
  color: #7d8da7;
}

.action-icon--delete {
  color: #c53d48;
}

.action-icon--toggle {
  color: #8a97ab;
}

.action-icon--email {
  color: #2e65f2;
}

.action-icon--disabled {
  color: #b7c2d5;
  opacity: 0.7;
}

.action-icon--toggle-active {
  color: #8a97ab;
}

.table-actions--single {
  min-width: 40px;
}

.table-sort-link,
.employee-directory__name {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.employee-directory__name {
  color: var(--primary-dark);
}

.employee-directory-filters {
  margin-bottom: 12px;
}

.employee-directory-cards {
  display: none;
}

.employee-directory-card {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 20px;
  box-shadow: 0 16px 30px rgba(17, 44, 96, 0.08);
  overflow: hidden;
}

.employee-directory-card + .employee-directory-card {
  margin-top: 12px;
}

.employee-directory-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(46, 101, 242, 0.08), rgba(46, 101, 242, 0.02));
  border-bottom: 1px solid rgba(211, 224, 243, 0.9);
}

.employee-directory-card__name {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 20px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.employee-directory-card__actions {
  flex: 0 0 auto;
}

.employee-directory-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.employee-directory-card__item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.employee-directory-card__item:nth-child(odd):not(.employee-directory-card__item--wide) {
  border-right: 1px solid rgba(211, 224, 243, 0.8);
}

.employee-directory-card__item + .employee-directory-card__item {
  border-top: 1px solid rgba(211, 224, 243, 0.8);
}

.employee-directory-card__item--wide {
  grid-column: 1 / -1;
}

.employee-directory-card__item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-directory-card__item strong {
  font-size: 16px;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.employee-sector-inline-wrap {
  display: grid;
  gap: 6px;
}

.employee-sector-inline {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(91, 129, 220, 0.18);
  background: rgba(248, 251, 255, 0.92);
  border-radius: 12px;
  padding: 9px 12px;
  font: inherit;
  color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.employee-sector-inline.is-saving {
  border-color: rgba(46, 101, 242, 0.35);
  background: rgba(232, 240, 255, 0.96);
}

.employee-sector-inline.is-success {
  border-color: rgba(23, 136, 91, 0.35);
  background: rgba(232, 248, 241, 0.98);
}

.employee-sector-inline.is-error {
  border-color: rgba(197, 61, 72, 0.3);
  background: rgba(255, 239, 241, 0.98);
}

.employee-sector-inline:disabled {
  opacity: 0.8;
  cursor: wait;
}

.employee-sector-inline__status {
  min-height: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.employee-sector-inline__status--info {
  color: var(--primary-dark);
}

.employee-sector-inline__status--success {
  color: var(--success);
}

.employee-sector-inline__status--danger {
  color: var(--danger);
}

.employee-history-filters {
  margin-bottom: 14px;
}

.summary-list--employee,
.summary-list--employee-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-list--case {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-list--case .summary-item {
  min-height: 88px;
  padding: 12px 14px;
  gap: 5px;
}

.summary-list--case .summary-item span {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.summary-list--case .summary-item strong {
  font-size: 15px;
  line-height: 1.18;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.summary-list--case .summary-item:first-child {
  background: linear-gradient(180deg, rgba(43, 69, 255, 0.12), rgba(43, 69, 255, 0.05));
}

.summary-list--case .summary-item:nth-child(5) {
  border-color: rgba(43, 69, 255, 0.18);
  background: linear-gradient(180deg, rgba(43, 69, 255, 0.1), rgba(43, 69, 255, 0.04));
}

.detail-actions--case {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.detail-actions--case > :first-child,
.detail-actions--case > :nth-child(2),
.detail-actions--case > :nth-child(3) {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 42px rgba(20, 46, 118, 0.09);
}

.detail-actions--case > :first-child .inline-form--status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.detail-actions--case > :first-child .inline-form--status select {
  min-width: 0;
}

.case-status-select {
  width: 100%;
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  border: 1px solid rgba(90, 118, 220, 0.18);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(236, 242, 255, 0.92));
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 28px rgba(20, 46, 118, 0.08);
  color: var(--text);
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.case-status-select:focus {
  outline: 2px solid rgba(46, 101, 242, 0.18);
  border-color: rgba(46, 101, 242, 0.45);
  box-shadow: 0 0 0 4px rgba(46, 101, 242, 0.08), 0 14px 30px rgba(20, 46, 118, 0.1);
}

.detail-actions--case > :first-child .btn--small,
.inline-form--case-primary .btn {
  min-height: 46px;
}

.detail-actions--case > :nth-child(2) .textarea,
.detail-actions--case > :nth-child(3) .textarea {
  min-height: 108px;
}

.detail-actions--case > :nth-child(3) .stack-form + .stack-form,
.case-email-side {
  margin-top: 12px;
}

.case-summary-grid .summary-item {
  min-height: 80px;
  padding: 12px 14px;
  border-radius: 18px;
}

.case-summary-grid .summary-item:nth-child(-n+5) {
  min-height: 92px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(233, 240, 255, 0.82));
  border-color: rgba(58, 102, 255, 0.18);
  box-shadow: 0 16px 34px rgba(14, 38, 105, 0.08);
}

.case-summary-grid .summary-item:nth-child(-n+5) strong {
  font-size: 19px;
  line-height: 1.14;
}

.case-summary-grid .summary-item:nth-child(n+6) {
  min-height: 66px;
  background: rgba(255, 255, 255, 0.72);
}

.case-summary-grid .summary-item:nth-child(n+6) strong {
  font-size: 14px;
  font-weight: 700;
}

.detail-actions--case > :first-child,
.case-card,
.case-attachments-footer {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(240, 245, 255, 0.88));
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 20px 44px rgba(20, 46, 118, 0.08);
}

.detail-actions--case > :first-child {
  display: grid;
  gap: 14px;
  align-content: start;
}

.detail-actions--case > :first-child::before,
.case-card::before,
.case-attachments-footer::before {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.detail-actions--case > :first-child::before {
  content: "Operacion";
}

.case-card--notes::before {
  content: "Interno";
}

.case-card--mail::before {
  content: "Seguimiento";
}

.case-attachments-footer::before {
  content: "Adjuntos";
}

.detail-actions--case > :first-child .inline-form--status {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.detail-actions--case > :first-child .inline-form--status select,
.detail-actions--case > :first-child .btn--small,
.inline-form--case-primary .btn,
.case-email-form .btn,
.case-card--notes .btn {
  min-height: 48px;
  width: 100%;
}

.case-card .field > span {
  font-size: 12px;
}

.case-card .textarea,
.case-email-form .textarea {
  min-height: 108px;
}

.case-card--mail {
  display: grid;
  gap: 12px;
  height: 100%;
  align-content: start;
}

.case-follow-row {
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.case-attachments-footer {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.toolbar--case-back,
.toolbar--case-bottom {
  justify-content: flex-start;
}

.case-status-field {
  margin: 0;
}

.case-status-field > span {
  font-size: 12px;
}

.detail-actions--case > :first-child .btn--small {
  margin-top: auto;
  width: 100%;
}

.case-attachments-footer > .btn--ghost {
  margin-top: auto;
  width: 100%;
}

.toolbar--case-bottom {
  margin-top: 16px;
}

.filters-grid--employees,
.filters-grid--employee-history {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-icon--toggle-inactive {
  color: #17885b;
}

.inline-form--status {
  align-items: stretch;
}

.inline-form--status select {
  min-width: 180px;
}

.pending-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(46, 101, 242, 0.08) 0%, rgba(46, 101, 242, 0.03) 100%);
  border-radius: 18px;
  padding: 15px;
  margin: 16px 0;
}

.pending-box__title {
  font-weight: 800;
  font-size: 18px;
}

.pending-box__text {
  margin-top: 5px;
  color: var(--muted);
}

.mobile-actions,
.incident-grid,
.incident-repeater,
.ops-list {
  display: grid;
  gap: 12px;
}

.mobile-actions {
  margin-top: 16px;
}

.employee-home-block {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.employee-home-block__title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.employee-home-block__subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.employee-link-list {
  display: grid;
  gap: 10px;
}

.employee-link-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(210, 221, 247, 0.9);
  background: #ffffff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 14px 30px rgba(42, 69, 168, 0.08);
  text-decoration: none;
}

.employee-link-card:hover {
  transform: translateY(-1px);
}

.employee-link-card__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(104, 122, 165, 0.08);
  color: rgba(73, 91, 135, 0.9);
  font-size: 15px;
  font-weight: 800;
  border: 1px solid rgba(185, 199, 233, 0.8);
}

.employee-link-card__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.employee-link-card__label {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: rgba(25, 42, 80, 0.96);
  text-decoration: none;
}

.employee-link-card__arrow {
  font-size: 24px;
  line-height: 1;
  color: rgba(102, 119, 160, 0.82);
}

.incident-card,
.incident-row,
.ops-item,
.summary-item,
.stat-card {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 18px;
}

.incident-card {
  padding: 16px;
}

.incident-card__top,
.incident-row__head,
.ops-item__main,
.ops-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.incident-card__eyebrow,
.incident-row__case {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.incident-card h3,
.incident-row__employee {
  margin: 5px 0 0;
  font-size: 22px;
  line-height: 1;
}

.incident-meta,
.incident-row__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.incident-meta > span,
.incident-row__meta > span,
.mini-state,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.incident-meta > span,
.incident-row__meta > span,
.mini-state,
.pill--soft {
  background: rgba(46, 101, 242, 0.08);
  color: var(--primary-dark);
}

.pill--warning {
  background: rgba(196, 125, 0, 0.12);
  color: #9b6400;
}

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

.incident-row {
  padding: 16px;
}

.incident-row__title {
  min-width: 0;
}

.incident-row__status {
  flex: 0 1 360px;
  margin-left: auto;
}

.incident-card--history {
  display: grid;
  gap: 12px;
}

.incident-card__reason {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.incident-row__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8eef8;
}

.incident-row__meta {
  align-items: center;
}

.incident-row__detail-link {
  margin-right: 4px;
}

.inline-form--status-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.inline-form--status-compact .case-status-field {
  gap: 0;
}

.inline-form--status-compact .case-status-select {
  min-width: 0;
  padding: 11px 14px;
  min-height: 44px;
  border-radius: 14px;
}

.inline-form--status-compact .btn {
  min-height: 44px;
}

.inline-form--status {
  --case-status-bg: #fff7dc;
  --case-status-border: #eadca6;
  --case-status-text: #7a5e0f;
  --case-status-button-bg: #f8efc7;
  --case-status-button-text: #5f4d0b;
}

.inline-form--status .case-status-select {
  background: var(--case-status-bg);
  border-color: var(--case-status-border);
  color: var(--case-status-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.inline-form--status .case-status-select:focus {
  border-color: #96b0f8;
  box-shadow: 0 0 0 4px rgba(150, 176, 248, 0.18);
}

.inline-form--status .case-status-save.btn--secondary {
  background: var(--case-status-button-bg);
  border-color: var(--case-status-border);
  color: var(--case-status-button-text);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.inline-form--status .case-status-save.btn--secondary:hover {
  transform: translateY(-1px);
  filter: brightness(0.99);
}

.inline-form--status.status-tone--informado {
  --case-status-bg: #fff7dc;
  --case-status-border: #eadca6;
  --case-status-text: #7a5e0f;
  --case-status-button-bg: #f8efc7;
  --case-status-button-text: #5f4d0b;
}

.inline-form--status.status-tone--requiere-respuesta {
  --case-status-bg: #f2f7dc;
  --case-status-border: #d4dfa4;
  --case-status-text: #5d6a1f;
  --case-status-button-bg: #eaf0c6;
  --case-status-button-text: #4f5b1d;
}

.inline-form--status.status-tone--en-revision {
  --case-status-bg: #fff0e3;
  --case-status-border: #edcda8;
  --case-status-text: #8a5614;
  --case-status-button-bg: #f8e1cb;
  --case-status-button-text: #784910;
}

.inline-form--status.status-tone--justificado {
  --case-status-bg: #e7f6e8;
  --case-status-border: #bcdebe;
  --case-status-text: #2b6237;
  --case-status-button-bg: #ddf0df;
  --case-status-button-text: #25552f;
}

.inline-form--status.status-tone--rechazado {
  --case-status-bg: #f6ecf4;
  --case-status-border: #ddc8d9;
  --case-status-text: #71486b;
  --case-status-button-bg: #eedfec;
  --case-status-button-text: #623e5d;
}

.toolbar--employee-card {
  margin-top: 12px;
}

.toolbar--employee-secondary {
  margin-top: 14px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.employee-request-section {
  margin-top: 34px;
  display: grid;
  gap: 10px;
}

.employee-request-section__title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.employee-request-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 20px;
  border: 1px solid rgba(210, 221, 247, 0.9);
  background: #ffffff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 14px 30px rgba(42, 69, 168, 0.08);
  text-decoration: none;
}

.employee-request-card:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.employee-request-card__icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(104, 122, 165, 0.08);
  color: rgba(73, 91, 135, 0.9);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(185, 199, 233, 0.8);
}

.employee-request-card__icon--update {
  background: rgba(70, 157, 132, 0.1);
  color: rgba(35, 116, 95, 0.95);
  border-color: rgba(146, 214, 196, 0.7);
}

.employee-request-card__content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.employee-request-card__label {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  color: rgba(25, 42, 80, 0.96);
  text-decoration: none;
}

.employee-request-card__meta {
  font-size: 12px;
  line-height: 1.3;
  color: rgba(87, 102, 138, 0.9);
  text-decoration: none;
}

.employee-request-card__arrow {
  font-size: 21px;
  line-height: 1;
  color: rgba(102, 119, 160, 0.82);
}

.toolbar--employee-bottom {
  margin-top: 16px;
  justify-content: flex-start;
}

.panel-card .two-column-form .toolbar {
  margin-top: auto;
}

.panel-card .panel-split > form {
  display: flex;
  flex-direction: column;
}

.panel-card .panel-split > form .btn,
.panel-card .two-column-form .toolbar .btn {
  width: 100%;
}

.panel-card .panel-split > form .btn {
  margin-top: auto;
}

.summary-item {
  padding: 14px 15px;
  display: grid;
  gap: 6px;
  background: var(--surface-soft);
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-item strong {
  font-size: 17px;
}

.stat-card {
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(46, 101, 242, 0.06), rgba(46, 101, 242, 0.02));
}

.stat-card__label {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat-card__value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  line-height: 0.95;
}

.stat-card--warning {
  border-color: rgba(196, 125, 0, 0.2);
  background: rgba(196, 125, 0, 0.08);
}

.stat-card--danger {
  border-color: rgba(197, 61, 72, 0.18);
  background: rgba(197, 61, 72, 0.08);
}

.stat-card--soft {
  border-color: rgba(46, 101, 242, 0.16);
}

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

.scope-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.scope-chip--active {
  background: rgba(46, 101, 242, 0.12);
  color: var(--primary-dark);
}

.filters-form {
  margin-bottom: 14px;
}

.incident-filters {
  margin-bottom: 14px;
}

.filters-grid--incident-primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters-grid--incident-advanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filters-collapsible {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.filters-collapsible--soft {
  gap: 0;
  margin-bottom: 0;
}

.filters-collapsible__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--primary-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filters-collapsible__body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 220ms ease, opacity 180ms ease, margin-top 180ms ease;
  margin-top: 0;
}

.filters-collapsible.is-open .filters-collapsible__body {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 10px;
}

.filters-collapsible__inner {
  min-height: 0;
  overflow: hidden;
}

.filters-collapsible.is-open .filters-collapsible__toggle {
  box-shadow: 0 14px 30px rgba(33, 66, 158, 0.08);
  background: rgba(43, 69, 255, 0.08);
}

.filters-grid__dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.attachment-list {
  margin: 0;
  padding-left: 18px;
}

.attachment-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.attachment-list__item > a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.attachment-list__action {
  margin: 0;
}

.attachment-list__action .btn {
  white-space: nowrap;
}

.attachment-list li + li {
  margin-top: 8px;
}

.attachment-repeater {
  display: grid;
  gap: 10px;
}

.attachment-repeater__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.attachment-repeater__row input[type="file"] {
  min-width: 0;
}

.attachment-repeater__clear {
  border: 1px solid rgba(197, 61, 72, 0.2);
  background: rgba(197, 61, 72, 0.08);
  color: #9f2230;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.user-chip {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(46, 101, 242, 0.12);
  color: var(--primary-dark);
  margin-bottom: 14px;
  font-weight: 800;
}

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

.app-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.app-table th,
.app-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf2fb;
  text-align: left;
  vertical-align: top;
}

.app-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.export-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.app-tabs {
  display: grid;
  gap: 14px;
}

.app-tabs__nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.app-tabs__button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.app-tabs__button--active {
  background: rgba(46, 101, 242, 0.12);
  color: var(--primary-dark);
  border-color: rgba(46, 101, 242, 0.26);
}

.app-tabs__panel {
  display: none;
}

.app-tabs__panel--active {
  display: block;
}

.password-panel {
  max-width: 420px;
}

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

.app-pagebar .user-chip {
  margin-bottom: 0;
}

.app-brandbar {
  justify-content: center;
  margin-bottom: 18px;
}

.brand-lockup {
  width: min(100%, 1180px);
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 255, 0.7)),
    radial-gradient(circle at top left, rgba(43, 69, 255, 0.18), transparent 48%);
  border: 1px solid rgba(90, 118, 220, 0.18);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(31, 59, 142, 0.12);
}

.brand-lockup__cam {
  filter: drop-shadow(0 14px 28px rgba(36, 60, 168, 0.18));
}

.brand-lockup__signature {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  letter-spacing: 0.18em;
}

.app-pagebar {
  padding: 12px 14px;
  border: 1px solid rgba(73, 103, 214, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(33, 66, 158, 0.1);
  backdrop-filter: blur(18px);
}

.user-chip {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(73, 103, 214, 0.14);
  box-shadow: 0 12px 32px rgba(33, 66, 158, 0.08);
}

.hero-card--admin,
.hero-card--employee {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.84)),
    radial-gradient(circle at top right, rgba(43, 69, 255, 0.1), transparent 44%);
}

.panel-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(249, 251, 255, 0.82));
}

.eyebrow {
  color: var(--primary-dark);
}

.btn {
  border-radius: 18px;
}

.btn--primary {
  background: linear-gradient(180deg, #4569ff 0%, #203efe 100%);
  box-shadow: 0 18px 36px rgba(32, 62, 254, 0.2);
}

.btn--secondary {
  background: rgba(34, 61, 222, 0.1);
  border: 1px solid rgba(73, 103, 214, 0.12);
}

.btn--ghost,
.scope-chip,
.filters-collapsible__toggle,
.app-tabs__button {
  border-color: rgba(73, 103, 214, 0.14);
  box-shadow: 0 10px 24px rgba(33, 66, 158, 0.08);
}

.app-tabs__button--active,
.scope-chip--active {
  background: linear-gradient(180deg, rgba(43, 69, 255, 0.16), rgba(43, 69, 255, 0.08));
  border-color: rgba(43, 69, 255, 0.18);
}

.field input,
.field select,
.textarea {
  border-color: rgba(90, 118, 220, 0.16);
  background: rgba(248, 251, 255, 0.88);
}

.stat-card,
.summary-item,
.incident-card,
.incident-row,
.ops-item,
.employee-directory-card {
  box-shadow: 0 18px 42px rgba(20, 46, 118, 0.09);
}

.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 244, 255, 0.92));
}

.ops-item::before {
  width: 6px;
  background: linear-gradient(180deg, #2b45ff 0%, #72a4ff 100%);
}

.ops-callouts .panel-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
  border-color: #dbe6f5;
}

.ops-list {
  gap: 10px;
}

.ops-item {
  position: relative;
  padding: 14px 14px 14px 16px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.ops-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #2e65f2 0%, #5c84ef 100%);
}

.ops-item__main {
  align-items: flex-start;
}

.ops-item__main strong {
  font-size: 17px;
}

.ops-item__copy {
  display: grid;
  gap: 4px;
}

.ops-item__main span,
.ops-item__meta span {
  color: var(--muted);
  font-size: 13px;
}

.toolbar--stack-mobile {
  flex-direction: column;
  align-items: stretch;
}

.toolbar--stack-mobile .btn {
  width: 100%;
}

.toolbar--employee-exit {
  margin-top: 20px;
  justify-content: flex-start;
}

.btn--employee-exit-action {
  background: linear-gradient(180deg, rgba(255, 240, 238, 0.98), rgba(252, 229, 225, 0.95));
  color: #a2352d;
  border: 1px solid rgba(214, 111, 99, 0.26);
  box-shadow: 0 14px 30px rgba(173, 77, 67, 0.1);
}

.btn--employee-exit-action:hover {
  background: linear-gradient(180deg, rgba(255, 235, 232, 1), rgba(248, 223, 217, 0.98));
}

.history-pagination {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.history-pagination--single {
  justify-content: flex-start;
}

.history-pagination__status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.info-modal[hidden] {
  display: none;
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 28, 61, 0.52);
}

.info-modal__dialog {
  position: relative;
  width: min(92vw, 640px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: none;
}

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

.info-modal__head h3 {
  margin: 0;
}

.info-modal__close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.info-modal__body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

body.has-info-modal {
  overflow: hidden;
}

.app-modal[hidden] {
  display: none;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 65;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;
}

.app-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 28, 61, 0.52);
}

.app-modal__dialog {
  position: relative;
  width: min(94vw, 860px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  position: sticky;
  top: -22px;
  z-index: 2;
  background: linear-gradient(180deg, #ffffff 72%, rgba(255, 255, 255, 0));
  padding: 0 0 14px;
}

.app-modal__head h3 {
  margin: 0;
}

.app-modal__head--form {
  grid-column: 1 / -1;
}

.app-modal__close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.app-modal__form .toolbar {
  grid-column: 1 / -1;
}

body.has-app-modal {
  overflow: hidden;
}

.permission-list,
.email-template-form,
.activity-list {
  display: grid;
  gap: 12px;
}

.permission-row {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f4f8ff);
  padding: 14px;
}

.permission-row span {
  display: grid;
  gap: 4px;
}

.permission-row small {
  color: var(--muted);
  line-height: 1.35;
}

.permission-list + .toolbar {
  position: sticky;
  bottom: -22px;
  z-index: 2;
  margin-top: 4px;
  padding-top: 14px;
  background: linear-gradient(0deg, #ffffff 72%, rgba(255, 255, 255, 0));
}

.email-template-form {
  grid-template-columns: 1fr;
}

.email-template-field {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
  padding: 14px;
}

.activity-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f5f8ff);
  box-shadow: 0 18px 44px rgba(21, 51, 119, 0.08);
  padding: 16px;
}

.activity-row__meta,
.activity-row__detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.activity-row__meta span,
.activity-row__detail span {
  border-radius: 999px;
  background: rgba(31, 88, 255, 0.08);
  padding: 6px 10px;
}

.activity-row__main {
  display: grid;
  gap: 3px;
}

.activity-row__main strong {
  color: var(--text);
  font-size: 1rem;
}

.activity-row__main span {
  color: var(--brand);
  font-weight: 800;
}

@media (min-width: 720px) {
  .app-shell {
    padding: 24px 18px 48px;
  }

  .hero-card {
    padding: 26px 24px;
  }

  .two-column-form,
  .summary-list,
  .incident-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-split {
    grid-template-columns: 320px minmax(0, 1fr);
  }

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

  .email-template-form > p,
  .email-template-form > .toolbar {
    grid-column: 1 / -1;
  }

  .detail-actions {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .toolbar--stack-mobile {
    flex-direction: row;
    align-items: center;
  }

  .toolbar--stack-mobile .btn {
    width: auto;
  }
}

@media (max-width: 560px) {
  .app-pagebar {
    align-items: flex-start;
  }

  .hero-card__topline {
    align-items: center;
  }

  .hero-card__topline .btn {
    min-height: 44px;
    padding-inline: 16px;
  }

  .employee-directory-cards {
    display: block;
  }

  .table-wrap--employees {
    display: none;
  }

  .employee-directory-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
    table-layout: fixed;
  }

  .table-wrap--employees {
    overflow-x: clip;
  }

  .employee-directory-table thead {
    display: none;
  }

  .employee-directory-table tbody,
  .employee-directory-table tr,
  .employee-directory-table td {
    display: block;
    width: 100%;
  }

  .employee-directory-table tbody tr {
    width: 100%;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(17, 44, 96, 0.06);
    overflow: hidden;
  }

  .employee-directory-table td {
    padding: 10px 14px;
    border: 0;
    overflow-wrap: anywhere;
  }

  .employee-directory-table td + td {
    border-top: 1px solid rgba(211, 224, 243, 0.7);
  }

  .employee-directory-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .employee-directory-table__name {
    padding-top: 14px;
    padding-bottom: 12px;
    background: linear-gradient(180deg, rgba(46, 101, 242, 0.05), rgba(46, 101, 242, 0));
  }

  .employee-directory-table__name .employee-directory__name {
    display: block;
    font-size: 19px;
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  .employee-directory-table__actions {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .employee-directory-table__actions .table-actions {
    justify-items: start;
    min-width: 0;
  }

  .employee-directory-table__actions .action-icon-link,
  .employee-directory-table__actions .action-icon-button,
  .employee-directory-table__actions .action-icon--disabled {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .employee-directory-card__actions .action-icon-link,
  .employee-directory-card__actions .action-icon-button,
  .employee-directory-card__actions .action-icon--disabled {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .filters-grid--employees,
  .filters-grid--employee-history,
  .filters-grid--incident-primary,
  .filters-grid--incident-advanced {
    grid-template-columns: 1fr;
  }

  .summary-list--employee-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-list--employee-filters .summary-item {
    min-height: 88px;
    padding: 11px 12px;
    gap: 5px;
    border-radius: 16px;
  }

  .summary-list--employee-filters .summary-item span {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .summary-list--employee-filters .summary-item strong {
    font-size: 16px;
    line-height: 1.15;
  }

  .summary-list--employee-filters .summary-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .summary-list--employee {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-list--employee .summary-item {
    min-height: 94px;
    padding: 11px 12px;
    gap: 5px;
    border-radius: 16px;
  }

  .summary-list--employee .summary-item span {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .summary-list--employee .summary-item strong {
    font-size: 14px;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .summary-list--employee .summary-item:nth-child(2) {
    order: 3;
    grid-column: 1 / -1;
  }

  .summary-list--employee .summary-item:nth-child(4) {
    order: 2;
  }

  .employee-history-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
    table-layout: fixed;
  }

  .employee-history-table thead {
    display: none;
  }

  .employee-history-table tbody,
  .employee-history-table tr,
  .employee-history-table td {
    display: block;
    width: 100%;
  }

  .employee-history-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(17, 44, 96, 0.06);
    overflow: hidden;
  }

  .employee-history-table td {
    padding: 10px 14px;
    border: 0;
    overflow-wrap: anywhere;
    width: auto;
  }

  .employee-history-table td + td {
    border-top: 1px solid rgba(211, 224, 243, 0.7);
  }

  .employee-history-table td:nth-child(even) {
    border-left: 1px solid rgba(211, 224, 243, 0.7);
  }

  .employee-history-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .employee-history-table__case {
    grid-column: 1 / -1;
    padding-top: 14px;
    padding-bottom: 12px;
    background: linear-gradient(180deg, rgba(46, 101, 242, 0.05), rgba(46, 101, 242, 0));
    font-size: 18px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
  }

  .employee-history-table__actions {
    grid-column: 1 / -1;
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .employee-history-table__actions::before {
    margin-bottom: 10px;
  }

  .employee-history-table__actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

@media (min-width: 980px) {
  .app-shell {
    padding: 32px 24px 56px;
  }

  .hero-card {
    padding: 30px 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .panel-split--wide {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }

  .panel-split--wide > .settings-form--general {
    grid-column: span 5;
  }

  .panel-split--wide .settings-form--exchange {
    grid-column: span 7;
  }

  .panel-split--wide .exchange-test-form {
    grid-column: span 5;
  }

  .panel-split--wide .settings-form--weekly {
    grid-column: span 7;
  }

  .panel-split--wide > .stack-form.compact-form:not(form) > form[action="/admin/weekly-summary/send"],
  .panel-split--wide > .stack-form.compact-form:not(form) > form[action="/admin/monthly-summary/send"] {
    grid-column: span 6;
  }

  .panel-triplet > .panel-card:last-child {
    grid-column: auto;
  }

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

  .filters-grid--incident-advanced {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-list--employee {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-card .panel-split {
    align-items: stretch;
  }

  .panel-card .panel-split--address-access {
    grid-template-columns: minmax(520px, 1.3fr) minmax(300px, 0.7fr);
  }

  .case-summary-grid {
    grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(0, 1fr));
  }

  .case-summary-grid .summary-item {
    min-height: 72px;
    padding: 11px 13px;
  }

  .case-summary-grid .summary-item:nth-child(-n+5) {
    min-height: 82px;
  }

  .case-summary-grid .summary-item:nth-child(-n+5) strong {
    font-size: 17px;
  }

  .detail-actions--case {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }

  .detail-actions--case > :first-child {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
  }

  .detail-actions--case > :first-child .inline-form--status {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .detail-actions--case > :first-child .btn--small {
    width: 100%;
    min-width: 0;
  }

  .case-card--notes {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
  }

  .case-card--mail {
    grid-column: auto;
    grid-row: auto;
  }

  .case-follow-row {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    align-items: stretch;
  }

  .case-attachments-footer {
    margin-top: 0;
    height: 100%;
    align-content: start;
  }

  .case-card--mail {
    height: 100%;
  }

  .summary-list--employee-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .settings-form--general,
  .settings-form--exchange,
  .settings-form--weekly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .settings-form--general > h3,
  .settings-form--general > .toolbar {
    grid-column: 1 / -1;
  }

  .settings-form--general > label:nth-of-type(1),
  .settings-form--general > label:nth-of-type(3),
  .settings-form--general > label:nth-of-type(4),
  .settings-form--general > label:nth-of-type(5) {
    grid-column: 1 / span 1;
  }

  .settings-form--general > label:nth-of-type(2),
  .settings-form--general > .field.field--wide,
  .settings-form--general > label:nth-of-type(6) {
    grid-column: 2 / span 2;
  }

  .settings-form--general > label:nth-of-type(2) {
    grid-row: 2;
  }

  .settings-form--general > .field.field--wide {
    grid-row: 3;
  }

  .settings-form--general > label:nth-of-type(6) {
    grid-row: 4;
  }

  .settings-form--general .field--checkbox,
  .settings-form--weekly .field--checkbox {
    min-height: 52px;
  }

  .settings-form--weekly > h3 {
    grid-column: 1 / -1;
  }

  .settings-form--weekly > p {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: auto;
    border: 1px solid rgba(91, 129, 220, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    padding: 16px;
  }

  .settings-form--weekly > label:nth-of-type(1),
  .settings-form--weekly > label:nth-of-type(2),
  .settings-form--weekly > label:nth-of-type(3) {
    grid-column: 1;
  }

  .settings-form--weekly > label:nth-of-type(4),
  .settings-form--weekly > label:nth-of-type(5),
  .settings-form--weekly > label:nth-of-type(6) {
    grid-column: 2;
  }

  .settings-form--weekly > label:nth-of-type(1)::before,
  .settings-form--weekly > label:nth-of-type(4)::before {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .settings-form--weekly > label:nth-of-type(1)::before {
    content: "Semanal";
  }

  .settings-form--weekly > label:nth-of-type(4)::before {
    content: "Mensual";
  }

  .settings-form--weekly > label:nth-of-type(1),
  .settings-form--weekly > label:nth-of-type(4) {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .settings-form--weekly > label:nth-of-type(2),
  .settings-form--weekly > label:nth-of-type(5) {
    margin-top: -14px;
    border-top: 0;
    border-radius: 0;
  }

  .settings-form--weekly > label:nth-of-type(3),
  .settings-form--weekly > label:nth-of-type(6) {
    margin-top: -14px;
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .settings-form--weekly > .toolbar {
    grid-column: 1 / -1;
  }

  .settings-form__actions {
    justify-content: flex-start;
  }

  .incident-row__actions {
    justify-content: space-between;
  }
}

@media (max-width: 979px) {
  .incident-row__status {
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
  }

  .inline-form--status-compact {
    grid-template-columns: 1fr;
  }

  .panel-triplet > .panel-card:last-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   START: DASHBOARD CHARTS STYLING (MODULAR SECTION)
   ========================================================================== */
.dashboard-charts-section {
  margin-top: 24px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%) !important;
  border: 1px solid #dbe6f5 !important;
}

.charts-view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.charts-view-toggle .btn {
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  transition: all 180ms ease;
}

.charts-view-toggle .btn--primary.active {
  background: linear-gradient(180deg, #4569ff 0%, #203efe 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(32, 62, 254, 0.16);
  border-color: transparent;
}

.charts-view-toggle .btn--secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.charts-view-toggle .btn--secondary:hover {
  background: var(--surface-soft);
}

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

.chart-container-card {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(20, 46, 118, 0.04);
  display: flex;
  flex-direction: column;
}

.chart-container-card h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(90, 118, 220, 0.08);
  padding-bottom: 8px;
}

.chart-canvas-holder {
  position: relative;
  height: 230px;
  width: 100%;
}

.chart-no-data {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  border: 1px dashed var(--line);
}

.chart-no-data[hidden] {
  display: none;
}

@media (max-width: 768px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .chart-canvas-holder {
    height: 210px;
  }
}
/* ==========================================================================
   END: DASHBOARD CHARTS STYLING (MODULAR SECTION)
   ========================================================================== */

/* ==========================================================================
   CONFIGURACION - REDISEÑO COMPACTO FINAL
   ========================================================================== */
.panel-split--wide > .stack-form.compact-form:not(form) {
  display: grid;
  gap: 16px;
}

.panel-split--wide .settings-form,
.panel-split--wide .exchange-test-form,
.panel-split--wide > .stack-form.compact-form:not(form) > form:not(.settings-form) {
  min-height: 0;
}

.settings-form--general,
.settings-form--exchange,
.settings-form--weekly {
  grid-template-columns: 1fr;
  align-content: start;
}

.settings-form--general > h3,
.settings-form--exchange > h3,
.settings-form--weekly > h3,
.exchange-test-form > h3 {
  margin-bottom: 4px;
}

.settings-form--general > label,
.settings-form--general > .field.field--wide {
  padding: 12px;
}

.settings-form--general > label:nth-of-type(5),
.settings-form--general > label:nth-of-type(6),
.settings-form--weekly > label:nth-of-type(2),
.settings-form--weekly > label:nth-of-type(3),
.settings-form--weekly > label:nth-of-type(5),
.settings-form--weekly > label:nth-of-type(6) {
  margin-top: 0;
  border-top: 1px solid rgba(91, 129, 220, 0.16);
  border-radius: 18px;
}

.settings-form--general > label:nth-of-type(4),
.settings-form--weekly > label:nth-of-type(1),
.settings-form--weekly > label:nth-of-type(4) {
  border-radius: 18px;
}

.settings-form--weekly > p {
  max-width: none;
}

@media (min-width: 980px) {
  .panel-card .panel-split--wide {
    grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
    align-items: start;
  }

  .panel-split--wide > .settings-form--general {
    grid-column: 1;
  }

  .panel-split--wide > .stack-form.compact-form:not(form) {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .panel-split--wide .settings-form--exchange {
    grid-column: 1 / -1;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .settings-form--exchange > h3 {
    grid-column: 1 / -1;
  }

  .settings-form--exchange > .exchange-status,
  .settings-form--exchange > .exchange-summary {
    grid-column: 1;
  }

  .settings-form--exchange > label:nth-of-type(1),
  .settings-form--exchange > label:nth-of-type(2) {
    grid-column: 2;
  }

  .settings-form--exchange > label:nth-of-type(3) {
    grid-column: 3;
    grid-row: 3;
  }

  .settings-form--exchange > .toolbar {
    grid-column: 2 / -1;
  }

  .panel-split--wide .exchange-test-form {
    grid-column: 1;
  }

  .panel-split--wide .settings-form--weekly {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-form--weekly > h3,
  .settings-form--weekly > p,
  .settings-form--weekly > .toolbar {
    grid-column: 1 / -1;
  }

  .settings-form--weekly > p {
    grid-row: auto;
    min-height: 0;
    display: block;
    padding: 12px;
  }

  .settings-form--weekly > label:nth-of-type(1),
  .settings-form--weekly > label:nth-of-type(2),
  .settings-form--weekly > label:nth-of-type(3) {
    grid-column: 1;
  }

  .settings-form--weekly > label:nth-of-type(4),
  .settings-form--weekly > label:nth-of-type(5),
  .settings-form--weekly > label:nth-of-type(6) {
    grid-column: 2;
  }

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

  .settings-form--general > h3,
  .settings-form--general > .toolbar {
    grid-column: 1 / -1;
  }

  .settings-form--general > label:nth-of-type(1),
  .settings-form--general > label:nth-of-type(3),
  .settings-form--general > label:nth-of-type(4),
  .settings-form--general > label:nth-of-type(5) {
    grid-column: 1;
  }

  .settings-form--general > label:nth-of-type(2),
  .settings-form--general > .field.field--wide,
  .settings-form--general > label:nth-of-type(6) {
    grid-column: 2;
    grid-row: auto;
  }
}

/* CONFIGURACION - REDISEÑO COMPACTO Y PREMIUM (SOLO ESTRUCTURAL Y DE FORMA) */
.panel-split--wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.settings-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Forzar que todos los formularios dentro de la configuración se apilen de forma compacta */
.panel-split--wide .settings-form,
.panel-split--wide .exchange-test-form,
.panel-split--wide .settings-card--weekly {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

/* Desactivar cualquier "order" de CSS heredado en los hijos de la tarjeta de resúmenes */
.panel-split--wide .settings-card--weekly > * {
  order: 0 !important;
}

/* Darle estilo a la tarjeta unificada de Resúmenes Operativos */
.panel-split--wide .settings-card--weekly {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.9));
  box-shadow: 0 18px 48px rgba(27, 62, 150, 0.08);
  padding: 18px;
}

/* Hacer transparentes las cajitas internas antiguas de General y Weekly */
.panel-split--wide .settings-form > label,
.panel-split--wide .settings-form > .field.field--wide,
.panel-split--wide .settings-card--weekly label {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-top: 0 !important;
}

/* Quitar anchos fijos y forzar que los campos aprovechen el 100% de la tarjeta */
.panel-split--wide .settings-form > *,
.panel-split--wide .exchange-test-form > *,
.panel-split--wide .settings-card--weekly form > * {
  grid-column: auto !important;
  grid-row: auto !important;
}

.panel-split--wide .settings-form .field,
.panel-split--wide .settings-card--weekly .field {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.panel-split--wide .settings-form .field input,
.panel-split--wide .settings-form .field select,
.panel-split--wide .settings-card--weekly .field input,
.panel-split--wide .settings-card--weekly .field select {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ajustes especiales para checkboxes internos */
.panel-split--wide .settings-form .field--checkbox,
.panel-split--wide .settings-card--weekly .field--checkbox {
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

.panel-split--wide .settings-form .field--checkbox input[type="checkbox"],
.panel-split--wide .settings-card--weekly .field--checkbox input[type="checkbox"] {
  width: auto !important;
}

/* Quitar los anchos forzados de los botones dentro de las tarjetas */
.panel-split--wide .settings-form .btn,
.panel-split--wide .exchange-test-form .btn,
.panel-split--wide .settings-card--weekly .btn {
  width: 100% !important;
}

/* Botón Destacado Fuera de la Caja para Permisos Supervisor */
.supervisor-permissions-action {
  width: 100%;
  margin-top: 4px;
}

.supervisor-permissions-action .btn {
  width: 100% !important;
  min-height: 46px;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Acciones manuales de resumen integradas dentro de la tarjeta */
.settings-manual-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding-top: 0px; /* Sin padding arriba para aprovechar altura */
  border-top: none !important; /* Quitar línea punteada superior para ahorrar espacio */
}

.settings-manual-actions form {
  flex: 1;
}

.settings-manual-actions .btn {
  width: 100% !important;
  font-size: 0.85rem;
}

/* Encabezado compacto de sección (Semanal / Mensual) con Checkbox en la misma fila */
.settings-section-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 14px 0 2px 0 !important;
  padding-bottom: 4px !important;
  border-bottom: 1px dashed var(--line) !important;
}

.settings-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field--checkbox-inline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.8rem !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.field--checkbox-inline input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  cursor: pointer;
}

.field--checkbox-inline span {
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  color: var(--text) !important;
}

/* Ocultar la duplicación de textos inyectados por CSS (Semanal/Mensual) en la tarjeta unificada */
.panel-split--wide .settings-card--weekly label::before {
  display: none !important;
  content: none !important;
}

@media (min-width: 980px) {
  .panel-card .panel-split--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    grid-auto-flow: dense;
  }
}

@media (max-width: 600px) {
  .settings-manual-actions {
    flex-direction: column;
    gap: 8px;
  }
}
/* Production pagination */
.pagination-bar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0;
}

.pagination-bar__summary,
.pagination-bar__page {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.pagination-bar__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 640px) {
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-bar__actions {
    justify-content: space-between;
  }
}
