:root {
    --reservas-bg: #181825;
    --reservas-text: #f5f4fb;
    --reservas-muted: #a9abc0;
    --reservas-border: rgba(255, 255, 255, 0.08);
    --reservas-accent: #FF6709;
    --reservas-shadow: 0 24px 44px rgba(9, 9, 18, 0.34);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

body {
    margin: 0;
    font-family: var(--meseros-font-family);
    color: var(--reservas-text);
    background:
        radial-gradient(circle at top left, rgba(255, 103, 9, 0.08), transparent 20rem),
        radial-gradient(circle at bottom right, rgba(127, 114, 255, 0.12), transparent 24rem),
        var(--reservas-bg);
    transition: background 0.25s ease, color 0.25s ease;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.reservas-shell {
    min-height: 100vh;
    display: flex;
    gap: 1.4rem;
    padding: 1rem;
}

.reservas-main {
    flex: 1;
    min-width: 0;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(35, 35, 52, 0.98), rgba(28, 28, 41, 0.98));
    box-shadow: var(--reservas-shadow);
    padding: 1.6rem;
}

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

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reservas-title {
    font-size: clamp(1.75rem, 2.4vw, 2.15rem);
    font-weight: 800;
}

.toolbar-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.toolbar-label {
    color: var(--reservas-muted);
    font-size: 0.92rem;
}

.toolbar-select,
.mini-select,
.toolbar-search input {
    border: 1px solid var(--reservas-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #f3f3fb;
}

.toolbar-select,
.mini-select {
    min-height: 42px;
    padding: 0.65rem 2.1rem 0.65rem 0.9rem;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #d5d6e8 50%), linear-gradient(135deg, #d5d6e8 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1rem), calc(100% - 12px) calc(1rem);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.toolbar-search-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    width: min(100%, 420px);
}

.toolbar-filter-btn {
    width: 46px;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    color: var(--reservas-text);
}

.toolbar-filter-btn svg,
.toolbar-search-icon svg {
    width: 18px;
    height: 18px;
}

.toolbar-search {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 0.3rem 0.9rem 0.3rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
}

.toolbar-search input {
    width: 100%;
    min-height: 44px;
    padding: 0;
    outline: none;
    border: 0;
    background: transparent;
    box-shadow: none;
    appearance: none;
}

.toolbar-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--reservas-muted);
}

.reservas-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.reservation-card {
    border-radius: 20px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(24, 24, 36, 0.96), rgba(20, 20, 30, 0.96));
    border: 1px solid var(--reservas-border);
    box-shadow: 0 16px 26px rgba(10, 10, 18, 0.16);
}

.reservation-card-create {
    min-height: 255px;
}

.create-box {
    min-height: 100%;
    border: 2px dashed rgba(255, 103, 9, 0.28);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem;
}

.create-reservation-image {
    width: 132px;
    height: 132px;
    object-fit: contain;
    display: block;
}

.btn-create-reservation {
    border: 1px solid rgba(255, 103, 9, 0.45);
    border-radius: 12px;
    padding: 0.72rem 1rem;
    background: transparent;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-create-reservation span {
    margin-left: 0.4rem;
    font-size: 1.1rem;
}

.reservation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.reservation-head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reservation-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-incoming {
    color: #ffbc6d;
    background: rgba(255, 103, 9, 0.1);
}

.status-confirmed {
    color: #ffd1b8;
    background: rgba(255, 103, 9, 0.14);
}

.status-completed {
    color: #8fc8ff;
    background: rgba(67, 182, 255, 0.14);
}

.mini-select {
    min-width: 72px;
    font-size: 0.9rem;
}

.icon-dots {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.icon-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d2d4e2;
}

.reservation-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 170px;
    gap: 0.9rem;
}

.guest-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
}

.guest-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 103, 9, 0.12);
    color: #ffd1b8;
    font-weight: 800;
}

.guest-line h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.38rem;
    color: var(--reservas-muted);
    font-size: 0.9rem;
}

