.er {
  --er-bg: #0b0e11; --er-panel: #11161b; --er-border: #2b3540;
  --er-text: #f0f4f6; --er-muted: #a4b0bc; --er-blue: #8cbaff;
  --er-teal: #76ddd4; --er-green: #8be0a9; --er-amber: #f4ca80;
  color: var(--er-text); font-family: inherit; font-size: 14px; line-height: 1.5; min-width: 0;
}
.er *, .er *::before, .er *::after { box-sizing: border-box; }
.er[hidden], #restaurantFloorPlanSettings[hidden] { display: none !important; }
.er h2 { margin: 4px 0 5px; font-size: 28px; letter-spacing: -.035em; line-height: 1.2; }
.er h3 { margin: 0 0 7px; font-size: 19px; letter-spacing: -.02em; }
.er h4 { font-size: 15px; margin: 0; }
.er p { margin: 7px 0 14px; }
.er small { display: block; font-size: 12px; line-height: 1.45; }
.er input, .er select, .er textarea {
  width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid var(--er-border);
  border-radius: 9px; background: #080b0e; color: var(--er-text); font: inherit; color-scheme: dark;
}
.er input[type=checkbox] { width: 17px; min-height: 17px; height: 17px; flex-shrink: 0; accent-color: #89c9aa; }
.er input:focus-visible, .er select:focus-visible, .er textarea:focus-visible, .er button:focus-visible, .er summary:focus-visible {
  outline: 2px solid var(--er-blue); outline-offset: 3px;
}
.er button { font-family: inherit; cursor: pointer; }
.er button:disabled { opacity: .5; cursor: wait; }
.er-button {
  min-height: 40px; padding: 9px 14px; border: 1px solid var(--er-border); border-radius: 9px;
  background: #151c23; color: var(--er-text); font-size: 13px; font-weight: 550; white-space: nowrap;
}
.er-button:hover { background: #202b35; border-color: #536574; }
.er-button.er-primary { background: #dbece1; color: #12271c; border-color: #dbece1; }
.er-button.er-primary:hover { background: #f0faf3; }
.er-heading, .er-toolbar, .er-actions, .er-area-title, .er-floor-toolbar, .er-detail-heading, .er-dialog-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.er-heading { margin: 10px 0 20px; align-items: flex-start; }
.er-heading p, .er-muted { color: var(--er-muted); }
.er-eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .13em; color: #b6cabc; }
.er-actions { justify-content: flex-start; gap: 8px; }
.er-toolbar { padding: 12px; border: 1px solid var(--er-border); border-radius: 12px; background: var(--er-bg); margin-bottom: 14px; justify-content: flex-start; }
.er-toolbar label { margin: 0; }
.er-segment { display: flex; gap: 4px; }
.er-date { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.er-date input { width: 157px; }
.er-zone { font-size: 11px; color: var(--er-muted); }
.er-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.er-stats>div { background: linear-gradient(125deg, #18231e, #101519 70%); border: 1px solid var(--er-border); border-radius: 12px; padding: 13px 16px; display: flex; align-items: baseline; gap: 10px; }
.er-stats strong { font-size: 27px; font-weight: 600; letter-spacing: -.04em; }
.er-stats span { font-size: 12px; color: var(--er-muted); }
.er-small-toolbar { background: transparent; border: 0; padding: 0; }
.er-search { flex: 1 1 200px; }
.er-notice { color: var(--er-amber); }
.er-notice:not(:empty) { border: 1px solid #71582b; background: #241e12; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.er-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.er-main { min-width: 0; }
.er-detail { min-width: 0; background: var(--er-panel); border: 1px solid var(--er-border); padding: 19px; border-radius: 14px; position: sticky; top: 14px; }
.er-detail h3 { margin-top: 10px; overflow-wrap: anywhere; }
.er-detail dl { margin: 18px 0; }
.er-detail dl>div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #273039; }
.er-detail dt { font-size: 12px; color: var(--er-muted); }
.er-detail dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.er-detail-actions { display: grid; gap: 8px; margin-top: 16px; }
.er-note { padding: 12px; background: var(--er-bg); border-radius: 10px; }
.er-note p { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.er-status { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 4px 7px; border: 1px solid transparent; white-space: nowrap; }
.er-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.er-confirmed { background: #172940; color: #a8ceff; border-color: #38597c; }
.er-arrived { background: #12302e; color: #96e9df; border-color: #34756e; }
.er-seated { background: #153324; color: #a0e9b9; border-color: #3e8158; }
.er-completed { background: #23282e; color: #afb7c1; border-color: #424a54; }
.er-cancelled, .er-no_show { background: #292127; color: #c5aab4; border-color: #58434d; }
.er-attention { background: #372716; color: #f7ce8f; border-color: #977245; }
.er-inactive { background: #191d20; color: #85909a; border-color: #39414a; }
.er-available { background: #111c19; color: #d1e7d9; border-color: #365449; }
.er-resetting { background: repeating-linear-gradient(135deg, #30323a 0 4px, #20242b 4px 9px); color: #c5ccd5; border-color: #515b68; }
.er-warning { display: block; padding: 9px 11px; border-left: 3px solid var(--er-amber); background: #2b2215; color: #f7d7a3; font-size: 12px; margin: 10px 0; border-radius: 3px; }
.er-floor-toolbar { margin: 5px 0 14px; }
.er-time { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; }
.er-time input { width: 125px; }
.er-area { margin-bottom: 14px; border: 1px solid var(--er-border); border-radius: 14px; padding: 16px; background: var(--er-bg); }
.er-area-title { margin-bottom: 15px; }
.er-area-title>span { color: var(--er-muted); font-size: 11px; }
.er-floor-scroll { overflow-x: auto; padding: 5px 0; }
.er-floor-grid { display: grid; grid-template-columns: repeat(8, minmax(78px, 1fr)); grid-auto-rows: 102px; gap: 10px; min-width: 695px; padding: 18px 12px; background-image: radial-gradient(#303a41 1px, transparent 1px); background-size: 17px 17px; }
.er-table { min-width: 0; min-height: 82px; padding: 9px 4px; border: 2px solid #42544a; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; background-color: #16241e; color: #deeee4; }
.er-table::before, .er-table::after { content: ""; width: 33px; height: 5px; background: #53675c; border-radius: 3px; position: absolute; left: calc(50% - 16px); }
.er-table::before { top: -9px; }.er-table::after { bottom: -9px; }
.er-table.er-shape-round { border-radius: 45%; }
.er-table.er-shape-rectangle { border-radius: 7px; }
.er-table-label { font-size: 18px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.er-capacity { font-size: 11px; opacity: .85; }
.er-table-state { font-size: 10px; line-height: 1.3; margin-top: 4px; }
.er-table.er-confirmed { background: #172940; border-color: #648bb8; }
.er-table.er-arrived { background: #173833; border-color: #69bdb1; }
.er-table.er-seated { background: #1f412c; border-color: #79c68e; }
.er-table.er-attention { background: #3a2c19; border-color: #d6a663; }
.er-table.er-inactive { background: #1a2024; border-color: #44515c; color: #9aa6b1; }
.er-selected { outline: 2px solid #e5f4ec; outline-offset: 3px; z-index: 3; }
.er-dim { opacity: .3; }
.er-calendar-title { margin: 8px 0 16px; }
.er-calendar-scroll { border: 1px solid var(--er-border); border-radius: 12px; overflow: auto; background: var(--er-bg); }
.er-calendar { width: calc(140px + var(--er-timeline-width)); }
.er-calendar-row { display: grid; grid-template-columns: 140px var(--er-timeline-width); border-bottom: 1px solid #28323b; }
.er-calendar-row:last-child { border-bottom: 0; }
.er-row-label { position: sticky; left: 0; z-index: 5; background: #141b21; color: var(--er-text); padding: 15px 12px; text-align: left; border: 0; border-right: 1px solid #3b4854; min-height: 92px; display: flex; flex-direction: column; justify-content: center; font-size: 14px; }
.er-row-label small { color: var(--er-muted); font-size: 11px; margin-top: 4px; }
.er-track { position: relative; min-height: 92px; background-image: linear-gradient(to right, #25313c 1px, transparent 1px); background-size: var(--er-hour-size) 100%; cursor: crosshair; }
.er-calendar-head { position: sticky; top: 0; z-index: 6; }
.er-calendar-head .er-row-label, .er-axis { min-height: 45px; background-color: #161f27; }
.er-tick { position: absolute; top: 13px; padding-left: 8px; font-size: 11px; color: #bcc8d3; white-space: nowrap; }
.er-booking { position: absolute; top: 13px; height: 64px; min-width: 0; overflow: hidden; padding: 9px 10px; border: 1px solid; border-radius: 8px; text-align: left; z-index: 2; font-size: 13px; }
.er-booking strong { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 13px; }
.er-booking strong span { font-weight: 400; }
.er-booking small { font-size: 11px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-top: 3px; }
.er-booking.er-flagged { border-bottom: 3px solid var(--er-amber); }
.er-booking.er-cancelled, .er-booking.er-no_show { opacity: .55; border-style: dashed; }
.er-buffer { position: absolute; top: 20px; height: 50px; background: repeating-linear-gradient(135deg, #4a5365 0 2px, #222c38 2px 7px); opacity: .65; border-radius: 0 6px 6px 0; pointer-events: none; z-index: 1; }
.er-now-line { position: absolute; top: 0; bottom: 0; width: 1px; background: #ecb278; z-index: 4; pointer-events: none; }
.er-now-line>span { position: absolute; top: -1px; left: 3px; color: #efc393; font-size: 10px; background: #141b21; padding: 0 3px; }
.er-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.er-footnote { font-size: 12px; color: var(--er-muted); line-height: 1.55; }
.er-booking-card { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--er-border); border-radius: 10px; background: #0d1318; padding: 12px; color: var(--er-text); text-align: left; margin: 9px 0; }
.er-booking-card strong { font-size: 13px; }
.er-booking-card small { color: var(--er-muted); margin-top: 3px; font-size: 11px; }
.er-booking-card .er-warning { width: 100%; margin: 0; }
.er-progress { height: 5px; border-radius: 4px; overflow: hidden; background: #313f38; margin-top: 16px; }
.er-progress>span { display: block; height: 100%; background: #86dba4; }
.er-empty { text-align: center; padding: 40px 24px; background: linear-gradient(140deg, #14251c, #0b1116 60%); border: 1px dashed #466051; border-radius: 15px; }
.er-empty p { max-width: 530px; margin: 12px auto 22px; color: var(--er-muted); }
.er-empty.er-compact { padding: 18px 12px; font-size: 12px; }
.er-unassigned { margin: 22px 0; border: 1px solid var(--er-border); border-radius: 12px; padding: 17px; }
.er summary { cursor: pointer; font-weight: 600; min-height: 34px; font-size: 14px; }
.er summary>span { margin-left: 8px; color: var(--er-muted); font-size: 12px; font-weight: 400; }
.er-request { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--er-border); padding: 13px 0; }
.er-request small { color: var(--er-muted); margin-top: 3px; }
.er-history { margin-top: 18px; font-size: 12px; }
.er-history p { border-top: 1px solid var(--er-border); padding-top: 10px; color: var(--er-muted); }
.er-history small { font-size: 10px; margin-top: 5px; }
.er-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 36px); padding: 26px; border: 1px solid #536155; border-radius: 18px; background: #10171c; box-shadow: 0 25px 120px #000b; color: var(--er-text); }
.er-dialog::backdrop { background: #020507c9; backdrop-filter: blur(4px); }
.er-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.er-field { display: flex; flex-direction: column; gap: 7px; font-size: 12px; min-width: 0; }
.er-field>span { color: #bdc9d4; font-weight: 550; }
.er-field small { color: var(--er-muted); }
.er-seat-choice { border: 1px solid var(--er-border); border-radius: 12px; padding: 14px; margin: 15px 0; }
.er-seat-choice legend { font-size: 14px; padding: 0 8px; }
.er-seat-choice>p { font-size: 12px; }
#er-seating-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 300px; overflow: auto; }
.er-seat-option { display: flex; gap: 9px; align-items: flex-start; padding: 11px; border: 1px solid #314139; border-radius: 9px; background: #0c1410; }
.er-seat-option:has(input:checked) { border-color: #a1d7b7; background: #1a3024; }
.er-seat-option strong { font-size: 13px; }
.er-seat-option small { color: var(--er-muted); font-size: 11px; }
.er-seat-hint { padding-top: 5px; }
.er-form-feedback { font-size: 12px; color: #b9d1c2; margin: 16px 0; }
.er-dialog-actions { justify-content: flex-end; border-top: 1px solid var(--er-border); padding-top: 18px; }
#restaurantFloorPlanSettings { grid-column: 1 / -1; padding: 22px; margin-bottom: 14px; background: linear-gradient(120deg, #142019, #10151b 55%); border: 1px solid #364b40; border-radius: 14px; }
.er-bar-setting { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; border: 1px solid #385746; background: #0d1912; border-radius: 12px; padding: 16px; margin-top: 17px; }
.er-bar-setting>label { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.er-bar-setting select { width: auto; }
.er-setup-details { border-top: 1px solid var(--er-border); padding: 17px 0; }
.er-setup-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; align-items: start; }
.er-table-editor { padding: 13px; background: #10181e; border: 1px solid var(--er-border); border-radius: 11px; }
.er-table-editor>summary { display: list-item; }
.er-check-stack { display: grid; gap: 10px; font-size: 12px; align-content: center; }
.er-check-stack label { display: flex; align-items: center; gap: 7px; }
.er-hours { display: grid; grid-template-columns: 50px 100px minmax(110px, 180px) 20px minmax(110px, 180px); align-items: center; gap: 12px; padding: 8px 0; }
.er-hours>label { display: flex; align-items: center; gap: 7px; }
.er-agenda { display: none; }
.er-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.er-reservations-active>.operations-range-toolbar, .er-reservations-active #operationsKanban, .er-reservations-active #operationsRangeList,
.er-reservations-active #operationsStatusFilter, .er-reservations-active #operationsServiceFilter,
.er-reservations-active .operations-toolbar-actions, .er-reservations-active #dispatchMapPanel { display: none !important; }
.er-reservations-active>.operations-filter-bar { display: flex; }
@media (max-width: 1250px) {
  .er-workspace { grid-template-columns: minmax(0, 1fr); }
  .er-detail { position: static; }
  .er-detail-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-stats>div { flex-direction: column; gap: 1px; }
  .er-date { margin-left: 0; }
}
@media (max-width: 700px) {
  .er h2 { font-size: 25px; }
  .er-heading { gap: 10px; }
  .er-stats { grid-template-columns: repeat(2, 1fr); }
  .er-stats>div { padding: 11px 13px; }
  .er-calendar-desktop { display: none; }
  .er-agenda { display: block; }
  .er-agenda>section { padding: 15px; border: 1px solid var(--er-border); border-radius: 12px; margin-bottom: 12px; }
  .er-setup-tables { grid-template-columns: 1fr; }
  .er-dialog { padding: 19px; }
  .er-hours { grid-template-columns: 35px 77px minmax(80px,1fr) 12px minmax(80px,1fr); gap: 5px; font-size: 12px; }
  .er-hours input[type=time] { padding: 8px 3px; font-size: 12px; }
  #restaurantFloorPlanSettings { padding: 15px; }
  .er-area { padding: 12px; }
  .er-zone { width: 100%; }
}
@media (max-width: 420px) {
  .er-form-grid, #er-seating-options { grid-template-columns: 1fr; }
  .er-date { gap: 4px; }
  .er-date .er-button { padding: 8px 10px; }
  .er-date input { width: 141px; }
  .er-heading .er-actions { width: 100%; }
  .er-heading .er-actions .er-primary { flex: 1; }
  .er-detail-actions { grid-template-columns: 1fr; }
  .er-toolbar { padding: 9px; gap: 9px; }
  .er-bar-setting>label { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .er-workspace, .er-empty { animation: er-appear .2s ease-out; }
  @keyframes er-appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
