.table-rental-page {
    position: relative;
    margin: -34px 0 0;
}

.table-rental-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: center;
    margin: 0 0 26px;
    padding: 52px clamp(28px, 6vw, 72px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 78% 52%, rgba(154, 38, 170, 0.58), rgba(154, 38, 170, 0) 27%),
        linear-gradient(135deg, #111217 0%, #191620 60%, #26142a 100%);
    box-shadow: 0 32px 80px rgba(33, 31, 28, 0.2);
    color: #fff;
}

.table-rental-hero__copy,
.table-rental-hero__media {
    position: relative;
    z-index: 1;
}

.table-rental-hero h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1;
}

.table-rental-hero .lead {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    font-weight: 800;
}

.table-rental-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 180px));
    gap: 18px;
    margin-top: 30px;
}

.table-rental-hero__stats span {
    display: grid;
    grid-template-columns: 34px auto;
    column-gap: 14px;
    align-items: center;
}

.table-rental-hero__stats .ui-icon {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(96%) saturate(2715%) hue-rotate(271deg) brightness(102%) contrast(102%);
}

.table-rental-hero__stats small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.table-rental-hero__stats strong {
    color: #fff;
    font-size: 20px;
}

.table-rental-hero__media {
    display: grid;
    place-items: center;
}

.table-rental-hero__media img {
    width: min(220px, 100%);
    filter: drop-shadow(0 24px 44px rgba(154, 38, 170, 0.4));
}

.table-rental-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin: 0 0 28px;
}

.table-picker,
.booking-board {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 54px rgba(33, 31, 28, 0.08);
}

.table-picker {
    min-width: 0;
    padding: 22px 16px;
}

.table-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.table-picker h2 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 18px;
}

.table-picker__list {
    display: grid;
    gap: 6px;
    margin-top: 18px;
}

