:root {
  --blue-900: #062d65;
  --blue-800: #0a3a7a;
  --blue-700: #124b96;
  --gold-600: #d99b2b;
  --gold-100: #fff4da;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --surface: #ffffff;
  --page: #f5f7fb;
  --band: #eef3f8;
  --green: #0f766e;
  --green-soft: #e8f6f3;
  --red: #b42318;
  --red-soft: #fdecea;
  --amber: #a15c07;
  --amber-soft: #fff3df;
  --shadow: 0 14px 34px rgba(16, 24, 40, 0.10);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.icon-sprite {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: sticky;
  top: 0;
}

.brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 190px;
  max-width: 100%;
}

.nav {
  display: grid;
  gap: 4px;
  padding: 16px 12px;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-parent {
  position: relative;
}

.nav-parent::after {
  color: #98a2b3;
  content: "▸";
  font-size: 12px;
  position: absolute;
  right: 12px;
}

.nav-group.open .nav-parent::after {
  content: "▾";
}

.nav-item {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  color: #344054;
  display: flex;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  text-align: left;
}

.nav-item svg,
.icon-button svg,
.primary svg,
.secondary svg,
.ghost svg,
.alert-list svg,
.sidebar-footer svg {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
  fill: currentColor;
}

.nav-item.active,
.nav-item:hover {
  background: #eef4fb;
  color: var(--blue-900);
  font-weight: 700;
}

.nav-submenu {
  border-left: 1px solid #c9d6e8;
  display: none;
  gap: 2px;
  margin: 0 0 4px 29px;
  padding: 2px 0 2px 8px;
}

.nav-group.open .nav-submenu {
  display: grid;
}

.nav-subitem {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  color: #475467;
  display: flex;
  font-size: 13px;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  text-align: left;
  width: 100%;
}

[hidden] {
  display: none !important;
}

.auth-pending {
  visibility: hidden;
}

.login-screen {
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, .65fr);
  inset: 0;
  min-height: 100vh;
  position: fixed;
  z-index: 1000;
}

.login-screen[hidden] {
  display: none;
}

.login-visual {
  background-image: url("assets/login-conciliacion-v3.webp");
  background-position: center;
  background-size: cover;
  min-height: 100vh;
  position: relative;
}

.login-visual::after {
  background: rgba(6, 45, 101, .28);
  content: "";
  inset: 0;
  position: absolute;
}

.login-visual::before {
  background: var(--gold-600);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.login-visual-copy {
  bottom: clamp(42px, 8vh, 88px);
  color: #fff;
  left: clamp(34px, 7vw, 104px);
  max-width: 620px;
  position: absolute;
  right: 34px;
  z-index: 1;
}

.login-visual-copy p {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
}

.login-visual-copy h2 {
  color: #fff;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  margin: 0 0 18px;
}

body:has(.login-screen:not([hidden])) {
  overflow: hidden;
}

.login-visual-copy span {
  color: rgba(255, 255, 255, .84);
  font-size: 14px;
}

.login-access {
  align-items: center;
  background: #fff;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(30px, 6vw, 76px);
}

.login-panel {
  display: grid;
  gap: 24px;
  width: min(470px, 100%);
}

.login-brand {
  display: block;
  width: 220px;
}

.login-heading h1 {
  color: var(--blue-900);
  font-size: 36px;
  line-height: 1.1;
  margin: 5px 0 0;
}

.login-copy {
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 0;
}

.suggested-account {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 15px 16px 16px;
}

.suggested-account[hidden],
.suggested-avatar img[hidden],
.suggested-avatar span[hidden],
.user-avatar img[hidden],
.user-avatar span[hidden] {
  display: none;
}

.suggested-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
}

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

.suggested-avatar {
  align-items: center;
  background: var(--blue-900);
  border: 3px solid #e7eef8;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 54px;
  font-size: 16px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  overflow: hidden;
  width: 54px;
}

.suggested-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.suggested-user div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.suggested-user strong {
  color: var(--blue-900);
  font-size: 15px;
}

.suggested-user div span {
  color: var(--muted);
  font-size: 12px;
}

.microsoft-login {
  align-items: center;
  background: var(--blue-900);
  border-radius: 6px;
  color: #fff;
  display: flex;
  font-weight: 700;
  gap: 12px;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
  width: 100%;
}

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

.local-login-form label {
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 700;
}

.local-login-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 43px;
  padding: 0 12px;
}

.local-login-form .password-control {
  width: 100%;
}

.local-login-form input:focus {
  border-color: var(--gold-600);
  box-shadow: 0 0 0 3px rgba(217, 155, 43, .18);
  outline: 0;
}

.local-login-form .microsoft-login {
  border: 0;
  cursor: pointer;
  margin-top: 10px;
}

.local-login-form .microsoft-login svg {
  fill: currentColor;
  height: 17px;
  width: 17px;
}

.login-other-account {
  color: var(--blue-800);
  font-size: 13px;
  font-weight: 700;
  justify-self: center;
  margin-top: -10px;
  text-decoration: none;
}

.login-other-account:hover {
  text-decoration: underline;
}

.microsoft-login:hover {
  background: var(--blue-800);
}

.microsoft-mark {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(2, 7px);
}

.microsoft-mark i {
  background: #fff;
  display: block;
  height: 7px;
  width: 7px;
}

.login-message {
  color: var(--red);
  font-weight: 600;
  margin: -8px 0 0;
  min-height: 18px;
}

.login-panel small {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.login-security {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 9px;
  padding-top: 18px;
}

.login-security svg {
  fill: var(--green);
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 250px;
  }

  .login-visual-copy {
    bottom: 30px;
    left: 30px;
  }

  .login-visual-copy h2 {
    font-size: 30px;
  }

  .login-access {
    min-height: auto;
    padding: 34px 28px;
  }
}

@media (max-width: 560px) {
  .login-visual {
    min-height: 190px;
  }

  .login-visual-copy p,
  .login-visual-copy span {
    display: none;
  }

  .login-visual-copy h2 {
    font-size: 25px;
    margin: 0;
  }

  .login-heading h1 {
    font-size: 30px;
  }
}

.nav-subitem svg {
  fill: currentColor;
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}

.nav-subitem span {
  min-width: 0;
}

.nav-subitem.active,
.nav-subitem:hover {
  background: #f7f9fc;
  color: var(--blue-900);
  font-weight: 700;
}

.sidebar-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 16px 20px;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  color: var(--blue-900);
  font-size: 13px;
}

.sidebar-footer span {
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 22px 24px 34px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.quick-access {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-left: auto;
  min-width: 0;
}

.quick-access-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue-900);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  width: 34px;
}

.quick-access-button:hover,
.quick-access-button:focus-visible {
  border-color: var(--gold-600);
  color: var(--blue-900);
  outline: 2px solid rgba(217, 155, 43, .24);
  outline-offset: 1px;
}

.quick-access-button.is-active {
  background: #fff;
  border-color: var(--line);
  color: var(--blue-900);
}

.quick-access-button:disabled,
.quick-access-button.is-disabled {
  cursor: default;
  opacity: .52;
}

.quick-access-button svg {
  height: 15px;
  width: 15px;
}

.quick-access-button span {
  display: none;
}

.process-context {
  align-items: center;
  background: var(--blue-900);
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(135px, .6fr) minmax(330px, 1.9fr) minmax(105px, .45fr);
  margin: -22px -24px 14px;
  min-height: 32px;
  padding: 0 24px;
}

.context-item {
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, .22);
  display: flex;
  min-height: 32px;
  min-width: 0;
  padding: 0 12px;
}

.context-item:last-child {
  border-right: 0;
}

.context-item > strong {
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-bank > strong {
  font-size: 12px;
}

.context-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  justify-self: start;
  max-width: 100%;
  padding: 2px 8px;
}

.context-status[data-state="borrador"] {
  background: var(--amber-soft);
  color: var(--amber);
}

.context-status[data-state="proceso"] {
  background: #e8f0fb;
  color: var(--blue-800);
}

.context-status[data-state="cerrada"] {
  background: var(--green-soft);
  color: var(--green);
}

.context-status[data-state="revision"],
.context-status[data-state="error"] {
  background: var(--red-soft);
  color: var(--red);
}

