/* Miligram overrides */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
}

.top-nav-links,
.side-nav,
h1, h2, h3, h4, h5, h6 {
    font-family: "Raleway", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    color: #363637;
}

a {
    color:#2f85ae;
    -webkit-transition:all 0.2s linear;
    transition:all 0.2s linear;
}

a:hover,
a:focus,
a:active  {
    color:#2a6496;
    -webkit-transition:all 0.2s easeout;
    transition:all 0.2s ease-out;
}

.side-nav a,
.top-nav-links a,
th a,
.actions a {
    color: #606c76;
}

.side-nav a:hover,
.side-nav a:focus,
.actions a:hover,
.actions a:focus {
    color:#2f85ae;
}

/* Utility */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Main */
body {
    background: #f5f7fa;
}
.content {
    padding: 2rem;
    background: #ffffff;
    border-radius: 0.4rem;
    /* Thanks Stripe */
    box-shadow: 0 7px 14px 0 rgba(60, 66, 87, 0.1),
        0 3px 6px 0 rgba(0, 0, 0, 0.07);
}
.actions a {
    font-weight: bold;
    padding: 0 0.4rem;
}
th {
    white-space: nowrap;
}

/* Nav bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 112rem;
    padding: 2rem;
    margin: 0 auto 2rem;
}
.top-nav-title a {
    font-size: 2.4rem;
    color: #d33c43;
}
.top-nav-title span {
    color: #404041;
}
.top-nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.top-nav-links a {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid transparent;
}
.top-nav-title a,
.top-nav-links a {
    font-weight: bold;
}
.top-nav-links a.active {
    color: #d33c43;
    border-bottom-color: #d33c43;
}

/* Botones de acción en grupo (ficha de PMS, ejecuciones...) */
.actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
.actions-bar form,
.actions-bar .button {
    margin: 0;
}

.side-nav-item {
    display: block;
    padding: 0.5rem 0;
}

/* View action */
.view.content .text {
    margin-top: 1.2rem;
}
.related {
    margin-top: 2rem;
}

/* Flash messages */
.message {
    padding: 1rem;

    background: #eff8ff;
    color: #2779bd;

    border-color: #6cb2eb;
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    margin-bottom: 2rem;
}
.message.hidden {
    display: none;
}
.message.success {
    background: #e3fcec;
    color: #1f9d55;
    border-color: #51d88a;
}
.message.error {
    background: #fcebea;
    color: #cc1f1a;
    border-color: #ef5753;
}

/* Forms */
.help-text {
    display: block;
    color: #909090;
    font-size: 1.2rem;
    margin: -1.4rem 0 1.5rem;
}
.input.radio,
.input.checkbox {
    margin-bottom: 2.0rem;
}
.input.radio input,
.input.checkbox input {
    margin: 0;
}
.input.radio label,
.input.checkbox label {
    margin: 0;
    display: flex;
    align-items: center;
}
.input.radio label > input,
.input.checkbox label > input {
    margin-right: 1.0rem;
}
.input.radio label:first-of-type {
    margin-bottom: 2.0rem;
}

/* Tarjeta blanca compartida por los paneles de filtros/acciones y la tabla de datos */
.filters-panel,
.action-panel {
    margin: 0 0 1rem;
    padding: 1.2rem 1.6rem;
    background: #ffffff;
    border: 1px solid #ebe9f1;
    border-radius: 0.75rem;
    box-shadow: 0 2px 6px 0 rgba(60, 66, 87, 0.06);
}

/* Filtros de listados (reservas/ventas): panel compacto, acotado en altura */
.filters-panel {
    max-height: 30vh;
    overflow-y: auto;
}
/* Milligram pone las labels a 2rem/700/margin 2rem y los inputs a 3.8rem de
   alto con 1.5rem de margen -- reventaría cualquier intento de hacerlo
   compacto, así que se pisa aquí, acotado al panel de filtros. */
