html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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 var(--msi-quantum-blue);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
:root {
  --msi-quantum-blue: #2457FF;
  --msi-ice-glass: #DFF7FF;
}

body {
  background: linear-gradient(180deg, rgba(223, 247, 255, 0.52) 0, #fff 13rem);
  color: #212529;
}

a {
  color: var(--msi-quantum-blue);
}

.btn-primary {
  --bs-btn-bg: var(--msi-quantum-blue);
  --bs-btn-border-color: var(--msi-quantum-blue);
  --bs-btn-hover-bg: var(--msi-quantum-blue);
  --bs-btn-hover-border-color: var(--msi-quantum-blue);
  --bs-btn-active-bg: var(--msi-quantum-blue);
  --bs-btn-active-border-color: var(--msi-quantum-blue);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--msi-quantum-blue);
}

.msi-navbar {
  background-color: rgba(223, 247, 255, 0.82);
  backdrop-filter: blur(10px);
}

.msi-navbar > .container {
  gap: 0.75rem;
}

.msi-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-right: 0.75rem;
  padding-block: 0.25rem;
}

.msi-brand-logo {
  display: block;
  width: auto;
  height: 3.25rem;
  max-width: 8rem;
  object-fit: contain;
}

.msi-login-shell {
  padding-block: clamp(1rem, 5vh, 4rem);
}

.msi-login-card {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--msi-ice-glass);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1rem 2.5rem rgba(36, 87, 255, 0.1);
}

.msi-login-logo {
  display: inline-block;
  width: min(15rem, 72vw);
  height: auto;
  max-height: 15rem;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .msi-navbar > .container {
    align-items: center;
  }

  .msi-brand-logo {
    height: 2.75rem;
    max-width: 6.75rem;
  }

  .msi-navbar .navbar-nav {
    width: 100%;
    margin-left: 0 !important;
  }

  .msi-login-card {
    border-radius: 0.75rem;
  }
}
.msi-alert-region { position: relative; z-index: 1040; margin-bottom: 1rem; }
.msi-global-alert { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-left: 4px solid #2457ff; box-shadow: 0 8px 24px rgba(31, 67, 139, .12); }
.msi-processing-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; background: rgba(18, 35, 64, .38); backdrop-filter: blur(3px); }
.msi-processing-overlay[hidden] { display: none !important; }
.msi-processing-dialog { display: flex; align-items: center; gap: .9rem; width: min(100%, 430px); padding: 1.2rem 1.35rem; border: 1px solid #a8dff1; border-radius: 16px; background: linear-gradient(145deg, #fff, #dff7ff); color: #1f2f46; box-shadow: 0 22px 60px rgba(16, 39, 82, .24); }
form[data-prevent-double-submit="true"] button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }

.msi-attachment-preview-dialog {
  width: 90vw;
  max-width: 90vw;
  margin: 5vh auto;
}

.msi-attachment-preview-dialog .modal-content {
  height: 90vh;
  overflow: hidden;
}

.msi-attachment-preview-dialog .modal-body {
  min-height: 0;
  overflow: auto;
}

.msi-attachment-preview-frame {
  min-height: 18rem;
  border: 1px solid #b9ddea;
  border-radius: .5rem;
  overflow: hidden;
  background: #f8fcff;
}

.msi-attachment-preview-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  border: 0;
  background: #fff;
}

.ticket-public-comment {
  border: 1px solid #b9dfc1;
  background: #effaf1;
}

.ticket-internal-note {
  border: 1px solid #b9ddea;
  border-left: 4px solid #2457ff;
  background: #dff7ff;
}

@media (max-width: 575.98px) {
  .msi-attachment-preview-dialog {
    width: 96vw;
    max-width: 96vw;
    margin: 2vh auto;
  }

  .msi-attachment-preview-dialog .modal-content {
    height: 96vh;
  }
}

.msi-attachment-preview-dialog .modal-body { overflow: hidden; }

.msi-attachment-preview-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 5;
  padding: .65rem;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 12px rgba(18, 35, 64, .2);
}

.msi-attachment-preview-loading {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: #2457ff;
}

.msi-attachment-preview-frame { background: #fff; }

.msi-attachment-preview-frame iframe,
.msi-attachment-preview-frame img,
.msi-attachment-preview-frame pre {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  border: 0;
  background: #fff;
}

.msi-attachment-preview-frame img { object-fit: contain; }

.msi-attachment-preview-frame pre {
  margin: 0;
  padding: 1rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #1f2f46;
}

.msi-attachment-preview-dialog [data-attachment-preview-unavailable] {
  width: min(100%, 34rem);
}
.msi-password-field .msi-password-toggle {
  width: 3rem;
  padding: 0.375rem 0.75rem;
  color: #495057;
  border-color: #ced4da;
  background-color: #fff;
}

.msi-password-field .msi-password-toggle:hover,
.msi-password-field .msi-password-toggle:focus-visible {
  color: var(--msi-quantum-blue);
  background-color: var(--msi-ice-glass);
  border-color: var(--msi-quantum-blue);
}

.msi-password-toggle svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msi-password-toggle svg[hidden] {
  display: none;
}
.bi {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -0.125em;
  fill: currentColor;
}

.msi-navbar .nav-link,
.msi-session-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.msi-session-action .bi {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.msi-user-identity {
  max-width: 13rem;
  line-height: 1.15;
}

.msi-user-identity strong,
.msi-user-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-mobile-card {
  position: relative;
  min-width: 0;
  border-color: #cfeaf4;
  box-shadow: 0 .25rem .8rem rgba(18, 35, 64, .06);
}

.ticket-mobile-card .card-body,
.ticket-mobile-card dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-mobile-card .stretched-link::after {
  border-radius: var(--bs-card-border-radius);
}

.msi-detail-mobile-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
}

.msi-detail-mobile-nav .btn[aria-expanded="true"] {
  color: #fff;
  background: var(--msi-quantum-blue);
  border-color: var(--msi-quantum-blue);
}

.msi-audit-table {
  font-size: .875rem;
}

.msi-audit-table th,
.msi-audit-table td {
  padding: .4rem .5rem;
  vertical-align: top;
}

.msi-audit-card {
  background: #fff;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .ticket-filter-collapse.collapse {
    display: block !important;
  }
}