.eyebrow {
  color: var(--gold-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  color: var(--blue-900);
  font-size: 25px;
  line-height: 1.2;
}

h2 {
  color: var(--blue-900);
  font-size: 15px;
  line-height: 1.3;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.release-update-button {
  align-items: center;
  background: var(--gold-600);
  border: 1px solid #b77b15;
  border-radius: 6px;
  color: var(--blue-900);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.release-update-button:hover {
  background: #e7aa37;
}

.release-update-button svg {
  height: 14px;
  width: 14px;
}

.release-update-button[hidden] {
  display: none;
}

.search {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
}

.search span {
  color: var(--muted);
  font-size: 12px;
}

.search input {
  border: 0;
  min-width: 220px;
  outline: 0;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue-900);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.user-identity {
  align-items: center;
  color: var(--blue-900);
  background: transparent;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  height: 32px;
}

.user-session {
  position: relative;
}

.user-menu {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  min-width: 250px;
  padding: 14px;
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 30;
}

.user-menu[hidden] {
  display: none;
}

.user-menu > span {
  color: var(--muted);
  font-size: 12px;
}

.user-menu .secondary {
  justify-content: center;
  margin-top: 8px;
  width: 100%;
}

.user-avatar {
  align-items: center;
  background: var(--blue-900);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  height: 28px;
  justify-content: center;
  overflow: hidden;
  width: 28px;
}

.user-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar,
.panel-header,
.actions-line,
.button-group {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.inline-status {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}

.app-status {
  max-width: 420px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-status[data-tone="warn"] {
  color: var(--amber);
}

.inline-status[data-tone="error"] {
  color: var(--red);
}

.inline-status[data-tone="busy"] {
  color: var(--muted);
}

.toolbar {
  margin-bottom: 14px;
}

.segmented {
  background: #e8edf4;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  padding: 3px;
}

.segmented button {
  background: transparent;
  border-radius: 4px;
  color: #344054;
  height: 30px;
  padding: 0 12px;
}

.segmented button.active {
  background: #fff;
  color: var(--blue-900);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.primary,
.secondary,
.ghost {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  gap: 8px;
  height: 36px;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.primary {
  background: var(--blue-900);
  color: #fff;
  font-weight: 700;
}

.primary:hover {
  background: var(--blue-800);
}

.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue-900);
  font-weight: 700;
}

.ghost {
  background: transparent;
  color: var(--blue-900);
  font-weight: 700;
}

.primary:disabled,
.secondary:disabled,
.ghost:disabled {
  cursor: not-allowed;
  opacity: .48;
}

#btn-ejecutar-conciliacion.is-processing:disabled {
  cursor: wait;
  opacity: 1;
}

.execute-button-spinner {
  animation: execute-button-spin .72s linear infinite;
  border: 2px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  border-top-color: #fff;
  display: none;
  flex: 0 0 15px;
  height: 15px;
  width: 15px;
}

#btn-ejecutar-conciliacion.is-processing .execute-button-play {
  display: none;
}

#btn-ejecutar-conciliacion.is-processing .execute-button-spinner {
  display: inline-block;
}

#btn-leer-movimientos.is-processing:disabled {
  cursor: wait;
  opacity: 1;
}

.source-read-spinner {
  animation: execute-button-spin .72s linear infinite;
  border: 2px solid rgba(6, 45, 101, .25);
  border-radius: 50%;
  border-top-color: var(--blue-900);
  display: none;
  flex: 0 0 15px;
  height: 15px;
  width: 15px;
}

#btn-leer-movimientos.is-processing .source-read-icon {
  display: none;
}

#btn-leer-movimientos.is-processing .source-read-spinner {
  display: inline-block;
}

@keyframes execute-button-spin {
  to { transform: rotate(360deg); }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
}

.split {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.split.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.top-gap {
  margin-top: 14px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-header {
  border-bottom: 1px solid var(--line);
  margin: -2px 0 12px;
  padding-bottom: 12px;
}

.data-grid {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
}

.data-grid.tall {
  max-height: 560px;
}

.source-update-status {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 5px 7px;
  grid-column: 1 / -1;
  grid-template-columns: 14px minmax(0, 1fr);
  margin: 7px 0 0;
  min-height: 19px;
}

.source-status-message {
  grid-column: 1 / -1;
  min-width: 0;
}

.source-status-spinner {
  animation: execute-button-spin .72s linear infinite;
  border: 2px solid rgba(6, 45, 101, .2);
  border-radius: 50%;
  border-top-color: var(--blue-900);
  display: none;
  height: 13px;
  width: 13px;
}

.source-status-track {
  background: #dbe4ef;
  border-radius: 999px;
  display: none;
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  position: relative;
}

.source-status-track > span {
  animation: source-status-progress 1.05s ease-in-out infinite;
  background: var(--gold-600);
  height: 100%;
  left: -32%;
  position: absolute;
  width: 32%;
}

.source-update-status.is-processing .source-status-spinner,
.source-update-status.is-processing .source-status-track {
  display: block;
}

.source-update-status.is-processing .source-status-message {
  color: var(--blue-800);
  font-weight: 700;
  grid-column: 2;
}

.source-update-status[data-tone="ok"] .source-status-message {
  color: var(--green);
}

.source-update-status[data-tone="error"] .source-status-message {
  color: var(--red);
  font-weight: 700;
}

@keyframes source-status-progress {
  from { transform: translateX(0); }
  to { transform: translateX(415%); }
}

.master-maintenance-grid {
  height: clamp(460px, calc(100vh - 285px), 760px);
  overflow-x: hidden;
  overflow-y: auto;
}

.access-log-grid {
  height: calc(100vh - 260px);
  min-height: 420px;
}

#responsables-grid,
#log-procesos-grid {
  table-layout: fixed;
  width: 100%;
}

#responsables-grid th:nth-child(1),
#responsables-grid td:nth-child(1) { width: 24%; }
#responsables-grid th:nth-child(2),
#responsables-grid td:nth-child(2) { width: 24%; }
#responsables-grid th:nth-child(3),
#responsables-grid td:nth-child(3) { width: 18%; }
#responsables-grid th:nth-child(4),
#responsables-grid td:nth-child(4) { width: 14%; }
#responsables-grid th:nth-child(5),
#responsables-grid td:nth-child(5) { width: 12%; text-align: center; }
#responsables-grid th:nth-child(6),
#responsables-grid td:nth-child(6) { width: 84px; }

.log-filters {
  align-items: end;
  display: grid;
  column-gap: 14px;
  grid-template-columns: minmax(300px, 1fr) 170px 170px 124px;
  margin-bottom: 12px;
  row-gap: 10px;
}

.log-filters > * {
  min-width: 0;
}

.log-filters button {
  justify-content: center;
  width: 124px;
}

#log-procesos-grid th:nth-child(1),
#log-procesos-grid td:nth-child(1) { width: 145px; }
#log-procesos-grid th:nth-child(2),
#log-procesos-grid td:nth-child(2) { width: 24%; }
#log-procesos-grid th:nth-child(3),
#log-procesos-grid td:nth-child(3) { width: 100px; }
#log-procesos-grid th:nth-child(4),
#log-procesos-grid td:nth-child(4) { width: 130px; }
#log-procesos-grid th:nth-child(5),
#log-procesos-grid td:nth-child(5) { width: 150px; }
#log-procesos-grid th:nth-child(6),
#log-procesos-grid td:nth-child(6) { width: 120px; }

#clientes-grid td,
#responsables-grid td,
#log-procesos-grid td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-grid.mini-grid {
  max-height: 280px;
}

#noconciliados .unmatched-panel {
  padding: 12px;
}

#noconciliados .manual-match-panel {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.7fr) auto;
  margin-bottom: 10px;
  padding: 10px 12px;
}

#noconciliados .manual-match-panel p {
  color: var(--muted);
  font-size: 11px;
  margin: 2px 0 0;
}

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

.manual-match-selection span {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--blue-900);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  padding: 7px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#noconciliados tr.manual-match-row > td {
  background: #fff7df;
}

#noconciliados tr.manual-match-row > td:first-child {
  box-shadow: inset 3px 0 0 var(--gold-600);
}

#noconciliados .unmatched-panel .panel-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

#noconciliados .unmatched-grid {
  height: clamp(245px, calc(100vh - 555px), 555px);
  overflow-x: hidden;
  overflow-y: auto;
}

.unmatched-summary {
  background: #dde8f5;
  border: 1px solid #b8c9df;
  border-radius: 5px;
  border-top: 3px solid var(--blue-900);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 7px;
  overflow: hidden;
}

.unmatched-summary span {
  display: grid;
  gap: 2px;
  padding: 6px 10px;
}

.unmatched-summary span + span {
  border-left: 1px solid #b8c9df;
}

.unmatched-summary small,
.unmatched-summary strong {
  color: var(--blue-900);
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unmatched-summary small {
  color: #344054;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.unmatched-summary strong {
  font-size: 13px;
}

@media (max-width: 1100px) {
  #noconciliados .manual-match-panel {
    grid-template-columns: 1fr auto;
  }

  .manual-match-selection {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Maestro de Clientes: distribución final sin Régimen y con encabezados completos. */
#clientes-grid {
  width: 100% !important;
  min-width: 158ch;
  max-width: none;
  table-layout: fixed;
}

#clientes-grid .client-col-id { width: 14ch; }
#clientes-grid .client-col-name { width: 40ch; }
#clientes-grid .client-col-type { width: 8ch; }
#clientes-grid .client-col-email { width: 32ch; }
#clientes-grid .client-col-status { width: 11ch; }
#clientes-grid .client-col-team { width: 17ch; }
#clientes-grid .client-col-services { width: 12ch; }
#clientes-grid .client-col-ica { width: 11ch; }
#clientes-grid .client-col-key { width: 13ch; }
#clientes-grid .client-col-actions { width: 10ch; }

#clientes-grid th {
  overflow: visible;
  text-overflow: clip;
}

#clientes-grid th .th-sort span {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

/* Maestros corporativos compartidos: presentación compacta y de solo consulta. */
.master-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #d5deea;
}

.master-quick-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.master-quick-filters button {
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid #d5deea;
  border-radius: 14px;
  background: #f5f7fa;
  color: #52647a;
  font-size: 11px;
  font-weight: 500;
}

.master-quick-filters button:hover {
  border-color: #9cb2cc;
  background: #edf3f9;
}

.master-quick-filters button.active {
  border-color: #0a5db2;
  background: #0a5db2;
  color: #fff;
}

.master-quick-filters strong {
  margin-left: 3px;
  font: inherit;
  font-weight: 700;
}

.master-list-search {
  flex: 0 0 230px;
}

.master-list-search input {
  width: 100%;
  height: 30px;
  border-radius: 5px;
  padding: 5px 10px;
  background: #f5f7fa;
}

#clientes .panel-header,
#responsables .panel-header {
  min-height: 48px;
}

#clientes .master-maintenance-grid {
  height: calc(100vh - 282px);
  min-height: 390px;
}

#clientes-grid {
  width: 163ch !important;
  min-width: 100%;
  table-layout: fixed;
}