.reservation-layout {
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.table-svg {
    width: 108px;
    height: 86px;
}

.table-svg circle,
.table-svg rect {
    fill: none;
    stroke: #FF6709;
    stroke-width: 4;
}

.reservation-meta {
    display: grid;
    gap: 0.3rem;
    color: #e3e5f3;
    font-size: 0.88rem;
}

.reservation-buttons {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
}

.reservation-buttons-full {
    margin-top: 0.9rem;
}

.action-btn {
    border-radius: 10px;
    padding: 0.72rem 1rem;
    font-weight: 700;
    border: 1px solid transparent;
    background: transparent;
    color: #ffffff;
    text-transform: uppercase;
}

.action-confirm {
    border-color: rgba(255, 103, 9, 0.4);
    background: rgba(255, 103, 9, 0.08);
}

.action-neutral {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.action-create-order {
    width: 100%;
    border-color: rgba(255, 103, 9, 0.4);
    background: rgba(255, 103, 9, 0.08);
}

.action-paid {
    width: 100%;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.reservas-pagination {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.page-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    color: #f3f3fb;
}

.page-track {
    width: min(100%, 180px);
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.page-progress {
    display: block;
    width: 56%;
    height: 100%;
    border-radius: inherit;
    background: rgba(255, 103, 9, 0.9);
}

.reservas-modal .modal-dialog {
    max-width: 360px;
}

.reservas-modal-content {
    border: 1px solid var(--reservas-border);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(35, 35, 52, 0.98), rgba(28, 28, 41, 0.98));
    box-shadow: 0 24px 44px rgba(9, 9, 18, 0.34);
}

.reservas-modal-header {
    border-bottom: 1px solid rgba(39, 34, 48, 0.08);
    padding: 1rem 1rem 0.5rem;
}

.reservas-modal-header .modal-title {
    font-size: 1.3rem;
    font-weight: 800;
}

.reservas-btn-close {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(39, 34, 48, 0.12);
    border-radius: 10px;
    background: rgba(39, 34, 48, 0.04);
    opacity: 1;
    filter: none;
    box-shadow: none;
}

.reservas-btn-close::before,
.reservas-btn-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: #2f2937;
}

.reservas-btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.reservas-btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.reservas-btn-close span {
    display: none;
}

.reservas-modal-body {
    padding: 0.75rem 1rem 1.1rem;
}

.reservation-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.35rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.mode-option {
    border: 0;
    border-radius: 12px;
    min-height: 46px;
    background: transparent;
    color: #5f5968;
    font-weight: 700;
    text-transform: uppercase;
}

.mode-option.mode-salon.is-active {
    background: #0f8a86;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 138, 134, 0.18);
}

.mode-option.mode-terraza.is-active {
    background: #FF6709;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(255, 103, 9, 0.18);
}

.modal-field + .modal-field {
    margin-top: 0.95rem;
}

.modal-field label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ececf7;
}

.modal-input,
.modal-select,
.guest-stepper {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #f4f4fb;
}

.modal-input,
.modal-select {
    padding: 0.8rem 0.95rem;
    outline: none;
}

.select-wrap {
    position: relative;
}

.modal-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #d5d6e8 50%), linear-gradient(135deg, #d5d6e8 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1.1rem), calc(100% - 12px) calc(1.1rem);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.guest-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.55rem;
}

.guest-stepper span {
    font-weight: 600;
}

.stepper-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1;
}

.stepper-btn.is-plus {
    background: rgba(255, 103, 9, 0.16);
    color: #ffffff;
}

.btn-modal-primary {
    width: 100%;
    margin-top: 1rem;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: #FF6709;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 16px 26px rgba(255, 103, 9, 0.24);
}

body.theme-light {
    --reservas-bg: #f3efe8;
    --reservas-text: #2c2734;
    --reservas-muted: #726b79;
    --reservas-border: rgba(60, 52, 75, 0.08);
    --reservas-shadow: 0 24px 44px rgba(180, 166, 148, 0.22);
    color-scheme: light;
}