@media (max-width: 991.98px) {
  body {
    overflow-x: clip;
  }

  .msi-navbar > .container {
    align-items: center;
  }

  .msi-navbar .navbar-collapse {
    width: 100%;
    padding: .65rem 0 .25rem;
  }

  .msi-navbar .navbar-nav,
  .msi-session-navigation {
    width: 100%;
    margin-left: 0 !important;
  }

  .msi-navbar .nav-link,
  .msi-session-action,
  .msi-session-form {
    width: 100%;
  }

  .msi-navbar .nav-link,
  .msi-session-action {
    justify-content: flex-start;
    min-height: 2.75rem;
  }

  .msi-session-navigation {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(36, 87, 255, .15);
  }

  .msi-user-identity {
    width: 100%;
    max-width: 100%;
  }

  .msi-ticket-detail .msi-detail-section {
    display: none;
  }

  .msi-ticket-detail[data-mobile-group="summary"] .msi-detail-summary,
  .msi-ticket-detail[data-mobile-group="followup"] .msi-detail-followup,
  .msi-ticket-detail[data-mobile-group="history"] .msi-detail-history {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .ticket-filter-form {
    padding: .75rem;
  }

  .ticket-filter-collapse .row > * {
    min-width: 0;
  }

  .ticket-mobile-card dl {
    margin-bottom: .5rem;
  }

  .ticket-mobile-card dt,
  .ticket-mobile-card dd {
    margin-bottom: .25rem;
  }

  .msi-detail-mobile-nav {
    font-size: .875rem;
  }

  .msi-detail-mobile-nav .btn {
    padding-inline: .35rem;
  }

  .msi-ticket-detail .card-body {
    padding: .9rem;
  }

  .pagination {
    gap: .2rem;
  }

  .pagination .page-link {
    padding: .45rem .6rem;
  }
}

@media (max-width: 991.98px) {
  .msi-detail-mobile-nav { gap: .25rem; font-size: .8rem; }
  .msi-detail-mobile-nav .btn { min-width: 0; padding: .45rem .2rem; white-space: normal; }
  .msi-audit-card { font-size: .875rem !important; }
  .msi-audit-card:nth-of-type(even) { background: #f4faff; }
  .msi-audit-card-fields {
    display: grid;
    grid-template-columns: minmax(6.7rem, 38%) minmax(0, 62%);
    gap: .3rem .55rem;
  }
  .msi-audit-card-fields dt { color: #5f6b7a; font-size: .78rem; }
  .msi-audit-card-fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
  .ticket-filter-collapse .btn { white-space: normal; }
}

@media (min-width: 992px) {
  .msi-audit-table {
    width: 100%;
    table-layout: fixed;
  }
  .msi-audit-table th,
  .msi-audit-table td {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .msi-audit-table th:nth-child(1) { width: 15%; }
  .msi-audit-table th:nth-child(2) { width: 17%; }
  .msi-audit-table th:nth-child(3) { width: 11%; }
  .msi-audit-table th:nth-child(4) { width: 17%; }
  .msi-audit-table th:nth-child(5) { width: 40%; }
}

@media (min-width: 1200px) {
  .ticket-results-table {
    width: 100%;
    table-layout: fixed;
    font-size: .9rem;
  }
  .ticket-results-table th,
  .ticket-results-table td {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .ticket-results-table th:nth-child(1) { width: 15%; }
  .ticket-results-table th:nth-child(2) { width: 10%; }
  .ticket-results-table th:nth-child(3) { width: 9%; }
  .ticket-results-table th:nth-child(4) { width: 10%; }
  .ticket-results-table th:nth-child(5) { width: 7%; }
  .ticket-results-table th:nth-child(6),
  .ticket-results-table th:nth-child(7),
  .ticket-results-table th:nth-child(8) { width: 10%; }
  .ticket-results-table th:nth-child(9) { width: 11%; }
  .ticket-results-table th:nth-child(10) { width: 8%; }
  .ticket-results-table th { overflow-wrap: normal; word-break: normal; }
  .ticket-results-table td:first-child,
  .ticket-results-table td:last-child .btn { white-space: nowrap; }
}
/* MSI-UX-03: composición del perfil Solicitante. */
.requester-ticket-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: .85rem;
}

.requester-ticket-card {
  margin-bottom: 0 !important;
  border-color: #a8dff1;
}

.requester-status-summary {
  padding: 1rem 1.1rem;
  border: 1px solid #a8dff1;
  border-radius: .75rem;
  background: #dff7ff;
  color: #1f2f46;
}

.requester-attention-badge {
  border: 1px solid #d6aa2e;
  background: #fff4c2;
  color: #5d4600;
}

.requester-confirmation-actions .btn,
.requester-empty-state .btn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

@media (max-width: 575.98px) {
  .requester-confirmation-actions .btn {
    width: 100%;
  }
}