#clientes-grid .client-col-id { width: 14ch; }
#clientes-grid .client-col-name { width: 39ch; }
#clientes-grid .client-col-type { width: 7ch; }
#clientes-grid .client-col-email { width: 24ch; }
#clientes-grid .client-col-regime { width: 13ch; }
#clientes-grid .client-col-status { width: 10ch; }
#clientes-grid .client-col-team { width: 20ch; }
#clientes-grid .client-col-services { width: 9ch; }
#clientes-grid .client-col-ica { width: 9ch; }
#clientes-grid .client-col-key { width: 10ch; }
#clientes-grid .client-col-actions { width: 8ch; }

#clientes-grid th,
#clientes-grid td,
#responsables-grid th,
#responsables-grid td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.responsible-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.responsible-summary > div {
  padding: 8px 12px;
  border: 1px solid #d5deea;
  border-left: 3px solid var(--blue-700);
  border-radius: 5px;
  background: #fff;
}

.responsible-summary span {
  display: block;
  color: #66778d;
  font-size: 10px;
  text-transform: uppercase;
}

.responsible-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--blue-950);
  font-size: 18px;
}

.responsables-readonly-workspace {
  display: block !important;
  min-height: 0;
}

.responsables-readonly-grid {
  height: calc(100vh - 275px) !important;
  min-height: 390px;
}

#responsables-grid {
  width: 100% !important;
  min-width: 1180px;
  table-layout: fixed;
}

#responsables-grid th:nth-child(1), #responsables-grid td:nth-child(1) { width: 24%; }
#responsables-grid th:nth-child(2), #responsables-grid td:nth-child(2) { width: 8%; }
#responsables-grid th:nth-child(3), #responsables-grid td:nth-child(3) { width: 12%; }
#responsables-grid th:nth-child(4), #responsables-grid td:nth-child(4) { width: 18%; }
#responsables-grid th:nth-child(5), #responsables-grid td:nth-child(5) { width: 17%; }
#responsables-grid th:nth-child(6), #responsables-grid td:nth-child(6) { width: 26%; }
#responsables-grid th:nth-child(7), #responsables-grid td:nth-child(7) { width: 9%; text-align: center; }

@media (max-width: 1250px) {
  .master-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .master-list-search {
    flex-basis: auto;
    max-width: 360px;
  }
}

#noconciliados .unmatched-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#banco-noconc-grid th:nth-child(1),
#banco-noconc-grid td:nth-child(1) { width: 18%; }
#banco-noconc-grid th:nth-child(2),
#banco-noconc-grid td:nth-child(2) { width: 19%; }
#banco-noconc-grid th:nth-child(3),
#banco-noconc-grid td:nth-child(3) { width: 51%; }
#banco-noconc-grid th:nth-child(4),
#banco-noconc-grid td:nth-child(4) { width: 12%; }

#mvto-noconc-grid th:nth-child(1),
#mvto-noconc-grid td:nth-child(1) { width: 12%; }
#mvto-noconc-grid th:nth-child(2),
#mvto-noconc-grid td:nth-child(2) { width: 15%; }
#mvto-noconc-grid th:nth-child(3),
#mvto-noconc-grid td:nth-child(3) { width: 20%; }
#mvto-noconc-grid th:nth-child(4),
#mvto-noconc-grid td:nth-child(4) { width: 7%; }
#mvto-noconc-grid th:nth-child(5),
#mvto-noconc-grid td:nth-child(5) { width: 14%; }
#mvto-noconc-grid th:nth-child(6),
#mvto-noconc-grid td:nth-child(6) { width: 20%; }
#mvto-noconc-grid th:nth-child(7),
#mvto-noconc-grid td:nth-child(7) { width: 12%; }

.manual-select-column {
  text-align: center;
}

.manual-select-column span {
  overflow: visible;
  text-overflow: clip;
}

.manual-select-all,
.manual-row-select {
  accent-color: var(--blue-900);
  cursor: pointer;
  height: 15px;
  margin: 0;
  width: 15px;
}

.manual-select-all {
  margin-left: 5px;
  vertical-align: middle;
}

.manual-select-cell {
  text-align: center;
}

#noconciliados .compensations-panel {
  padding: 12px;
}

#noconciliados .compensations-panel .panel-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

#noconciliados .compensations-grid {
  max-height: 120px;
  overflow-x: hidden;
  overflow-y: auto;
}

#compensaciones-grid {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#compensaciones-grid th:nth-child(1),
#compensaciones-grid td:nth-child(1) { width: 13%; }
#compensaciones-grid th:nth-child(2),
#compensaciones-grid td:nth-child(2) { width: 10%; }
#compensaciones-grid th:nth-child(3),
#compensaciones-grid td:nth-child(3) { width: 11%; }
#compensaciones-grid th:nth-child(4),
#compensaciones-grid td:nth-child(4) { width: 11%; }
#compensaciones-grid th:nth-child(5),
#compensaciones-grid td:nth-child(5) { width: 23%; }
#compensaciones-grid th:nth-child(6),
#compensaciones-grid td:nth-child(6) { width: 32%; }

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

table.wide-table {
  min-width: 1320px;
}

#contabilidad-grid {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#contabilidad .data-grid {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
}

#contabilidad,
#contabilidad .panel {
  min-width: 0;
  overflow-x: hidden;
}

#contabilidad-grid.wide-table {
  min-width: 100%;
}

#banco-grid {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#banco .data-grid {
  overflow-x: hidden;
  overflow-y: auto;
}

#contabilidad .data-grid.tall,
#banco .data-grid.tall {
  height: clamp(600px, calc(100vh - 300px), 780px);
  max-height: none;
}

#contabilidad .data-grid.tall {
  height: clamp(630px, calc(100vh - 250px), 830px);
}

#maestro-puc .data-grid.tall,
#maestro-terceros .data-grid.tall {
  height: clamp(640px, calc(100vh - 250px), 840px);
  max-height: none;
}

.grid-summary {
  align-items: center;
  background: #dde8f5;
  border: 1px solid #b8c9df;
  border-top: 3px solid var(--blue-900);
  border-radius: 6px;
  color: var(--blue-900);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 8px;
  min-height: 44px;
  overflow: hidden;
}

.grid-summary span {
  border-left: 1px solid #b8c9df;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 10px;
}

.grid-summary span:first-child {
  border-left: 0;
}

.grid-summary small {
  color: #344054;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.grid-summary strong {
  color: var(--blue-900);
  font-size: 13px;
  line-height: 1.1;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#contabilidad .panel,
#banco .panel,
#maestro-puc .panel,
#maestro-terceros .panel {
  padding: 12px 16px 16px;
}

#contabilidad .panel-header,
#banco .panel-header,
#maestro-puc .panel-header,
#maestro-terceros .panel-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

#contabilidad .table-toolbar,
#banco .table-toolbar,
#maestro-puc .table-toolbar,
#maestro-terceros .table-toolbar {
  gap: 10px;
  margin-bottom: 8px;
}

#contabilidad-grid th:nth-child(1),
#contabilidad-grid td:nth-child(1) {
  min-width: 0;
  width: 5%;
}

#contabilidad-grid th:nth-child(2),
#contabilidad-grid td:nth-child(2) {
  min-width: 0;
  width: 9%;
}

#contabilidad-grid th:nth-child(3),
#contabilidad-grid td:nth-child(3) {
  min-width: 0;
  width: 11%;
}

#contabilidad-grid th:nth-child(4),
#contabilidad-grid td:nth-child(4) {
  min-width: 0;
  text-align: center;
  width: 6%;
}

#contabilidad-grid th:nth-child(5),
#contabilidad-grid td:nth-child(5) {
  min-width: 0;
  width: 27%;
}

#contabilidad-grid th:nth-child(6),
#contabilidad-grid td:nth-child(6) {
  min-width: 0;
  text-align: center;
  width: 5%;
}

#contabilidad-grid th:nth-child(7),
#contabilidad-grid td:nth-child(7) {
  min-width: 0;
  width: 13%;
}

#contabilidad-grid th:nth-child(8),
#contabilidad-grid td:nth-child(8) {
  min-width: 0;
  width: 24%;
}

#contabilidad-grid.sortable-table th {
  padding: 0;
}

#contabilidad-grid .th-content {
  gap: 1px;
  grid-template-columns: minmax(0, 1fr) 14px;
  padding: 0 2px 0 5px;
}

#contabilidad-grid .th-sort,
#contabilidad-grid .th-filter {
  padding: 0;
}

#contabilidad-grid .th-filter {
  width: 14px;
}

#contabilidad-grid .th-sort span {
  text-overflow: clip;
}

#banco-grid th:nth-child(1),
#banco-grid td:nth-child(1) {
  min-width: 0;
  width: 5%;
}

#banco-grid th:nth-child(2),
#banco-grid td:nth-child(2) {
  min-width: 0;
  width: 8%;
}

#banco-grid th:nth-child(3),
#banco-grid td:nth-child(3) {
  min-width: 0;
  width: 11%;
}

#banco-grid th:nth-child(4),
#banco-grid td:nth-child(4) {
  min-width: 0;
  text-align: center;
  width: 6%;
}

#banco-grid th:nth-child(5),
#banco-grid td:nth-child(5) {
  min-width: 0;
  width: 28%;
}

#banco-grid th:nth-child(6),
#banco-grid td:nth-child(6) {
  min-width: 0;
  width: 16%;
}

#banco-grid th:nth-child(7),
#banco-grid td:nth-child(7) {
  min-width: 0;
  width: 13%;
}

#banco-grid th:nth-child(8),
#banco-grid td:nth-child(8) {
  min-width: 0;
  width: 13%;
}

#banco-grid .th-sort span {
  text-overflow: clip;
}