.table-picker__button {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 18px;
    gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 84px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.table-picker__button:hover,
.table-picker__button.is-active {
    border-color: #e3c8ff;
    background: #f7efff;
}

.table-picker__thumb {
    display: grid;
    place-items: center;
    height: 54px;
}

.table-picker__thumb img {
    width: 64px;
    height: 54px;
    object-fit: contain;
}

.table-picker__name {
    display: block;
    color: var(--brand-dark);
    font-weight: 800;
}

.table-picker__meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.table-status-dot,
.legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.table-status-dot--free,
.legend-dot--free {
    background: #20b486;
}

.table-status-dot--booked,
.legend-dot--booked {
    background: #c2c6d0;
}

.table-status-dot--blocked,
.legend-dot--blocked {
    background: #f2a93b;
}

.table-status-dot--mine,
.legend-dot--mine {
    background: #8226d9;
}

.booking-board {
    min-width: 0;
    overflow: hidden;
}

.booking-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.booking-date-control {
    display: grid;
    gap: 10px;
    min-width: 0;
    min-height: 102px;
    padding: 12px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.booking-date-control__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.booking-date-control__title {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--brand-dark);
    font-weight: 900;
    white-space: nowrap;
}

.booking-date-control .ui-icon {
    width: 24px;
    height: 24px;
}

.booking-date-control__current {
    overflow: hidden;
    color: #68635f;
    font-size: 14px;
    font-weight: 900;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-date-options {
    display: grid;
    grid-auto-columns: 94px;
    grid-auto-flow: column;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 1px 2px 3px;
    scrollbar-width: thin;
}

.booking-date-option {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    justify-items: center;
    width: 94px;
    height: 66px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--brand-dark);
    cursor: pointer;
    text-align: center;
    transform: none;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.booking-date-option:hover,
.booking-date-option.is-active {
    border-color: #d994ed;
    background: #fbf2ff;
    color: var(--brand-dark);
    transform: none;
}

.booking-date-option.is-active {
    box-shadow: inset 0 0 0 1px #d994ed;
}

.booking-date-option__weekday {
    color: #6d6965;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.booking-date-option__day {
    color: var(--brand-dark);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.booking-date-option__month {
    color: #6d6965;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.duration-control legend {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.duration-control {
    min-width: 286px;
    margin: 0;
    padding: 0;
    border: 0;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid #e9d7fa;
    border-radius: 10px;
    background: #fbf7ff;
}

.duration-option {
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--brand-dark);
    font-weight: 800;
    cursor: pointer;
    transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.duration-option.is-active {
    background: #ead4ff;
    color: #8226d9;
    box-shadow: 0 8px 18px rgba(130, 38, 217, 0.14);
}

.duration-option:hover {
    background: #f3e8ff;
}

.booking-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-end;
    color: var(--muted);
    font-weight: 700;
}

.booking-legend span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.booking-legend span:last-child {
    color: var(--brand-dark);
    font-weight: 900;
}

.booking-grid-wrap {
    padding: 18px 20px 20px;
}

.booking-grid-frame {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    min-width: 0;
}

.booking-grid-labels {
    position: relative;
    z-index: 2;
    display: grid;
    grid-auto-rows: minmax(72px, auto);
    background: #fff;
    border-right: 1px solid var(--line);
}

.booking-grid__label {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 8px 16px 8px 0;
    border-bottom: 1px solid var(--line);
    color: var(--brand-dark);
    font-weight: 900;
}

.booking-grid__label--head {
    min-height: 44px;
    color: var(--brand-dark);
    font-size: 14px;
}

.booking-grid__label--active {
    color: #8226d9;
}

.booking-grid-scroll {
    overflow-x: auto;
    min-width: 0;
}

.booking-grid {
    display: grid;
    min-width: max(980px, 100%);
    gap: 0;
}

.mobile-booking-list {
    display: none;
}

.booking-grid__cell {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 8px;
    border-bottom: 1px solid var(--line);
}

.booking-grid__cell--span {
    padding-right: 7px;
    padding-left: 7px;
}

.booking-grid__head {
    min-height: 44px;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.booking-slot {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 56px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafb;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.booking-slot--free {
    border-color: #cfefe5;
    background: #f3fffb;
    color: #00896b;
}

.booking-slot--preview {
    border-color: #aee7d4;
    background: linear-gradient(180deg, #f4fffb 0%, #eafff8 100%);
    box-shadow: inset 0 0 0 1px rgba(32, 180, 134, 0.18);
}

.booking-slot--selected {
    position: relative;
    border-color: #8226d9;
    background: #f5ebff;
    color: #8226d9;
    box-shadow: 0 14px 34px rgba(130, 38, 217, 0.18);
}

.booking-slot--free:hover {
    border-color: #20b486;
    box-shadow: 0 12px 30px rgba(32, 180, 134, 0.14);
    transform: translateY(-1px);
}

.booking-slot--booked {
    border-color: #e5e7ec;
    background: linear-gradient(135deg, #f8f8f9 0%, #f1f2f5 100%);
    color: #697180;
}

.booking-slot--blocked {
    border-color: #f7d79a;
    background: #fff7e8;
    color: #9a5a00;
}

.booking-slot--mine {
    border-color: #dcbcff;
    background: #f6edff;
    color: #8226d9;
}

.booking-slot--empty {
    color: #c2c6d0;
}

.booking-slot-button,
.booking-slot .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 8px 6px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 11px;
    line-height: 1;
    box-shadow: none;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.booking-slot-form {
    width: 100%;
}

.booking-slot-button--cancel {
    color: #8226d9;
}

.booking-slot-button--cancel:hover,
.booking-slot-button--cancel:focus-visible {
    border-radius: 6px;
    background: #ead8fb;
    color: #5c159d;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(130, 38, 217, 0.14);
    transform: translateY(-1px);
}

.booking-slot .button-link::before {
    margin-right: 6px;
    content: "+";
    font-size: 16px;
    line-height: 1;
}

.booking-slot--mine::before,
.booking-slot--booked::before {
    margin-right: 6px;
}

.booking-empty {
    padding: 36px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.table-confirm-page {
    max-width: 920px;
}

.table-confirm-head {
    margin-bottom: 18px;
}

.table-confirm-head h1 {
    margin: 4px 0 0;
    color: var(--brand-dark);
}

.table-confirm-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 24px;
    align-items: stretch;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 54px rgba(33, 31, 28, 0.08);
}

.table-confirm-card--cancel {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
}

.table-confirm-card__main {
    display: grid;
    align-content: start;
    gap: 10px;
}

.table-confirm-card__label,
.table-confirm-duration > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.table-confirm-card h2 {
    margin: 0;
    color: var(--brand-dark);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1;
}

.table-confirm-summary {
    display: grid;
    gap: 6px;
    margin: 8px 0 4px;
    color: var(--brand-dark);
    font-size: 19px;
    font-weight: 900;
}

.table-confirm-summary strong {
    color: #8226d9;
    font-size: 16px;
}

.table-confirm-duration {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
    border: 1px solid #ead8fb;
    border-radius: 8px;
    background: #fbf7ff;
}

.table-confirm-duration__options {
    display: grid;
    gap: 8px;
}

.table-confirm-duration__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: var(--brand-dark);
    text-align: left;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.table-confirm-duration__option--details {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
}

.table-confirm-duration__option--details small {
    line-height: 1.35;
    white-space: normal;
}

.table-confirm-duration__option:hover,
.table-confirm-duration__option.is-active {
    border-color: #cf9cff;
    background: #f4e9ff;
    box-shadow: 0 12px 26px rgba(130, 38, 217, 0.12);
}

.table-confirm-duration__option.is-active {
    transform: translateY(-1px);
}

.table-confirm-duration__option strong,
.table-confirm-duration__option small {
    display: block;
}

.table-confirm-duration__option small {
    color: var(--muted);
    font-weight: 800;
}

.table-confirm-warning {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid #f2d27a;
    border-radius: 8px;
    background: #fff8df;
    color: var(--brand-dark);
}

.table-confirm-warning h2,
.table-confirm-warning p {
    margin: 0;
}

.table-confirm-warning h2 {
    font-size: 20px;
}

.table-confirm-warning ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.table-confirm-warning li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
}

.table-confirm-warning span {
    color: var(--muted);
    font-weight: 800;
}

.refund-request-status {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border: 1px solid #cf9cff;
    border-radius: 8px;
    background: #f7efff;
    color: var(--brand-dark);
}

.refund-request-status--new {
    border-color: #ead8fb;
    background: #fbf7ff;
}

.refund-request-status__label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.refund-request-status strong {
    font-size: 20px;
}

.refund-request-status p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.55;
}

.refund-request-form,
.refund-request-cancel-form {
    width: 100%;
}

.refund-request-form textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

@media (max-width: 1120px) {
    .table-rental-page {
        margin-top: -20px;
    }

    .table-rental-shell {
        grid-template-columns: 1fr;
    }

    .table-picker__list {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .booking-toolbar {
        grid-template-columns: 1fr;
    }

    .booking-legend {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .table-rental-hero {
        grid-template-columns: 1fr;
        padding: 34px 20px;
        background:
            radial-gradient(circle at 50% 34%, rgba(217, 77, 240, 0.28), rgba(217, 77, 240, 0) 36%),
            linear-gradient(180deg, #111217 0%, #23222b 100%);
    }

    .table-rental-hero__media {
        min-height: 180px;
    }

    .table-rental-hero__stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .booking-toolbar {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .duration-control {
        min-width: 0;
    }

    .booking-date-control {
        min-height: 0;
    }

    .booking-date-control__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .booking-date-control__current {
        max-width: 100%;
        text-align: left;
    }

    .booking-date-options {
        grid-auto-columns: 88px;
    }

    .booking-date-option {
        width: 88px;
    }

    .table-rental-shell {
        gap: 10px;
    }

    .table-picker {
        padding: 12px;
    }

    .table-picker__head {
        padding-bottom: 10px;
    }

    .table-picker h2 {
        font-size: 15px;
    }

    .table-picker__list {
        grid-auto-columns: minmax(132px, 168px);
        grid-auto-flow: column;
        grid-template-columns: none;
        gap: 8px;
        margin-top: 10px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding-bottom: 3px;
        scrollbar-width: thin;
    }

    .table-picker__button {
        grid-template-columns: minmax(0, 1fr) 11px;
        min-height: 48px;
        padding: 10px 11px;
        gap: 10px;
    }

    .table-picker__thumb,
    .table-picker__meta {
        display: none;
    }

    .table-picker__name {
        overflow: hidden;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .booking-board {
        overflow: visible;
    }

    .booking-legend {
        gap: 8px 12px;
        font-size: 12px;
    }

    .booking-grid-wrap {
        padding: 12px;
    }

    .booking-grid-frame {
        display: none;
    }

    .mobile-booking-list {
        display: grid;
        gap: 8px;
    }

    .mobile-booking-list__head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 2px 2px 6px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
    }

    .mobile-booking-list__head strong {
        overflow: hidden;
        color: var(--brand-dark);
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-booking-slot {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
        gap: 10px;
        align-items: center;
        min-height: 62px;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #f8fafb;
    }

    .mobile-booking-slot__main {
        display: grid;
        gap: 3px;
        min-width: 0;
    }

    .mobile-booking-slot__main strong,
    .mobile-booking-slot__main span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-booking-slot__main strong {
        color: var(--brand-dark);
        font-size: 16px;
        font-weight: 900;
    }

    .mobile-booking-slot__main span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

    .mobile-booking-slot--free {
        border-color: #cfefe5;
        background: #f3fffb;
    }

    .mobile-booking-slot--free .mobile-booking-slot__main span {
        color: #00896b;
    }

    .mobile-booking-slot--mine {
        border-color: #dcbcff;
        background: #f6edff;
    }

    .mobile-booking-slot--mine .mobile-booking-slot__main span {
        color: #8226d9;
    }

    .mobile-booking-slot--blocked {
        border-color: #f7d79a;
        background: #fff7e8;
    }

    .mobile-booking-slot--blocked .mobile-booking-slot__main span {
        color: #9a5a00;
    }

    .mobile-booking-slot--booked {
        border-color: #e5e7ec;
        background: linear-gradient(135deg, #f8f8f9 0%, #f1f2f5 100%);
    }

    .mobile-booking-slot--empty {
        opacity: 0.7;
    }

    .mobile-booking-slot__action {
        min-width: 0;
    }

    .mobile-booking-slot__action .button-link,
    .mobile-booking-slot__action .booking-slot-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 40px;
        padding: 9px 10px;
        border-radius: 7px;
        font-size: 12px;
        font-weight: 900;
        line-height: 1.1;
        text-align: center;
        text-decoration: none;
        white-space: normal;
    }

    .mobile-booking-slot__action .button-link {
        background: #20b486;
        color: #fff;
        box-shadow: 0 10px 20px rgba(32, 180, 134, 0.16);
    }

    .mobile-booking-slot__action .button-link::before {
        margin-right: 5px;
        content: "+";
        font-size: 15px;
        line-height: 1;
    }

    .mobile-booking-slot__action .booking-slot-button--cancel {
        background: #ead8fb;
        color: #5c159d;
    }

    .mobile-booking-slot:not(.mobile-booking-slot--free):not(.mobile-booking-slot--mine) {
        grid-template-columns: 1fr;
    }

    .table-confirm-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}
