/*
 * Ajustes exclusivos para escritorio del panel.
 *
 * Esta capa se carga después de los estilos históricos y no modifica la
 * experiencia móvil. Centraliza densidad, jerarquía y alineación visual de
 * Solicitudes, Historial y Configuración sin tocar sus hooks funcionales.
 */
@media (min-width: 821px) {
  .panel-page {
    background:
      radial-gradient(circle at 86% -12%, #fbe9f7 0, transparent 29rem),
      #fbf9fc !important;
  }

  .panel-page .panel-header {
    height: 72px;
    padding: 0 max(28px, calc((100% - 1320px) / 2));
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 0 #eadfeb;
  }

  .panel-page .panel-header::before {
    height: 8px;
  }

  .panel-page .panel-header .panel-brand {
    display: inline-flex;
    align-items: center;
    width: 160px;
    min-width: 160px;
    margin-top: 5px;
  }

  .panel-page .panel-header .panel-brand img {
    display: block;
    width: 154px;
    max-height: 30px;
  }

  .panel-page .panel-header nav {
    align-items: center;
    gap: 4px;
    margin-top: 5px;
  }

  .panel-page .panel-header nav .panel-nav-link,
  .panel-page .panel-header .guest-nav-name {
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #69556e;
    font-size: 12px;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
  }

  .panel-page .panel-header nav .panel-nav-link:hover {
    background: #fff4fb;
    color: #79066d;
  }

  .panel-page .panel-header nav .panel-nav-link.active {
    border-color: #f0c4e3;
    background: linear-gradient(110deg, #faeefa, #fff1f8);
    color: #79066d;
  }

  .panel-page .panel-header nav .panel-nav-utility {
    color: #846d88;
  }

  .panel-page .panel-header nav .panel-nav-logout {
    margin-left: 5px;
    border-color: #eadfeb;
    background: #fff;
  }

  .panel-page .wrap {
    width: min(1320px, calc(100% - 48px));
    margin: 28px auto 38px;
  }

  .panel-page .card {
    border-color: #eadfeb;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(77, 23, 64, .055);
  }

  .panel-page .metrics-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(156px, 178px));
    gap: 10px;
    width: fit-content;
    margin: 0 0 17px;
  }

  .panel-page .metrics-cards article {
    min-height: 78px;
    padding: 13px 15px;
    border: 1px solid #eadfeb;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #fff9fd);
    box-shadow: 0 6px 16px rgba(77, 23, 64, .035);
  }

  .panel-page .metrics-cards span {
    font-size: 10px;
    letter-spacing: .08em;
  }

  .panel-page .metrics-cards strong {
    margin: 3px 0 1px;
    font-size: 23px;
    line-height: 1;
  }

  .panel-page .metrics-cards small {
    font-size: 10px;
  }

  .panel-page .page-head {
    min-height: 54px;
    align-items: flex-end;
    gap: 20px;
    margin: 0 0 14px;
  }

  .panel-page .page-head h1 {
    margin: 3px 0 2px;
    color: #25123d;
    font-size: 27px;
    line-height: 1.08;
    letter-spacing: -.035em;
  }

  .panel-page .page-head p {
    font-size: 12px;
    line-height: 1.35;
  }

  .panel-page .page-head > form {
    flex: 0 0 auto;
    margin: 0;
  }

  .panel-page .history-entry,
  .panel-page .danger-button {
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid #ecd6e7;
    border-radius: 8px;
    background: #fff7fc;
    color: #8a176f;
    box-shadow: none;
    font-size: 12px;
  }

  .panel-page .danger-button {
    border-color: #f0ccd5;
    background: #fff8fa;
    color: #a02f54;
  }

  .panel-page .history-entry:hover,
  .panel-page .danger-button:hover {
    background: #fbedf8;
  }

  /* Bandeja: acciones y datos relevantes permanecen en una única fila. */
  .panel-page .list {
    margin: 0;
    border-radius: 14px;
  }

  .panel-page .list h2 {
    min-height: 52px;
    padding: 16px 18px;
    color: #311841;
    font-size: 15px;
    line-height: 20px;
  }

  .panel-page .list .table-scroll {
    border-radius: 0 0 14px 14px;
  }

  .panel-page .list .requests-table {
    min-width: 1100px;
  }

  .panel-page .list .requests-table th {
    padding: 10px 13px;
    color: #8d748b;
    font-size: 10px;
    letter-spacing: .09em;
  }

  .panel-page .list .requests-table td {
    padding: 11px 13px;
    color: #38203d;
    font-size: 12px;
  }

  .panel-page .list .requests-table tbody tr {
    height: 66px;
  }

  .panel-page .list .requests-table th:first-child,
  .panel-page .list .requests-table td:first-child {
    width: 86px;
    min-width: 86px;
    padding-left: 18px;
  }

  .panel-page .list .requests-table th:nth-child(2),
  .panel-page .list .requests-table td:nth-child(2) {
    min-width: 220px;
  }

  .panel-page .list .requests-table th:nth-child(3),
  .panel-page .list .requests-table td:nth-child(3) {
    width: 104px;
  }

  .panel-page .list .requests-table th:nth-child(4),
  .panel-page .list .requests-table td:nth-child(4) {
    width: 132px;
  }

  .panel-page .list .requests-table th:nth-child(5),
  .panel-page .list .requests-table td:nth-child(5) {
    width: 150px;
  }

  .panel-page .list .requests-table th:nth-child(6),
  .panel-page .list .requests-table td:nth-child(6) {
    width: 268px;
    padding-right: 18px;
  }

  .panel-page .list .registered-cell {
    color: #7f6a80;
    font-size: 11px;
    white-space: nowrap;
  }

  .panel-page .list .requests-table td:nth-child(2) > b {
    margin-bottom: 3px;
    color: #2b1737;
    font-size: 14px;
    letter-spacing: .01em;
  }

  .panel-page .list .requests-table small {
    color: #8a758b;
    font-size: 10px;
    line-height: 1.35;
  }

  .panel-page .list .auto-note {
    margin-top: 3px !important;
    font-size: 10px !important;
  }

  .panel-page .list .ip-value {
    color: #705a73;
    font-size: 11px;
  }

  .panel-page .list .status,
  .panel-page .list .presence-status {
    padding: 5px 8px;
    font-size: 10px;
  }

  .panel-page .request-actions {
    gap: 5px;
  }

  .panel-page .request-actions .assign {
    gap: 5px;
  }

  .panel-page .request-actions .assign select {
    min-width: 132px;
    height: 34px;
    padding: 6px 27px 6px 9px;
    border-color: #dfd0df;
    border-radius: 8px;
    font-size: 11px;
  }

  .panel-page .request-actions .icon-button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 16px;
  }

  .panel-page .panel-meta {
    min-height: 38px;
    margin-top: 8px;
    padding: 7px 10px;
    border: 1px solid #eadfeb;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    font-size: 11px;
  }

  .panel-page .panel-meta button {
    min-height: 26px;
    padding: 5px 8px;
    border: 1px solid #eadfec;
    border-radius: 7px;
    font-size: 11px;
  }

  /* Historial: mantiene los días compactos y los detalles visualmente unidos. */
  .panel-page .history-head {
    margin-bottom: 14px;
  }

  .panel-page .history-days {
    display: grid;
    gap: 9px;
  }

  .panel-page .history-day {
    overflow: hidden;
    border: 1px solid #eadfeb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(77, 23, 64, .035);
  }

  .panel-page .history-day summary {
    min-height: 48px;
    padding: 0 16px;
    background: #fffafd;
  }

  .panel-page .history-day[open] summary {
    border-bottom: 1px solid #eee3ed;
  }

  .panel-page .history-day .requests-table {
    min-width: 770px;
  }

  .panel-page .history-day .requests-table th,
  .panel-page .history-day .requests-table td {
    padding: 10px 14px;
    font-size: 12px;
  }

  .panel-page .history-day .requests-table td:first-child {
    min-width: 88px;
  }

  /* Configuración: una columna lateral limpia y contenido con aire suficiente. */
  .panel-page .settings-layout {
    grid-template-columns: 208px minmax(0, 1fr);
    gap: 22px;
  }

  .panel-page .settings-menu {
    position: sticky;
    top: 18px;
    padding: 10px;
    border-radius: 13px;
  }

  .panel-page .settings-label {
    padding: 3px 8px 8px;
  }

  .panel-page .settings-menu a {
    min-height: 38px;
    margin: 2px 0;
    padding: 9px 10px;
    font-size: 12px;
  }

  .panel-page .settings-content {
    width: min(100%, 1050px);
  }

  .panel-page .integration-card,
  .panel-page .users-card,
  .panel-page .sede-sheet,
  .panel-page .new-sede-sheet {
    padding: 22px;
  }

  .panel-page .integration-title,
  .panel-page .users-title {
    margin-bottom: 16px;
  }

  .panel-page .integration-title h2,
  .panel-page .users-title h2 {
    margin-bottom: 3px;
    font-size: 20px;
  }

  .panel-page .telegram-fields {
    gap: 10px;
  }

  .panel-page .telegram-messages {
    margin-top: 16px;
    padding-top: 14px;
  }

  .panel-page .telegram-messages article {
    padding: 11px 12px;
  }

  .panel-page .telegram-actions {
    margin-top: 13px;
  }

  .panel-page .user-create {
    gap: 10px;
  }

  .panel-page .users-list {
    margin-top: 17px;
    padding-top: 14px;
  }

  .panel-page .user-row {
    min-height: 52px;
    padding: 10px 12px;
  }

  /* Sedes y prefijos comparten la densidad y el acabado de la bandeja. */
  .panel-page .sedes-view {
    max-width: 100%;
  }

  .panel-page .sedes-toolbar,
  .panel-page .sheet-title {
    margin-bottom: 14px;
  }

  .panel-page .sedes-toolbar h2,
  .panel-page .sheet-title h2 {
    font-size: 21px;
  }

  .panel-page .sedes-table th {
    padding: 10px 14px;
    font-size: 10px;
  }

  .panel-page .sedes-table td {
    padding: 12px 14px;
    font-size: 12px;
  }

  .panel-page .sede-sheet {
    max-width: 920px;
  }

  .panel-page .office-tabs {
    margin: 15px 0;
  }

  .panel-page .sheet-form {
    gap: 12px 14px;
  }

  .panel-page .prefix-add {
    display: grid;
    grid-template-columns: minmax(160px, 245px) minmax(180px, 1fr) auto;
    max-width: 700px;
    gap: 8px;
  }

  .panel-page .prefix-add input,
  .panel-page .prefix-add button {
    height: 38px;
  }

  .panel-page .prefix-table {
    margin-top: 10px;
    box-shadow: none;
  }

  .panel-page .prefix-table th {
    padding: 9px 12px;
  }

  .panel-page .prefix-table td {
    padding: 9px 12px !important;
  }

  .panel-page .prefix-table .table-actions {
    width: 108px !important;
  }

  .panel-page .prefix-edit-link,
  .panel-page .prefix-delete-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .panel-page .detail-add-office {
    margin: 0 0 10px;
    font-size: 12px;
  }

  .panel-page input,
  .panel-page select {
    min-height: 38px;
    padding: 9px 11px;
    font-size: 13px;
  }

  .panel-page button,
  .panel-page .button {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 12px;
  }

  .panel-page button:focus-visible,
  .panel-page a:focus-visible,
  .panel-page input:focus-visible,
  .panel-page select:focus-visible {
    outline: 3px solid rgba(8, 199, 187, .42);
    outline-offset: 2px;
  }

  /* Los controles con icono conservan una huella visual más pequeña. */
  .panel-page .request-actions .icon-button {
    min-height: 34px;
  }

  .panel-page .user-delete,
  .panel-page .delete-office-form button,
  .panel-page .prefix-edit-link,
  .panel-page .prefix-delete-icon {
    min-height: 32px;
  }
}