#banco-grid .th-content {
  gap: 1px;
  grid-template-columns: minmax(0, 1fr) 14px;
  padding-left: 5px;
  padding-right: 2px;
}

#banco-grid .th-filter {
  padding: 0;
  width: 14px;
}

#banco-grid .th-sort {
  padding: 0;
  width: 100%;
}

#puc-grid {
  min-width: 1120px;
}

#puc-grid th:nth-child(1),
#puc-grid td:nth-child(1) {
  min-width: 132px;
  width: 132px;
}

#puc-grid th:nth-child(2),
#puc-grid td:nth-child(2) {
  min-width: 560px;
}

#puc-grid th:nth-child(3),
#puc-grid td:nth-child(3),
#puc-grid th:nth-child(4),
#puc-grid td:nth-child(4),
#puc-grid th:nth-child(5),
#puc-grid td:nth-child(5) {
  min-width: 128px;
  width: 128px;
}

#terceros-grid {
  min-width: 1240px;
}

#terceros-grid th:nth-child(1),
#terceros-grid td:nth-child(1) {
  min-width: 142px;
  width: 142px;
}

#terceros-grid th:nth-child(2),
#terceros-grid td:nth-child(2) {
  min-width: 560px;
}

#terceros-grid th:nth-child(3),
#terceros-grid td:nth-child(3) {
  min-width: 130px;
  width: 130px;
}

#terceros-grid th:nth-child(4),
#terceros-grid td:nth-child(4) {
  min-width: 180px;
  width: 180px;
}

#terceros-grid th:nth-child(5),
#terceros-grid td:nth-child(5) {
  min-width: 120px;
  width: 120px;
}

#conceptos-grid {
  min-width: 1180px;
  table-layout: fixed;
}

#conceptos-grid th:nth-child(1),
#conceptos-grid td:nth-child(1) { width: 18%; }
#conceptos-grid th:nth-child(2),
#conceptos-grid td:nth-child(2) { width: 10%; }
#conceptos-grid th:nth-child(3),
#conceptos-grid td:nth-child(3) { width: 9%; }
#conceptos-grid th:nth-child(4),
#conceptos-grid td:nth-child(4) { width: 17%; }
#conceptos-grid th:nth-child(5),
#conceptos-grid td:nth-child(5) { width: 10%; }
#conceptos-grid th:nth-child(6),
#conceptos-grid td:nth-child(6) { width: 20%; }
#conceptos-grid th:nth-child(7),
#conceptos-grid td:nth-child(7) { width: 8%; }
#conceptos-grid th:nth-child(8),
#conceptos-grid td:nth-child(8) { width: 8%; }

.actions-column,
.row-actions-cell {
  text-align: center;
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
}

.row-action-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--blue-900);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.row-action-button:hover {
  background: #eaf1f9;
  border-color: #bfd0e4;
}

.row-action-button.delete {
  color: var(--red);
}

.row-action-button.delete:hover {
  background: var(--red-soft);
  border-color: #efb3ad;
}

.row-action-button svg {
  fill: currentColor;
  height: 16px;
  width: 16px;
}

.responsables-workspace {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(260px, 1.15fr) minmax(210px, .85fr);
  height: calc(100% - 64px);
  min-height: 0;
}

.responsables-main-grid {
  height: 100%;
  max-height: none;
  min-height: 0;
}

.responsables-catalogs {
  border-left: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding-left: 0;
  padding-top: 12px;
}

#maestro-responsables > .panel {
  height: calc(100vh - 190px);
  min-height: 0;
  overflow: hidden;
}

.responsable-catalog-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.responsable-catalog-block + .responsable-catalog-block {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.compact-catalog-grid {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.responsable-catalog-block {
  min-height: 0;
}

.responsable-catalog-block + .responsable-catalog-block {
  border-top: 0;
  padding-top: 0;
}

.compact-section-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.compact-section-header h3,
.compact-section-header p {
  margin: 0;
}

.compact-section-header h3 {
  color: var(--blue-900);
  font-size: 14px;
}

.compact-section-header p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.compact-command {
  min-height: 30px;
  padding: 5px 9px;
}

.compact-catalog-grid {
  max-height: none;
}

.compact-catalog-grid table {
  min-width: 0;
  table-layout: fixed;
}

.compact-catalog-grid th,
.compact-catalog-grid td {
  font-size: 11.5px;
  padding: 3px 7px;
}

.compact-catalog-grid th:nth-child(2),
.compact-catalog-grid td:nth-child(2) {
  text-align: center;
  width: 115px;
}

.compact-catalog-grid th:last-child,
.compact-catalog-grid td:last-child {
  width: 72px;
}

#responsables-grid {
  min-width: 0;
  table-layout: fixed;
}

#responsables-grid th:nth-child(1),
#responsables-grid td:nth-child(1) { width: 23%; }
#responsables-grid th:nth-child(2),
#responsables-grid td:nth-child(2) { width: 24%; }
#responsables-grid th:nth-child(3),
#responsables-grid td:nth-child(3) { width: 15%; }
#responsables-grid th:nth-child(4),
#responsables-grid td:nth-child(4) { width: 13%; }
#responsables-grid th:nth-child(5),
#responsables-grid td:nth-child(5) { width: 10%; text-align: center; }
#responsables-grid th:nth-child(6),
#responsables-grid td:nth-child(6) { width: 7%; text-align: center; }
#responsables-grid th:nth-child(7),
#responsables-grid td:nth-child(7) { width: 8%; min-width: 88px; }

/* Responsables is a read-only projection of the corporate shared master. */
.responsables-readonly-workspace {
  display: block;
  height: calc(100% - 64px);
}

.responsables-readonly-grid {
  height: 100%;
  max-height: none;
  min-height: 0;
}

.responsables-readonly-grid #responsables-grid th:nth-child(1),
.responsables-readonly-grid #responsables-grid td:nth-child(1) { width: 30%; }
.responsables-readonly-grid #responsables-grid th:nth-child(2),
.responsables-readonly-grid #responsables-grid td:nth-child(2) { width: 34%; }
.responsables-readonly-grid #responsables-grid th:nth-child(3),
.responsables-readonly-grid #responsables-grid td:nth-child(3) { width: 24%; }
.responsables-readonly-grid #responsables-grid th:nth-child(4),
.responsables-readonly-grid #responsables-grid td:nth-child(4) {
  text-align: center;
  width: 12%;
}

@media (max-width: 1500px) {
  #maestro-responsables > .panel { min-height: 0; }
}

@media (max-width: 900px) {
  .responsables-catalogs {
    grid-template-columns: 1fr;
  }

  .responsable-catalog-block + .responsable-catalog-block {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }
}

.conceptos-total-scroll {
  border: 1px solid #b8c9df;
  border-top: 3px solid var(--blue-900);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.conceptos-total-row {
  align-items: center;
  background: #d7e4f3;
  color: var(--blue-900);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  grid-template-columns: 18% 10% 9% 17% 10% 20% 8% 8%;
  min-height: 36px;
  min-width: 1180px;
}

.conceptos-total-row > * {
  min-width: 0;
  padding: 0 8px;
}

.conceptos-total-row strong {
  font-weight: 900;
  text-align: right;
}

.conceptos-total-row strong.negative {
  color: var(--red);
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.15;
  max-width: 50ch;
  overflow: hidden;
  padding: 4px 8px;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

#banco-grid th,
#banco-grid td,
#contabilidad-grid th,
#contabilidad-grid td,
#puc-grid th,
#puc-grid td,
#terceros-grid th,
#terceros-grid td {
  font-size: 11.5px;
  line-height: 1;
  padding: 2px 8px;
}

th {
  background: var(--blue-900);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sortable-table th {
  overflow: visible;
  padding: 0;
}

.th-content {
  align-items: center;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(0, 1fr) 18px;
  min-height: 28px;
  padding: 0 4px 0 8px;
  position: relative;
}

#banco-grid .th-content,
#contabilidad-grid .th-content,
#puc-grid .th-content,
#terceros-grid .th-content {
  min-height: 23px;
  padding-left: 7px;
}

#banco-grid .tag,
#contabilidad-grid .tag,
#puc-grid .status,
#terceros-grid .status {
  font-size: 10px;
  min-height: 16px;
  padding: 1px 7px;
}

.conc-state {
  align-items: center;
  display: inline-flex;
  gap: 3px;
  justify-content: center;
  min-width: 30px;
}

.conc-state svg {
  fill: currentColor;
  height: 13px;
  width: 13px;
}

.conc-state small {
  color: #667085;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.conc-state.is-conciliated {
  color: var(--green);
}

.conc-state.is-pending {
  color: var(--amber);
}

