.admin-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.admin-panel {
    grid-column: span 4;
    padding: 22px;
}

.admin-panel-switcher-nav {
    padding: 12px 14px;
}

.admin-panel.wide {
    grid-column: span 8;
}

.admin-panel.wide-full {
    grid-column: 1 / -1;
}

.admin-panel-switcher {
    display: grid;
    gap: 18px;
}

.admin-panel-floor {
    padding: 24px;
}

.floor-heading-copy {
    max-width: 760px;
}

.floor-top-buttons {
    display: grid;
    gap: 12px;
    width: 100%;
}

.floor-top-buttons-side {
    align-self: start;
    width: 100%;
    max-width: 190px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(26, 42, 54, 0.96), rgba(12, 22, 30, 0.96));
    border: 1px solid rgba(170, 180, 190, 0.14);
    box-shadow: 0 18px 30px rgba(2, 8, 12, 0.22);
}

.floor-top-buttons button {
    width: 100%;
}

.floor-admin-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
}

.floor-admin-sidebar,
.floor-admin-canvas-wrap,
.floor-admin-section,
.space-row,
.floor-stage,
.floor-table,
.state-card,
.data-row,
.table-row {
    background: linear-gradient(180deg, rgba(20, 37, 49, 0.98), rgba(10, 18, 24, 0.96));
    border: 1px solid rgba(170, 180, 190, 0.12);
}

.floor-admin-sidebar,
.floor-admin-canvas-wrap {
    border-radius: 22px;
    padding: 18px;
}

.floor-canvas-row {
    display: grid;
    grid-template-columns: minmax(0, 780px) minmax(170px, 190px);
    gap: 22px;
    align-items: start;
    justify-content: start;
}

.floor-admin-sidebar {
    display: grid;
    gap: 16px;
    align-content: start;
}

.floor-admin-section {
    border-radius: 18px;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.floor-admin-section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.floor-admin-section h3 {
    margin: 0;
    font-size: 1rem;
}

.space-list {
    display: grid;
    gap: 10px;
}

.space-row {
    border-radius: 18px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.space-row.active {
    border-color: rgba(200, 155, 78, 0.34);
    box-shadow: 0 18px 30px rgba(7, 14, 18, 0.24);
}

.space-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: left;
    color: var(--text);
}

.space-row-main span:last-child {
    display: grid;
    gap: 4px;
}

.space-row-main small {
    color: var(--text-soft);
}

.space-swatch {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.space-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.space-tab-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.space-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(170, 180, 190, 0.12);
    color: var(--text-soft);
    box-shadow: none;
    font-size: 0.86rem;
    font-weight: 700;
    justify-content: flex-start;
}

.space-tab-item.active {
    color: #111923;
    background: linear-gradient(180deg, #efc168, #d4a247);
    border-color: rgba(212, 162, 71, 0.6);
}

.space-tab-item.active .space-swatch {
    box-shadow: 0 0 0 3px rgba(17, 25, 35, 0.08);
}

.floor-canvas {
    min-height: 620px;
    width: 100%;
}

.floor-stage {
    position: relative;
    min-height: 620px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 38px rgba(2, 8, 12, 0.24);
}

.floor-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(200, 155, 78, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(18, 44, 64, 0.95), rgba(9, 18, 26, 0.96));
    pointer-events: none;
}

.floor-stage-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
}

.floor-stage-label-wrap {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.floor-stage-label {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(9, 18, 26, 0.7);
    border: 1px solid rgba(170, 180, 190, 0.14);
}

.floor-stage-label-input {
    width: 100%;
    min-width: 110px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    outline: none;
}

.floor-stage-label-input:focus {
    color: var(--text);
}

.floor-stage-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(170, 180, 190, 0.14);
    background: rgba(9, 18, 26, 0.7);
    color: #f4c986;
    box-shadow: none;
    font-size: 0.84rem;
    line-height: 1;
}

.floor-stage-delete:hover {
    border-color: rgba(221, 150, 70, 0.34);
    background: rgba(30, 18, 8, 0.7);
}

