@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Playfair+Display:ital,wght@1,600&display=swap');

:root {
  --ink: #17221d;
  --forest: #12251d;
  --green: #245c45;
  --sage: #dce9df;
  --cream: #f5f3ed;
  --paper: #fdfcf9;
  --line: #e2e4dd;
  --muted: #758079;
  --danger: #a43e38;
  --shadow: 0 18px 55px rgba(25, 42, 33, .08);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--cream); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.055em; line-height: 1.06; margin-bottom: .55rem; }
h2 { font-size: 1.55rem; letter-spacing: -.035em; }
h3 { font-size: 1.03rem; margin-bottom: 0; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: .5rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.accent { color: var(--green); }
[hidden] { display: none !important; }

.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-family: Georgia, serif; font-style: italic; }
.brand-light .brand-mark { color: var(--forest); background: #d6a86a; }

.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 1.1fr) minmax(420px, .9fr); }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 3rem 4rem; color: #f8f5ec; background: radial-gradient(circle at 70% 25%, rgba(91,139,110,.35), transparent 31%), linear-gradient(145deg, #19372b, #0c1712); }
.login-story::after { content: ""; position: absolute; right: -12%; bottom: -22%; width: 72%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.story-copy { position: relative; z-index: 1; max-width: 660px; }
.story-copy h1 { font-size: clamp(3rem, 5.8vw, 6rem); font-weight: 500; letter-spacing: -.065em; }
.story-copy h1 em { color: #dfb67e; font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
.story-copy > p:last-child { max-width: 520px; color: rgba(255,255,255,.67); font-size: 1.05rem; line-height: 1.7; }
.story-foot { z-index: 1; color: rgba(255,255,255,.42); font-size: .78rem; }
.login-panel { display: grid; place-items: center; padding: 2rem; background: var(--paper); }
.login-card { width: min(410px, 100%); }
.login-card h2 { margin-bottom: .5rem; font-size: 2.4rem; }
.login-card > .muted { margin-bottom: 2.2rem; line-height: 1.6; }
.login-card label, .form-grid label { display: grid; gap: .55rem; margin-bottom: 1.1rem; color: #445049; font-size: .76rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #d8dcd5; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
input, select { height: 46px; padding: 0 .85rem; }
textarea { padding: .8rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #4d8067; box-shadow: 0 0 0 3px rgba(36,92,69,.11); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 85px; }
.text-button { position: absolute; right: .75rem; top: 50%; border: 0; color: var(--green); background: none; transform: translateY(-50%); font-size: .72rem; font-weight: 700; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: .8rem; border: 1px solid transparent; border-radius: 10px; padding: .7rem 1rem; font-size: .78rem; font-weight: 700; transition: transform .16s, background .16s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 8px 24px rgba(36,92,69,.18); }
.button-primary:hover { background: #194934; }
.button-secondary { border-color: var(--line); color: var(--ink); background: #fff; }
.button-wide { width: 100%; justify-content: space-between; padding-inline: 1.2rem; }
.security-note { margin-top: 1rem; color: #97a09a; text-align: center; font-size: .68rem; }
.mobile-brand { display: none; margin-bottom: 3rem; }
.form-error { margin: .75rem 0; padding: .7rem .8rem; border-radius: 8px; color: var(--danger); background: #fff0ee; font-size: .76rem; }

.app-shell { min-height: 100vh; padding-left: 232px; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: 232px; flex-direction: column; padding: 1.7rem 1rem 1rem; border-right: 1px solid rgba(255,255,255,.07); color: #e8eee9; background: var(--forest); }
.sidebar .brand { margin: 0 .55rem 2.7rem; }
.sidebar nav { display: grid; gap: .3rem; }
.nav-item { display: flex; width: 100%; align-items: center; gap: .8rem; border: 0; border-radius: 9px; padding: .72rem .8rem; color: #aab8b0; background: transparent; text-align: left; font-size: .78rem; }
.nav-item span { display: inline-grid; width: 22px; place-items: center; font-size: 1rem; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.sidebar-foot { display: grid; gap: .5rem; margin-top: auto; }
.sidebar-foot a { padding: .7rem .8rem; color: #83958a; text-decoration: none; font-size: .67rem; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; height: 78px; align-items: center; justify-content: space-between; padding: 0 2.3rem; border-bottom: 1px solid var(--line); background: rgba(245,243,237,.92); backdrop-filter: blur(12px); }
.topbar h2 { margin-bottom: 0; font-size: 1.15rem; }
.top-date { margin-bottom: .25rem; color: var(--muted); font-size: .65rem; text-transform: capitalize; }
.top-actions { display: flex; align-items: center; gap: 1rem; }
.restaurant-picker { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .68rem; }
.restaurant-picker select { width: 170px; height: 38px; background: var(--paper); }
.user-chip { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; font-size: .72rem; font-weight: 700; }
.user-chip > span:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--green); background: var(--sage); }
.icon-button { display: none; border: 0; background: transparent; font-size: 1.3rem; }
.content { padding: 2.4rem; }
.page { display: none; max-width: 1400px; margin: 0 auto; }
.page.active { display: block; animation: page-in .28s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }
.hero-row, .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.page-head h1 { margin-bottom: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric-card { display: flex; min-height: 130px; align-items: center; gap: 1rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 7px 25px rgba(26,43,34,.035); }
.metric-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 12px; font-size: 1.05rem; }
.metric-icon.green { color: #236143; background: #e0eee4; }.metric-icon.amber { color: #93651d; background: #f6ead2; }.metric-icon.rose { color: #995854; background: #f5e5e2; }.metric-icon.blue { color: #456989; background: #e3edf4; }
.metric-card div:last-child { display: grid; }
.metric-card span { color: var(--muted); font-size: .7rem; }
.metric-card strong { font-size: 1.8rem; letter-spacing: -.05em; }
.metric-card small { color: #98a19b; font-size: .62rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); gap: 1rem; }
.panel { padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 7px 25px rgba(26,43,34,.035); }
.panel-head { display: flex; min-height: 45px; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.link-button, .small-button { border: 0; color: var(--green); background: none; font-size: .7rem; font-weight: 700; }
.small-button { padding: .45rem .7rem; border-radius: 8px; background: var(--sage); }
.timeline { display: grid; }
.timeline-item { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 1rem; padding: 1rem .2rem; border-top: 1px solid #eceee9; }
.timeline-time { font-size: .9rem; font-weight: 700; }
.timeline-main strong { display: block; margin-bottom: .25rem; font-size: .78rem; }.timeline-main span { color: var(--muted); font-size: .67rem; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .32rem .56rem; color: #536159; background: #edf0ec; font-size: .61rem; font-weight: 700; white-space: nowrap; }
.badge.confirmed, .badge.seated, .badge.completed { color: #246044; background: #e1eee5; }.badge.pending, .badge.hold { color: #8b631d; background: #f6ecd8; }.badge.cancelled, .badge.no_show { color: #a04a44; background: #f7e7e4; }.badge.arrived { color: #416586; background: #e4edf4; }
.status-summary { display: grid; gap: .85rem; }
.status-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; font-size: .72rem; }.status-row div { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 4px; background: #eceee9; }.status-row i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.empty-state { padding: 2.4rem 1rem; color: var(--muted); text-align: center; font-size: .76rem; }.empty-state strong { display: block; margin-bottom: .4rem; color: var(--ink); }
.toolbar { display: flex; gap: .7rem; margin-bottom: 1rem; }.toolbar input, .toolbar select { width: auto; min-width: 170px; background: var(--paper); }.toolbar .search-input { width: min(420px, 100%); }
.table-panel { padding: .3rem 1.2rem; }
.data-list { display: grid; }
.data-row { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); align-items: center; gap: 1rem; min-height: 68px; border-bottom: 1px solid #e9ebe6; font-size: .72rem; }
.data-row:last-child { border-bottom: 0; }.data-row.header { min-height: 44px; color: #919a94; font-size: .62rem; font-weight: 700; text-transform: uppercase; }.data-row strong { font-size: .76rem; }.data-row small { display: block; margin-top: .2rem; color: var(--muted); }
.data-row.reservation-row { grid-template-columns: .7fr 1.2fr .7fr .6fr .8fr 1fr; }
.data-row.clickable { cursor: pointer; transition: background .15s; }.data-row.clickable:hover { background: #f7f8f4; }
.status-select { height: 34px; border: 0; background: #eef1ed; font-size: .66rem; }
.reservation-commandbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }.reservation-commandbar .toolbar { margin: 0; }.mode-switch b { min-width: 20px; border-radius: 999px; padding: .12rem .32rem; color: #fff; background: #b67a31; font-size: .56rem; }
.waitlist-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: .75rem; padding: .9rem 0; }.waitlist-card { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: .8rem; border: 1px solid #eadfc9; border-radius: 11px; padding: 1rem; color: var(--ink); background: #fffaf0; text-align: left; cursor: pointer; }.waitlist-card:hover { border-color: #d1a661; box-shadow: 0 6px 18px rgba(96,65,20,.08); }.waitlist-card strong,.waitlist-card small { display: block; }.waitlist-card small { margin-top: .2rem; color: var(--muted); font-size: .61rem; }.waitlist-card b { color: #9b691f; font-size: .62rem; }.waitlist-time { font-size: .9rem; font-weight: 800; }
.reservation-schedule-panel { padding: .8rem; overflow-x: auto; }.schedule-shell { min-width: 1120px; }.schedule-hours,.schedule-row { display: grid; grid-template-columns: 135px minmax(900px,1fr); }.schedule-hours { position: sticky; top: 0; z-index: 5; padding-bottom: .35rem; color: var(--muted); background: var(--paper); }.schedule-hours > div { display: flex; justify-content: space-between; }.schedule-hours b { font-size: .56rem; font-weight: 700; transform: translateX(-50%); }.schedule-hours b:last-child { transform: translateX(50%); }.schedule-row { min-height: 64px; border-top: 1px solid #e4e8e2; }.schedule-table { display: grid; align-content: center; padding: .6rem .8rem .6rem .2rem; }.schedule-table strong { font-size: .72rem; }.schedule-table span { margin-top: .15rem; color: var(--muted); font-size: .56rem; }.schedule-track { position: relative; background-image: repeating-linear-gradient(to right,transparent 0,transparent calc(6.25% - 1px),#e8ebe6 calc(6.25% - 1px),#e8ebe6 6.25%),linear-gradient(to bottom,#fafbf8,#f7f9f5); }.schedule-track > i { display: none; }.schedule-track.drag-target { background-color: #eef5ef; }.schedule-booking { position: absolute; z-index: 2; left: var(--booking-left); top: 8px; width: var(--booking-width); min-width: 38px; height: 47px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--booking-color) 80%,#334); border-radius: 8px; padding: .35rem .45rem; color: #fff; background: var(--booking-color); text-align: left; cursor: grab; box-shadow: 0 4px 10px color-mix(in srgb,var(--booking-color) 22%,transparent); }.schedule-booking:active,.schedule-booking.dragging { cursor: grabbing; opacity: .65; }.schedule-booking strong,.schedule-booking span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.schedule-booking strong { font-size: .62rem; }.schedule-booking span { margin-top: .16rem; color: rgba(255,255,255,.85); font-size: .53rem; }.schedule-booking.hold,.schedule-booking.pending { --booking-color:#c58a36; }.schedule-booking.confirmed { --booking-color:#e47739; }.schedule-booking.arrived { --booking-color:#4388c8; }.schedule-booking.seated,.schedule-booking.completed { --booking-color:#2a9b68; }.schedule-help { margin: .8rem .2rem 0; color: var(--muted); font-size: .61rem; }
.floor-page-head { margin-bottom: 1.25rem; }.floor-page-head .muted { margin: .6rem 0 0; font-size: .78rem; }
.floor-commandbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding: .65rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.mode-switch { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 11px; background: #ecefe9; }
.mode-switch button { min-height: 38px; border: 0; border-radius: 8px; padding: .55rem .9rem; color: #68736c; background: transparent; font-size: .7rem; font-weight: 700; }
.mode-switch button.active { color: var(--forest); background: #fff; box-shadow: 0 3px 10px rgba(25,42,33,.10); }
.service-time-controls { display: flex; align-items: flex-end; gap: .45rem; }
.service-time-controls label { display: grid; gap: .2rem; color: var(--muted); font-size: .56rem; font-weight: 700; text-transform: uppercase; }
.service-time-controls input { width: 138px; height: 38px; font-size: .7rem; }
.service-time-controls label:nth-child(2) input { width: 95px; }
.time-button, .time-step { height: 38px; border: 1px solid #dbe0d9; border-radius: 9px; padding: 0 .75rem; color: var(--green); background: #f8faf7; font-size: .68rem; font-weight: 700; }.time-step { width: 44px; padding: 0; }
.map-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .6rem; margin-bottom: .8rem; }
.map-stat { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: .55rem; min-height: 46px; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(253,252,249,.8); font-size: .63rem; }.map-stat i,.state-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--status-color); box-shadow: 0 0 0 4px color-mix(in srgb,var(--status-color) 18%,transparent); }.map-stat span { color: var(--muted); }.map-stat strong { font-size: .78rem; }
.free { --status-color:#2fc887; }.soon { --status-color:#e9a33a; }.reserved { --status-color:#f0823e; }.arrived { --status-color:#4f91da; }.occupied { --status-color:#ed5c59; }
.floor-tabs { display: flex; gap: .5rem; margin-bottom: .8rem; overflow-x: auto; scrollbar-width: thin; }
.floor-tab { display: flex; min-width: 135px; align-items: center; justify-content: space-between; gap: .7rem; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; color: var(--ink); background: var(--paper); white-space: nowrap; }.floor-tab strong { font-size: .7rem; }.floor-tab span { color: var(--muted); font-size: .58rem; }.floor-tab.active { border-color: #71907e; color: #fff; background: var(--forest); }.floor-tab.active span { color: #aebcb4; }
.floor-workspace { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: .8rem; align-items: start; }
.floor-stage { min-width: 0; padding: .9rem; }.floor-stage-head { display: flex; min-height: 46px; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }.floor-stage-head .eyebrow { margin-bottom: .25rem; }
.editor-tools { margin-bottom: .55rem; }
.editor-admin { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
.widget-admin { grid-column: 1 / -1; }
.widget-live { border-radius: 999px; padding: .35rem .55rem; color: #19754f; background: #e7f5ec; font-size: .58rem; font-weight: 800; }
.widget-copy { max-width: 720px; margin: 0 0 .85rem; color: var(--muted); font-size: .66rem; line-height: 1.55; }
.widget-url { display: grid; gap: .25rem; }
.widget-url span { color: var(--muted); font-size: .56rem; font-weight: 700; text-transform: uppercase; }
.widget-url input { width: 100%; font-size: .68rem; }
.widget-actions { display: flex; gap: .6rem; margin: .75rem 0; }
.widget-actions + small { color: var(--muted); font-size: .6rem; }
.table-inspector { position: sticky; top: 94px; min-height: 310px; padding: 1.15rem; }
.inspector-empty { display: grid; min-height: 270px; place-content: center; color: var(--muted); text-align: center; }.inspector-empty h3 { margin: .8rem 0 .45rem; color: var(--ink); }.inspector-empty p { max-width: 220px; margin: 0; font-size: .68rem; line-height: 1.6; }.inspector-icon { display: grid; width: 48px; height: 48px; margin: 0 auto; place-items: center; border-radius: 50%; color: var(--green); background: var(--sage); font-size: 1.2rem; }
.inspector-head { display: flex; align-items: center; gap: .7rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }.inspector-head p { margin: 0 0 .16rem; color: var(--muted); font-size: .61rem; }.inspector-head h2 { margin: 0; font-size: 1.25rem; }.capacity-pill { margin-left: auto; border-radius: 999px; padding: .35rem .55rem; color: #506057; background: #eef1ed; font-size: .59rem; font-weight: 700; }
.reservation-focus { display: grid; grid-template-columns: 1fr auto; gap: .35rem; padding: 1rem 0; }.reservation-focus span { color: var(--muted); font-size: .6rem; }.reservation-focus strong { font-size: .72rem; }.reservation-focus b { grid-column: 1/-1; font-size: 1.05rem; }
.guest-focus { display: flex; align-items: center; gap: .7rem; padding: .8rem; border-radius: 11px; background: #f4f5f1; }.guest-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: .75rem; font-weight: 700; }.guest-focus strong,.guest-focus span { display: block; }.guest-focus strong { font-size: .72rem; }.guest-focus span { margin-top: .15rem; color: var(--muted); font-size: .58rem; }
.reservation-note { margin: .75rem 0 0; padding: .65rem .75rem; border-left: 3px solid #d3a05c; border-radius: 0 8px 8px 0; color: #5d625e; background: #faf4e9; font-size: .63rem; line-height: 1.5; }
.inspector-actions { display: grid; margin-top: .8rem; }.inspector-actions button { min-height: 40px; border: 0; border-radius: 9px; color: #fff; background: var(--green); font-size: .68rem; font-weight: 700; }
.free-table-message { padding-top: 1.2rem; }.free-table-message strong { font-size: .82rem; }.free-table-message p { margin: .35rem 0 1rem; color: var(--muted); font-size: .65rem; line-height: 1.5; }
.stack-list { display: grid; gap: .5rem; }
.stack-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem; border: 1px solid transparent; border-radius: 9px; background: #f5f5f0; cursor: pointer; }.stack-item:hover, .stack-item.active { border-color: #9ebba9; background: #edf4ef; }.stack-item strong { display: block; font-size: .74rem; }.stack-item small { color: var(--muted); font-size: .61rem; }
.panel-actions { display: flex; gap: .45rem; }
.drag-hint { display: block; margin-top: .35rem; color: var(--muted); font-size: .61rem; font-weight: 500; }
.plan-tools, .selection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .75rem; }
.plan-tools > span { margin-right: .15rem; color: var(--muted); font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.plan-tool { min-height: 30px; border: 1px solid #dfe3dc; border-radius: 7px; padding: .35rem .6rem; color: #4e5d54; background: #f8f8f4; font-size: .64rem; font-weight: 700; }
.plan-tool:hover { border-color: #9ebba9; color: var(--green); background: #eef4ef; }
.plan-tool.danger { margin-left: auto; color: #984942; }.plan-tool.danger:hover { border-color: #deb4af; background: #fff0ee; }
.selection-toolbar { min-height: 42px; padding: .45rem .55rem; border: 1px solid #d9e4dc; border-radius: 9px; background: #eef4ef; }
.selection-toolbar strong { font-size: .71rem; }.selection-toolbar > span { margin-right: auto; color: var(--muted); font-size: .61rem; }
.table-map { position: relative; min-height: 560px; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid #293b34; border-radius: 12px; background-color: #101b17; background-image: radial-gradient(rgba(209,226,217,.14) 1px, transparent 1px),radial-gradient(circle at 50% 0,rgba(57,93,75,.22),transparent 42%); background-size: 18px 18px,100% 100%; box-shadow: inset 0 0 50px rgba(0,0,0,.2); }
.table-map::after { content: "План зала"; position: absolute; right: .75rem; bottom: .55rem; color: #63726a; font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.table-map .empty-state { position: absolute; inset: 0; display: grid; place-content: center; }
.plan-object { position: absolute; left: var(--x); top: var(--y); touch-action: none; user-select: none; cursor: pointer; }
.table-map.edit-mode .plan-object { cursor: grab; }
.plan-object.dragging { z-index: 20 !important; cursor: grabbing; }
.plan-object.selected { outline: 2px solid #f6c06f; outline-offset: 6px; }
.table-object { --table-color:#2fc887; z-index: 5; display: grid; min-width: 72px; min-height: 54px; place-items: center; color: #fff; text-align: center; }
.table-object.status-soon { --table-color:#e9a33a; }.table-object.status-reserved { --table-color:#f0823e; }.table-object.status-arrived { --table-color:#4f91da; }.table-object.status-occupied { --table-color:#ed5c59; }
.table-surface { position: absolute; inset: 0; display: grid; place-items: center; padding: .28rem; border: 2px solid color-mix(in srgb,var(--table-color) 72%,#fff); border-radius: 9px; background: color-mix(in srgb,var(--table-color) 82%,#15261e); box-shadow: 0 7px 18px color-mix(in srgb,var(--table-color) 28%,transparent),inset 0 1px rgba(255,255,255,.2); transition: transform .16s,box-shadow .16s,filter .16s; }
.table-object:hover .table-surface, .table-object.selected .table-surface { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 12px 24px color-mix(in srgb,var(--table-color) 38%,transparent),inset 0 1px rgba(255,255,255,.25); }
.table-object.round .table-surface { border-radius: 50%; }.table-object.square .table-surface { border-radius: 3px; }.table-object.rectangle .table-surface { border-radius: 8px; }.table-object.bar .table-surface { border-radius: 24px; }
.table-object strong { display: block; font-size: .72rem; text-shadow: 0 1px 2px rgba(0,0,0,.2); }.table-object small { display: block; margin-top: .12rem; color: rgba(255,255,255,.82); font-size: .52rem; }
.seat-marker { position: absolute; z-index: 2; left: var(--seat-x); top: var(--seat-y); width: 14px; height: 14px; border: 2px solid #172620; border-radius: 50%; background: color-mix(in srgb,var(--table-color) 70%,#fff); box-shadow: 0 2px 5px rgba(0,0,0,.38); transform: translate(-50%, -50%); pointer-events: none; }
.table-map.edit-mode .table-object { --table-color:#789a86; }
.floor-element { z-index: 1; min-width: 12px; min-height: 12px; }
.floor-element.wall { border-radius: 3px; background: #758078; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.floor-element.window { border: 2px solid #75bedb; border-left: 0; border-right: 0; background: rgba(105,190,224,.32); box-shadow: 0 0 8px rgba(105,190,224,.22); }
.floor-element.door { border: 3px solid #c9a56f; border-top: 0; background: rgba(218,191,154,.12); }
.floor-element.door::after { content: ""; position: absolute; inset: 10% 5%; border: 1px dashed rgba(145,102,52,.6); border-radius: 50% 50% 0 0; }
.floor-element.bar { display: grid; place-items: center; border: 2px solid #a89070; border-radius: 18px; color: #e0d1bc; background: #594f43; font-size: .58rem; font-weight: 700; text-transform: uppercase; }
.floor-element.selected { z-index: 3; }
.resize-handle { position: absolute; z-index: 4; right: -7px; bottom: -7px; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; background: #d49a50; box-shadow: 0 2px 5px rgba(0,0,0,.2); cursor: nwse-resize; touch-action: none; }

.modal { width: min(690px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; border: 0; border-radius: 16px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.reservation-modal { width: min(980px,calc(100% - 2rem)); }.reservation-form-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(230px,.75fr); gap: 1.35rem; }.reservation-context { display: grid; align-content: start; gap: 1rem; border-left: 1px solid var(--line); padding-left: 1.2rem; }.reservation-context section { min-width: 0; }.compact-history { display: grid; gap: .45rem; color: var(--muted); font-size: .62rem; }.compact-history button,.compact-history > div { display: grid; gap: .16rem; border: 0; border-radius: 8px; padding: .65rem; color: var(--ink); background: #f3f5f1; text-align: left; }.compact-history button { cursor: pointer; }.compact-history button:hover { background: #e9f0ea; }.compact-history strong { font-size: .64rem; }.compact-history span { color: var(--muted); font-size: .56rem; }.field-hint { display: block; min-height: 14px; margin-top: .25rem; color: var(--muted); font-size: .56rem; }.button-danger { color: #9b4943; background: #f7e8e5; }.modal-action-spacer { flex: 1; }
.modal::backdrop { background: rgba(10,24,17,.54); backdrop-filter: blur(3px); }
.modal form { padding: 1.5rem; }.modal-small { width: min(500px, calc(100% - 2rem)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; }.modal-head h2 { margin-bottom: 0; }.modal-close { border: 0; color: var(--muted); background: transparent; font-size: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }.form-grid.single { grid-template-columns: 1fr; }.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: .7rem; padding-top: .6rem; }
.toast { position: fixed; z-index: 100; right: 1.4rem; bottom: 1.4rem; max-width: 360px; padding: .9rem 1rem; border-radius: 10px; color: #fff; background: var(--forest); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .25s; font-size: .74rem; }.toast.visible { opacity: 1; transform: none; }.toast.error { background: #823a36; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .floor-workspace { grid-template-columns: minmax(0,1fr) 260px; }.map-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 780px) {
  .login-shell { display: block; }.login-story { display: none; }.login-panel { min-height: 100vh; padding: 1.5rem; }.mobile-brand { display: flex; }
  .app-shell { padding-left: 0; }.sidebar { width: min(270px, 82vw); transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow); }.sidebar.open { transform: none; }
  .topbar { height: 72px; padding: 0 1rem; }.icon-button { display: block; }.topbar > div:nth-child(2) { margin-right: auto; margin-left: .7rem; }.restaurant-picker span, .user-chip > span:last-child { display: none; }.restaurant-picker select { width: 120px; }
  .content { padding: 1.3rem 1rem 5rem; }.hero-row, .page-head { align-items: flex-start; }.hero-row h1 { font-size: 2rem; }.hero-row .muted { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.metric-card { min-height: 110px; padding: .9rem; }.metric-card small { display: none; }
  .dashboard-grid, .floor-workspace, .editor-admin { grid-template-columns: 1fr; }
  .floor-commandbar { align-items: stretch; flex-direction: column; }.service-time-controls { flex-wrap: wrap; }.service-time-controls label:first-child { flex: 1; }.service-time-controls label:first-child input { width: 100%; }.map-summary { display: flex; overflow-x: auto; }.map-stat { min-width: 135px; }.floor-stage { padding: .65rem; }.table-map { min-height: 390px; }.table-inspector { position: static; min-height: 0; }.inspector-empty { min-height: 150px; }
  .data-list { min-width: 650px; }.table-panel { overflow-x: auto; }.toolbar { flex-wrap: wrap; }.toolbar input, .toolbar select { flex: 1; min-width: 135px; }
  .reservation-commandbar { align-items: stretch; flex-direction: column; }.reservation-commandbar .mode-switch { display: grid; grid-template-columns: repeat(3,1fr); }.reservation-form-layout { grid-template-columns: 1fr; }.reservation-context { border-top: 1px solid var(--line); border-left: 0; padding-top: 1rem; padding-left: 0; }
}
@media (max-width: 500px) {
  .metric-grid { gap: .7rem; }.metric-card { display: grid; gap: .5rem; }.metric-card strong { font-size: 1.5rem; }.metric-icon { width: 34px; height: 34px; }
  .button { padding-inline: .8rem; }.hero-row { gap: .7rem; }.hero-row .button { max-width: 125px; }
  .form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.modal form { padding: 1.2rem; }
  .timeline-item { grid-template-columns: 54px 1fr; }.timeline-item > :last-child { grid-column: 2; justify-self: start; }
  .floor-page-head { align-items: flex-start; }.floor-page-head .muted { display: none; }.floor-page-head .button { max-width: 125px; }.mode-switch { display: grid; grid-template-columns: 1fr 1fr; }.service-time-controls label:nth-child(2) { flex: 1; }.service-time-controls label:nth-child(2) input { width: 100%; }.floor-stage-head { display: block; }.floor-stage-head .panel-actions { margin-top: .7rem; }.table-map { min-height: 340px; aspect-ratio: 4 / 3; }
  .widget-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