.conc-state-dot {
  background: currentColor;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.th-sort,
.th-filter {
  background: transparent;
  color: inherit;
  min-width: 0;
}

.th-sort {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  text-align: left;
}

.th-sort span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.th-filter {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-size: 13px;
  height: 20px;
  justify-content: center;
  opacity: 0.78;
  width: 18px;
}

.th-filter:hover,
.th-content:focus-within .th-filter {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}

.th-filter.is-active {
  background: var(--gold);
  color: var(--blue-900);
  opacity: 1;
}

.column-filter-popover {
  background: #fff;
  border: 1px solid #d0d9e6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 42, 77, 0.18);
  display: none;
  left: 8px;
  min-width: 240px;
  padding: 9px 10px 8px;
  position: fixed;
  top: 30px;
  font-weight: 400;
  z-index: 1000;
}

.column-filter-popover.open {
  display: block;
}

.sortable-table th:has(.column-filter-popover.open) {
  z-index: 12;
}

.column-filter-title {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.column-menu-commands {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  margin: -2px 0 8px;
  padding-bottom: 7px;
}

.column-menu-commands button,
.column-total-command {
  align-items: center;
  background: transparent;
  border-radius: 4px;
  color: var(--ink);
  display: flex;
  font-size: 12px;
  font-weight: 500;
  justify-content: space-between;
  min-height: 28px;
  padding: 4px 6px;
  text-align: left;
  width: 100%;
}

.column-menu-commands button:hover,
.column-menu-commands button.is-selected,
.column-total-command:hover,
.column-total-command.is-selected {
  background: var(--blue-050);
  color: var(--blue-900);
}

.column-menu-commands button.is-selected,
.column-total-command.is-selected {
  font-weight: 700;
}

.column-total-command {
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 7px;
}

.column-filter-search {
  border: 1px solid #c9d6e8 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  height: 32px !important;
  min-width: 0 !important;
  padding: 0 9px !important;
  width: 100%;
}

.column-filter-actions {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: 7px 0 3px;
  padding: 0 0 6px;
}

.column-filter-actions button {
  background: transparent;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 0;
}

.column-filter-actions button:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.column-filter-values {
  max-height: 238px;
  overflow-y: auto;
  padding-top: 2px;
}

.column-filter-value {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font-size: 12px;
  font-weight: 400;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  min-height: 28px;
  padding: 3px 2px;
}

.column-filter-value:hover {
  background: var(--blue-050);
}

.column-filter-value input[type="checkbox"] {
  appearance: none;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 10px 10px;
  border: 1px solid #98a2b3;
  border-radius: 2px;
  box-shadow: none;
  height: 14px;
  margin: 0;
  min-height: 14px;
  min-width: 14px;
  padding: 0;
  width: 14px;
}

.column-filter-value input[type="checkbox"]:checked {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.7 9 10 3' fill='none' stroke='%23062d65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--blue-900);
}

.column-filter-value input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(217, 155, 43, 0.45);
  outline-offset: 1px;
}

.column-filter-value span {
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-filter-value small {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 400;
}

.column-filter-empty {
  color: #667085;
  display: block;
  font-size: 12px;
  padding: 8px 3px;
}

.grid-functional-footer {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-top: 0;
  color: #475467;
  display: grid;
  font-size: 11px;
  grid-template-columns: 5% 9% 11% 6% 27% 5% 13% 24%;
  min-height: 21px;
  padding: 2px 14px 2px 0;
}

#contabilidad .data-grid.tall:has(+ .grid-functional-footer) {
  height: clamp(609px, calc(100vh - 271px), 809px);
}

.grid-functional-total {
  display: block;
  justify-items: end;
  line-height: 1;
  min-width: 0;
  padding: 0 6px;
  text-align: right;
}

.grid-visible-count {
  grid-column: 1;
  overflow: hidden;
  padding-left: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-functional-total strong,
.grid-visible-count strong,
.tabular-cell {
  font-variant-numeric: tabular-nums;
}

.grid-functional-total strong {
  font-size: 11px;
}

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

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

.cell-align-right {
  text-align: right;
}

.column-filter-popover {
  min-width: 240px;
  width: min(240px, calc(100vw - 32px));
}

.column-filter-popover {
  right: auto;
}

.column-filter-popover.is-compact {
  min-width: 210px;
  width: min(210px, calc(100vw - 32px));
}

.column-filter-popover.is-compact .column-filter-values {
  max-height: 182px;
}

.column-filter-popover.is-compact .column-filter-value {
  gap: 6px;
  min-height: 25px;
}

.data-grid.tall.has-cyc-grid-footer {
  max-height: 539px;
}

.master-maintenance-grid.has-cyc-grid-footer {
  height: clamp(439px, calc(100vh - 306px), 739px);
}

#noconciliados .unmatched-grid.has-cyc-grid-footer {
  height: clamp(224px, calc(100vh - 576px), 534px);
}

#noconciliados .compensations-grid.has-cyc-grid-footer {
  max-height: 99px;
}

.compact-catalog-grid.has-cyc-grid-footer {
  height: calc(100% - 21px);
}

#contabilidad .data-grid.tall.has-cyc-grid-footer {
  max-height: none;
}

#banco .data-grid.tall.has-cyc-grid-footer {
  height: clamp(579px, calc(100vh - 321px), 759px);
  max-height: none;
}

#maestro-puc .data-grid.tall.has-cyc-grid-footer,
#maestro-terceros .data-grid.tall.has-cyc-grid-footer {
  height: clamp(619px, calc(100vh - 271px), 819px);
  max-height: none;
}

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

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

.rule-form-grid label {
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.rule-form-grid input,
.rule-form-grid select,
.rule-form-grid textarea {
  margin-top: 5px;
}

.rule-form-grid textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 96px;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}

.rule-form-grid textarea:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 2px rgba(18, 75, 150, 0.12);
  outline: 0;
}

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

.directory-control,
.directory-location {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 38px;
}

.catalog-select-control {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 38px;
  margin-top: 5px;
}

.catalog-lookup-control {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 36px;
  margin-top: 5px;
}

.rule-form-grid .catalog-lookup-control input {
  margin-top: 0;
  min-width: 0;
}

.catalog-lookup-trigger {
  align-items: center;
  align-self: stretch;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--gold-600);
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 36px;
}

.catalog-lookup-trigger:hover,
.catalog-lookup-trigger:focus-visible {
  background: var(--gold-100);
  color: var(--blue-900);
  outline: 2px solid rgba(217, 155, 43, 0.32);
  outline-offset: 1px;
}

.catalog-lookup-trigger svg {
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.responsable-form-grid {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.password-control {
  display: block;
  position: relative;
}

.password-control input {
  padding-right: 42px;
  width: 100%;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.password-visibility {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--blue-900);
  cursor: pointer;
  display: flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 4px;
  top: 6px;
  width: 32px;
}

.password-visibility:hover,
.password-visibility:focus-visible {
  background: var(--gold-100);
  border-radius: 4px;
  outline: 2px solid rgba(217, 155, 43, .24);
}

.password-visibility svg {
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.catalog-field > label {
  display: block;
}

.catalog-select-control select {
  margin-top: 0;
  min-width: 0;
}

.catalog-select-control .icon-command {
  height: 32px;
}

.catalog-inline-create {
  background: transparent;
  color: var(--gold-600);
}

.catalog-inline-create:hover,
.catalog-inline-create:focus-visible {
  background: var(--gold-100);
  outline: 0;
}

.directory-control input {
  margin-top: 0;
}

.icon-command {
  align-items: center;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  min-width: 38px;
  padding: 0;
  width: 38px;
}

.icon-command svg {
  fill: currentColor;
  height: 17px;
  width: 17px;
}

.directory-location {
  grid-template-columns: 38px 38px minmax(0, 1fr);
  margin-bottom: 10px;
}

.directory-location input {
  font-size: 12px;
}

.directory-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  max-height: 310px;
  min-height: 210px;
  overflow-y: auto;
  outline: 0;
}

.directory-list:focus-visible {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 2px rgba(10, 58, 122, 0.14);
}

.directory-option {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 9px;
  min-height: 36px;
  padding: 7px 10px;
  text-align: left;
  user-select: none;
  width: 100%;
}

.directory-option:last-child {
  border-bottom: 0;
}

.directory-option:hover,
.directory-option:focus-visible,
.directory-option.selected {
  background: #eef4fb;
  color: var(--blue-900);
}

.directory-option.selected {
  box-shadow: inset 3px 0 0 var(--gold-600);
  font-weight: 700;
}

.directory-option svg {
  fill: var(--gold-600);
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

.directory-empty {
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.selector-status {
  color: var(--muted);
  font-size: 12px;
  min-height: 0;
  margin: 0;
}

.selector-status[data-tone="error"] {
  color: var(--red);
}

.selector-status[data-tone="search"] {
  color: var(--blue-700);
  font-weight: 700;
}

.selector-status[data-tone="warning"] {
  color: #9a6700;
  font-weight: 700;
}

.switch-field {
  align-items: center;
  display: flex;
  gap: 9px;
}

.switch-field input {
  height: 18px;
  margin: 0;
  width: 18px;
}

input[data-invalid="true"] {
  border-color: var(--red);
  color: var(--red);
}

.form-message {
  color: var(--red);
  font-size: 12px;
  min-height: 18px;
  margin: 12px 0 0;
}

.dialog-actions {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 14px;
}

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

  .rule-form-grid .field-wide {
    grid-column: auto;
  }
}

/* Regla de grilla bancaria: cada encabezado debe mostrarse completo sin scroll horizontal. */
#banco-grid.sortable-table th {
  padding: 0;
}

#banco-grid .th-content {
  gap: 1px;
  grid-template-columns: minmax(0, 1fr) 14px;
  padding: 0 2px 0 5px;
}

#banco-grid .th-sort,
#banco-grid .th-filter {
  padding: 0;
}

.column-filter-popover input {
  border-color: #c9d6e8;
  font-size: 12px;
  height: 30px;
  min-width: 170px;
  padding: 0 8px;
}
td {
  background: #fff;
}

tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.cell-navigation-grid tbody td:not(.row-actions-cell) {
  cursor: cell;
}

.cell-navigation-grid tbody tr.grid-active-row > td {
  background: #f1f5fa;
}

.cell-navigation-grid tbody td.grid-active-cell,
.cell-navigation-grid tbody tr.grid-active-row > td.grid-active-cell {
  background: #fff6df;
  box-shadow: inset 0 0 0 2px var(--gold-600);
  color: var(--ink);
  outline: none;
}

.cell-navigation-grid tbody td.grid-active-cell.negative {
  color: var(--red);
}

.cell-navigation-grid tbody td.grid-cell-copied {
  background: #e5f5f1;
  box-shadow: inset 0 0 0 2px var(--green);
}