.floor-table {
    position: absolute;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: var(--table-gap, 4px);
    padding: var(--table-pad-y, 8px) var(--table-pad-x, 10px);
    border-radius: 18px;
    color: var(--text);
    background: linear-gradient(180deg, rgba(226, 242, 255, 0.96), rgba(194, 226, 249, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
    cursor: grab;
    user-select: none;
    z-index: 1;
}

.floor-table-round {
    border-radius: 999px;
}

.floor-table-square {
    aspect-ratio: 1;
}

.floor-table.active {
    outline: 3px solid rgba(200, 155, 78, 0.72);
    transform: translateY(-2px);
}

.floor-status-free {
    background: linear-gradient(180deg, rgba(177, 209, 228, 0.96), rgba(127, 170, 198, 0.94));
    color: #0f2432;
}

.floor-status-pending {
    background: linear-gradient(180deg, rgba(255, 219, 147, 0.98), rgba(226, 166, 70, 0.92));
    color: #3b2502;
}

.floor-status-preparing {
    background: linear-gradient(180deg, rgba(124, 170, 199, 0.98), rgba(73, 121, 153, 0.92));
}

.floor-status-ready {
    background: linear-gradient(180deg, rgba(144, 212, 184, 0.98), rgba(88, 154, 127, 0.92));
    color: #10281e;
}

.floor-table-name {
    font-weight: 800;
    font-size: var(--table-name-size, 0.95rem);
    line-height: 0.95;
    max-width: 100%;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.floor-table-meta,
.floor-table-state {
    font-size: var(--table-meta-size, 0.72rem);
    line-height: 1;
    opacity: 0.82;
    max-width: 100%;
    text-align: center;
    overflow-wrap: anywhere;
}

.floor-table-state {
    font-size: var(--table-state-size, 0.72rem);
}

.floor-status-free .floor-table-name,
.floor-status-free .floor-table-meta,
.floor-status-free .floor-table-state {
    color: #102838;
    opacity: 1;
}

.floor-table-resize {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: rgba(7, 14, 18, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.48);
    cursor: nwse-resize;
}

.floor-divider {
    position: absolute;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    z-index: 2;
    cursor: grab;
}

.floor-divider-horizontal {
    min-height: 18px;
}

.floor-divider-vertical {
    min-width: 18px;
}

.floor-divider-line {
    position: absolute;
    inset: 0;
}

.floor-divider-vertical .floor-divider-line {
    left: 8px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(209, 224, 233, 0.86));
    box-shadow: 0 0 0 1px rgba(7, 14, 18, 0.12), 0 10px 22px rgba(3, 10, 16, 0.18);
}

.floor-divider-horizontal .floor-divider-line {
    left: 0;
    top: 8px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(209, 224, 233, 0.86));
    box-shadow: 0 0 0 1px rgba(7, 14, 18, 0.12), 0 10px 22px rgba(3, 10, 16, 0.18);
}

.floor-divider.active .floor-divider-line {
    background: linear-gradient(180deg, rgba(240, 196, 103, 0.96), rgba(214, 160, 61, 0.96));
}

.floor-divider-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(10, 18, 24, 0.82);
    border: 1px solid rgba(170, 180, 190, 0.14);
    color: var(--text-muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.floor-divider-rotate {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #f0c467;
    border: 2px solid rgba(10, 18, 24, 0.8);
    box-shadow: 0 8px 18px rgba(3, 10, 16, 0.28);
    cursor: pointer;
}

.floor-divider-vertical .floor-divider-rotate {
    left: 3px;
    top: -2px;
}

.floor-divider-horizontal .floor-divider-rotate {
    left: -2px;
    top: 3px;
}

.floor-divider-resize {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: #8fd1ff;
    border: 2px solid rgba(10, 18, 24, 0.8);
    box-shadow: 0 8px 18px rgba(3, 10, 16, 0.28);
}

.floor-divider-vertical .floor-divider-resize {
    left: 3px;
    bottom: -2px;
    cursor: ns-resize;
}

.floor-divider-horizontal .floor-divider-resize {
    right: -2px;
    top: 3px;
    cursor: ew-resize;
}

.state-editor-list {
    margin-top: 18px;
}

.state-card {
    display: grid;
    gap: 10px;
    border-radius: 18px;
    padding: 16px;
}

.state-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.color-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.table-head,
.table-row {
    display: grid;
    gap: 10px;
    align-items: center;
    border-radius: 16px;
}

.table-head.products,
.table-row.products {
    grid-template-columns: 1.6fr 1fr 1fr 0.8fr 0.8fr 0.8fr;
}

.table-head.orders,
.table-row.orders {
    grid-template-columns: 0.7fr 0.8fr 0.8fr 1fr 1fr 0.8fr 0.8fr;
}

.table-head {
    padding: 0 8px;
    color: var(--text-soft);
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    background: transparent;
    border: none;
}

.table-row,
.data-row {
    padding: 14px 16px;
}

.table-toolbar {
    margin: 14px 0 12px;
}

.empty-inline {
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(20, 37, 49, 0.98), rgba(10, 18, 24, 0.96));
    border: 1px solid rgba(170, 180, 190, 0.12);
    color: var(--text-soft);
}

.data-row {
    border-radius: 18px;
}

.inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ghost-button {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    box-shadow: none;
}

.admin-switcher-bar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.admin-switcher-tab {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(170, 180, 190, 0.12);
    color: var(--text-soft);
    box-shadow: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    white-space: normal;
    text-align: center;
}

.admin-switcher-tab.active {
    color: #111923;
    background: linear-gradient(180deg, #efc168, #d4a247);
    border-color: rgba(212, 162, 71, 0.6);
}

.admin-switcher-panel {
    display: none;
    gap: 16px;
}

.admin-switcher-panel.active {
    display: grid;
}

.admin-panel-switcher .panel-heading {
    margin-bottom: 4px;
}

.hidden {
    display: none !important;
}

@media (max-width: 1320px) {
    .floor-admin-layout {
        grid-template-columns: 1fr;
    }

    .floor-canvas-row {
        grid-template-columns: 1fr;
    }

    .floor-top-buttons-side {
        max-width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-self: stretch;
    }

    .floor-canvas {
        min-height: 540px;
    }

    .admin-switcher-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding-bottom: 8px;
    }
}

@media (max-width: 1180px) {
    .admin-panel,
    .admin-panel.wide,
    .admin-panel.wide-full {
        grid-column: span 12;
    }
}

@media (max-width: 760px) {
    .color-row,
    .table-head.products,
    .table-row.products,
    .table-head.orders,
    .table-row.orders,
    .floor-admin-layout {
        grid-template-columns: 1fr;
    }

    .floor-stage,
    .floor-canvas {
        min-height: 420px;
    }

    .floor-top-buttons-side {
        grid-template-columns: 1fr;
    }

    .admin-switcher-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
