html {
  font-size: 13px;
}

.previo-admin-table th,
.previo-admin-table td {
    vertical-align: middle;
}

.previo-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.previo-admin-actions form {
    margin: 0;
}

.previo-admin-detail-row td {
    background: #f8fbff;
}

.previo-admin-detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
}

.previo-admin-detail article,
.previo-admin-cancel {
    border: 1px solid #d5e1ef;
    border-radius: 8px;
    background: #fff;
    padding: 0.75rem;
}

.previo-admin-detail span,
.previo-admin-cancel label {
    display: block;
    color: #00756f;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.previo-admin-detail strong,
.previo-admin-detail p {
    margin: 0;
    color: #142033;
}

.previo-admin-wide,
.previo-admin-cancel {
    grid-column: 1 / -1;
}

.previo-admin-rich {
    color: #142033;
}

.previo-admin-cancel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.previo-admin-modal .modal-body {
    display: grid;
    gap: 1rem;
}

.previo-admin-request-box .form-control[readonly] {
    background: #eef5fb;
    border-color: #bfd2e6;
    color: #172033;
    font-weight: 800;
}

.previo-admin-merchandise-wrap {
    max-height: 260px;
}

.previo-admin-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.previo-admin-status-grid article {
    background: #f8fafc;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    padding: 0.75rem;
}

.previo-admin-status-grid span {
    color: #0f766e;
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.previo-admin-status-grid strong,
.previo-admin-status-grid p {
    color: #172033;
    margin: 0;
}

.revalidacion-admin-summary-row {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    overflow-x: auto;
}

.revalidacion-admin-summary-row .previo-admin-wide {
    grid-column: auto;
}

.revalidacion-admin-summary-row article {
    min-width: 180px;
}

.revalidacion-admin-summary-row .previo-admin-rich,
.revalidacion-admin-summary-row p,
.revalidacion-admin-summary-row strong {
    max-height: 76px;
    overflow: auto;
}

.vacios-admin-summary-row {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    overflow-x: auto;
}

.vacios-admin-summary-row .previo-admin-wide {
    grid-column: auto;
}

.vacios-admin-summary-row article {
    min-width: 180px;
}

.vacios-admin-summary-row .previo-admin-rich,
.vacios-admin-summary-row p,
.vacios-admin-summary-row strong {
    max-height: 76px;
    overflow: auto;
}

.previo-admin-modal-footer {
    align-items: stretch;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr;
}

.previo-admin-modal-footer form {
    margin: 0;
}

.previo-admin-main-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.previo-admin-main-actions form {
    margin: 0;
}

.previo-admin-cancel-shell {
    width: 100%;
}

.previo-admin-cancel-toggle {
    display: flex;
    justify-content: flex-end;
}

.previo-admin-cancel-shell .collapse,
.previo-admin-cancel-shell .collapsing {
    margin-top: 0.5rem;
}

.previo-admin-modal-cancel {
    align-items: end;
    background: #fff7f7;
    border: 1px solid #f1c6c6;
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(220px, 0.55fr) minmax(220px, 0.45fr) minmax(280px, 0.65fr) auto;
    padding: 0.75rem;
    width: 100%;
}

.previo-admin-modal-cancel label {
    color: #7f1d1d;
    display: grid;
    font-size: 0.78rem;
    font-weight: 900;
    gap: 0.25rem;
    margin: 0;
    text-transform: uppercase;
}

.previo-admin-modal-cancel .form-control,
.previo-admin-modal-cancel .form-select {
    min-height: 38px;
}

.previo-admin-cancel-comment {
    grid-column: 1 / -2;
}

.previo-admin-cancel-comment textarea {
    min-height: 88px;
}

.previo-cancel-file-drop {
    margin: 0;
    min-height: 92px;
}

.previo-admin-cancel-docs-wrap {
    max-height: 220px;
}

.previo-followup-section {
    display: grid;
    gap: 0.8rem;
}

.previo-followup-form {
    align-items: end;
    background: #f7fbff;
    border: 1px solid #cddbec;
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(170px, 0.35fr) minmax(220px, 0.45fr) minmax(180px, 0.35fr) minmax(170px, 0.3fr) minmax(280px, 0.65fr);
    padding: 0.75rem;
}

.previo-followup-form label {
    color: #00756f;
    display: grid;
    font-size: 0.78rem;
    font-weight: 900;
    gap: 0.25rem;
    margin: 0;
    text-transform: uppercase;
}

.previo-followup-comment {
    grid-column: 1 / -1;
}

.previo-amount-control {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: 1fr auto;
}

.previo-mini-calculator {
    align-items: center;
    background: #fff;
    border: 1px solid #cddbec;
    border-radius: 8px;
    display: grid;
    gap: 0.5rem;
    grid-column: 1 / -1;
    grid-template-columns: minmax(140px, 0.3fr) 1fr auto;
    padding: 0.55rem;
}

.previo-calculator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.previo-mini-calculator output {
    color: #00756f;
    font-size: 1rem;
    font-weight: 900;
    min-width: 90px;
    text-align: right;
}

.previo-followup-files {
    grid-row: span 2;
}

.previo-followup-form > button[type="submit"] {
    justify-self: start;
    min-width: 210px;
}

.previo-followup-status {
    align-self: center;
    color: #00756f;
    font-weight: 800;
}

.previo-followup-status.is-error {
    color: #b91c1c;
}

.vacios-followup-capture {
    display: grid;
    gap: 0.75rem;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.vacios-unique-data-form {
    background: #f7fbff;
    border: 1px solid #cddbec;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
}

.vacios-unique-data-form > .btn {
    justify-self: start;
    min-width: 210px;
}

.vacios-followup-column,
.vacios-demoras-fields {
    display: grid;
    gap: 0.55rem;
}

.vacios-followup-checks {
    align-content: start;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 38px;
}

.vacios-followup-checks label {
    align-items: center;
    background: #fff;
    border: 1px solid #cddbec;
    border-radius: 6px;
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    padding: 0.45rem;
}

.vacios-followup-summary {
    display: grid;
    gap: 0.25rem;
    min-width: 280px;
}

.vacios-followup-summary span {
    color: #172033;
    font-size: 0.78rem;
}

.vacios-followup-summary b {
    color: #0f766e;
}

.previo-followup-files .opening-file-drop,
.previo-followup-files .previo-file-drop {
    margin: 0;
    min-height: 92px;
}

.previo-followup-table-wrap {
    max-height: 320px;
}

.previo-followup-table td {
    vertical-align: top;
}

.previo-followup-doc-list {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.previo-followup-doc-list li {
    background: #f8fafc;
    border: 1px solid #d8e1ec;
    border-radius: 6px;
    display: grid;
    gap: 0.15rem;
    padding: 0.45rem;
}

.previo-followup-doc-list span,
.previo-followup-doc-list small {
    color: #475569;
}

.previo-admin-finalize-form {
    align-items: end;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(280px, 1fr) auto;
    width: min(720px, 100%);
}

@media (max-width: 900px) {
    .previo-admin-detail {
        grid-template-columns: 1fr;
    }

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

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

    .previo-admin-modal-cancel {
        grid-template-columns: 1fr;
    }

    .previo-admin-main-actions {
        justify-content: stretch;
    }

    .previo-admin-main-actions form,
    .previo-admin-main-actions .btn {
        width: 100%;
    }

    .previo-followup-form,
    .previo-admin-finalize-form {
        grid-template-columns: 1fr;
    }

    .vacios-followup-capture,
    .vacios-followup-checks {
        grid-template-columns: 1fr;
    }
}

.opening-page {
  display: grid;
  gap: 1rem;
}

.opening-reference-panel,
.opening-upload-form,
.opening-reference-search {
  display: grid;
  gap: .85rem;
}

.opening-reference-search {
  align-items: end;
  grid-template-columns: minmax(240px, 1fr) auto;
}

.opening-reference-state {
  border: 1px solid #b6d9d4;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem;
}

.opening-reference-state strong {
  color: #0f766e;
  font-weight: 900;
}

.opening-reference-state span {
  color: #334155;
  font-weight: 800;
}

.opening-reference-state.is-existing,
.opening-reference-state.is-missing {
  background: #fff7ed;
  border-color: #fed7aa;
}

.opening-reference-state.is-existing strong,
.opening-reference-state.is-missing strong {
  color: #c2410c;
}

.opening-upload-form {
  grid-template-columns: minmax(240px, .85fr) minmax(280px, 1fr);
}

.opening-file-drop {
  align-items: center;
  border: 2px dashed #9db3d5;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  justify-items: center;
  min-height: 108px;
  padding: .85rem;
  text-align: center;
}

.opening-file-drop input {
  display: none;
}

.opening-file-drop strong {
  color: #172033;
  font-weight: 900;
}

.opening-file-drop span,
.opening-file-drop small {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.opening-file-drop.is-dragging {
  background: #eef6f5;
  border-color: #0f766e;
}

.opening-file-rename-list,
.tower-file-rename-list {
  display: grid;
  gap: .35rem;
  margin-top: .45rem;
}

.tower-file-rename-row {
  align-items: center;
  display: grid;
  gap: .4rem;
  grid-template-columns: 92px minmax(180px, 1fr) minmax(220px, 1fr);
}

.tower-file-rename-row span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tower-file-name-editor {
  align-items: center;
  display: grid;
  gap: .35rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.tower-file-name-editor small {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  font-size: .72rem;
  font-weight: 900;
  padding: .32rem .45rem;
}

.opening-comment {
  grid-column: 1 / -1;
}

.opening-upload-form > button {
  justify-self: end;
}

.opening-documents-table {
  min-width: 1100px;
}

.opening-pending-table {
  min-width: 920px;
}

.opening-document-actions {
  display: inline-flex;
  gap: .35rem;
  white-space: nowrap;
}

.opening-document-actions a {
  align-items: center;
  background: #0f766e;
  border: 0;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  text-decoration: none;
  width: 28px;
}

.opening-document-actions a svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 16px;
}

.opening-modal-reference-data {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .85rem;
}

.opening-modal-reference-data span {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 900;
  padding: .38rem .55rem;
  text-transform: uppercase;
}

.opening-modal-reference-data strong {
  color: #172033;
}

.opening-modal-upload {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: .85rem;
}

.opening-comment-cell {
  min-width: 280px;
  white-space: normal;
}

@media (max-width: 720px) {
  .opening-reference-search,
  .opening-upload-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 14px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

input[type="checkbox"]:disabled {
  accent-color: #64748b;
  cursor: not-allowed;
  opacity: 1;
}

input[type="checkbox"]:disabled:checked {
  accent-color: #0f766e;
  filter: saturate(1.25) contrast(1.2);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f3f6fa;
  color: #172033;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.app-nav {
  background: #101827;
  border-bottom: 1px solid #223048;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  min-height: 52px;
}

.app-nav .nav-link {
  align-items: center;
  border-radius: 6px;
  color: #dce7f3;
  display: inline-flex;
  font-size: .92rem;
  font-weight: 600;
  min-height: 44px;
  padding: .45rem .75rem;
}

.app-nav .nav-link.active,
.app-nav .nav-link:hover {
  background: #1d2a3d;
  color: #fff;
}

.app-nav-dropdown-toggle {
  background: transparent;
  border: 0;
}

.app-nav-dropdown {
  background: #101827;
  border: 1px solid #223048;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .22);
  padding: .35rem;
}

.app-nav-dropdown .dropdown-item {
  border-radius: 6px;
  color: #dce7f3;
  font-size: .9rem;
  font-weight: 700;
  padding: .45rem .7rem;
}

.app-nav-dropdown .dropdown-item:hover,
.app-nav-dropdown .dropdown-item:focus {
  background: #1d2a3d;
  color: #fff;
}

.nav-panel-link {
  align-items: center;
  display: inline-flex;
  gap: .55rem;
}

.nav-panel-link img {
  background: #0b1220;
  border-radius: 4px;
  height: 36px;
  object-fit: contain;
  padding: .18rem;
  width: 168px;
}

.nav-user {
  color: #dce7f3;
  font-size: .88rem;
  font-weight: 700;
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 150px);
  padding: 1rem 0;
}

.login-panel {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 1.35rem;
  width: min(100%, 420px);
}

.login-logo {
  background: #0b1220;
  border-radius: 8px;
  display: block;
  height: auto;
  margin-bottom: 1rem;
  padding: .75rem;
  width: 100%;
}

.login-brand h1 {
  color: #111827;
  font-size: 1.6rem;
  font-weight: 800;
  margin: .25rem 0 .35rem;
}

.login-brand p {
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.login-form {
  display: grid;
  gap: .9rem;
}

.panel-hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .94), rgba(17, 24, 39, .96));
  border: 1px solid #19374a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  color: #eef5ff;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 280px;
  margin: 1rem 0;
  padding: 1.25rem;
}

.panel-hero .manual-kicker {
  color: #99f6e4;
}

.panel-hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 800;
  margin: 0 0 .45rem;
}

.panel-hero p {
  margin-bottom: 0;
  max-width: 760px;
}

.panel-status,
.option-grid {
  display: grid;
  gap: .6rem;
}

.panel-status {
  align-content: center;
}

.panel-status strong,
.panel-status span,
.option-card {
  border-radius: 6px;
  font-weight: 800;
  padding: .65rem .8rem;
}

.panel-status strong,
.panel-status span {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(153, 246, 228, .4);
  color: #ecfeff;
}

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

.option-card {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  display: grid;
  gap: .3rem;
}

.option-card strong {
  color: #111827;
}

.option-card span {
  color: #64748b;
  font-size: .85rem;
}

.option-card a {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

.option-card a:hover {
  color: #0b625c;
  text-decoration: underline;
}

.navbar-toggler {
  border-color: #52627a;
}

.page-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 1rem 0 .85rem;
}

.page-header h1 {
  color: #111827;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 700;
  margin: 0;
}

.page-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.audit-filter {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  margin-bottom: .85rem;
  padding: .85rem;
}

.form-label {
  color: #344256;
  font-size: .82rem;
  font-weight: 700;
}

.form-control,
.form-select,
.btn {
  border-radius: 6px;
  font-size: .9rem;
}

.btn-primary {
  background: #0f766e;
  border-color: #0f766e;
  font-weight: 700;
}

.btn-primary:hover {
  background: #0b625c;
  border-color: #0b625c;
}

.btn-success {
  background: #15803d;
  border-color: #15803d;
  font-weight: 700;
}

.btn-danger {
  background: #b42318;
  border-color: #b42318;
  font-weight: 700;
}

.results-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: .75rem 0;
}

.results-summary {
  color: #475569;
  font-size: .9rem;
}

.results-actions {
  align-items: center;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.results-actions .form-select {
  min-width: 240px;
}

.reference-phase-tools {
  align-items: end;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  display: grid;
  gap: .65rem;
  grid-template-columns: 150px minmax(190px, 1fr) 130px repeat(4, minmax(130px, 1fr)) auto;
  margin-bottom: .85rem;
  padding: .75rem;
}

.reference-phase-tools .form-label {
  margin-bottom: .2rem;
}

.reference-phase-tools .btn {
  white-space: nowrap;
}

.column-menu {
  max-height: 320px;
  min-width: 260px;
  overflow-y: auto;
  padding: .4rem;
}

.column-menu .form-check {
  margin: 0;
  padding: .35rem .5rem .35rem 1.8rem;
}

.column-menu .form-check:hover {
  background: #eef3f8;
  border-radius: 6px;
}

.column-menu .form-check-label {
  color: #263345;
  font-size: .86rem;
  white-space: nowrap;
}

.export-status {
  color: #475569;
  font-size: .8rem;
}

.audit-table-wrapper .audit-col-description-fraccion {
  max-width: 180px;
  min-width: 140px;
  width: 180px;
}

.audit-table-wrapper td.audit-col-description-fraccion {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-frame {
  border: 0;
  height: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
}

.processing-overlay {
  align-items: center;
  background: rgba(15, 23, 42, .45);
  bottom: 0;
  display: none;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 2000;
}

.processing-overlay.is-visible {
  display: flex;
}

.processing-panel {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
  color: #172033;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 220px;
  padding: 1.4rem 1.8rem;
}

.processing-panel span {
  color: #64748b;
  font-size: .85rem;
}

.processing-spinner {
  animation: processing-spin .8s linear infinite;
  border: 4px solid #d8e1ec;
  border-radius: 999px;
  border-top-color: #0f766e;
  height: 42px;
  width: 42px;
}

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

.processing-modal .modal-content {
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}

.processing-modal .modal-body {
  align-items: center;
  display: grid;
  gap: .65rem;
  justify-items: center;
  padding: 1.6rem 1.4rem;
  text-align: center;
}

.processing-modal h2 {
  color: #172033;
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0;
}

.processing-modal p {
  color: #64748b;
  font-size: .86rem;
  font-weight: 700;
  margin: 0;
}

.processing-animation {
  align-items: center;
  display: flex;
  gap: .35rem;
  height: 42px;
}

.processing-animation span {
  animation: processing-bounce .72s ease-in-out infinite alternate;
  background: #0f766e;
  border-radius: 999px;
  height: 11px;
  width: 11px;
}

.processing-animation span:nth-child(2) {
  animation-delay: .12s;
}

.processing-animation span:nth-child(3) {
  animation-delay: .24s;
}

.processing-check {
  align-items: center;
  background: #0f766e;
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 1.7rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  line-height: 1;
  width: 42px;
}

@keyframes processing-bounce {
  from {
    opacity: .55;
    transform: translateY(7px) scale(.9);
  }
  to {
    opacity: 1;
    transform: translateY(-7px) scale(1.08);
  }
}

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

.manual-hero > div,
.manual-section,
.manual-card {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  padding: 1rem;
}

.manual-kicker {
  color: #0f766e;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 .35rem;
  text-transform: uppercase;
}

.manual-hero h1 {
  color: #111827;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  margin: 0 0 .5rem;
}

.manual-hero p,
.manual-section-title p,
.manual-card p {
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.manual-hero-panel {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.manual-hero-panel strong {
  color: #111827;
  font-size: 1rem;
}

.manual-hero-panel span {
  background: #eef3f8;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #263345;
  font-weight: 700;
  padding: .55rem .65rem;
}

.tower-manual-hero {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.manual-steps {
  color: #475569;
  display: grid;
  gap: .35rem;
  margin: .65rem 0 0;
  padding-left: 1.1rem;
}

.manual-steps li {
  line-height: 1.35;
}

.manual-flow {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manual-flow article {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  display: grid;
  gap: .35rem;
  padding: 1rem;
}

.manual-flow article span {
  align-items: center;
  background: #0f766e;
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.manual-flow h3 {
  color: #172033;
  font-size: .98rem;
  font-weight: 900;
  margin: 0;
}

.manual-flow p {
  color: #64748b;
  margin: 0;
}

.manual-screenshot-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
  margin-top: 1rem;
}

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

.manual-screenshot {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  margin: 1rem 0 0;
  overflow: hidden;
}

.manual-screenshot img {
  display: block;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  object-position: top left;
  width: 100%;
}

.manual-screenshot-wide img {
  max-height: 520px;
}

.manual-screenshot figcaption {
  background: #f8fafc;
  border-top: 1px solid #d8e1ec;
  color: #475569;
  font-size: .84rem;
  font-weight: 800;
  margin: 0;
  padding: .7rem .85rem;
}

.manual-section {
  margin-bottom: 1rem;
}

.manual-section-title {
  margin-bottom: .9rem;
}

.manual-section-title h2,
.manual-card h3 {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 .45rem;
}

.manual-visual-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.manual-card-wide {
  grid-column: span 2;
}

.manual-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .85rem;
}

.manual-links a {
  background: #eef3f8;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #0f4f4a;
  font-weight: 700;
  padding: .45rem .65rem;
  text-decoration: none;
}

.manual-links a:hover {
  background: #d9f0ee;
  color: #0b625c;
}

.mock-filter {
  display: grid;
  gap: .4rem;
  grid-template-columns: 1fr 1fr;
  margin: .8rem 0;
}

.mock-filter label {
  color: #344256;
  font-size: .76rem;
  font-weight: 800;
}

.mock-filter .mock-input,
.mock-rfc .mock-input,
.mock-toolbar {
  background: #f8fafc;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #263345;
  min-height: 32px;
  padding: .45rem .55rem;
}

.mock-filter button,
.mock-export button {
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  padding: .48rem .7rem;
}

.mock-filter button {
  background: #0f766e;
  grid-column: 1 / -1;
}

.mock-rfc {
  display: grid;
  gap: .45rem;
  margin: .8rem 0;
}

.mock-list-item {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #263345;
  font-size: .85rem;
  padding: .45rem .55rem;
}

.mock-grid {
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  margin: .8rem 0;
  overflow: hidden;
}

.mock-grid-head,
.mock-grid-filter,
.mock-grid-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mock-grid.compact .mock-grid-head,
.mock-grid.compact .mock-grid-row {
  grid-template-columns: 1fr;
}

.mock-grid-head span,
.mock-grid-filter span,
.mock-grid-row span {
  border-right: 1px solid #cfd8e3;
  padding: .45rem .55rem;
}

.mock-grid-head span:last-child,
.mock-grid-filter span:last-child,
.mock-grid-row span:last-child {
  border-right: 0;
}

.mock-grid-head {
  background: #152238;
  color: #eef5ff;
  font-size: .78rem;
  font-weight: 800;
}

.mock-grid-head b {
  color: #7dd3fc;
  float: right;
  font-size: .7rem;
}

.mock-grid-filter {
  background: #eef3f8;
  color: #64748b;
  font-size: .78rem;
}

.mock-grid-filter .is-typing {
  background: #fff;
  color: #0f766e;
  font-weight: 800;
}

.mock-grid-row {
  background: #fff;
  color: #263345;
  font-size: .85rem;
}

.mock-grid-row:nth-child(even) {
  background: #f7fafc;
}

.mock-grid-row.muted-row {
  opacity: .45;
}

.mock-toolbar {
  align-items: center;
  display: flex;
  gap: .6rem;
  justify-content: space-between;
  margin: .8rem 0;
}

.mock-toolbar strong {
  background: #d9f0ee;
  border-radius: 6px;
  color: #0f4f4a;
  padding: .25rem .5rem;
}

.mock-group {
  background: #d9f0ee;
  color: #0f4f4a;
  font-weight: 800;
  padding: .45rem .55rem;
}

.mock-columns {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  display: grid;
  gap: .35rem;
  margin: .8rem 0;
  padding: .7rem;
}

.mock-columns label {
  color: #263345;
  font-weight: 700;
}

.mock-export {
  display: flex;
  gap: .5rem;
  margin: .8rem 0;
}

.mock-export .excel {
  background: #15803d;
}

.mock-export .pdf {
  background: #b42318;
}

.audit-table-wrapper {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  max-height: 76vh;
  width: 100%;
}

.audit-table-wrapper .table {
  font-size: .82rem;
  margin-bottom: 0;
}

.audit-table-wrapper thead th {
  background: #152238;
  border-bottom: 0;
  color: #eef5ff;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 2;
}

.audit-table-wrapper thead .filter-row th {
  background: #eef3f8;
  top: 2.05rem;
  z-index: 3;
}

.audit-table-wrapper td {
  border-color: #edf2f7;
  color: #263345;
  padding: .35rem .5rem;
  white-space: nowrap;
}

.sort-button,
.server-sort-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #eef5ff;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  gap: .35rem;
  min-height: 1.75rem;
  padding: 0;
  text-align: left;
  white-space: nowrap;
}

.sort-indicator {
  color: #7dd3fc;
  display: inline-block;
  font-size: .68rem;
  min-width: 2rem;
}

.group-row td {
  background: #d9f0ee;
  color: #0f4f4a;
  font-weight: 700;
  position: sticky;
  left: 0;
}

.reference-filter {
  position: sticky;
  top: 0;
  z-index: 10;
}

.krones-filter-row {
  align-items: end;
  display: grid;
  gap: .55rem;
  grid-template-columns: minmax(135px, .8fr) minmax(135px, .8fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(180px, 1fr) minmax(105px, .55fr) minmax(220px, .8fr);
}

.krones-filter .form-label {
  margin-bottom: .22rem;
}

.krones-filter-actions {
  display: flex;
  gap: .55rem;
}

@media (max-width: 1200px) {
  .krones-filter-row {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .krones-filter-actions {
    grid-column: 1 / -1;
  }
}

.reference-client-lock {
  align-items: center;
  background: #eef3f8;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #263345;
  display: flex;
  gap: .6rem;
  min-height: 36px;
  overflow: hidden;
  padding: .45rem .65rem;
}

.reference-client-picker {
  position: relative;
}

.reference-client-values {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  display: flex;
  gap: .3rem;
  min-height: 36px;
  overflow-x: auto;
  padding: .2rem .35rem;
  white-space: nowrap;
}

.reference-client-values:focus-within {
  border-color: #258cfb;
  box-shadow: 0 0 0 .2rem rgba(37, 140, 251, .25);
}

.reference-client-values input {
  border: 0;
  flex: 1 0 260px;
  min-width: 220px;
  outline: 0;
}

.reference-client-chip {
  align-items: center;
  background: #d9f0ee;
  border: 1px solid #9bd7d1;
  border-radius: 999px;
  color: #0f4f4a;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .78rem;
  font-weight: 800;
  gap: .35rem;
  max-width: 340px;
  padding: .18rem .28rem .18rem .55rem;
}

.reference-client-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.reference-client-chip button {
  align-items: center;
  background: #0f766e;
  border: 0;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 900;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.reference-client-suggestions {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 25;
}

.reference-client-suggestions button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  color: #263345;
  display: grid;
  gap: .1rem;
  padding: .45rem .6rem;
  text-align: left;
  width: 100%;
}

.reference-client-suggestions button:hover {
  background: #eef3f8;
}

.reference-client-suggestions strong {
  color: #0f766e;
  font-size: .8rem;
}

.reference-client-suggestions span {
  color: #475569;
  font-size: .78rem;
}

.reference-client-lock strong {
  color: #0f4f4a;
  font-size: .88rem;
  white-space: nowrap;
}

.reference-client-lock span {
  color: #64748b;
  font-size: .84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financing-report {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  margin-bottom: .85rem;
  overflow: hidden;
}

.financing-report-header {
  align-items: center;
  background: linear-gradient(135deg, #0f766e, #152238);
  color: #eef5ff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .9rem 1rem;
}

.financing-report-header .manual-kicker {
  color: #99f6e4;
}

.financing-report-header h2 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}

.financing-report-header span {
  color: #dce7f3;
  display: block;
  font-size: .9rem;
  font-weight: 700;
  margin-top: .15rem;
}

.financing-report-header strong,
.financing-refresh-button {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(153, 246, 228, .45);
  border-radius: 6px;
  color: #ecfeff;
  font-size: .92rem;
  font-weight: 900;
  padding: .5rem .7rem;
  text-decoration: none;
  white-space: nowrap;
}

.financing-refresh-button:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.financing-empty {
  color: #475569;
  font-size: .95rem;
  font-weight: 700;
  padding: .9rem 1rem;
}

.financing-panels {
  display: grid;
  gap: .85rem;
  padding: .85rem;
}

.financing-main-panel,
.financing-detail-panel {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  overflow: hidden;
}

.financing-panel-title {
  align-items: center;
  background: #eef3f8;
  border-bottom: 1px solid #d8e1ec;
  display: flex;
  gap: .7rem;
  justify-content: space-between;
  padding: .65rem .8rem;
}

.financing-panel-title strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
}

.financing-panel-title span {
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
}

.financing-report-table-wrap {
  max-height: 220px;
  overflow: auto;
}

.financing-report-table {
  font-size: .92rem;
  margin-bottom: 0;
  min-width: 760px;
}

.financing-report-table thead th {
  background: #eef3f8;
  border-bottom: 1px solid #17466a;
  color: #111827;
  font-weight: 900;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

.financing-report-table th,
.financing-report-table td {
  border-color: #d8e1ec;
  padding: .55rem .65rem;
  vertical-align: middle;
  white-space: nowrap;
}

.financing-report-table tbody tr:nth-child(odd) td {
  background: #f8fafc;
}

.financing-report-table tbody tr:nth-child(even) td {
  background: #edf2f7;
}

.financing-detail-list {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0;
  padding: .8rem;
}

.financing-detail-list div {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .2rem;
  min-height: 68px;
  padding: .6rem .7rem;
}

.financing-detail-list dt {
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.financing-detail-list dd {
  color: #172033;
  font-size: .98rem;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.financing-card-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: .85rem;
}

.financing-card-grid article {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  display: grid;
  gap: .3rem;
  min-height: 86px;
  padding: .75rem .85rem;
}

.financing-card-grid span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.financing-card-grid strong {
  color: #172033;
  font-size: 1.25rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.balance-aging-report {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  margin-bottom: .85rem;
  overflow: hidden;
}

.balance-aging-header {
  align-items: center;
  background: linear-gradient(135deg, #17466a, #152238);
  color: #eef5ff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .9rem 1rem;
}

.balance-aging-header .manual-kicker {
  color: #99f6e4;
}

.balance-aging-header h2 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0;
}

.balance-aging-header-actions {
  align-items: center;
  display: flex;
  gap: .5rem;
}

.balance-aging-detail-button {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(153, 246, 228, .45);
  border-radius: 6px;
  color: #ecfeff;
  font-size: .92rem;
  font-weight: 900;
  padding: .5rem .7rem;
  text-decoration: none;
  white-space: nowrap;
}

.balance-aging-detail-button:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.balance-aging-card-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  padding: .85rem;
}

.balance-aging-card-grid article {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  display: grid;
  gap: .3rem;
  grid-column: span 4;
  min-height: 82px;
  padding: .75rem .85rem;
}

.balance-aging-card-grid .balance-aging-row-break {
  grid-column-start: 1;
}

.balance-aging-card-grid .balance-aging-days-card {
  grid-column: span 5;
}

.balance-aging-card-grid span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.balance-aging-card-grid strong {
  color: #172033;
  font-size: 1.18rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.balance-aging-modal .modal-content {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
}

.balance-aging-modal-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.balance-aging-modal-toolbar strong {
  color: #172033;
  font-size: .95rem;
}

.balance-aging-export-actions {
  display: flex;
  gap: .5rem;
}

.balance-aging-status {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #475569;
  font-weight: 800;
  padding: .85rem;
}

.balance-aging-table-wrap {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  max-height: 62vh;
  overflow: auto;
}

.balance-aging-table {
  font-size: .88rem;
  margin-bottom: 0;
  width: max-content;
}

.balance-aging-table th {
  background: #152238;
  color: #eef5ff;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

.balance-aging-table th,
.balance-aging-table td {
  border-color: #d8e1ec;
  vertical-align: middle;
  white-space: nowrap;
}

.reference-table-shell {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  height: calc(100vh - 285px);
  min-height: 430px;
  overflow: auto;
}

.reference-grid-toolbar {
  align-items: end;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(190px, .75fr) minmax(320px, 1.4fr) minmax(260px, 1fr);
  margin: 0 0 .65rem;
  padding: .75rem;
  position: sticky;
  top: 0;
  z-index: 9;
}

.reference-grid-toolbar .form-label {
  margin-bottom: .22rem;
}

.compliance-summary {
  display: grid;
  gap: .8rem;
  margin-bottom: 1rem;
}

.compliance-summary h2 {
  color: #0f766e;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: .25rem 0 0;
}

.compliance-collapse {
  display: grid;
  gap: .55rem;
}

.compliance-collapse summary {
  align-items: center;
  background: #eef3f8;
  border: 1px solid #17466a;
  border-radius: 6px;
  color: #0f766e;
  cursor: pointer;
  display: flex;
  font-size: 1.2rem;
  font-weight: 800;
  justify-content: space-between;
  list-style: none;
  padding: .65rem .8rem;
}

.compliance-collapse summary::-webkit-details-marker {
  display: none;
}

.compliance-collapse summary::before {
  color: #17466a;
  content: "+";
  font-size: 1.25rem;
  font-weight: 900;
  margin-right: .55rem;
}

.compliance-collapse[open] summary::before {
  content: "-";
}

.compliance-collapse summary span {
  flex: 1;
}

.compliance-collapse summary strong {
  color: #475569;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compliance-table-shell {
  background: #fff;
  border: 1px solid #17466a;
  border-radius: 6px;
  overflow-x: auto;
}

.compliance-table {
  font-size: .96rem;
  margin-bottom: 0;
  min-width: 980px;
}

.compliance-table thead th {
  background: #eef3f8;
  border-bottom: 2px solid #111827;
  color: #111827;
  font-weight: 800;
  white-space: nowrap;
}

.compliance-table th,
.compliance-table td {
  border-color: #17466a;
  padding: .58rem .7rem;
  vertical-align: middle;
}

.compliance-table tbody tr:nth-child(odd) td {
  background: #f8fafc;
}

.compliance-table tbody tr:nth-child(even) td {
  background: #edf2f7;
}

.compliance-number-link {
  background: transparent;
  border: 0;
  color: #0f766e;
  display: inline-block;
  font-weight: 900;
  min-width: 2.2rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compliance-number-link:hover {
  color: #0b625c;
}

.noncompliance-modal .modal-content {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
}

.noncompliance-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.noncompliance-toolbar strong {
  color: #172033;
  font-size: .95rem;
}

.noncompliance-table-wrap {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  max-height: 58vh;
  overflow: auto;
}

.noncompliance-table {
  font-size: .9rem;
  margin-bottom: 0;
  min-width: 980px;
}

.noncompliance-table th {
  background: #152238;
  color: #eef5ff;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

.noncompliance-table th,
.noncompliance-table td {
  border-color: #d8e1ec;
  vertical-align: middle;
  white-space: nowrap;
}

.noncompliance-table a {
  color: #0f766e;
  font-weight: 900;
}

.noncompliance-empty {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #475569;
  font-weight: 800;
  padding: .85rem;
}

.reference-table {
  font-size: .82rem;
  margin-bottom: 0;
  min-width: 2140px;
}

.reference-table.is-phases-only {
  min-width: 2160px;
}

.reference-table.is-phases-only th:first-child,
.reference-table.is-phases-only td.reference-cell {
  display: none;
}

.reference-table.is-phases-only .reference-phases-cell {
  min-width: 2160px;
  width: 100%;
}

.reference-table.is-phases-only .reference-phase-grid {
  gap: .65rem;
  grid-template-columns: repeat(6, 340px);
}

.reference-table.is-phase-columns {
  min-width: 3690px;
}

.reference-table.is-phase-columns .reference-phases-cell {
  min-width: 3510px;
}

.reference-table.is-phase-columns .reference-phase-grid {
  gap: .45rem;
  grid-template-columns: repeat(11, 315px);
}

.reference-table.is-phase-columns .reference-phase-stack {
  display: contents;
}

.reference-table.is-phase-columns .reference-phase {
  align-content: start;
  display: grid;
  gap: .16rem;
}

.reference-table.is-phase-columns .reference-phase-empty {
  display: none;
}

.reference-table.is-phase-columns .reference-phase-group-classification .reference-phase:nth-child(1) { grid-column: 1; }
.reference-table.is-phase-columns .reference-phase-group-classification .reference-phase:nth-child(2) { grid-column: 2; }
.reference-table.is-phase-columns .reference-phase-group-quote .reference-phase:nth-child(1) { grid-column: 3; }
.reference-table.is-phase-columns .reference-phase-group-quote .reference-phase:nth-child(2) { grid-column: 4; }
.reference-table.is-phase-columns .reference-phase-group-review .reference-phase:nth-child(1) { grid-column: 5; }
.reference-table.is-phase-columns .reference-phase-group-review .reference-phase:nth-child(2) { grid-column: 6; }
.reference-table.is-phase-columns .reference-phase-group-payment .reference-phase:nth-child(1) { grid-column: 7; }
.reference-table.is-phase-columns .reference-phase-group-payment .reference-phase:nth-child(2) { grid-column: 8; }
.reference-table.is-phase-columns .reference-phase-group-clearance .reference-phase:nth-child(1) { grid-column: 9; }
.reference-table.is-phase-columns .reference-phase-group-clearance .reference-phase:nth-child(2) { grid-column: 10; }
.reference-table.is-phase-columns .reference-phase-group-billing .reference-phase:nth-child(1) { grid-column: 11; }

.phase-compact-col {
  display: none;
}

.reference-table thead th {
  background: #eef3f8;
  border-bottom: 1px solid #17466a;
  color: #111827;
  font-size: .82rem;
  font-weight: 800;
  padding: .35rem .45rem;
  position: sticky;
  top: 0;
  z-index: 3;
}

.reference-table th,
.reference-table td {
  border-color: #17466a;
  padding: .38rem .45rem;
  vertical-align: top;
}

.reference-table tbody tr:nth-child(odd) td {
  background: #f8fafc;
}

.reference-table tbody tr:nth-child(even) td {
  background: #edf2f7;
}

.reference-cell {
  max-width: 176px;
  min-width: 176px;
  position: sticky;
  left: 0;
  z-index: 2;
}

.reference-table tbody tr:nth-child(odd) .reference-cell {
  background: #f8fafc;
}

.reference-table tbody tr:nth-child(even) .reference-cell {
  background: #edf2f7;
}

.reference-button {
  background: #0d6efd;
  border: 0;
  border-radius: 3px;
  color: #fff;
  display: block;
  font-size: .58rem;
  font-weight: 800;
  line-height: 1.42;
  min-height: 66px;
  padding: .38rem .45rem;
  position: relative;
  text-align: center;
  width: 100%;
}

.reference-button:hover {
  background: #0b5ed7;
}

.reference-button span {
  display: block;
  overflow-wrap: anywhere;
}

.reference-button b,
.reference-button em {
  border-radius: 999px;
  position: absolute;
}

.reference-button b {
  background: #dc3545;
  border: 1px solid #111827;
  height: 10px;
  left: -4px;
  top: -4px;
  width: 10px;
}

.reference-button em {
  background: #64748b;
  color: #fff;
  font-style: normal;
  line-height: 1;
  padding: .16rem .35rem;
  right: -7px;
  top: -7px;
}

.phase-item {
  display: grid;
  gap: .15rem;
  min-width: 280px;
}

.reference-phases-cell {
  min-width: 1960px;
}

.reference-phase-grid {
  align-items: start;
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(6, 315px);
  width: 100%;
}

.krones-reference-table .reference-phases-cell {
  min-width: 0;
  width: 100%;
}

.krones-reference-table .reference-phase-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(n+17) {
  display: none;
}

.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(1),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(6),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(7),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(10),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(11) {
  --krones-column-color: #47d359;
}

.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(2),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(13),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(14) {
  --krones-column-color: #be5014;
}

.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(3),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(4),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(5),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(8),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(9),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(12),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(15),
.krones-reference-table .reference-phase-grid > .reference-phase-stack:nth-child(16) {
  --krones-column-color: #0070c0;
}

.krones-reference-table .reference-cell {
  max-width: 70px;
  min-width: 70px;
  text-align: center;
  width: 70px;
}

.krones-detail-button {
  display: inline-flex;
  font-size: .72rem;
  line-height: 1;
  min-height: 0;
  padding: .28rem .4rem;
  width: auto;
}

.reference-phase-stack {
  display: grid;
  gap: .12rem;
}

.reference-phase {
  display: grid;
  gap: .14rem;
  min-width: 315px;
}

.krones-reference-table .reference-phase {
  min-width: 0;
}

.krones-reference-table .krones-operation-reference {
  background: #ffffff;
  border: 1px solid #111827;
  border-radius: 0;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.krones-reference-table .krones-operation-reference .reference-phase-title {
  background: var(--krones-column-color, #0070c0);
  color: #ffffff;
  min-height: 1.65rem;
  padding: .25rem .4rem;
}

.krones-reference-table .krones-operation-reference .reference-phase-title label {
  color: #ffffff;
  font-size: .66rem;
  line-height: 1.05;
  text-align: center;
}

.krones-operation-reference .phase-badge {
  background: #ffffff;
  border: 0;
  color: #111827;
  font-size: .72rem;
  letter-spacing: 0;
  min-height: 1.55rem;
  padding: .22rem .35rem;
}

.krones-operation-reference .reference-phase-dates {
  background: #ffffff;
  border-top: 1px solid #111827;
  color: #111827;
  display: block;
  font-size: .58rem;
  font-weight: 800;
  overflow: hidden;
  padding: .2rem .35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.krones-encargado-list-value,
.krones-status-list-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.krones-invoice-list,
.krones-guide-list {
  display: grid;
  gap: .08rem;
  overflow: auto;
  text-align: left;
  white-space: normal;
}

.krones-invoice-list > span,
.krones-guide-list > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-phase-title {
  align-items: center;
  display: grid;
  gap: .25rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.reference-phase-actions {
  align-items: center;
  display: inline-flex;
  gap: .25rem;
}

.reference-phase-request {
  align-items: center;
  background: #eef6f5;
  border: 1px solid #9ec9c4;
  border-radius: 6px;
  color: #0f766e;
  display: inline-flex;
  font-size: .62rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  padding: 0 .35rem;
  text-transform: uppercase;
  gap: .25rem;
}

.reference-phase-request:hover {
  background: #dff0ee;
  color: #0b5f59;
}

.reference-phase-request-count {
  align-items: center;
  background: #0f766e;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .58rem;
  height: 15px;
  justify-content: center;
  min-width: 15px;
  padding: 0 .22rem;
}

.reference-phase-request:not(.has-solicitudes) .reference-phase-request-count {
  background: #9aa7b4;
}

.reference-phase label {
  color: #050505;
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-phase-upload {
  align-items: center;
  background: #0f766e;
  border: 1px solid #0b5f59;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
  color: #fff;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 22px;
}

.reference-phase-upload:hover {
  background: #0b5f59;
  transform: translateY(-1px);
}

.revalidacion-request-box {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  display: grid;
  gap: .55rem;
  margin-bottom: 1rem;
  padding: .85rem;
}

.revalidacion-request-modal .modal-dialog {
  max-width: min(1580px, calc(100vw - 2rem));
}

.revalidacion-request-layout {
  align-items: start;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.45fr) minmax(320px, 1fr);
}

.revalidacion-request-layout.is-previo-request,
.revalidacion-request-layout.is-operacion-request,
.revalidacion-request-layout.is-proforma-request {
  grid-template-columns: 1fr;
}

.revalidacion-request-layout.is-previo-request .revalidacion-request-fields,
.revalidacion-request-layout.is-operacion-request .revalidacion-request-fields,
.revalidacion-request-layout.is-proforma-request .revalidacion-request-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.revalidacion-request-panel {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  min-width: 0;
  padding: .55rem;
}

.revalidacion-request-state-aceptada {
  background: #d8f3e5;
  border-color: #8fd0aa;
}

.revalidacion-request-state-cancelada {
  background: #fde2e2;
  border-color: #ef9a9a;
}

.revalidacion-request-state-pendiente {
  background: #fff4ce;
  border-color: #f2d16b;
}

.revalidacion-request-state-finalizada {
  background: #dbeafe;
  border-color: #93b7ef;
}

.revalidacion-request-state-label {
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 900;
  padding: .42rem .6rem;
  text-transform: uppercase;
}

.revalidacion-request-state-label.is-aceptada {
  background: #bfe8d2;
  border-color: #62b887;
  color: #075f3d;
}

.revalidacion-request-state-label.is-cancelada {
  background: #f8caca;
  border-color: #df6f6f;
  color: #8f1d1d;
}

.revalidacion-request-state-label.is-pendiente {
  background: #ffe8a3;
  border-color: #e6ba36;
  color: #7a5600;
}

.revalidacion-request-state-label.is-finalizada {
  background: #bfdbfe;
  border-color: #6ea2ea;
  color: #173f7a;
}

.revalidacion-request-box input:disabled,
.revalidacion-request-box select:disabled,
.revalidacion-request-box textarea:disabled {
  background: rgba(241, 245, 249, .88);
  color: #334155;
  opacity: 1;
}

.revalidacion-request-box.is-locked .revalidacion-options-content input,
.revalidacion-request-box.is-locked .revalidacion-options-content textarea {
  cursor: not-allowed;
  pointer-events: none;
}

.revalidacion-request-box label,
.revalidacion-request-history h2 {
  color: #0f766e;
  font-size: .82rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.revalidacion-request-fields {
  display: grid;
  gap: .55rem .5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.revalidacion-request-fields label {
  display: grid;
  gap: .25rem;
  margin: 0;
}

.revalidacion-request-fields .form-control {
  min-height: 34px;
  padding: .32rem .55rem;
}

.revalidacion-request-fields .form-control.is-readonly {
  background: #eef5fb;
  border-color: #bfd2e6;
  color: #172033;
  font-weight: 800;
}

.revalidacion-field-wide {
  grid-column: span 2;
}

.revalidacion-field-mini {
  grid-column: span 1;
}

.revalidacion-field-normal {
  grid-column: span 1;
}

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

.revalidacion-merchandise-box {
  display: grid;
  gap: .35rem;
}

.revalidacion-merchandise-box > strong {
  color: #0f766e;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revalidacion-merchandise-wrap {
  max-height: 235px;
}

.revalidacion-merchandise-table {
  min-width: 100%;
}

.revalidacion-merchandise-table th,
.revalidacion-merchandise-table td {
  font-size: .78rem;
  padding: .38rem .45rem;
  vertical-align: top;
}

.revalidacion-options-box {
  display: grid;
  gap: .5rem;
}

.revalidacion-options-tabs .nav-link {
  color: #475569;
  font-size: .84rem;
  font-weight: 900;
}

.revalidacion-options-tabs .nav-link.active {
  color: #0f766e;
}

.revalidacion-options-wrap {
  max-height: 300px;
}

.revalidacion-vacios-documents {
  display: grid;
  gap: .6rem;
}

.vacios-options-wrap {
  max-height: none;
}

.vacios-options-wrap .revalidacion-options-table {
  min-width: 420px;
}

.revalidacion-options-table {
  min-width: 100%;
}

.revalidacion-options-table th,
.revalidacion-options-table td {
  font-size: .78rem;
  padding: .35rem .45rem;
  vertical-align: middle;
}

.revalidacion-options-table th:nth-child(2),
.revalidacion-options-table td:nth-child(2) {
  text-align: center;
  width: 48px;
}

.revalidacion-options-table input[type="checkbox"] {
  height: 1.08rem;
  width: 1.08rem;
}

.revalidacion-summary {
  display: grid;
  gap: .18rem .55rem;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  margin-bottom: .35rem;
}

.revalidacion-summary b {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revalidacion-request-actions {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

.revalidacion-request-actions span {
  color: #475569;
  font-size: .82rem;
  font-weight: 800;
  margin-right: auto;
}

.revalidacion-request-actions span.is-error {
  color: #dc3545;
}

.revalidacion-request-history {
  display: grid;
  gap: .6rem;
}

.revalidacion-request-table {
  min-width: 1180px;
}

.revalidacion-request-table tr.revalidacion-history-row-aceptada > td {
  background: #d8f3e5;
}

.revalidacion-request-table tr.revalidacion-history-row-cancelada > td {
  background: #fde2e2;
}

.revalidacion-request-table tr.revalidacion-history-row-pendiente > td {
  background: #fff4ce;
}

.revalidacion-request-table tr.revalidacion-history-row-finalizada > td {
  background: #dbeafe;
}

.revalidacion-state {
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 900;
  justify-content: center;
  min-width: 86px;
  padding: .25rem .55rem;
  text-transform: uppercase;
}

.revalidacion-state-solicitada {
  background: #64748b;
}

.revalidacion-state-aceptada {
  background: #0f766e;
}

.revalidacion-state-rechazada {
  background: #dc3545;
}

.revalidacion-state-finalizada {
  background: #198754;
}

.revalidacion-comment {
  max-height: 90px;
  overflow: auto;
}

.revalidacion-history-detail {
  display: grid;
  gap: .2rem;
  margin-top: .4rem;
}

.revalidacion-history-detail strong {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revalidacion-history-documents {
  display: grid;
  gap: .3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.revalidacion-history-documents li {
  border-top: 1px solid #d8e1ec;
  display: grid;
  gap: .1rem;
  padding-top: .25rem;
}

.revalidacion-history-documents small {
  color: #64748b;
}

.revalidacion-readonly-content {
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  padding: .75rem;
}

.revalidacion-readonly-state-aceptada {
  background: #d8f3e5;
  border-color: #8fd0aa;
}

.revalidacion-readonly-state-cancelada {
  background: #fde2e2;
  border-color: #ef9a9a;
}

.revalidacion-readonly-state-pendiente {
  background: #fff4ce;
  border-color: #f2d16b;
}

.revalidacion-readonly-state-finalizada {
  background: #dbeafe;
  border-color: #93b7ef;
}

.revalidacion-readonly-section {
  background: rgba(255, 255, 255, .72);
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  display: grid;
  gap: .6rem;
  padding: .75rem;
}

.revalidacion-readonly-section h3 {
  color: #0f766e;
  font-size: .82rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.revalidacion-readonly-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.revalidacion-readonly-grid article {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .2rem;
  min-width: 0;
  padding: .5rem;
}

.revalidacion-readonly-grid span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revalidacion-readonly-grid strong {
  color: #172033;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.revalidacion-history-options {
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .35rem;
  margin-top: .45rem;
  padding: .45rem;
}

.revalidacion-history-options > strong {
  color: #0f766e;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revalidacion-history-options table {
  border-collapse: collapse;
  width: 100%;
}

.revalidacion-history-options th,
.revalidacion-history-options td {
  border-top: 1px solid #d8e1ec;
  font-size: .72rem;
  padding: .28rem .35rem;
  vertical-align: top;
}

.revalidacion-history-options th {
  background: #132038;
  color: #fff;
  font-weight: 900;
}

.revalidacion-history-options th:nth-child(2),
.revalidacion-history-options td:nth-child(2) {
  text-align: center;
  width: 46px;
}

.revalidacion-option-value {
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .65rem;
  font-weight: 900;
  justify-content: center;
  min-width: 30px;
  padding: .08rem .35rem;
}

.revalidacion-option-value.is-yes {
  background: #0f766e;
}

.revalidacion-option-value.is-no {
  background: #64748b;
}

@media (max-width: 1199.98px) {
  .revalidacion-request-layout {
    grid-template-columns: 1fr;
  }
}

.reference-phase-dates {
  color: #334155;
  display: block;
  font-size: .64rem;
  font-weight: 800;
  line-height: 1.18;
  min-height: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-phase-dates:empty {
  display: none;
}

.reference-phase-empty {
  visibility: hidden;
}

.phase-item + .phase-item {
  margin-top: .28rem;
}

.phase-item label {
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

.phase-badge {
  border-radius: 3px;
  color: #fff;
  display: block;
  font-size: .62rem;
  font-weight: 900;
  line-height: 1;
  min-height: 17px;
  overflow: hidden;
  padding: .24rem .35rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.phase-dates {
  color: #475569;
  display: block;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 280px;
  overflow-wrap: anywhere;
}

.reference-table.is-compact {
  min-width: 2520px;
}

.reference-table.is-compact .phase-detail-col {
  display: none;
}

.reference-table.is-compact .phase-compact-col {
  display: table-cell;
  min-width: 205px;
}

.reference-table.is-compact .phase-item {
  min-width: 185px;
}

.reference-table.is-compact .phase-item-compact {
  gap: .18rem;
}

.reference-table.is-compact .phase-badge {
  min-width: 100%;
}

.reference-table.is-compact .phase-dates {
  max-width: 185px;
}

.phase-ok {
  background: #198754;
}

.phase-bad {
  background: #dc3545;
}

.phase-warn {
  background: #d97706;
}

.phase-na {
  background: #6c757d;
}

.reference-charts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  margin-top: 1.2rem;
}

.reference-chart-card {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  min-height: 310px;
  padding: 1rem;
}

.reference-chart-card h2 {
  color: #0f766e;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 .25rem;
}

.reference-chart-card p {
  color: #475569;
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.bar-chart {
  display: grid;
  gap: .8rem;
}

.bar-row {
  align-items: center;
  display: grid;
  gap: .65rem;
  grid-template-columns: 145px minmax(120px, 1fr) 54px;
}

.bar-row span {
  color: #111827;
  font-size: .92rem;
  font-weight: 800;
}

.bar-row div {
  background: #e5e7eb;
  border-radius: 999px;
  height: 28px;
  overflow: hidden;
}

.bar-row b {
  display: block;
  height: 100%;
  min-width: 4px;
}

.bar-row strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  text-align: right;
}

.bar-ok,
.legend-ok {
  background: #198754;
}

.bar-bad,
.legend-bad {
  background: #dc3545;
}

.bar-warn,
.legend-warn {
  background: #eab308;
}

.donut-chart {
  align-items: center;
  border-radius: 50%;
  display: grid;
  height: 190px;
  justify-items: center;
  margin: .5rem auto 1rem;
  width: 190px;
}

.donut-chart > div {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  display: grid;
  height: 112px;
  justify-items: center;
  text-align: center;
  width: 112px;
}

.donut-chart strong {
  color: #111827;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.donut-chart span {
  color: #475569;
  font-size: .78rem;
  font-weight: 800;
}

.chart-legend,
.chart-compact-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .9rem;
  justify-content: center;
}

.chart-legend span,
.chart-compact-summary span {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 800;
  gap: .35rem;
}

.chart-legend b {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.reference-modal .modal-content {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
}

.modal:not(.processing-modal) .modal-dialog {
  margin: 1rem auto;
  max-width: calc(100vw - 2rem);
  width: calc(100vw - 2rem);
}

.modal:not(.processing-modal) .modal-dialog-centered {
  min-height: calc(100% - 2rem);
}

.modal:not(.processing-modal) .modal-content {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2rem);
  max-height: calc(100vh - 2rem);
}

.modal:not(.processing-modal) .modal-body {
  min-height: 0;
  overflow: auto;
}

.modal:not(.processing-modal) .modal-dialog-scrollable {
  height: calc(100vh - 2rem);
}

.modal:not(.processing-modal) .modal-dialog-scrollable .modal-content {
  max-height: 100%;
}

.reference-modal .modal-header {
  align-items: flex-start;
}

.reference-modal .modal-title {
  color: #172033;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.reference-modal-meta-row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-top: .4rem;
}

.reference-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-top: 0;
}

.reference-modal-meta span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #172033;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  gap: .35rem;
  padding: .24rem .45rem;
}

.reference-modal-meta b {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.revalidacion-reprogram-modal .modal-dialog {
  max-width: 1180px;
  width: min(1180px, calc(100vw - 2rem));
}

.revalidacion-reprogram-modal .modal-content {
  height: auto !important;
  max-height: calc(100vh - 2rem) !important;
  min-height: 0;
}

.revalidacion-reprogram-modal .modal-body {
  overflow: visible !important;
}

.revalidacion-reprogram-form {
  background: #fff7f7;
  border: 1px solid #fecaca;
  border-radius: 8px;
  display: grid;
  gap: .55rem;
  margin: .75rem;
  padding: .75rem;
}

.revalidacion-reprogram-form label {
  color: #7f1d1d;
  display: grid;
  font-size: .72rem;
  font-weight: 900;
  gap: .35rem;
  text-transform: uppercase;
}

.revalidacion-reprogram-pretexto {
  max-width: 580px;
}

.revalidacion-reprogram-comment-row {
  align-items: end;
  display: grid;
  gap: .55rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.revalidacion-reprogram-comment-row .form-control {
  min-height: 70px;
}

.revalidacion-reprogram-comment-row .btn {
  min-height: 42px;
  white-space: nowrap;
}

.revalidacion-reprogram-form .expediente-status {
  margin: 0;
  padding: .35rem 0 0;
}

.reference-detail-grid {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.reference-detail-grid article {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .25rem;
  padding: .65rem;
}

.reference-detail-grid span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reference-detail-grid strong {
  color: #172033;
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.reference-detail-wide {
  grid-column: 1 / -1;
}

.krones-encargado-control,
.krones-estatus-control {
  align-items: center;
  display: grid;
  gap: .35rem;
  grid-template-columns: minmax(180px, 260px) auto;
}

.krones-encargado-control .btn,
.krones-estatus-control .btn {
  white-space: nowrap;
}

.krones-encargado-top,
.krones-entrega-almacen-top,
.krones-estatus-top {
  align-items: end;
  display: grid;
  gap: .2rem;
  margin-top: 0;
}

.krones-encargado-top {
  max-width: 380px;
}

.krones-entrega-almacen-top {
  max-width: 180px;
}

.krones-estatus-top {
  max-width: 380px;
}

.krones-encargado-top label,
.krones-entrega-almacen-top label,
.krones-estatus-top label {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.krones-encargado-top small,
.krones-entrega-almacen-top small,
.krones-estatus-top small,
.krones-encargado-create-status {
  display: block;
  font-size: .72rem;
  line-height: 1;
  min-height: .8rem;
}

.krones-encargado-editor {
  border-bottom: 1px solid #d8e1ec;
  margin-bottom: 1rem;
  padding-bottom: .85rem;
}

.krones-encargado-editor-row {
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.krones-estatus-editor-row {
  align-items: center;
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.krones-encargado-list h2 {
  color: #0f766e;
  font-size: .9rem;
  font-weight: 900;
  margin: 0 0 .55rem;
  text-transform: uppercase;
}

.krones-encargado-empty {
  color: #64748b;
  font-weight: 700;
  margin: .35rem 0 0;
}

.krones-color-swatch {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  display: inline-block;
  height: .85rem;
  margin-right: .4rem;
  vertical-align: middle;
  width: .85rem;
}

.krones-text-blocks {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  margin-bottom: .85rem;
}

.krones-text-block {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .4rem;
  padding: .55rem;
}

.krones-text-block-header {
  align-items: center;
  display: flex;
  gap: .5rem;
  justify-content: space-between;
}

.krones-text-block-header label {
  color: #0f766e;
  font-size: .75rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.krones-rich-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.krones-rich-toolbar button,
.krones-rich-toolbar label {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #172033;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 800;
  gap: .3rem;
  min-height: 1.75rem;
  padding: .25rem .45rem;
}

.krones-rich-toolbar input[type="color"] {
  border: 0;
  height: 1rem;
  padding: 0;
  width: 1.35rem;
}

.krones-rich-editor {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #172033;
  font-size: .86rem;
  line-height: 1.35;
  min-height: 5.8rem;
  overflow: auto;
  padding: .55rem .65rem;
}

.krones-rich-editor:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 .12rem rgba(15, 118, 110, .16);
  outline: 0;
}

.krones-rich-list-value {
  display: block;
  max-height: 4.5rem;
  overflow: auto;
  text-align: left;
  white-space: normal;
}

.krones-rich-list-value p,
.krones-rich-list-value ul,
.krones-rich-list-value ol {
  margin-bottom: .25rem;
}

.krones-rich-list-value ul,
.krones-rich-list-value ol {
  padding-left: 1rem;
}

.krones-rich-list-value .krones-rich-content {
  display: block;
  margin: -.22rem -.35rem;
  min-height: 1.55rem;
  padding: .22rem .35rem;
}

.krones-text-block small {
  color: #0f766e;
  font-size: .72rem;
  font-weight: 800;
  min-height: .8rem;
}

.krones-text-block small.is-error {
  color: #b91c1c;
}

.reference-detail-phases {
  margin-top: .9rem;
}

.reference-detail-phases h2 {
  color: #0f766e;
  font-size: .95rem;
  font-weight: 900;
  margin: 0 0 .55rem;
  text-transform: uppercase;
}

.reference-detail-phase-grid {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.reference-detail-phase-grid article {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .42rem;
  padding: .65rem;
}

.reference-detail-phase-grid h3 {
  color: #172033;
  font-size: .88rem;
  font-weight: 900;
  margin: 0;
}

.reference-detail-phase-grid p {
  display: grid;
  gap: .12rem;
  margin: 0;
}

.reference-detail-phase-grid p span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reference-detail-phase-grid p strong {
  color: #172033;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.reference-modal-tabs {
  border-bottom-color: #d8e1ec;
  margin-bottom: .85rem;
}

.reference-modal-tabs .nav-link {
  color: #475569;
  font-weight: 800;
}

.reference-modal-tabs .nav-link.active {
  color: #0f766e;
}

.reference-modal-tab-content {
  min-height: 360px;
}

.reference-timeline-shell {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  padding: 1rem;
}

.reference-timeline-heading {
  align-items: center;
  border-bottom: 1px solid #d8e1ec;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .85rem;
  padding-bottom: .7rem;
}

.reference-timeline-heading span {
  color: #0f766e;
  display: block;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reference-timeline-heading strong {
  color: #172033;
  font-size: 1rem;
  font-weight: 900;
}

.reference-timeline {
  display: grid;
  gap: .2rem;
  position: relative;
}

.reference-timeline::before {
  background: repeating-linear-gradient(to bottom, #334155 0 12px, transparent 12px 20px);
  bottom: 24px;
  content: "";
  left: 50%;
  position: absolute;
  top: 24px;
  transform: translateX(-50%);
  width: 2px;
}

.reference-timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  min-height: 112px;
  position: relative;
}

.reference-timeline-card {
  align-self: center;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  display: grid;
  gap: .32rem;
  padding: .72rem;
  position: relative;
}

.reference-timeline-card::after {
  background: #2dd4bf;
  content: "";
  height: 3px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
}

.reference-timeline-item.is-left .reference-timeline-card {
  grid-column: 1;
}

.reference-timeline-item.is-left .reference-timeline-card::after {
  left: 100%;
}

.reference-timeline-item.is-right .reference-timeline-card {
  grid-column: 3;
}

.reference-timeline-item.is-right .reference-timeline-card::after {
  right: 100%;
}

.reference-timeline-step {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reference-timeline-card h3 {
  color: #172033;
  font-size: .96rem;
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
}

.reference-timeline-card small {
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
}

.reference-timeline-card p {
  display: grid;
  gap: .08rem;
  margin: 0;
}

.reference-timeline-card p span {
  color: #64748b;
  font-size: .66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reference-timeline-card p strong {
  color: #172033;
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.reference-timeline-node {
  align-items: center;
  align-self: center;
  border: 4px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #334155, 0 8px 18px rgba(15, 23, 42, .22);
  color: #fff;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 900;
  grid-column: 2;
  height: 46px;
  justify-content: center;
  justify-self: center;
  line-height: 1;
  position: relative;
  width: 46px;
  z-index: 1;
}

.reference-timeline-switch {
  background: #e2e8f0;
  border-radius: 8px;
  display: inline-flex;
  gap: .2rem;
  padding: .2rem;
}

.reference-timeline-switch button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475569;
  font-size: .78rem;
  font-weight: 900;
  padding: .42rem .7rem;
}

.reference-timeline-switch button.is-active {
  background: #0f766e;
  color: #fff;
}

.reference-timeline-doc-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  color: #172033;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  gap: .4rem;
  padding: .38rem .6rem;
}

.reference-timeline-doc-toggle input {
  accent-color: #0f766e;
}

.reference-phase-docs {
  border-top: 1px solid #d8e1ec;
  margin-top: .35rem;
  overflow-x: auto;
  padding-top: .45rem;
}

.reference-phase-docs.is-empty {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
}

.reference-phase-docs table {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-collapse: separate;
  border-radius: 6px;
  border-spacing: 0;
  font-size: .72rem;
  min-width: 640px;
  overflow: hidden;
  width: 100%;
}

.reference-phase-docs th {
  background: #eef3f8;
  color: #172033;
  font-size: .64rem;
  font-weight: 900;
  padding: .36rem .42rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.reference-phase-docs td {
  border-top: 1px solid #d8e1ec;
  color: #172033;
  padding: .38rem .42rem;
  vertical-align: top;
}

.reference-phase-docs td:nth-child(1) {
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}

.reference-phase-docs td:nth-child(2) {
  min-width: 190px;
}

.reference-phase-docs td:nth-child(3),
.reference-phase-docs td:nth-child(4) {
  font-weight: 800;
}

.reference-phase-doc-comment {
  color: #172033;
  font-size: .72rem;
  max-height: 96px;
  overflow: auto;
}

.reference-phase-doc-comment img {
  height: auto;
  max-width: 100%;
}

.reference-phase-doc-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  justify-content: flex-start;
  min-width: 118px;
  white-space: normal;
}

.reference-phase-doc-actions-internal {
  flex-wrap: nowrap;
  min-width: 180px;
  white-space: nowrap;
}

.reference-phase-doc-actions a,
.reference-phase-doc-actions button {
  align-items: center;
  background: #0f766e;
  border: 0;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: .7rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  flex: 0 0 28px;
  width: 28px;
}

.reference-phase-doc-actions a svg,
.reference-phase-doc-actions button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 16px;
}

.pdf-4mb-option {
  align-items: center;
  color: #172033;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .7rem;
  font-weight: 900;
  gap: .18rem;
  line-height: 1;
  white-space: nowrap;
}

.pdf-4mb-option input {
  height: .85rem;
  margin: 0;
  width: .85rem;
}

.reference-phase-doc-actions .pdf-tif-link {
  font-size: .58rem;
  letter-spacing: 0;
}

.document-preview-modal .modal-dialog {
  max-width: calc(100vw - 2rem);
}

.document-preview-modal-front {
  z-index: 1085;
}

.document-record-modal .modal-dialog {
  max-width: calc(100vw - 2rem);
}

.document-preview-modal .modal-header {
  align-items: flex-start;
}

.document-preview-meta {
  margin: .35rem 0 .45rem;
}

.document-preview-body {
  background: #eef3f8;
  height: min(78vh, 820px);
  padding: .75rem;
}

.document-preview-body iframe {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  height: 100%;
  width: 100%;
}

.document-record-grid {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.document-record-modal .modal-body {
  display: flex;
  flex-direction: column;
}

.document-record-grid article {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .25rem;
  padding: .55rem;
}

.document-record-grid article > span,
.document-record-comment h2 {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.document-record-grid article > strong,
.document-record-value {
  color: #172033;
  font-size: .84rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.document-record-comment {
  border-top: 1px solid #d8e1ec;
  display: grid;
  gap: .45rem;
  margin-top: .75rem;
  padding-top: .75rem;
}

.document-record-comment div {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  max-height: 260px;
  overflow: auto;
  padding: .65rem;
}

.document-record-comment img,
.document-record-comment table {
  max-width: 100%;
}

.document-record-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .75rem;
}

.document-record-preview {
  border-top: 1px solid #d8e1ec;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .45rem;
  margin-top: .75rem;
  min-height: 360px;
  padding-top: .75rem;
}

.document-record-preview h2 {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.document-record-preview iframe {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  flex: 1 1 auto;
  min-height: 320px;
  width: 100%;
}

.reference-route-timeline {
  min-height: 560px;
  overflow-x: auto;
  padding: 1.5rem 0 1.2rem;
  position: relative;
}

.reference-route-timeline.has-documents {
  min-height: 1120px;
  padding-top: 2.25rem;
}

.reference-route-line {
  background: #cbd5e1;
  border: 1px solid #94a3b8;
  height: 18px;
  left: 98px;
  min-width: 1710px;
  position: absolute;
  right: 0;
  top: 270px;
  transform: skewY(-2deg);
}

.reference-route-timeline.has-documents .reference-route-line {
  min-width: 3320px;
  top: 520px;
}

.reference-route-vehicle {
  animation: route-vehicle-advance 18s linear infinite;
  color: #111827;
  height: 164px;
  left: -32px;
  position: absolute;
  top: 168px;
  width: 164px;
  z-index: 2;
}

.reference-route-timeline.has-documents .reference-route-vehicle {
  animation-name: route-vehicle-advance-wide;
  top: 418px;
}

.reference-route-vehicle svg {
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  width: 100%;
}

.reference-route-vehicle img {
  animation: route-vehicle-bob .72s ease-in-out infinite alternate;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

@keyframes route-vehicle-advance {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(1610px);
  }
}

@keyframes route-vehicle-bob {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-4px);
  }
}

@keyframes route-vehicle-advance-wide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(3220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reference-route-vehicle,
  .reference-route-vehicle img {
    animation: none;
  }
}

.reference-route-vehicle.is-sea {
  color: #0369a1;
}

.reference-route-vehicle.is-air {
  color: #4f46e5;
}

.reference-route-vehicle.is-land {
  color: #111827;
}

.reference-route-stops {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(11, 145px);
  min-width: 1710px;
  padding-left: 112px;
  position: relative;
  z-index: 1;
}

.reference-route-timeline.has-documents .reference-route-stops {
  gap: 1.2rem;
  grid-template-columns: repeat(11, 280px);
  min-width: 3320px;
}

.reference-route-stop {
  display: grid;
  grid-template-rows: 220px 64px 220px;
  justify-items: center;
  position: relative;
}

.reference-route-timeline.has-documents .reference-route-stop {
  grid-template-rows: 470px 64px 470px;
}

.reference-route-pin {
  align-items: center;
  border: 4px solid #fff;
  border-radius: 999px 999px 999px 0;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .22), 0 8px 18px rgba(15, 23, 42, .2);
  color: #fff;
  display: flex;
  font-size: .85rem;
  font-weight: 900;
  grid-row: 2;
  height: 48px;
  justify-content: center;
  line-height: 1;
  margin-top: 2px;
  transform: rotate(-45deg);
  width: 48px;
}

.reference-route-pin span {
  transform: rotate(45deg);
}

.reference-route-card {
  align-self: end;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
  display: grid;
  gap: .34rem;
  padding: .68rem;
  width: 142px;
}

.reference-route-timeline.has-documents .reference-route-card {
  max-height: 440px;
  overflow: auto;
  width: 276px;
}

.reference-route-timeline.has-documents .reference-phase-docs {
  max-height: 260px;
}

.reference-route-timeline.has-documents .reference-phase-docs table {
  min-width: 760px;
}

.reference-route-timeline.has-documents .reference-phase-doc-comment {
  max-height: 120px;
}

.reference-route-stop.is-bottom .reference-route-card {
  align-self: start;
  grid-row: 3;
}

.reference-route-stop.is-top .reference-route-card {
  grid-row: 1;
}

.reference-route-card strong {
  color: #172033;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.05;
}

.reference-route-card .phase-badge {
  font-size: .62rem;
}

.reference-route-dates {
  display: grid;
  gap: .25rem;
}

.reference-route-dates p {
  display: grid;
  gap: .05rem;
  margin: 0;
}

.reference-route-dates span {
  color: #64748b;
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reference-route-dates b {
  color: #172033;
  font-size: .72rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.expediente-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.expediente-toolbar strong {
  color: #172033;
  display: block;
  font-size: .94rem;
}

.expediente-toolbar span {
  color: #64748b;
  font-size: .82rem;
  font-weight: 700;
}

.expediente-actions {
  align-items: center;
  display: flex;
  gap: .5rem;
}

.expediente-actions .form-control {
  max-width: 280px;
}

.expediente-subtabs {
  margin-bottom: .9rem;
}

.expediente-subtab-content {
  padding-top: .25rem;
}

.expediente-status {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  color: #475569;
  font-weight: 700;
  padding: .9rem;
}

.expediente-table-wrap {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  max-height: 52vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.expediente-table {
  font-size: .82rem;
  margin-bottom: 0;
  table-layout: fixed;
  width: 100%;
}

.expediente-table th {
  background: #152238;
  color: #eef5ff;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.expediente-table-filter-row th {
  background: #eef3f8;
  top: 36px;
  z-index: 2;
}

.expediente-table-filter-row input {
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  font-size: .72rem;
  min-width: 92px;
  padding: .28rem .4rem;
  width: 100%;
}

.expediente-table td,
.expediente-table th {
  border-color: #d8e1ec;
  vertical-align: middle;
  overflow-wrap: anywhere;
  white-space: normal;
}

.expediente-table td:nth-child(3) {
  min-width: 520px;
  white-space: normal;
}

.expediente-table td:last-child,
.expediente-table th:last-child {
  min-width: 152px;
  white-space: normal;
  width: 152px;
}

#reference-expediente-interno-pane .expediente-table td:last-child,
#reference-expediente-interno-pane .expediente-table th:last-child {
  min-width: 204px;
  white-space: nowrap;
  width: 204px;
}

.expediente-type-col,
.expediente-data-col {
  display: none;
}

.expediente-table td:nth-child(3) strong {
  color: #111827;
  margin-left: .4rem;
}

.expediente-table td:nth-child(3) strong:first-child {
  margin-left: 0;
}

.tower-document-user {
  align-items: center;
  display: inline-flex;
  gap: .5rem;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
}

.tower-document-user img,
.tower-document-user > span {
  border: 1px solid #d8e1ec;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 34px;
  object-fit: cover;
  width: 34px;
}

.tower-document-user > span {
  align-items: center;
  background: #0f766e;
  color: #fff;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  justify-content: center;
  text-transform: uppercase;
}

.tower-document-user strong,
.tower-document-user small {
  display: block;
}

.tower-document-user strong {
  color: #172033;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.15;
}

.tower-document-user small {
  color: #64748b;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.15;
}

.expediente-state {
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: .72rem;
  font-weight: 900;
  min-width: 78px;
  padding: .18rem .45rem;
  text-align: center;
}

.expediente-ready {
  background: #198754;
}

.expediente-pending {
  background: #6c757d;
}

.expediente-internal-table td:nth-child(3),
.tower-document-table td:nth-child(3) {
  min-width: 0;
  white-space: normal;
}

.expediente-internal-table th:nth-child(1),
.expediente-internal-table td:nth-child(1),
.tower-document-table th:nth-child(1),
.tower-document-table td:nth-child(1) {
  width: 20%;
}

.expediente-internal-table th:nth-child(2),
.expediente-internal-table td:nth-child(2),
.tower-document-table th:nth-child(2),
.tower-document-table td:nth-child(2) {
  width: 13%;
}

.expediente-internal-table th:nth-child(3),
.expediente-internal-table td:nth-child(3),
.tower-document-table th:nth-child(3),
.tower-document-table td:nth-child(3) {
  width: 12%;
}

.expediente-internal-table th:nth-child(4),
.expediente-internal-table td:nth-child(4) {
  width: 26%;
}

.expediente-internal-table th:nth-child(5),
.expediente-internal-table td:nth-child(5),
.tower-document-table th:nth-child(4),
.tower-document-table td:nth-child(4) {
  width: 12%;
}

.expediente-internal-table th:nth-child(6),
.expediente-internal-table td:nth-child(6),
.tower-document-table th:nth-child(5),
.tower-document-table td:nth-child(5) {
  width: 12%;
}

.expediente-internal-table th:nth-child(7),
.expediente-internal-table td:nth-child(7),
.tower-document-table th:nth-child(7),
.tower-document-table td:nth-child(7) {
  width: 5%;
}

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

.expediente-admin-empty {
  background: #f8fafc;
  border: 1px dashed #b8c7d8;
  border-radius: 8px;
  color: #64748b;
  font-weight: 800;
  padding: 1.2rem;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 112px);
  place-items: center;
  background: #071222 url("../img/tower-bmasc-login.png") center / 100% 100% no-repeat;
  margin: -1rem calc(50% - 50vw) -60px;
  padding: 2rem 1rem 5rem;
}

.login-card {
  background: rgba(255, 255, 255, .68);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .20);
  max-width: 420px;
  padding: 1.5rem;
  width: 100%;
}

.login-card img {
  display: none;
}

.login-card h1,
.security-heading h1,
.security-panel h2 {
  color: #172033;
  font-weight: 900;
}

.security-page {
  display: grid;
  gap: 1rem;
}

.security-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.admin-toast {
  align-items: start;
  background: #fff;
  border: 1px solid #c7d7e7;
  border-left: 5px solid #0f766e;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  display: grid;
  gap: .15rem .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: min(460px, calc(100vw - 2rem));
  opacity: 0;
  padding: .9rem 1rem;
  position: fixed;
  right: 1rem;
  top: 1rem;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2000;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.is-danger {
  border-left-color: #c0392b;
}

.admin-toast strong {
  color: #172033;
  font-size: .9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-toast span {
  color: #334155;
  font-weight: 700;
  grid-column: 1;
}

.admin-toast button {
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: .85rem;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: 1;
  padding: .15rem;
}

.security-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.revalidacion-catalog-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: 260px minmax(0, 1fr);
}

.revalidacion-catalog-nav {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  gap: .25rem;
  padding: .5rem;
  position: sticky;
  top: .75rem;
}

.revalidacion-catalog-nav .nav-link {
  border-radius: 6px;
  color: #172033;
  font-size: .78rem;
  font-weight: 900;
  text-align: left;
}

.revalidacion-catalog-nav .nav-link.active {
  background: #0f766e;
  color: #fff;
}

.revalidacion-catalog-content {
  min-width: 0;
}

.revalidacion-catalog-content .security-panel {
  min-height: 460px;
}

@media (max-width: 991.98px) {
  .revalidacion-catalog-layout {
    grid-template-columns: 1fr;
  }

  .revalidacion-catalog-nav {
    position: static;
  }
}

.security-panel {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  padding: 1rem;
}

.security-form {
  display: grid;
  gap: .75rem;
}

.security-profile-create-form {
  align-items: start;
  grid-template-columns: minmax(220px, .8fr) minmax(260px, 1fr) minmax(260px, 1fr);
}

.security-profile-fields {
  display: grid;
  gap: .75rem;
}

.security-profile-create-form .security-checkbox-list {
  height: 210px;
  max-height: 210px;
}

.security-profile-edit-form {
  align-items: start;
  grid-template-columns: minmax(190px, .75fr) minmax(260px, 1fr) minmax(240px, .95fr);
}

.security-profile-edit-form .security-checkbox-list {
  height: 260px;
  max-height: 260px;
}

.security-profile-actions {
  display: flex;
  gap: .5rem;
  grid-column: 1 / -1;
}

.security-user-create-form {
  align-items: start;
  grid-template-columns: minmax(360px, 1.05fr) minmax(300px, .95fr) minmax(300px, .95fr) minmax(230px, .65fr);
}

.security-user-edit-form {
  align-items: start;
  grid-template-columns: minmax(360px, 1.05fr) minmax(300px, .95fr) minmax(260px, .85fr) minmax(230px, .65fr);
}

.security-user-fields {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.security-user-fields label:nth-child(3),
.security-user-fields label:nth-child(4) {
  grid-column: 1 / -1;
}

.security-user-create-form .security-access-block,
.security-user-edit-form .security-access-block,
.security-user-side {
  min-height: 100%;
}

.security-user-create-form .security-checkbox-list,
.security-user-edit-form .security-checkbox-list {
  max-height: 230px;
}

.security-user-create-form .security-option-grid,
.security-user-edit-form .security-option-grid {
  grid-template-columns: 1fr;
}

.security-user-side {
  display: grid;
  gap: .75rem;
}

.security-user-side .btn {
  align-self: end;
}

.security-form label {
  color: #334155;
  font-size: .82rem;
  font-weight: 800;
}

.security-check {
  align-items: center;
  display: flex;
  gap: .45rem;
}

.security-checkbox-list {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  display: grid;
  gap: .35rem;
  max-height: 260px;
  overflow: auto;
  padding: .75rem;
}

.security-checkbox-list strong {
  color: #0f766e;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.security-access-block {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  display: grid;
  gap: .55rem;
  padding: .75rem;
}

.security-tabs {
  margin-top: .75rem;
}

.security-tab-content {
  padding-top: 1rem;
}

.security-tab-content .tab-pane.active {
  display: grid;
  gap: 1rem;
}

.security-edit-details summary {
  color: #0f766e;
  cursor: pointer;
  font-weight: 900;
}

.security-edit-toggle {
  background: transparent;
  border: 0;
  color: #0f766e;
  font-weight: 900;
  padding: 0;
}

.security-user-edit-row td {
  background: #f8fafc;
  padding: .85rem;
}

.security-inline-form {
  margin-top: .75rem;
  min-width: min(980px, 84vw);
}

.app-user-nav {
  align-items: center;
}

.app-user-chip {
  align-items: center;
  display: inline-flex;
  gap: .55rem;
  line-height: 1.1;
}

.app-user-chip img,
.app-user-avatar {
  border: 2px solid rgba(15, 118, 110, .24);
  border-radius: 999px;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.app-user-avatar {
  align-items: center;
  background: #0f766e;
  color: #fff;
  display: inline-flex;
  font-size: .95rem;
  font-weight: 900;
  justify-content: center;
  text-transform: uppercase;
}

.app-user-chip strong,
.app-user-chip small,
.app-user-chip em {
  display: block;
}

.app-user-chip strong {
  color: #fff;
  font-size: .83rem;
  font-weight: 900;
}

.app-user-chip small {
  color: #dce7f3;
  font-size: .72rem;
  font-weight: 800;
}

.app-user-chip em {
  color: #f8fafc;
  font-size: .7rem;
  font-style: normal;
  font-weight: 700;
}

.security-user-thumb {
  border: 1px solid #d8e1ec;
  border-radius: 999px;
  height: 34px;
  object-fit: cover;
  width: 34px;
}

.security-user-thumb-empty {
  align-items: center;
  background: #eef6f5;
  color: #0f766e;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  text-transform: uppercase;
}

.security-option-grid {
  gap: .35rem .7rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  max-height: 190px;
}

.security-option-grid strong {
  grid-column: 1 / -1;
}

.security-option-grid label {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
  margin: 0;
}

.security-access-block .is-disabled {
  opacity: .48;
}

.security-client-picker {
  display: grid;
  gap: .4rem;
  position: relative;
}

.security-client-picker > strong {
  color: #0f766e;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.security-table-wrap {
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  overflow: auto;
}

.security-table {
  font-size: .82rem;
  margin: 0;
}

.security-table th {
  background: #152238;
  color: #eef5ff;
  position: sticky;
  top: 0;
}

.security-table-filter-row th {
  background: #eef3f8;
  top: 35px;
}

.security-table-filter-row input {
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  font-size: .72rem;
  min-width: 92px;
  padding: .28rem .4rem;
  width: 100%;
}

.security-user-pager {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding-top: .65rem;
}

.security-user-pager span {
  color: #475569;
  font-size: .82rem;
  font-weight: 800;
}

.security-user-pager div {
  display: inline-flex;
  gap: .4rem;
}

.connection-config-form {
  grid-template-columns: minmax(160px, .7fr) minmax(220px, 1fr) minmax(360px, 2fr) auto auto;
}

.connection-string-field textarea {
  font-family: Consolas, "Courier New", monospace;
  font-size: .78rem;
}

.connection-config-table {
  min-width: 1180px;
}

.connection-config-table th:nth-child(3),
.connection-config-table td:nth-child(3) {
  min-width: 210px;
}

.connection-config-table textarea {
  font-family: Consolas, "Courier New", monospace;
  font-size: .72rem;
  min-width: 420px;
}

.revalidacion-catalog-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.revalidacion-catalog-form {
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.revalidacion-catalog-grid .security-table {
  min-width: 520px;
}

.monitor-payment-summary {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 1rem 0;
}

.monitor-payment-summary article {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  display: grid;
  gap: .25rem;
  padding: 1rem;
}

.monitor-payment-summary span {
  color: #64748b;
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.monitor-payment-summary strong {
  color: #172033;
  font-size: 1.8rem;
  font-weight: 900;
}

.monitor-payment-summary .summary-card-warning {
  border-left: 5px solid #d97706;
}

.monitor-payment-summary .summary-card-danger {
  border-left: 5px solid #dc3545;
}

.monitor-payment-summary .summary-card-success {
  border-left: 5px solid #198754;
}

.monitor-tabs {
  margin-top: .75rem;
}

.monitor-tabs .nav-link {
  color: #475569;
  font-size: .82rem;
  font-weight: 900;
}

.monitor-tabs .nav-link.active {
  color: #0f766e;
}

.monitor-tab-content {
  padding-top: .75rem;
}

.monitor-table-wrap {
  max-height: 62vh;
  overflow: auto;
}

.monitor-table {
  font-size: .78rem;
  min-width: 1320px;
}

.monitor-table th {
  white-space: nowrap;
}

.monitor-table td {
  vertical-align: middle;
}

.monitor-client-cell {
  min-width: 230px;
}

.monitor-client-cell strong,
.monitor-client-cell span {
  display: block;
}

.monitor-client-cell span {
  color: #334155;
  line-height: 1.25;
}

.monitor-status {
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 900;
  justify-content: center;
  min-width: 76px;
  padding: .25rem .55rem;
  text-transform: uppercase;
}

.monitor-status-request {
  background: #d97706;
}

.monitor-status-pending {
  background: #dc3545;
}

.monitor-status-paid {
  background: #198754;
}

.solicitud-payment-form {
  margin-top: 1rem;
}

.solicitud-payment-shell {
  display: grid;
  gap: 1rem;
}

.solicitud-search-form {
  margin-bottom: 0;
}

.solicitud-last-update {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.solicitud-detail-panel {
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.solicitud-detail-header {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.solicitud-detail-header div,
.solicitud-detail-grid div {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  display: grid;
  gap: .18rem;
  padding: .72rem;
}

.solicitud-detail-header span,
.solicitud-detail-grid span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.solicitud-detail-header strong,
.solicitud-detail-grid strong {
  color: #172033;
  font-size: .9rem;
  font-weight: 900;
}

.solicitud-detail-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.solicitud-detail-client {
  grid-column: span 2;
}

.solicitud-flags > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  min-height: 38px;
}

.solicitud-flags label {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  gap: .28rem;
  margin: 0;
  white-space: nowrap;
}

.solicitud-payment-table form .btn {
  min-width: 76px;
}

.cube-hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .92), rgba(17, 24, 39, .96)),
    radial-gradient(circle at 85% 12%, rgba(125, 211, 252, .55), transparent 30%);
  border: 1px solid #19374a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  color: #eef5ff;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 300px;
  margin: 1rem 0;
  overflow: hidden;
  padding: 1.25rem;
}

.cube-kicker {
  color: #99f6e4;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0 0 .35rem;
  text-transform: uppercase;
}

.cube-hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 800;
  margin: 0 0 .45rem;
}

.cube-hero p {
  margin-bottom: 0;
  max-width: 760px;
}

.cube-glow-panel {
  align-content: center;
  display: grid;
  gap: .55rem;
}

.cube-glow-panel span {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(153, 246, 228, .4);
  border-radius: 6px;
  box-shadow: inset 0 0 18px rgba(125, 211, 252, .08);
  color: #ecfeff;
  font-weight: 800;
  padding: .65rem .8rem;
}

.cube-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  width: 100%;
}

.cube-main {
  display: grid;
  gap: 1rem;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.cube-panel,
.cube-metric {
  background: #0f172a;
  border: 1px solid #24344d;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .15);
  color: #dbeafe;
  min-width: 0;
  max-width: 100%;
}

.cube-controls {
  display: grid;
  gap: .9rem;
  grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1fr) minmax(260px, 1.2fr);
  max-width: 100%;
  min-width: 0;
  padding: 1rem;
}

.cube-controls .form-label,
.cube-builder .form-label {
  color: #9bd7ef;
}

.cube-source-list {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.cube-source-list .form-label {
  flex-basis: 100%;
}

.cube-source-list label:not(.form-label) {
  align-items: center;
  background: #14233a;
  border: 1px solid #29405f;
  border-radius: 6px;
  color: #e0f2fe;
  display: flex;
  font-weight: 700;
  gap: .5rem;
  padding: .5rem .65rem;
}

.cube-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.cube-freeze-toggle {
  align-content: start;
  display: grid;
  gap: .35rem;
}

.cube-switch {
  align-items: center;
  background: #14233a;
  border: 1px solid #29405f;
  border-radius: 6px;
  color: #e0f2fe;
  cursor: pointer;
  display: inline-flex;
  gap: .6rem;
  min-height: 38px;
  padding: .45rem .65rem;
}

.cube-switch input {
  position: absolute;
  opacity: 0;
}

.cube-switch span {
  background: #334155;
  border-radius: 999px;
  display: inline-block;
  height: 20px;
  position: relative;
  transition: background .16s ease;
  width: 38px;
}

.cube-switch span::before {
  background: #e2e8f0;
  border-radius: 999px;
  content: "";
  height: 16px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform .16s ease;
  width: 16px;
}

.cube-switch input:checked + span {
  background: #0f766e;
}

.cube-switch input:checked + span::before {
  transform: translateX(18px);
}

.cube-switch strong {
  font-size: .86rem;
}

.cube-filter-chip {
  background: #14233a;
  border: 1px solid #29405f;
  border-radius: 6px;
  display: grid;
  gap: .45rem;
  min-width: 260px;
  padding: .6rem;
}

.cube-filter-chip span {
  color: #99f6e4;
  font-size: .8rem;
  font-weight: 800;
}

.cube-metrics {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 100%;
  min-width: 0;
}

.cube-metric {
  padding: .9rem 1rem;
}

.cube-metric-search {
  display: grid;
  gap: .55rem;
}

.cube-metric-search .form-label {
  color: #9bd7ef;
  margin: .25rem 0 0;
}

.cube-metric span {
  color: #9bd7ef;
  display: block;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cube-metric strong {
  color: #fff;
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  margin-top: .35rem;
}

.cube-builder {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 100%;
  min-width: 0;
  padding: 1rem;
}

.cube-panel-title {
  align-items: center;
  border-bottom: 1px solid #24344d;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .8rem 1rem;
}

.cube-panel-title strong {
  color: #fff;
}

.cube-panel-title span {
  color: #99f6e4;
  font-size: .8rem;
  font-weight: 700;
}

.cube-export-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.cube-table-wrap {
  height: clamp(260px, 34vh, 420px);
  max-height: none;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  width: 100%;
}

.cube-table-wrap.detail {
  height: calc(100vh - 330px);
  min-height: 360px;
  max-height: 72vh;
  overflow: auto;
}

.cube-table-wrap table {
  color: #dbeafe;
  margin-bottom: 0;
  min-width: 100%;
  width: max-content;
}

.cube-table-wrap th {
  background: #111c30;
  color: #e0f2fe;
  position: sticky;
  top: 0;
  z-index: 1;
}

.cube-table-wrap .cube-detail-filter-row th {
  background: #14233a;
  top: 2.1rem;
  z-index: 2;
}

.cube-table-wrap td,
.cube-table-wrap th {
  border-color: #24344d;
  font-size: .78rem;
  padding: .32rem .4rem;
  white-space: nowrap;
}

.cube-table-wrap.detail td,
.cube-table-wrap.detail th {
  max-width: 112px;
  min-width: 72px;
}

.cube-table-wrap.detail td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cube-table-wrap tbody tr:nth-child(odd) td,
.cube-table-wrap tbody tr:nth-child(odd) th {
  background: #101b2f;
}

.cube-table-wrap tbody tr:nth-child(even) td,
.cube-table-wrap tbody tr:nth-child(even) th {
  background: #13223a;
}

.cube-table-wrap .cube-sticky-col {
  box-shadow: 1px 0 0 #24344d;
  left: 0;
  position: sticky;
}

.cube-table-wrap thead .cube-sticky-col {
  background: #111c30;
}

.cube-table-wrap .cube-detail-filter-row .cube-sticky-col {
  background: #14233a;
}

.cube-table-wrap tbody tr:nth-child(odd) .cube-sticky-col {
  background: #101b2f;
}

.cube-table-wrap tbody tr:nth-child(even) .cube-sticky-col {
  background: #13223a;
}

.cube-total-cell {
  color: #99f6e4;
  font-weight: 800;
}

.cube-detail-sort {
  align-items: center;
  background: transparent;
  border: 0;
  color: #e0f2fe;
  display: grid;
  font-size: .7rem;
  font-weight: 800;
  gap: .1rem;
  justify-items: center;
  line-height: 1.05;
  min-height: 2.05rem;
  min-width: 64px;
  padding: 0;
  text-align: center;
  white-space: normal;
}

.cube-detail-sort b {
  color: #99f6e4;
  font-size: .66rem;
  min-height: .7rem;
}

.cube-detail-source {
  color: #99f6e4;
  display: block;
  font-size: .6rem;
  text-transform: uppercase;
}

.cube-detail-name {
  color: #e0f2fe;
  display: block;
  max-width: 78px;
  overflow-wrap: anywhere;
}

.cube-reference-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: none;
  display: inline-flex;
  font-size: 0;
  height: 26px;
  justify-content: center;
  margin-left: .4rem;
  vertical-align: middle;
  width: 34px;
}

.cube-reference-button:hover {
  background: rgba(153, 246, 228, .12);
  border-color: rgba(153, 246, 228, .55);
}

.cube-reference-button::before {
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 86'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='10' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 43 C30 16 54 6 80 17 C95 23 108 34 116 43 C104 56 90 67 74 72 C47 80 25 68 8 43Z'/%3E%3Ccircle cx='64' cy='43' r='22'/%3E%3Cpath d='M81 60 L104 78'/%3E%3C/g%3E%3Ccircle cx='64' cy='43' r='8' fill='%23ffffff'/%3E%3C/svg%3E");
  content: "";
  display: block;
  height: 18px;
  width: 26px;
}

.cube-reference-icon {
  display: none;
}

.cube-detail-modal .modal-dialog {
  height: calc(100vh - 2rem);
  max-height: calc(100vh - 2rem);
  max-width: calc(100vw - 2rem);
}

.cube-detail-modal .modal-content {
  background: #0f172a;
  border: 1px solid #24344d;
  color: #dbeafe;
  height: 100%;
}

.cube-detail-modal .modal-header {
  border-bottom-color: #24344d;
}

.cube-modal-kicker {
  color: #99f6e4;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}

.cube-modal-tabs {
  border-bottom-color: #24344d;
}

.cube-modal-tabs .nav-link {
  color: #9bd7ef;
  font-weight: 800;
}

.cube-modal-tabs .nav-link.active {
  background: #14233a;
  border-color: #24344d #24344d #14233a;
  color: #fff;
}

.cube-modal-content {
  background: #14233a;
  border: 1px solid #24344d;
  border-top: 0;
  height: calc(94vh - 150px);
  padding: .9rem;
}

.cube-modal-summary {
  color: #99f6e4;
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.cube-modal-table-wrap {
  height: calc(94vh - 230px);
  max-height: none;
  overflow: auto;
}

.cube-modal-table-wrap table {
  color: #dbeafe;
  margin-bottom: 0;
  width: max-content;
}

.cube-modal-table-wrap th {
  background: #111c30;
  color: #e0f2fe;
  position: sticky;
  top: 0;
}

.cube-modal-table-wrap td,
.cube-modal-table-wrap th {
  border-color: #24344d;
  font-size: .78rem;
  padding: .42rem .55rem;
  white-space: nowrap;
}

.cube-modal-empty {
  background: #0f172a;
  border: 1px solid #24344d;
  border-radius: 6px;
  color: #9bd7ef;
  font-weight: 700;
  padding: .9rem;
}

.cube-column-menu {
  max-height: 380px;
  min-width: 320px;
}

.tower-document-form {
  background: #f8fafc;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  padding: .85rem;
}

.tower-document-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(180px, .95fr) minmax(96px, .32fr) minmax(280px, 1.35fr);
}

.tower-document-catalog-field {
  max-width: 180px;
}

.tower-file-dropzone {
  align-items: center;
  background: #fff;
  border: 2px dashed #9fb2c8;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  display: grid;
  gap: .16rem;
  min-height: 92px;
  padding: .75rem;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.tower-file-dropzone input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.tower-file-dropzone strong {
  color: #172033;
  font-size: .9rem;
  font-weight: 900;
}

.tower-file-dropzone span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
}

.tower-file-dropzone small {
  color: #0f766e;
  font-size: .74rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tower-file-dropzone.is-dragging {
  background: #ecfdf5;
  border-color: #0f766e;
  transform: translateY(-1px);
}

.tower-file-dropzone.has-file {
  background: #f0fdfa;
  border-color: #0f766e;
}

.tower-document-editor {
  display: grid;
  gap: .35rem;
}

.tower-editor-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.tower-editor-toolbar button {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #172033;
  font-size: .8rem;
  font-weight: 800;
  min-height: 32px;
  padding: .25rem .55rem;
}

.tower-color-control {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #172033;
  display: inline-flex;
  font-size: .8rem;
  font-weight: 800;
  gap: .4rem;
  min-height: 32px;
  padding: .2rem .45rem;
}

.tower-table-size {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #172033;
  display: inline-flex;
  font-size: .8rem;
  font-weight: 800;
  gap: .35rem;
  min-height: 32px;
  padding: .2rem .45rem;
}

.tower-table-size input {
  border: 1px solid #d8e1ec;
  border-radius: 4px;
  font-weight: 800;
  height: 24px;
  padding: 0 .2rem;
  width: 48px;
}

.tower-color-control input {
  border: 0;
  height: 22px;
  padding: 0;
  width: 28px;
}

.tower-editor {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  min-height: 130px;
  overflow: auto;
  padding: .65rem;
}

.tower-editor:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 .18rem rgba(15, 118, 110, .16);
  outline: 0;
}

.tower-editor table {
  border-collapse: collapse;
  margin: .4rem 0;
  width: 100%;
}

.tower-editor td,
.tower-editor th {
  border: 1px solid #cfd8e3;
  padding: .35rem;
}

.tower-document-actions {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.tower-document-actions span {
  font-size: .84rem;
  font-weight: 800;
}

.tower-document-list {
  display: grid;
  gap: .6rem;
  margin-top: .85rem;
}

.tower-document-table td:nth-child(2),
.tower-document-table td:nth-child(3) {
  white-space: normal;
}

.tower-no-file {
  color: #64748b;
  font-size: .8rem;
  font-weight: 800;
}

@media (max-width: 768px) {
  .manual-hero {
    grid-template-columns: 1fr;
  }

  .manual-card-wide {
    grid-column: auto;
  }

  .manual-flow {
    grid-template-columns: 1fr;
  }

  .manual-screenshot-grid {
    grid-template-columns: 1fr;
  }

  .manual-screenshot img,
  .manual-screenshot-wide img {
    max-height: none;
  }

  .mock-filter,
  .mock-grid-head,
  .mock-grid-filter,
  .mock-grid-row {
    grid-template-columns: 1fr;
  }

  .mock-grid-head span,
  .mock-grid-filter span,
  .mock-grid-row span {
    border-right: 0;
    border-bottom: 1px solid #cfd8e3;
  }

  .results-toolbar,
  .results-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reference-phase-tools {
    grid-template-columns: 1fr;
  }

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

  .tower-document-grid {
    grid-template-columns: 1fr;
  }

  .tower-document-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .security-profile-create-form {
    grid-template-columns: 1fr;
  }

  .security-profile-edit-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .security-user-create-form,
  .security-user-edit-form,
  .security-user-fields {
    grid-template-columns: 1fr;
  }

  .security-user-fields label:nth-child(3),
  .security-user-fields label:nth-child(4) {
    grid-column: auto;
  }

  .security-profile-create-form .security-checkbox-list,
  .security-profile-edit-form .security-checkbox-list {
    height: auto;
    max-height: 260px;
  }

  .reference-timeline::before {
    left: 23px;
  }

  .reference-timeline-item {
    gap: .65rem;
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .reference-timeline-item.is-left .reference-timeline-card,
  .reference-timeline-item.is-right .reference-timeline-card {
    grid-column: 2;
  }

  .reference-timeline-node {
    grid-column: 1;
    grid-row: 1;
  }

  .reference-timeline-card::after {
    display: none;
  }

  .results-actions .form-select,
  .results-actions .btn {
    width: 100%;
  }

  .cube-hero,
  .cube-shell,
  .cube-builder,
  .cube-metrics {
    grid-template-columns: 1fr;
  }

  .cube-controls {
    position: static;
  }
}
