:root {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #17243b;
    background: #f4f7fb;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 242px;
    flex-shrink: 0;
    background: #19283f;
    color: #e6edf7;
    padding: 27px 16px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2768ef;
    color: white;
}

.sidebar-label {
    color: #8294af;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin: 56px 14px 15px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.nav-link.active {
    background: #354861;
    color: #fff;
    font-weight: 650;
}

.nav-link span {
    font-size: 21px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 20px 12px 0;
    color: #9cadc3;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #3dd598;
    border-radius: 50%;
}

.main-area {
    min-width: 0;
    flex: 1;
}

.topbar {
    height: 72px;
    padding: 0 38px;
    background: #fff;
    border-bottom: 1px solid #e7ecf3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 13px;
}

.topbar-brand {
    font-weight: 600;
}

.page-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 38px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.eyebrow {
    color: #3774ed;
    font-size: 11px;
    letter-spacing: 1.2px;
    font-weight: 750;
    margin-bottom: 10px;
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(25px, 3vw, 34px);
    margin-bottom: 8px;
}

h1, h2 {
    font-weight: 800;
    letter-spacing: -0.045em;
}

.page-heading p,
.panel-heading p {
    color: #78869b;
    font-size: 14px;
    margin-bottom: 0;
}

.btn {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    transition: background .15s, transform .15s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #1767ed;
    color: white;
}

.btn-primary:hover {
    background: #0d54ce;
}

.btn-secondary {
    background: white;
    color: #41516a;
    border-color: #dfe6f0;
}

.btn-secondary:hover {
    background: #f6f8fc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 22px;
}

.stat-card {
    background: white;
    border: 1px solid #e7edf5;
    border-radius: 13px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 17px;
    box-shadow: 0 3px 16px #19283f06;
}

.stat-icon {
    width: 49px;
    height: 49px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 25px;
    flex-shrink: 0;
}

.stat-blue {
    background: #e8f0ff;
    color: #1767ed;
}

.stat-green {
    background: #e2f8e9;
    color: #169b53;
}

.stat-yellow {
    background: #fff3d9;
    color: #d99308;
}

.stat-red {
    background: #ffe7e9;
    color: #db4555;
}

.stat-label {
    display: block;
    color: #75839a;
    font-size: 12px;
    margin-bottom: 5px;
}

.stat-card strong {
    font-weight: 800;
    letter-spacing: -0.05em;
}

.panel {
    background: white;
    border: 1px solid #e7edf5;
    border-radius: 13px;
    box-shadow: 0 3px 16px #19283f06;
}