.grid-cell-tooltip {
  background: var(--blue-900);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .22);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  max-height: min(220px, calc(100vh - 24px));
  max-width: min(480px, calc(100vw - 16px));
  overflow: auto;
  padding: 8px 10px;
  position: fixed;
  user-select: text;
  white-space: normal;
  word-break: break-word;
  z-index: 1200;
}

.grid-cell-tooltip[hidden] {
  display: none;
}

.money {
  text-align: right;
  white-space: nowrap;
}

.mono {
  color: #475467;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.negative {
  color: var(--red);
  font-weight: 700;
}

.status,
.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 7px;
  white-space: nowrap;
}

.status.open,
.tag.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.closed,
.tag.ok {
  background: var(--green-soft);
  color: var(--green);
}

.status.review,
.tag {
  background: #eef4fb;
  color: var(--blue-900);
}

.alert-list,
.rules {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.alert-list li {
  align-items: flex-start;
  color: #344054;
  display: flex;
  gap: 10px;
  line-height: 1.35;
}

.alert-list svg {
  color: var(--gold-600);
  margin-top: 1px;
}

.config-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

.status.error {
  background: var(--red-soft);
  color: var(--red);
}

.process-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) clamp(660px, 40vw, 760px);
  grid-template-areas:
    "actions actions"
    "contable data"
    "extracto data";
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
}

.process-actions-panel {
  grid-area: actions;
  padding-bottom: 12px;
}

#conciliacion .process-actions-panel .panel-header {
  border-bottom: 0;
  margin: 0;
  padding-bottom: 0;
}

#conciliacion .process-actions-panel .panel-note {
  display: none;
}

.process-actions-header {
  position: relative;
}

.process-action-menu-shell {
  flex: 0 0 auto;
  position: relative;
}

.process-action-menu-trigger {
  min-width: 118px;
}

.process-action-menu-caret {
  font-size: 11px;
  margin-left: 1px;
  transition: transform .16s ease;
}

.process-action-menu-trigger[aria-expanded="true"] .process-action-menu-caret {
  transform: rotate(180deg);
}

.process-action-menu-popover {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(6, 45, 101, .18);
  min-width: 330px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
}

.process-action-menu-popover[hidden] {
  display: none;
}

.process-action-menu-group {
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  margin: 3px 8px 4px;
  text-transform: uppercase;
}

.process-action-menu-item {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  color: var(--blue-900);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
  width: 100%;
}

.process-action-menu-item:hover:not(:disabled),
.process-action-menu-item:focus-visible {
  background: #eef4fb;
}

.process-action-menu-item-main {
  color: var(--blue-900);
}

.process-action-menu-item svg {
  color: var(--gold-600);
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

.process-action-menu-item:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  opacity: .72;
}

.process-action-menu-item:disabled svg {
  color: #b8c1cc;
}

.process-action-menu-separator {
  border-top: 1px solid var(--line);
  margin: 6px 4px;
}

.process-action-menu-item .execute-button-spinner {
  border-color: rgba(6, 45, 101, .25);
  border-top-color: var(--blue-900);
}

.form-panel {
  grid-area: data;
}

.panel-heading-with-icon {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
}

.panel-heading-with-icon > svg {
  color: var(--gold-600);
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.panel-heading-with-icon h2 {
  margin: 0;
}

.process-layout .uploads:nth-of-type(3) {
  grid-area: contable;
}

.process-layout .uploads:nth-of-type(4) {
  grid-area: extracto;
}

.process-data-sections {
  display: grid;
  gap: 7px;
}

.process-data-group {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-top: 7px;
}

.process-data-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.process-data-group h3 {
  color: var(--blue-900);
  font-size: 13px;
  margin: 0;
}

.master-derived-field select:disabled,
.master-derived-field input:read-only {
  background-color: #f3f6fa;
  color: #344054;
  cursor: not-allowed;
  opacity: 1;
}

#conciliacion .panel {
  padding: 10px 16px;
}

#conciliacion .panel-header {
  margin-bottom: 7px;
  padding-bottom: 7px;
}

.form-grid.process-grid {
  align-items: end;
  column-gap: 10px;
  row-gap: 8px;
}

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

.empresa-grid .company-field {
  grid-column: 1 / -1;
}

.source-file-summary {
  background: #ffffff;
  border: 1px solid #c7d3e2;
  border-left: 3px solid var(--gold-600);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 9px 11px;
  width: 100%;
}

.source-file-summary.is-empty {
  background: #f8fafc;
  border-color: #d5dde8;
  border-left-color: #aeb8c8;
}

.source-file-summary > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .025em;
  overflow-wrap: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-file-summary > span,
.source-file-summary > strong,
.source-file-summary > small {
  grid-column: 1;
}

.source-file-summary > strong {
  color: var(--blue-900);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-file-summary > small {
  color: #667085;
  font-size: 10.5px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-refresh-button {
  align-items: center;
  align-self: center;
  background: #fff;
  border: 1px solid #b7c5d7;
  border-radius: 6px;
  color: var(--blue-900);
  cursor: pointer;
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 700;
  gap: 7px;
  grid-column: 2;
  grid-row: 1 / 4;
  justify-content: center;
  min-height: 33px;
  padding: 6px 10px;
  white-space: nowrap;
}

.source-refresh-button:hover,
.source-refresh-button:focus-visible {
  background: #f6f9fd;
  border-color: var(--blue-800);
  outline: 2px solid rgba(10, 58, 122, .16);
  outline-offset: 1px;
}

.source-refresh-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.source-refresh-button.is-processing:disabled {
  cursor: wait;
  opacity: 1;
}

.source-refresh-button .source-refresh-icon {
  color: var(--blue-900);
  height: 15px;
  width: 15px;
}

.source-refresh-spinner {
  animation: execute-button-spin .72s linear infinite;
  border: 2px solid rgba(6, 45, 101, .22);
  border-radius: 50%;
  border-top-color: var(--blue-900);
  display: none;
  height: 14px;
  width: 14px;
}

.source-refresh-button.is-processing .source-refresh-icon {
  display: none;
}

.source-refresh-button.is-processing .source-refresh-spinner {
  display: inline-block;
}

.upload-box .source-refresh-button > span:last-child {
  color: var(--blue-900);
  overflow-wrap: normal;
}

.form-grid.period-grid {
  grid-template-columns: 104px 64px 76px 78px;
}

.form-grid.bank-grid {
  grid-template-columns: minmax(0, 1fr) 118px;
}

.account-name-field,
.output-name-field {
  grid-column: 1 / -1;
}

.short-field input {
  text-align: center;
}

.year-field input,
.period-field input,
.account-code-field input {
  text-align: center;
}

.master-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.table-toolbar.compact {
  grid-template-columns: minmax(260px, 1fr) 220px auto;
}

.panel-note {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.config-layout {
  display: grid;
  gap: 14px;
}

.config-section {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.config-section h3 {
  color: var(--blue-900);
  font-size: 14px;
  margin: 0 0 12px;
}

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

.two-column-config {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.compact-brand {
  gap: 12px;
}

.compact-brand img {
  max-width: 260px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  font-weight: 700;
}

input,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  height: 32px;
  padding: 0 10px;
  width: 100%;
}

.sortable-table th[data-sort] .th-sort span {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--gold-600);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

input[readonly],
.readonly-field {
  background: #f3f6fa;
  color: #344054;
  cursor: not-allowed;
}

.field-warning {
  background: var(--amber-soft);
  border-color: #f2b95b;
  color: var(--amber);
  font-weight: 700;
}

.uploads {
  min-height: 0;
}

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

.upload-box {
  align-content: start;
  align-items: center;
  background: #fbfcfe;
  border: 1px dashed #aeb8c8;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
  padding: 12px;
}

.upload-box input {
  font-size: 12px;
  height: 34px;
}

.upload-box svg {
  color: var(--gold-600);
  fill: currentColor;
  height: 22px;
  width: 22px;
}

.upload-box .upload-command {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--gold-600);
  cursor: pointer;
  display: inline-flex;
  grid-column: 1;
  height: 28px;
  justify-content: center;
  min-width: 0;
  padding: 2px;
  width: 28px;
}

.upload-box .upload-command:hover,
.upload-box .upload-command:focus-visible {
  background: #fff4dc;
  outline: 2px solid rgba(217, 155, 43, 0.35);
  outline-offset: 1px;
}

.upload-box .upload-command:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.upload-box .upload-command svg {
  color: inherit;
}

.upload-box strong {
  color: var(--blue-900);
}

.upload-box label {
  grid-column: 1 / -1;
}

.upload-box span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.client-card {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px;
}

.client-card strong {
  color: var(--blue-900);
  font-size: 16px;
}

.client-card span {
  color: var(--muted);
  line-height: 1.35;
}

.button-stack {
  display: grid;
  gap: 8px;
}

.button-stack .primary,
.button-stack .secondary {
  width: 100%;
}

.actions-line {
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
}

.summary-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.summary-strip span {
  background: var(--band);
  border-radius: 6px;
  color: #344054;
  padding: 12px;
}

.summary-strip strong {
  color: var(--blue-900);
  display: block;
  font-size: 22px;
}

.workpaper-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.export-options {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 220px minmax(320px, 1fr) minmax(320px, .9fr);
  margin-bottom: 14px;
  padding: 12px;
}

#papel-carpeta {
  background: #f4f7fb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workpaper-annexes {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-600);
  border-radius: 6px;
  margin-bottom: 14px;
  padding: 11px 12px;
}

.workpaper-annexes-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.workpaper-annexes h3 {
  color: var(--blue-900);
  font-size: 15px;
  margin: 0;
}

.workpaper-annexes-header p,
.workpaper-annex-empty {
  color: #667085;
  font-size: 12px;
  margin: 3px 0 0;
}

.workpaper-annex-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.workpaper-annex-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr) auto 34px;
  min-height: 43px;
  padding: 5px 6px 5px 9px;
}

