* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, system-ui, Segoe UI, Arial;
    background: #f4f6fb;
    color: #172033
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

.top {
    background: #111827;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.brand {
    font-weight: 900
}

.wrap {
    width: min(1450px, 100%);
    margin: auto;
    padding: 14px
}

.card {
    background: #fff;
    border: 1px solid #dfe4ed;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(25, 35, 55, .07)
}

.toolbar {
    padding: 12px;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    align-items: end
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.field label {
    font-size: 12px;
    font-weight: 800;
    color: #626d80
}

.field input,
.field select {
    border: 1px solid #d7deea;
    border-radius: 9px;
    padding: 8px 9px;
    min-width: 0;
    background: #fff
}

.btn {
    border: 0;
    border-radius: 9px;
    padding: 9px 12px;
    background: #e9edf5;
    color: #273249;
    font-weight: 800;
    text-decoration: none
}

.btn.primary {
    background: #6d4aff;
    color: #fff
}

.btn.danger {
    background: #ffe8eb;
    color: #b4232d
}

.layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 285px;
    gap: 12px;
    margin-top: 12px
}

.panel {
    padding: 14px;
    align-self: start
}

.panel h3 {
    margin: 0 0 12px
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
}

.help {
    font-size: 12px;
    color: #6e788b;
    line-height: 1.5
}

.canvas-shell {
    overflow: auto;
    background: #e6eaf1;
    border-radius: 16px;
    padding: 14px;
    min-height: 670px
}

.canvas {
    position: relative;
    background: #f8fafc;
    border: 1px solid #cbd3df;
    box-shadow: 0 8px 24px rgba(20, 30, 50, .13);
    transform-origin: top left;
    overflow: hidden
}

.canvas.designer {
    background-image: 
        linear-gradient(rgba(109, 74, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 74, 255, 0.2) 1px, transparent 1px),
        linear-gradient(rgba(109, 74, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 74, 255, 0.05) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}

.stage {
    position: absolute;
    background: linear-gradient(#29354e, #111827);
    color: #fff;
    border-radius: 50% 50% 10px 10px/80% 80% 10px 10px;
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: .15em
}

.seat {
    position: absolute;
    border: 1px solid #bdc6d6;
    background: #e8edf5;
    border-radius: 9px 9px 5px 5px;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
    color: #263247;
    box-shadow: inset 0 -5px rgba(30, 40, 60, .08);
    user-select: none;
    touch-action: none
}

.designer .seat {
    cursor: grab
}

.seat.selected {
    outline: 3px solid #6d4aff;
    outline-offset: 2px;
    background: #ddd5ff
}

.seat.vip {
    background: #fff0b8;
    border-color: #d4b84d
}

.seat.wheelchair {
    background: #cceeff;
    border-color: #57a8d0
}

.seat.blocked,
.seat.maintenance,
.seat.reserved {
    background: #9ea8b7;
    color: #fff;
    opacity: .65;
    cursor: not-allowed
}

.seat.sold {
    background: #ff4a4a;
    border-color: #d13030;
    color: #fff;
    opacity: 0.9;
    cursor: not-allowed
}

.seat.assigned {
    background: #e8ebf0;
    box-shadow: inset 0 0 0 1px #cbd3df;
    opacity: 0.8;
    cursor: not-allowed;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        rgba(0,0,0,0.03) 4px,
        rgba(0,0,0,0.03) 8px
    );
}

.seat.booking.available {
    cursor: pointer
}

.seat.booking.chosen {
    background: #6d4aff;
    color: #fff;
    border-color: #6d4aff
}

.tabs {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.tab {
    border: 1px solid #dce2eb;
    background: #fff;
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 800;
    color: #5c6679
}

.tab.active {
    background: #6d4aff;
    border-color: #6d4aff;
    color: #fff
}

.summary {
    margin-top: 12px;
    padding: 14px
}

.chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 7px
}

.chip {
    background: #eeeaff;
    color: #4d36c7;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800
}

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 20
}

