.mm-table-shape {
    --orbit: 22px;
    --surf-w: 28px;
    --surf-h: 28px;
    --radius: 50%;
    --clip: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--surf-w) + 22px);
    height: calc(var(--surf-h) + 22px);
    color: var(--primary-color, #198754);
}

.mm-table-shape__surface {
    position: relative;
    z-index: 1;
    width: var(--surf-w);
    height: var(--surf-h);
    border-radius: var(--radius);
    clip-path: var(--clip);
    background: currentColor;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.mm-table-shape__chairs {
    position: absolute;
    inset: 0;
}

.mm-table-shape__chairs i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    margin: -3.5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
    transform: rotate(calc(360deg * var(--i) / var(--n))) translateY(calc(-1 * var(--orbit)));
}

.mm-table-shape__label {
    position: absolute;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.mm-table-shape--1 { --orbit: 16px; --surf-w: 20px; --surf-h: 20px; --radius: 50%; }
.mm-table-shape--2 { --orbit: 18px; --surf-w: 34px; --surf-h: 18px; --radius: 50%; }
.mm-table-shape--3 { --orbit: 20px; --surf-w: 28px; --surf-h: 24px; --radius: 0; --clip: polygon(50% 6%, 94% 90%, 6% 90%); }
.mm-table-shape--4 { --orbit: 22px; --surf-w: 26px; --surf-h: 26px; --radius: 6px; }
.mm-table-shape--5 { --orbit: 23px; --surf-w: 28px; --surf-h: 28px; --radius: 0; --clip: polygon(50% 4%, 96% 38%, 78% 96%, 22% 96%, 4% 38%); }
.mm-table-shape--6 { --orbit: 22px; --surf-w: 42px; --surf-h: 24px; --radius: 8px; }
.mm-table-shape--7 { --orbit: 24px; --surf-w: 30px; --surf-h: 30px; --radius: 0; --clip: polygon(50% 2%, 93% 26%, 93% 74%, 50% 98%, 7% 74%, 7% 26%); }
.mm-table-shape--8 { --orbit: 22px; --surf-w: 52px; --surf-h: 22px; --radius: 8px; }
.mm-table-shape--9 { --orbit: 26px; --surf-w: 36px; --surf-h: 36px; --radius: 50%; }
.mm-table-shape--10 { --orbit: 24px; --surf-w: 54px; --surf-h: 26px; --radius: 50%; }
.mm-table-shape--11 { --orbit: 26px; --surf-w: 58px; --surf-h: 30px; --radius: 50%; }
.mm-table-shape--12 { --orbit: 22px; --surf-w: 68px; --surf-h: 24px; --radius: 10px; }

.mm-shape-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.5rem;
}

.mm-shape-picker__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.12));
    border-radius: 12px;
    background: var(--surface-bg, var(--card-bg, transparent));
    color: inherit;
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
}

.mm-shape-picker__btn.is-selected {
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.18);
}

.mm-tables {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.mm-table-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    border-radius: 16px;
    border: 1px solid var(--mm-line, var(--border-subtle, #eadfd2));
    background: var(--mm-card, var(--card-bg, #fff));
    text-align: center;
}

.mm-table-card.is-empty { --mm-state: #15803d; }
.mm-table-card.is-occupied { --mm-state: #b91c1c; }
.mm-table-card.is-reserved { --mm-state: #1d4ed8; }
.mm-table-card .mm-table-shape { color: var(--mm-state, currentColor); }

.mm-table-card__meta {
    font-size: 0.78rem;
    color: var(--mm-muted, var(--text-muted, #6b6259));
}

.admin-table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.admin-table-row__main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.taker-table {
    background: transparent;
    color: #fff;
    width: auto;
    min-width: 78px;
    min-height: 78px;
}

.taker-table .mm-table-shape {
    color: var(--table-state, currentColor);
}

.taker-table .mm-table-shape__label {
    color: #fff;
}
