:root {
    color-scheme: dark;
    --bg: #09090b;
    --panel: #141417;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --quiet: #71717a;
    --accent: #34d399;
    --danger: #fca5a5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
}

.auth-hero {
    display: none;
    min-height: 100vh;
    padding: 40px 48px;
    background:
        radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.24), transparent 30%),
        linear-gradient(135deg, #18181b, #09090b);
}

.auth-hero-content {
    max-width: 620px;
}

.auth-hero h1 {
    margin: 16px 0 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
}

.auth-hero p {
    color: #d4d4d8;
    font-size: 1.08rem;
    line-height: 1.6;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: #052e1b;
    font-weight: 900;
}

.brand-title {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--quiet);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.login-wrap {
    width: 100%;
    max-width: 430px;
}

.mobile-brand {
    margin-bottom: 32px;
}

.panel,
.metric-card,
.dashboard-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.login-panel {
    padding: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.login-panel h2,
.dashboard-card h2 {
    margin: 8px 0 0;
}

.form {
    display: grid;
    gap: 20px;
    margin-top: 28px;
}

.field label {
    display: block;
    color: #d4d4d8;
    font-size: 0.9rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    background: #18181b;
    color: var(--text);
}

.field select,
.field textarea {
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    background: #18181b;
    color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.field-error {
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 0.88rem;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d4d4d8;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
}

.btn-primary {
    width: 100%;
    padding: 13px 18px;
    background: var(--accent);
    color: #052e1b;
}

.btn-primary.btn-fit {
    width: fit-content;
}

.btn-light {
    padding: 10px 16px;
    background: #fafafa;
    color: #18181b;
}

.btn-ghost {
    padding: 10px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.btn-danger {
    padding: 10px 16px;
    background: #7f1d1d;
    color: #fee2e2;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn-fit {
    width: fit-content;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    display: none;
}

.main-area {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.topbar h1 {
    margin: 2px 0 0;
    font-size: 1.35rem;
}

.content {
    padding: 24px 20px;
}

.mobile-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    padding: 10px 20px;
    background: rgba(9, 9, 11, 0.82);
}

.mobile-nav-link {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: #d4d4d8;
    font-size: 0.86rem;
    font-weight: 700;
}

.mobile-nav-link.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #052e1b;
}

.mobile-nav-link.disabled {
    color: var(--quiet);
}

.nav {
    display: grid;
    gap: 6px;
    margin-top: 34px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d4d4d8;
    font-size: 0.92rem;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    background: var(--accent);
    color: #052e1b;
}

.nav-badge {
    color: var(--quiet);
    font-size: 0.72rem;
}

.user-box {
    margin-top: auto;
    padding: 16px;
}

.viewing-box {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    border-color: rgba(52, 211, 153, 0.28);
    background: rgba(52, 211, 153, 0.08);
}

.user-name {
    margin: 0;
    font-weight: 700;
}

.user-email {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--quiet);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.role-pill {
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.1);
    color: #a7f3d0;
    padding: 5px 8px;
    font-size: 0.75rem;
}

.metric-grid {
    display: grid;
    gap: 16px;
}

.metric-card,
.dashboard-card {
    padding: 22px;
}

.metric-label,
.muted {
    color: var(--muted);
}

.metric-value {
    margin: 14px 0 0;
    font-size: 2rem;
    font-weight: 800;
}

.metric-hint,
.ok {
    color: var(--accent);
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.card-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-pill {
    width: fit-content;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.1);
    color: #a7f3d0;
    padding: 6px 10px;
    font-size: 0.88rem;
    font-weight: 700;
}

.feature-grid,
.session-roles {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.feature-item,
.role-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.55);
    padding: 14px;
}

.role-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.page-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
}