.modal-bg.open {
    display: flex
}

.modal {
    width: min(500px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    max-height: 90vh;
    overflow-y: auto;
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px
}

.login form {
    width: min(390px, 100%);
    padding: 22px
}

@media(max-width:1050px) {
    .layout {
        grid-template-columns: 1fr
    }

    .canvas-shell {
        order: 1
    }

    .panel {
        order: 2
    }
}

@media(max-width:600px) {
    .grid {
        grid-template-columns: 1fr
    }

    .top {
        align-items: flex-start;
        flex-direction: column
    }
}

.easy-designer {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 270px;
    gap: 12px;
    margin-top: 12px
}

.easy-panel .field,
.chair-panel .field {
    margin-bottom: 9px
}

.big-action {
    width: 100%;
    padding: 13px;
    margin-top: 4px
}

.active-draw {
    background: #ff9f1c !important;
    box-shadow: 0 0 0 4px rgba(255, 159, 28, .2)
}

.draw-hint {
    margin-top: 9px;
    padding: 10px;
    border-radius: 10px;
    background: #f0edff;
    color: #4d36c7;
    font-size: 13px;
    font-weight: 800
}

.row-name-box {
    padding: 9px;
    border-radius: 9px;
    background: #f2f4f8;
    margin-bottom: 9px
}

.nudge-grid {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    justify-content: center;
    gap: 6px;
    margin: 10px 0
}

.easy-panel>button,
.chair-panel>button {
    width: 100%;
    margin-top: 7px
}

details {
    margin-top: 14px;
    border-top: 1px solid #e1e6ee;
    padding-top: 12px
}

summary {
    cursor: pointer;
    font-weight: 900;
    color: #4f5b70;
    margin-bottom: 10px
}

.advanced-grid {
    margin-top: 10px
}

.designer-shell {
    position: relative;
    padding-top: 52px
}

.canvas-toolbar {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 10px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: #687387;
    font-size: 13px
}

.canvas-toolbar span:first-child {
    margin-right: auto
}

.designer-shell:after {
    content: "";
    display: block;
    height: var(--scaled-height, 900px);
    width: var(--scaled-width, 100%);
    pointer-events: none
}

.draw-point {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff9f1c;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    display: grid;
    place-items: center;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(255, 159, 28, .25)
}

.seat.row-selected {
    box-shadow: 0 0 0 2px rgba(109, 74, 255, .28), inset 0 -5px rgba(30, 40, 60, .08)
}

.selection-box {
    position: absolute;
    border: 1px solid #6d4aff;
    background: rgba(109, 74, 255, 0.15);
    pointer-events: none;
    z-index: 100;
}

.designer .seat.assigned-admin::after {
    content: "A";
    position: absolute;
    top: -4px;
    right: -4px;
    background: #3bb273;
    color: white;
    font-size: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

@media(max-width:1100px) {
    .easy-designer {
        grid-template-columns: 1fr
    }

    .designer-shell {
        order: 1
    }

    .easy-panel {
        order: 2
    }

    .chair-panel {
        order: 3
    }
}

.public-seat.unassigned {
    background: #e8edf5;
    border-color: #bdc6d6;
    color: #263247;
}

.public-seat.assigned {
    background: #3bb273;
    border-color: #23945a;
    color: #ffffff;
}

.public-seat.sold {
    background: #e53935;
    border-color: #b71c1c;
    color: #ffffff;
    position: absolute;
}

.public-seat.sold::before,
.public-seat.sold::after {
    content: "";
    position: absolute;

    width: 70%;
    height: 3px;

    left: 15%;
    top: calc(50% - 1px);

    background: white;
    border-radius: 2px;

    pointer-events: none;
}

.public-seat.sold::before {
    transform: rotate(45deg);
}

.public-seat.sold::after {
    transform: rotate(-45deg);
}