.workpaper-annex-item > svg {
  color: var(--gold-600);
  height: 18px;
  width: 18px;
}

.workpaper-annex-item strong,
.workpaper-annex-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workpaper-annex-item strong {
  color: var(--blue-900);
  font-size: 12px;
}

.workpaper-annex-item small {
  color: #667085;
  font-size: 10px;
  margin-top: 2px;
}

.workpaper-annex-type {
  background: var(--band);
  border-radius: 999px;
  color: var(--blue-900);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
}

.workpaper-annex-remove {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--red-600, #b42318);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.workpaper-annex-remove svg {
  height: 17px;
  width: 17px;
}

.workpaper-annex-empty[hidden] {
  display: none;
}

.wp-title {
  background: var(--blue-900);
  border-bottom: 3px solid var(--gold-600);
  color: #fff;
  font-weight: 800;
  padding: 14px;
}

.wp-section {
  background: #f1f3f6;
  border-left: 1px solid #98a2b3;
  color: var(--blue-900);
  font-weight: 800;
  margin-top: 18px;
  padding: 9px 12px;
}

.wp-grid {
  display: grid;
  grid-template-columns: 52px 1.6fr repeat(4, 1fr);
  margin-top: 12px;
}

.wp-grid > * {
  border: 1px solid var(--line);
  padding: 8px;
}

.mail-options {
  display: grid;
  grid-template-columns: 1.15fr 1.5fr 1fr;
  gap: 10px;
}

.mail-subject,
.mail-message {
  grid-column: 1 / -1;
}

.mail-options textarea {
  width: 100%;
  resize: vertical;
  min-height: 78px;
}

/* Patrón de ancho por caracteres para el maestro de Clientes. */
#clientes-grid { width: 220ch; max-width: none; table-layout: fixed; }
#clientes-grid .client-col-name { width: 60ch; }
#clientes-grid .client-col-nit { width: 15ch; }
#clientes-grid .client-col-financial { width: 25ch; }
#clientes-grid .client-col-tax { width: 25ch; }
#clientes-grid .client-col-contact { width: 35ch; }
#clientes-grid .client-col-email { width: 50ch; }
#clientes-grid .client-col-actions { width: 10ch; }
#clientes-grid td:not(:last-child) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#clientes-grid th:last-child,
#clientes-grid td:last-child {
  background: #fff;
  box-shadow: -5px 0 8px -7px rgba(6, 45, 101, 0.75);
  position: sticky;
  right: 0;
}

#clientes-grid th:last-child {
  background: var(--blue-100);
  z-index: 4;
}

#clientes-grid td:last-child {
  z-index: 2;
}

#clientes-grid tbody tr:nth-child(even) td:last-child {
  background: #fafbfc;
}

#clientes-grid tbody tr:hover td:last-child,
#clientes-grid tbody tr.grid-active-row td:last-child {
  background: #fff9ec;
}

@media (max-width: 1280px) {
  .process-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "actions"
      "data"
      "contable"
      "extracto";
    grid-template-rows: auto;
  }
}

@media (max-width: 1050px) {
  .mail-options { grid-template-columns: 1fr; }
  .mail-subject, .mail-message { grid-column: auto; }
}

.wp-grid-contents {
  display: contents;
}

.wp-grid-contents > * {
  border: 1px solid var(--line);
  padding: 8px;
}

.wp-grid > :nth-child(-n+6) {
  background: var(--blue-900);
  color: #fff;
  font-weight: 800;
}

.wp-grid > :is(:nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6)),
.wp-grid-contents > :is(:nth-child(6n+3), :nth-child(6n+4), :nth-child(6n+5), :nth-child(6n+6)) {
  text-align: right;
}

.brand-kit {
  display: grid;
  gap: 16px;
}

.brand-kit img {
  max-width: 360px;
  width: 100%;
}

.swatches {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.swatches span {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  padding: 10px;
}

.swatches span::before {
  background: var(--sw);
  border-radius: 4px;
  content: "";
  height: 22px;
  width: 22px;
}

.rules li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 84px 1fr;
  }

  .brand {
    padding: 16px 12px;
  }

  .brand img {
    content: url("assets/logo-simbolo.png");
    width: 42px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item span,
  .nav-submenu,
  .sidebar-footer div {
    display: none;
  }

  .sidebar-footer {
    justify-content: center;
  }

  .split,
  .split.equal,
  .process-layout,
  .config-grid,
  .master-layout,
  .wide-form,
  .two-column-config,
  .table-toolbar {
    grid-template-columns: 1fr;
  }

  .process-layout {
    grid-template-areas:
      "actions"
      "data"
      "contable"
      "extracto";
    grid-template-rows: auto;
  }

  .process-context {
    grid-template-columns: 1fr 1fr;
  }

  .context-item:nth-child(2) {
    border-right: 0;
  }

  .context-item:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255, 255, 255, .22);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    overflow: visible;
    position: static;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 42px;
  }

  .workspace {
    padding: 16px;
  }

  .topbar,
  .quick-access,
  .topbar-actions,
  .workpaper-annexes-header,
  .toolbar,
  .upload-row,
  .summary-strip,
  .export-options,
  .form-grid,
  .wide-form,
  .two-column-config,
  .table-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .process-context {
    grid-template-columns: 200px 140px 360px 110px;
    margin: -16px -16px 14px;
    overflow-x: auto;
    padding: 0 16px;
  }

  .context-item,
  .context-item:nth-child(2) {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, .22);
  }

  .context-item:last-child {
    border-right: 0;
  }

  .search input {
    min-width: 0;
  }
}

@media (max-width: 1000px) {
  .log-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-maintenance-grid {
    overflow-x: auto;
  }

  #responsables-grid,
  #log-procesos-grid {
    min-width: 980px;
  }
}

.dashboard-processes-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.dashboard-processes-panel {
  min-height: clamp(420px, calc(100vh - 285px), 720px);
}

.dashboard-processes-grid {
  overflow: visible;
}

#dashboard-process-grid th:last-child,
#dashboard-process-grid td:last-child {
  width: 88px;
  text-align: center;
}

#dashboard-process-grid {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#dashboard-process-grid th:nth-child(1),
#dashboard-process-grid td:nth-child(1) { width: 30%; }
#dashboard-process-grid th:nth-child(2),
#dashboard-process-grid td:nth-child(2) { width: 12%; }
#dashboard-process-grid th:nth-child(3),
#dashboard-process-grid td:nth-child(3) { width: 24%; }
#dashboard-process-grid th:nth-child(4),
#dashboard-process-grid td:nth-child(4) { width: 14%; }
#dashboard-process-grid th:nth-child(5),
#dashboard-process-grid td:nth-child(5) { width: 150px; }

.management-status-cell {
  padding-bottom: 2px;
  padding-top: 2px;
}

.management-status-select {
  background: #fff;
  border: 1px solid #b8c9df;
  border-radius: 999px;
  color: var(--blue-900);
  font-size: 11px;
  font-weight: 800;
  height: 24px;
  padding: 0 24px 0 8px;
}

.management-status-select:focus-visible {
  border-color: var(--gold-600);
  outline: 2px solid rgba(217, 155, 43, .28);
  outline-offset: 1px;
}

.numeric { text-align: right; }

.help-page {
  padding: 0;
  overflow: visible;
}

.help-sticky-header {
  position: sticky;
  top: 0;
  z-index: 18;
}

.help-hero {
  align-items: end;
  background: var(--blue-900);
  border-bottom: 4px solid var(--gold-600);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  padding: 24px 28px;
}

.help-page .help-hero {
  border-radius: 6px 6px 0 0;
}

.help-eyebrow {
  color: #f2bf58;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 5px;
}

.help-hero h2 {
  color: #fff;
  font-size: 25px;
  margin: 0;
}

.help-hero p {
  color: #dce7f6;
  line-height: 1.5;
  margin: 7px 0 0;
  max-width: 760px;
}

.help-hero-rule {
  border-left: 2px solid var(--gold-600);
  display: grid;
  gap: 5px;
  padding: 4px 0 4px 14px;
}

.help-hero-rule strong {
  color: #fff;
  font-size: 12px;
}

.help-hero-rule span {
  color: #dce7f6;
  font-size: 11px;
  line-height: 1.5;
}

.help-toc {
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 28px;
}

.help-toc a {
  border-radius: 4px;
  color: var(--blue-900);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 9px;
  text-decoration: none;
}

.help-toc a:hover,
.help-toc a:focus-visible {
  background: #e8f0fa;
  outline: none;
}

.help-section {
  border-bottom: 1px solid var(--line);
  padding: 22px 28px;
  scroll-margin-top: 178px;
}

.help-section-heading {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  margin-bottom: 15px;
}