.page-head h2,
.form-card h2,
.resource-card h3,
.table-row-card h3,
.empty-state h3 {
    margin: 6px 0 0;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.notice {
    margin-bottom: 18px;
    border: 1px solid rgba(52, 211, 153, 0.32);
    border-radius: 8px;
    background: rgba(52, 211, 153, 0.1);
    color: #bbf7d0;
    padding: 12px 14px;
}

.notice-danger {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.resource-grid,
.table-list {
    display: grid;
    gap: 14px;
}

.table-panel {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-table td span {
    display: block;
    margin-top: 4px;
    color: var(--quiet);
    font-size: 0.86rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-form select,
.inline-form input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #18181b;
    color: var(--text);
    padding: 0 12px;
}

.resource-card,
.table-row-card,
.form-card,
.floor-shell,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 20px;
}

.resource-card-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.status-muted {
    background: rgba(113, 113, 122, 0.16);
    color: #d4d4d8;
}

.status-danger {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.form-shell {
    max-width: 760px;
}

.form-card {
    padding: 24px;
}

.field-grid {
    display: grid;
    gap: 16px;
}

.module-checklist {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.module-grid {
    display: grid;
    gap: 10px;
}

.module-check {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.45);
    color: #d4d4d8;
    font-weight: 700;
    padding: 12px;
}

.module-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.client-users {
    margin-top: 18px;
}

.danger-zone {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.table-row-card {
    display: grid;
    gap: 14px;
}

.table-coordinates {
    color: var(--accent);
    font-weight: 800;
}

.floor-shell {
    padding: 16px;
    overflow-x: auto;
}

.floor-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.floor-toolbar-actions,
.design-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.design-tools {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.42);
    padding: 12px;
}

.floor-settings-panel,
.selected-inspector {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    align-items: end;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 14px;
}

.floor-settings-panel > div,
.selected-inspector > div {
    grid-column: 1 / -1;
}

.floor-settings-panel h3,
.selected-inspector h3 {
    margin: 4px 0 0;
}

.floor-settings-panel label,
.selected-inspector label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.floor-settings-panel input,
.floor-settings-panel select,
.selected-inspector input {
    min-height: 40px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #18181b;
    color: var(--text);
    padding: 0 10px;
}

.floor-settings-panel .check {
    min-height: 40px;
    display: flex;
    align-items: center;
    text-transform: none;
}

.selected-inspector[hidden] {
    display: none;
}

.precision-tools,
.alignment-tools {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.precision-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.precision-select select {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #18181b;
    color: var(--text);
    padding: 0 10px;
}

.precision-check {
    margin: 0;
}

.selected-item-label {
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.1);
    color: #bbf7d0;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 8px 10px;
}

.design-help {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.design-tools[hidden],
.object-editor-list[hidden] {
    display: none;
}

.save-state {
    width: fit-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #d4d4d8;
    padding: 7px 10px;
    font-size: 0.84rem;
    font-weight: 800;
}

.save-state[data-mode="saving"] {
    background: rgba(251, 191, 36, 0.16);
    color: #fde68a;
}

.save-state[data-mode="saved"] {
    background: rgba(52, 211, 153, 0.14);
    color: #bbf7d0;
}

.save-state[data-mode="error"] {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.floor-plan {
    position: relative;
    display: block;
    width: 100%;
    min-width: min(880px, 100%);
    min-height: 520px;
    height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        #101014;
    background-size: var(--floor-grid-size, 40px) var(--floor-grid-size, 40px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    isolation: isolate;
    touch-action: none;
}

.floor-table {
    appearance: none;
    position: absolute;
    z-index: 10;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    width: 104px;
    height: 90px;
    min-height: 0;
    place-items: center;
    gap: 3px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    cursor: grab;
    color: #052e1b;
    padding: 10px;
    overflow: hidden;
    text-align: center;
    user-select: none;
    touch-action: none;
    container-type: size;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.floor-draggable.dragging {
    z-index: 30 !important;
    cursor: grabbing;
    opacity: 0.9;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.floor-draggable.selected {
    outline: 2px solid #f5f5f5 !important;
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18), 0 24px 54px rgba(0, 0, 0, 0.38);
}

.table-shape-circular {
    border-radius: 999px;
}

.table-shape-rectangular {
    width: 144px;
}

.table-shape-ovalada {
    border-radius: 999px / 62%;
}

.table-status-libre {
    background: #34d399;
}

.table-status-ocupada {
    background: #fb7185;
    color: #fff1f2;
}

.table-status-reservada {
    background: #fbbf24;
    color: #422006;
}

.table-status-cuenta_solicitada {
    background: #60a5fa;
    color: #082f49;
}

.table-chair {
    position: absolute;
    left: var(--chair-x);
    top: var(--chair-y);
    z-index: 0;
    width: clamp(7px, 11cqw, 14px);
    height: clamp(7px, 11cqw, 14px);
    border: 1px solid rgba(9, 9, 11, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.table-name {
    position: relative;
    z-index: 1;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    font-size: clamp(0.68rem, 16cqw, 0.95rem);
    font-weight: 900;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-capacity,
.table-status {
    position: relative;
    z-index: 1;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-action {
    position: relative;
    z-index: 1;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(9, 9, 11, 0.18);
    padding: 3px 8px;
    font-size: clamp(0.55rem, 10cqw, 0.68rem);
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.floor-plan.design-mode .floor-table {
    grid-template-rows: 1fr;
}

.floor-plan.design-mode .table-capacity,
.floor-plan.design-mode .table-status,
.floor-plan.design-mode .table-action {
    display: none;
}

.floor-plan.design-mode .table-name {
    align-self: center;
    font-size: clamp(0.7rem, 18cqw, 1rem);
}

@container (max-width: 72px) {
    .table-chair {
        display: none;
    }

    .table-action {
        display: none;
    }
}

.floor-edit-button,
.resize-handle {
    display: none;
}

.floor-plan.design-mode .floor-edit-button {
    position: absolute;
    right: 6px;
    top: 6px;
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(9, 9, 11, 0.7);
    color: #f5f5f5;
    cursor: pointer;
    font-size: 0.64rem;
    font-weight: 900;
    padding: 3px 8px;
    text-transform: uppercase;
}

.floor-plan.design-mode .resize-handle {
    position: absolute;
    z-index: 40;
    display: block;
    width: 12px;
    height: 12px;
    border: 2px solid #101014;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.resize-handle-e {
    right: -7px;
    top: 50%;
    cursor: ew-resize;
    transform: translateY(-50%);
}

.resize-handle-s {
    bottom: -7px;
    left: 50%;
    cursor: ns-resize;
    transform: translateX(-50%);
}

.resize-handle-se {
    right: -7px;
    bottom: -7px;
    cursor: nwse-resize;
}

.floor-empty {
    position: absolute;
    left: 24px;
    top: 24px;
    max-width: 360px;
}

.floor-object {
    position: absolute;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--object-color), #ffffff 22%);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--object-color), #ffffff 14%), var(--object-color));
    color: #f5f5f5;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    overflow: hidden;
    pointer-events: none;
    text-align: center;
    text-transform: uppercase;
    user-select: none;
    container-type: size;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    touch-action: none;
}

.floor-object-label {
    max-width: 100%;
    min-width: 0;
    padding: 4px 8px;
    overflow: hidden;
    font-size: clamp(0.56rem, 14cqw, 0.78rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floor-plan.design-mode .floor-object {
    cursor: grab;
    outline: 1px dashed rgba(194, 138, 74, 0.62);
    outline-offset: 3px;
    pointer-events: auto;
}

.floor-object-wall,
.floor-object-door,
.floor-object-window {
    border-radius: 999px;
}

.floor-object-column {
    border-radius: 999px;
}

.floor-object-text {
    border-style: dashed;
    background: rgba(245, 245, 245, 0.08);
    color: #f5f5f5;
}

.object-editor-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.object-editor-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.46);
    overflow: hidden;
}

.object-editor-card h4 {
    margin: 4px 0 0;
}

.object-editor-summary {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.4fr) repeat(3, minmax(78px, 0.55fr)) auto auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
}

.object-editor-summary::-webkit-details-marker {
    display: none;
}

.object-editor-card[open] .object-editor-summary {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.object-summary-type,
.object-summary-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.object-summary-type {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.object-summary-label {
    color: var(--text);
    font-weight: 900;
}

.object-summary-meta {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.object-summary-toggle {
    min-height: 34px;
    padding: 7px 12px;
}

.object-summary-delete {
    display: inline-flex;
}

.object-summary-delete .btn,
.object-editor-delete .btn {
    min-height: 34px;
    padding: 7px 12px;
}

.object-editor-body {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.object-editor-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.object-editor-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.object-editor-form input {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #18181b;
    color: var(--text);
    padding: 0 10px;
}

.object-editor-actions {
    display: flex;
    align-items: end;
}

.object-editor-delete {
    width: fit-content;
}

.floor-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.66);
    padding: 18px;
}

.floor-editor-modal[hidden] {
    display: none;
}

.floor-editor-card {
    width: min(720px, 100%);
    max-height: min(760px, 92vh);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111114;
    box-shadow: 0 36px 120px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

.floor-editor-head,
.floor-editor-actions,
.rotation-stepper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.floor-editor-head {
    justify-content: space-between;
    margin-bottom: 18px;
}

.floor-editor-head h3 {
    margin: 4px 0 0;
}

.floor-editor-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.floor-editor-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.floor-editor-form input,
.floor-editor-form select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #18181b;
    color: var(--text);
    padding: 0 12px;
}

.rotation-stepper,
.floor-editor-actions {
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .object-editor-summary {
        grid-template-columns: 1fr 1fr;
    }

    .object-editor-form {
        grid-template-columns: 1fr;
    }

    .floor-settings-panel,
    .selected-inspector {
        grid-template-columns: 1fr;
    }

    .floor-editor-form {
        grid-template-columns: 1fr;
    }
}

.operation-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.operation-grid-wide {
    align-items: start;
}

.operation-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 22px;
}

.operation-panel h3 {
    margin: 6px 0 0;
}

.operation-status {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
}

.detail-list div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.45);
    padding: 12px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 5px 0 0;
    font-weight: 800;
}

.total-panel {
    display: grid;
    align-content: center;
}

.session-total {
    margin-top: 10px;
    color: var(--accent);
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 900;
}

.inline-total {
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 8px;
    background: rgba(52, 211, 153, 0.08);
    padding: 12px;
}

.session-items {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.session-item {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.45);
    padding: 14px;
}

.session-item-total {
    color: var(--accent);
    font-weight: 900;
}

.color-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.color-chip span,
.category-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--accent);
}

.pos-panel {
    margin-top: 16px;
}

.pos-category-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.pos-category {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.32);
    padding: 14px;
}

.pos-category-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pos-product-grid {
    display: grid;
    gap: 10px;
}

.pos-product-button {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 8px;
    background: rgba(52, 211, 153, 0.08);
    color: var(--text);
    cursor: pointer;
    padding: 12px;
    text-align: left;
}

.pos-product-button:hover {
    border-color: rgba(52, 211, 153, 0.64);
    background: rgba(52, 211, 153, 0.16);
}

@media (min-width: 768px) {
    .metric-grid,
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .page-head,
    .floor-toolbar,
    .resource-card-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

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

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

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

    .table-row-card {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
    }

    .operation-grid {
        grid-template-columns: 1fr 0.7fr;
    }

    .operation-grid-wide {
        grid-template-columns: 0.8fr 1.2fr;
    }

    .operation-status {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .session-item {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
    }

    .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1.1fr 0.9fr;
    }

    .auth-hero {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .mobile-brand {
        display: none;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        display: flex;
        width: 288px;
        flex-direction: column;
        border-right: 1px solid var(--line);
        background: rgba(9, 9, 11, 0.96);
        padding: 24px 20px;
    }

    .main-area {
        padding-left: 288px;
    }

    .topbar-inner,
    .content {
        padding-right: 32px;
        padding-left: 32px;
    }

    .mobile-nav {
        display: none;
    }
}

@media (min-width: 1280px) {
    .metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1.3fr 0.7fr;
    }

    .resource-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .module-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