body.theme-light {
    background:
        radial-gradient(circle at top left, rgba(255, 103, 9, 0.08), transparent 20rem),
        radial-gradient(circle at bottom right, rgba(255, 194, 121, 0.18), transparent 24rem),
        var(--reservas-bg);
}

body.theme-light .reservas-main,
body.theme-light .reservation-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 245, 240, 0.98));
}

body.theme-light .toolbar-select,
body.theme-light .mini-select,
body.theme-light .toolbar-filter-btn,
body.theme-light .sort-chip,
body.theme-light .action-neutral,
body.theme-light .action-paid,
body.theme-light .page-arrow {
    color: #3d3847;
    background-color: rgba(39, 34, 48, 0.04);
}

body.theme-light .toolbar-search,
body.theme-light .toolbar-search {
    color: #3d3847;
    background-color: rgba(39, 34, 48, 0.04);
}

body.theme-light .toolbar-search input {
    color: #3d3847;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none;
}

body.theme-light .btn-create-reservation {
    color: #5f5968;
    border-color: rgba(255, 103, 9, 0.35);
}

body.theme-light .reservas-modal-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 245, 240, 0.98));
}

body.theme-light .reservas-btn-close {
    border-color: rgba(39, 34, 48, 0.12);
    background: rgba(39, 34, 48, 0.04);
}

body.theme-light .reservation-mode-switch,
body.theme-light .modal-input,
body.theme-light .modal-select,
body.theme-light .guest-stepper {
    background: rgba(39, 34, 48, 0.04);
    color: #2c2734;
}

body.theme-light .modal-field label {
    color: #2c2734;
}

body.theme-light .mode-option {
    color: #5f5968;
}

body.theme-light .mode-option.mode-salon.is-active,
body.theme-light .mode-option.mode-terraza.is-active {
    color: #ffffff;
}

body.theme-light .reservas-modal-header {
    border-bottom-color: rgba(39, 34, 48, 0.08);
}

body.theme-light .stepper-btn {
    background: rgba(39, 34, 48, 0.08);
    color: #2c2734;
}

body.theme-light .reservation-layout {
    border-left-color: rgba(39, 34, 48, 0.08);
}

body.theme-light .guest-mark {
    background: rgba(255, 103, 9, 0.12);
    color: #FF6709;
}

body.theme-light .action-confirm,
body.theme-light .action-create-order {
    color: #5f5968;
    border-color: rgba(255, 103, 9, 0.35);
    background: rgba(255, 103, 9, 0.08);
}

body.theme-light .action-neutral,
body.theme-light .action-paid {
    color: #5f5968;
}

body.theme-light .status-confirmed {
    color: #FF6709;
    background: rgba(255, 103, 9, 0.12);
}

body.theme-light .contact-list,
body.theme-light .toolbar-label {
    color: #726b79;
}

body.theme-light .reservation-meta {
    color: #403a48;
}

body.theme-light .icon-dots span {
    background: #5b5662;
}

body.theme-light .page-track {
    background: rgba(39, 34, 48, 0.08);
}

body.theme-light {
    scrollbar-color: rgba(39, 34, 48, 0.18) transparent;
}

body.theme-light ::-webkit-scrollbar-thumb {
    background: rgba(39, 34, 48, 0.18);
}

@media (max-width: 1199.98px) {
    .reservation-content {
        grid-template-columns: 1fr;
    }

    .reservation-layout {
        padding-left: 0;
        padding-top: 0.8rem;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        align-items: flex-start;
    }
}

@media (max-width: 991.98px) {
    .reservas-shell {
        flex-direction: column;
        padding: 0.85rem;
    }

    .reservas-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left {
        flex-wrap: wrap;
    }

    .toolbar-search-wrap {
        width: 100%;
    }

    .reservas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .reservas-main {
        padding: 1.2rem;
        border-radius: 26px;
    }

    .reservation-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .toolbar-search-wrap {
        flex-wrap: wrap;
    }

    .toolbar-filter-btn,
    .toolbar-search {
        width: 100%;
    }
}