.help-section-heading > span {
  color: var(--gold-600);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.help-section-heading h3 {
  color: var(--blue-900);
  font-size: 16px;
  margin: 0;
}

.help-section-heading p {
  color: var(--muted);
  margin: 3px 0 0;
}

.help-info-grid,
.help-review-grid,
.help-close-flow {
  display: grid;
  gap: 10px;
}

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

.help-info-grid article,
.help-review-grid article,
.help-close-flow article {
  background: #f9fbfd;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.help-info-grid strong,
.help-review-grid strong,
.help-close-flow strong {
  color: var(--blue-900);
  display: block;
  margin-bottom: 5px;
}

.help-info-grid p,
.help-review-grid p,
.help-close-flow p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.help-timeline {
  counter-reset: none;
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-timeline li {
  display: grid;
  gap: 12px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 0 0 15px;
  position: relative;
}

.help-timeline li:not(:last-child)::before {
  background: #c9d6e6;
  content: "";
  height: calc(100% - 25px);
  left: 14px;
  position: absolute;
  top: 27px;
  width: 1px;
}

.help-timeline li > span,
.help-close-flow article > span {
  align-items: center;
  background: var(--blue-900);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.help-timeline strong {
  color: var(--blue-900);
}

.help-timeline p {
  color: var(--muted);
  line-height: 1.48;
  margin: 3px 0 0;
}

.help-review-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-review-grid .status {
  display: inline-block;
  margin-bottom: 8px;
}

.help-notice {
  background: var(--gold-100);
  border-left: 3px solid var(--gold-600);
  margin-top: 12px;
  padding: 10px 12px;
}

.help-notice p {
  line-height: 1.45;
  margin: 4px 0 0;
}

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

.help-close-flow article > span {
  background: var(--gold-600);
  margin-bottom: 8px;
}

.help-accordion {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.help-accordion details + details {
  border-top: 1px solid var(--line);
}

.help-accordion summary {
  color: var(--blue-900);
  cursor: pointer;
  font-weight: 700;
  padding: 11px 13px;
}

.help-accordion details[open] summary {
  background: #f2f6fb;
}

.help-accordion details p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  padding: 0 13px 13px;
}

.help-footer {
  align-items: center;
  background: #f7f9fc;
  color: var(--muted);
  display: grid;
  gap: 3px 20px;
  grid-template-columns: auto 1fr;
  padding: 16px 28px;
}

.help-footer strong {
  color: var(--blue-900);
}

.help-footer p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

@media (max-width: 900px) {
  .help-sticky-header {
    position: static;
  }

  .help-hero,
  .help-info-grid,
  .help-review-grid,
  .help-close-flow {
    grid-template-columns: 1fr;
  }

  .help-hero,
  .help-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .help-toc {
    padding-left: 18px;
    padding-right: 18px;
  }

  .help-section {
    scroll-margin-top: 12px;
  }
}

/* ==========================================================================
   Cardona Apps · identidad compartida 2026
   Conciliador conserva su lógica y adopta el shell, navegación y grillas
   validados por los aplicativos más recientes de la plataforma.
   ========================================================================== */

:root {
  --blue-950: #041f47;
  --blue-100: #eaf1f9;
  --blue-050: #f4f7fb;
  --canvas: #f3f5f8;
  --navigation-gradient: linear-gradient(180deg, #0a3a7a 0%, #062d65 34%, #041f47 100%);
}

body {
  background: var(--canvas);
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  background: var(--navigation-gradient);
  border-right: 0;
  color: #fff;
  overflow: hidden;
  z-index: 40;
}

.brand {
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex: 0 0 98px;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-height: 98px;
  padding: 15px 18px 13px;
}

.brand-logo {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  width: 190px;
}

.brand-product {
  color: #b9c7d9;
  display: block;
  font-size: 10px;
  line-height: 1.2;
  padding-left: 1px;
}

.nav {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 17px 9px 12px;
}

.nav-section-label {
  color: #8498b2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  margin: 13px 9px 5px;
  text-transform: uppercase;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.nav-item,
.nav-subitem {
  border-left: 3px solid transparent;
  border-radius: 0;
  color: #dfe8f2;
  margin: 1px 0;
  min-height: 36px;
}

.nav-item {
  height: 36px;
  padding: 7px 10px;
  width: 100%;
}

.nav-item:hover,
.nav-item.active,
.nav-subitem:hover,
.nav-subitem.active {
  color: #fff;
}

.nav-item:hover,
.nav-subitem:hover {
  background: rgba(255, 255, 255, .07);
}

.nav-item.active,
.nav-subitem.active {
  background: rgba(217, 155, 43, .14);
  border-left-color: var(--gold-600);
  font-weight: 600;
}

.nav-group {
  display: block;
}

.nav-parent::after {
  color: #9eafc4;
  content: "›";
}

.nav-group.open .nav-parent::after {
  content: "⌄";
}

.nav-submenu {
  border-left-color: rgba(255, 255, 255, .16);
  margin-left: 21px;
  padding-left: 5px;
}

.nav-subitem {
  font-size: 12px;
  height: 32px;
  padding: 0 9px;
}

.sidebar-footer {
  background: rgba(0, 0, 0, .1);
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #9eafc4;
  flex: 0 0 56px;
  min-height: 56px;
  padding: 10px 16px;
}

.sidebar-footer strong {
  color: #fff;
  font-size: 12px;
}

.sidebar-footer span {
  color: #9eafc4;
  font-size: 10px;
}

.connection-dot {
  background: #9eafc4;
  border-radius: 50%;
  flex: 0 0 9px;
  height: 9px;
  width: 9px;
}

.connection-dot.connected {
  background: #38c7aa;
}

.workspace {
  background: var(--canvas);
  padding: 0 18px 24px;
}

.process-context {
  background: var(--navigation-gradient);
  margin: 0 -18px;
  min-height: 32px;
  padding: 0 18px;
}

.context-item {
  min-height: 32px;
  padding: 0 13px;
}

.context-item > strong,
.context-bank > strong {
  font-size: 11px;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  margin: 0 -18px 12px;
  min-height: 46px;
  padding: 5px 18px;
}

.topbar .eyebrow {
  font-size: 9px;
  margin-bottom: 1px;
}

.topbar h1 {
  font-size: 19px;
}

.view-heading {
  min-width: 0;
}

.view-heading-title {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.view-heading-title h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-heading-icon {
  align-items: center;
  color: var(--gold-600);
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.view-heading-icon svg {
  fill: currentColor;
  height: 19px;
  width: 19px;
}

.quick-access {
  flex-wrap: nowrap;
  gap: 5px;
}

.quick-access-button {
  border-color: #ccd6e2;
  border-radius: 4px;
  height: 30px;
  min-height: 30px;
  width: 32px;
}

.quick-access-button:hover,
.quick-access-button:focus-visible,
.quick-access-button.is-active {
  background: var(--gold-100);
  border-color: var(--gold-600);
}

.user-identity {
  font-size: 11px;
}

.panel {
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(21, 35, 55, .05);
}

/* Grillas compartidas: cabecera clara, densidad contable y selección visible. */
.data-grid {
  background: #fff;
  border-color: #cad4e0;
  border-radius: 3px;
}

th {
  background: #eaf0f7;
  box-shadow: inset -1px 0 #cad4e0, inset 0 -1px #aebdce;
  color: var(--blue-950);
  font-size: 10px;
  height: 32px;
}

.th-content {
  min-height: 31px;
}

#banco-grid .th-content,
#contabilidad-grid .th-content,
#puc-grid .th-content,
#terceros-grid .th-content {
  min-height: 27px;
}

.sortable-table th[data-sort] .th-sort span {
  color: var(--blue-950);
  text-decoration: none;
}

.th-filter {
  color: #53667c;
  opacity: 1;
}

.th-filter:hover,
.th-content:focus-within .th-filter {
  background: rgba(6, 45, 101, .08);
}

.th-filter.is-active {
  background: transparent;
  color: #946000;
}

.sortable-table th:has(.th-filter.is-active) {
  box-shadow:
    inset 0 3px var(--gold-600),
    inset -1px 0 #cad4e0,
    inset 0 -1px #aebdce;
}

th[aria-sort="ascending"] .th-sort span::after {
  content: " \2191";
  color: var(--blue-800);
}

th[aria-sort="descending"] .th-sort span::after {
  content: " \2193";
  color: var(--blue-800);
}

td {
  border-bottom-color: #e6eaf0;
  color: #29364a;
  height: 23px;
}

tbody tr:nth-child(even) td {
  background: #fafbfc;
}

tbody tr:hover td,
.cell-navigation-grid tbody tr.grid-active-row > td {
  background: #fff9ec;
}

.cell-navigation-grid tbody td.grid-active-cell,
.cell-navigation-grid tbody tr.grid-active-row > td.grid-active-cell {
  background: #fff9ec;
  box-shadow: inset 0 0 0 2px var(--gold-600);
}

.column-filter-popover {
  border-radius: 3px;
  box-shadow: 0 8px 20px rgba(15, 42, 77, .18);
  top: 31px;
}

.column-filter-title {
  color: #53667c;
  font-size: 10px;
}

.column-filter-search {
  border-radius: 3px !important;
  font-size: 11px !important;
}

.column-filter-value {
  font-size: 11px;
  min-height: 27px;
}

.grid-total,
.unmatched-summary,
.totals-bar {
  background: #dfe8f2;
  color: var(--blue-950);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }

  .brand {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .nav {
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Distribución definitiva del Maestro de Clientes. Debe permanecer al final. */
#maestro-clientes #clientes-grid {
  width: 100% !important;
  min-width: 158ch !important;
  max-width: none !important;
  table-layout: fixed;
}

#maestro-clientes #clientes-grid .client-col-id { width: 14ch; }
#maestro-clientes #clientes-grid .client-col-name { width: 40ch; }
#maestro-clientes #clientes-grid .client-col-type { width: 8ch; }
#maestro-clientes #clientes-grid .client-col-email { width: 32ch; }
#maestro-clientes #clientes-grid .client-col-status { width: 11ch; }
#maestro-clientes #clientes-grid .client-col-team { width: 17ch; }
#maestro-clientes #clientes-grid .client-col-services { width: 12ch; }
#maestro-clientes #clientes-grid .client-col-ica { width: 11ch; }
#maestro-clientes #clientes-grid .client-col-key { width: 13ch; }
#maestro-clientes #clientes-grid .client-col-actions { width: 10ch; }

#maestro-clientes #clientes-grid th,
#maestro-clientes #clientes-grid th .th-sort span {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