.filters-panel label {
    display: block;
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
    color: #a5a3ae;
}
.filters-panel input,
.filters-panel select {
    height: 3.1rem;
    width: 100%;
    margin-bottom: 0;
    padding: 0.3rem 0.8rem;
    font-size: 1.25rem;
    box-sizing: border-box;
}
.filters-panel .input {
    min-width: 0;
    margin: 0;
}
/* Todos los filtros (PMS/hotel/id de reserva y cada fecha) viven en una
   única rejilla, así todas las columnas miden lo mismo y todas las celdas
   quedan a la misma altura, tengan o no etiqueta encima. */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1rem 1.5rem;
}
.filter-cell {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    min-height: 5.2rem;
}
.filter-date-group label {
    margin-bottom: 0.3rem;
}
.filter-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.filter-date-range input {
    width: 0;
    flex: 1 1 auto;
}
.filters-panel .actions-bar {
    justify-content: flex-end;
    margin: 1rem 0 0 !important;
    padding-top: 1rem;
    border-top: 1px solid #ebe9f1;
}
.filters-panel .button,
.filters-panel button {
    height: 3.1rem;
    line-height: 3.1rem;
    padding: 0 2rem;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Tarjeta de la tabla de datos: sin margen lateral propio, para que quede
   en línea con la cabecera y el resto del contenido (que ya trae su
   propio padding vía .container/.column). */
.data-table-wrap {
    margin: 0 0 3rem;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 6px 0 rgba(60, 66, 87, 0.06);
    overflow: hidden;
}
.data-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 1.1rem 1.6rem;
    border-bottom: 1px solid #ebe9f1;
}
.data-card-header h4 {
    margin: 0;
    font-size: 1.5rem;
    color: #5e5873;
}
.data-card-header .muted,
.data-card-footer .muted {
    color: #a5a3ae;
    font-size: 1.1rem;
    margin: 0;
}
.data-card-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.data-card-header .button {
    height: 3.1rem;
    line-height: 3.1rem;
    padding: 0 1.8rem;
    font-size: 1rem;
    margin: 0;
}
.action-panel h4 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #5e5873;
}
.data-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.6rem;
    border-top: 1px solid #ebe9f1;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
}
.table-modern thead th {
    background: #f8f7fa;
    color: #a5a3ae;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: .04em;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #ebe9f1;
    white-space: nowrap;
}
.table-modern tbody td {
    padding: 0.5rem 1rem;
    font-size: 1.15rem;
    color: #6e6b7b;
    border-bottom: 1px solid #f1f0f2;
    white-space: nowrap;
    transition: background-color .1s ease-in-out;
}
.table-modern tbody tr:last-child td {
    border-bottom: none;
}
.table-modern tbody tr:hover td {
    background: #e6e7f0;
}
.cell-truncate {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges (chips de estado, al estilo de un panel de admin) */
.badge {
    display: inline-block;
    padding: 0.2em 0.8em;
    border-radius: 50rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-success { background: #e3f9e8; color: #28c76f; }
.badge-secondary { background: #f1f0f2; color: #82868b; }
.badge-danger { background: #fbe4e5; color: #ea5455; }

/* Paginator: píldoras, estilo panel de admin */
.paginator {
    text-align: right;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.4rem;
}
.pagination li {
    margin: 0;
}
.pagination a,
.pagination li > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    height: 2.8rem;
    padding: 0 0.7rem;
    border-radius: 50rem;
    font-size: 1.1rem;
    color: #6e6b7b;
    border: 1px solid #ebe9f1;
}
.pagination a:hover {
    background: #f8f7fa;
    color: #7367f0;
    border-color: #7367f0;
}
.pagination .active a,
.pagination .active span {
    background: #7367f0;
    border-color: #7367f0;
    color: #ffffff;
}
.pagination .prev.disabled a,
.pagination .next.disabled a,
.prev.disabled a,
.next.disabled a {
    cursor: not-allowed;
    opacity: .4;
}
.pagination .prev.disabled a:hover,
.pagination .next.disabled a:hover {
    background: transparent;
    color: #6e6b7b;
    border-color: #ebe9f1;
}
.asc:after {
    content: " \2193";
}
.desc:after {
    content: " \2191";
}

/* Error */
.error-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
}

/* Caja centrada para formularios sueltos (login) */
.form-box {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
}

@media screen and (max-width: 640px) {
    .top-nav {
        margin: 0 auto;
        padding: 1.5rem;
    }
    .top-nav-links {
        width: 100%;
        justify-content: flex-start;
    }
    .top-nav-links a {
        margin: 0.5rem 1.5rem 0 0;
    }
    .side-nav {
        margin-bottom: 1rem;
    }
    .heading {
        margin-bottom: 1rem;
    }
    .side-nav-item {
        display: inline;
        margin: 0 1.5rem 0 0;
    }
    .asc:after {
        content: " \2192";
    }
    .desc:after {
        content: " \2190";
    }
    .container {
        padding: 0 1.2rem;
    }
    .button {
        padding: 0 1.6rem;
    }
}