.filters-panel {
    padding: 22px;
    margin-bottom: 22px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.field {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.field span {
    font-size: 12px;
    font-weight: 650;
}

.field input,
.field select {
    width: 100%;
    min-width: 0;
    height: 43px;
    padding: 0 12px;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    background: #fff;
    color: #253650;
    font-size: 13px;
}

.field input::placeholder {
    color: #9aa8ba;
}

.table-panel {
    overflow: hidden;
}

.panel-heading {
    padding: 24px 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.panel-heading h2 {
    font-size: 19px;
    letter-spacing: -.4px;
    margin-bottom: 5px;
}

#reservas-count {
    color: #8897aa;
    font-weight: 500;
}

.table-scroll {
    overflow-x: auto;
    padding: 0 24px;
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
}

thead {
    background: #f5f7fb;
    color: #6f7f96;
}

th {
    font-size: 11px;
    font-weight: 700;
    padding: 15px 13px;
}

td {
    padding: 16px 13px;
    border-bottom: 1px solid #edf1f6;
}

tbody tr:hover {
    background: #fafcff;
}

td:first-child {
    color: #8a99ac;
}

.guest-name {
    font-weight: 650;
    color: #253650;
}

.status {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-confirmada {
    color: #148348;
    background: #e2f7e9;
}

.status-pendiente {
    color: #aa7400;
    background: #fff3d5;
}

.status-cancelada {
    color: #c33d4c;
    background: #ffe7e9;
}

.status-unknown {
    color: #64748b;
    background: #f1f5f9;
}

.table-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid #dfe6f0;
    color: #2563eb;
    font-size: 12px;
    font-weight: 650;
}

.table-action:hover {
    background: #eff6ff;
}

.table-footer {
    padding: 20px 24px;
    color: #7b899d;
    font-size: 12px;
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
    color: #8795a8;
}

.feedback {
    margin: 0 24px 16px;
    padding: 13px 16px;
    border-radius: 8px;
    background: #fff1f2;
    color: #b42336;
    font-size: 13px;
}

.feedback-success {
    background: #ecfdf3;
    color: #067647;
}

.feedback-loading {
    background: #eff8ff;
    color: #175cd3;
}

.feedback[hidden] {
    display: none;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        padding: 14px 18px;
    }

    .brand {
        padding: 0;
    }

    .sidebar-label,
    .sidebar-bottom {
        display: none;
    }

    .sidebar-nav {
        margin-top: 12px;
    }

    .nav-link {
        padding: 10px 12px;
    }

    .topbar {
        height: 52px;
        padding: 0 18px;
    }

    .topbar-brand {
        display: none;
    }

    .page-content {
        padding: 22px 16px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid,
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .panel-heading {
        padding: 20px 16px;
    }

    .table-scroll {
        padding: 0 16px;
    }
}

/* ===== Ajustes de tipografía ===== */

:root {
    font-size: 15px;
}

/* Navegación */
.nav-link {
    font-size: 15px;
}

.sidebar-label,
.sidebar-bottom {
    font-size: 12px;
}

/* Encabezados */
h1 {
    font-size: clamp(28px, 3vw, 36px);
}

.panel-heading h2 {
    font-size: 21px;
}

/* Descripciones */
.page-heading p,
.panel-heading p {
    font-size: 15px;
}

/* Tarjetas estadísticas */
.stat-label {
    font-size: 14px;
}

.stat-card strong {
    font-size: 32px;
}

/* Formularios y filtros */
.field span {
    font-size: 13px;
}

.field input,
.field select {
    font-size: 14px;
}

/* Tabla */
table {
    font-size: 14px;
}

th {
    font-size: 12px;
}

td {
    padding: 17px 13px;
}

/* Estados */
.status {
    font-size: 12px;
}

/* Botones */
.btn {
    font-size: 14px;
}

.table-action {
    font-size: 13px;
}

/* Pie de tabla */
.table-footer {
    font-size: 13px;
}



/* ===== Detalle de reserva ===== */

.back-link {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 25px;
}

.back-link:hover {
    color: #1767ed;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
    gap: 22px;
    align-items: start;
}

.detail-panel {
    padding: 28px;
}

.detail-section-heading {
    border-bottom: 1px solid #edf1f6;
    padding-bottom: 22px;
    margin-bottom: 25px;
}

.detail-section-heading h2 {
    font-size: 19px;
    margin-bottom: 7px;
}

.detail-section-heading p {
    font-size: 13px;
    color: #8390a4;
    margin-bottom: 0;
}

.detail-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.detail-field span,
.detail-notes span {
    color: #8492a6;
    font-size: 13px;
}

.detail-field strong {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.detail-price {
    color: #1767ed;
    font-size: 21px !important;
}

.detail-notes {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #edf1f6;
}

.detail-notes p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.7;
}

.timeline {
    padding-left: 8px;
}

.timeline-item {
    display: flex;
    gap: 18px;
    padding-bottom: 30px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 15px;
    bottom: 0;
    width: 2px;
    background: #e7edf5;
}

.timeline-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1767ed;
    border: 3px solid #dce9ff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 7px;
}

.timeline-content p {
    font-size: 13px;
    color: #697a92;
    margin-bottom: 9px;
    line-height: 1.6;
}

.timeline-content time {
    color: #9ba7b8;
    font-size: 12px;
}

@media (max-width: 1000px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .detail-fields {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        padding: 20px;
    }
}


/* ===== Drawer nueva reserva ===== */

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(15 23 42 / 45%);
    z-index: 100;
}

.drawer-backdrop[hidden] {
    display: none;
}

.reserva-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(100%, 480px);
    height: 100dvh;
    background: #fff;
    z-index: 101;
    box-shadow: -15px 0 50px rgb(15 23 42 / 12%);
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
}

.reserva-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 28px;
    border-bottom: 1px solid #edf1f6;
}

.drawer-header h2 {
    margin: 0 0 8px;
    font-size: 23px;
}

.drawer-header p {
    margin: 0;
    font-size: 13px;
    color: #8390a4;
}

.drawer-close {
    background: #f3f6fa;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 9px;
    font-size: 25px;
    color: #64748b;
}

.drawer-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.drawer-body {
    padding: 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
    flex: 1;
}

.drawer-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.drawer-body textarea {
    width: 100%;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    padding: 12px;
    font: inherit;
    font-size: 14px;
    resize: vertical;
}

.drawer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 22px 28px;
    border-top: 1px solid #edf1f6;
}

.form-error {
    padding: 13px;
    border-radius: 8px;
    background: #fff1f2;
    color: #b42336;
    font-size: 13px;
    white-space: pre-line;
}

.form-error[hidden] {
    display: none;
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

@media (max-width: 500px) {
    .drawer-header,
    .drawer-body,
    .drawer-footer {
        padding: 20px;
    }

    .drawer-two-columns {
        grid-template-columns: 1fr;
    }
}

.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.btn-danger:hover {
    background: #ffe4e6;
}

/* ===== Iconos Lucide ===== */

.stat-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 2;
}

.btn,
.nav-link,
.table-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn {
    justify-content: center;
}

.nav-link {
    gap: 12px;
}

.btn svg,
.nav-link svg,
.table-action svg {
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    stroke-width: 2;
}

/* Botón actualizar */
#btn-actualizar svg,
#btn-nueva-reserva svg
{
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

