/* SeyEats restaurant dashboard. Builds on the variables and buttons in style.css. */
.rd-body { background: var(--paper); min-height: 100vh; }

.rd-topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 4%; background: var(--deep); color: #fff;
}
.rd-brand { display: flex; align-items: center; gap: 9px; font: 800 22px "DM Sans", sans-serif; letter-spacing: -1.2px; }
.rd-brand .brand-mark { background: var(--lime); color: var(--deep); }
.rd-brand .brand-accent { color: var(--lime); }
.rd-brand small { font: 600 11px "DM Sans", sans-serif; letter-spacing: 0; color: #b8cbc1; margin-left: 4px; }
.rd-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-restaurant-name { font: 700 14px "DM Sans", sans-serif; }
.rd-picker { border-radius: 8px; border: 0; padding: 7px 10px; font-weight: 700; }
.rd-icon-button {
  border: 1px solid #ffffff33; background: transparent; color: #fff;
  border-radius: 8px; padding: 7px 11px; font: 700 11px "DM Sans", sans-serif; cursor: pointer;
}
.rd-icon-button[aria-pressed="true"] { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.rd-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #d1ddd7; }
.rd-live i { width: 8px; height: 8px; border-radius: 50%; background: #e3b341; }
.rd-live.on i { background: #7fd36b; box-shadow: 0 0 0 4px #7fd36b33; }
.rd-live.off i { background: #e5675f; }

.rd-main { padding: 22px 4% 60px; }

/* Sign-in and message cards */
.rd-card {
  max-width: 420px; margin: 8vh auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 28px; box-shadow: var(--shadow);
}
.rd-card h1 { font: 800 26px "DM Sans", sans-serif; letter-spacing: -1px; margin: 0 0 6px; }
.rd-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.rd-card code { display: block; white-space: pre-wrap; background: #f2f5ef; padding: 10px; border-radius: 8px; font-size: 11px; color: var(--ink); margin-top: 8px; }
.rd-field { display: grid; gap: 6px; margin: 14px 0; }
.rd-field label { font-size: 10px; font-weight: 700; letter-spacing: .8px; color: #526258; }
.rd-field input { height: 46px; border: 1px solid #dfe6df; border-radius: 10px; padding: 0 13px; background: #fbfcfa; }
.rd-error { color: #a52c25; font-size: 12px; min-height: 18px; margin: 6px 0 0; }

/* Status tabs (phones) and board columns (wide screens) */
.rd-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.rd-tab {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 13px; font: 700 12px "DM Sans", sans-serif; color: #58645c; cursor: pointer;
}
.rd-tab b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: #edf3e4; margin-left: 6px; font-size: 11px; }
.rd-tab.active { background: var(--green); color: #fff; border-color: var(--green); }
.rd-tab.active b { background: var(--lime); color: var(--deep); }
.rd-tab.alert b { background: #e5675f; color: #fff; }

.rd-board { display: grid; gap: 16px; }
.rd-column h2 { font: 800 15px "DM Sans", sans-serif; margin: 0 0 10px; display: flex; justify-content: space-between; }
.rd-column h2 span { color: var(--muted); font-weight: 600; }
.rd-empty { color: var(--muted); font-size: 12px; padding: 18px; border: 1px dashed #d5ddd3; border-radius: 12px; text-align: center; }

@media (max-width: 1099px) {
  .rd-column { display: none; }
  .rd-column.active { display: block; }
  .rd-column h2 { display: none; }
}
@media (min-width: 1100px) {
  .rd-tabs { display: none; }
  .rd-board { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
}

/* Order cards */
.rd-order {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px;
  transition: box-shadow .3s, border-color .3s;
}
.rd-order.is-new { border-color: #e5675f; box-shadow: 0 0 0 3px #e5675f26; animation: rd-pulse 1.4s ease-in-out 3; }
@keyframes rd-pulse { 50% { box-shadow: 0 0 0 7px #e5675f1a; } }
.rd-order-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rd-order-top h3 { font: 800 16px "DM Sans", sans-serif; margin: 0; }
.rd-age { font-size: 11px; color: var(--muted); }
.rd-age.late { color: #b4532a; font-weight: 700; }
.rd-items { list-style: none; padding: 0; margin: 10px 0; font-size: 13px; }
.rd-items li { padding: 3px 0; }
.rd-items b { display: inline-block; min-width: 26px; }
.rd-total { display: flex; justify-content: space-between; font-size: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.rd-customer { font-size: 12px; color: #4f5c54; line-height: 1.6; margin-top: 8px; }
.rd-customer a { color: var(--green); font-weight: 700; }
.rd-notes { background: #fff7e0; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-top: 8px; }
.rd-actions { display: grid; gap: 7px; margin-top: 12px; }
.rd-actions .primary-button { margin-top: 0; }
.rd-actions .secondary-button { width: 100%; }
.rd-cancel { color: #a52c25 !important; }
.rd-cancel.confirm { background: #a52c25 !important; color: #fff !important; border-color: #a52c25 !important; }
.rd-final { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.rd-final.cancelled { color: #a52c25; }

/* Driver info on order cards (v9) */
.rd-driver { font-size: 12px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #edf3e4; color: #2f4f37; }
.rd-driver a { color: var(--green); font-weight: 700; }
.rd-driver.waiting { background: #f4f6f2; color: var(--muted); }

/* ===================== v11: restaurant back office ===================== */
.rd-sections { display: flex; gap: 4px; padding: 8px 4%; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 61px; z-index: 4; scrollbar-width: none; }
.rd-sections button { border: 0; background: transparent; padding: 9px 14px; border-radius: 10px; font: 700 13px "DM Sans", sans-serif; color: #6b5d52; cursor: pointer; white-space: nowrap; }
.rd-sections button.active { background: var(--accent); color: #fff; }
.rd-sections button b { background: var(--sun); color: var(--sun-ink); border-radius: 10px; padding: 1px 7px; margin-left: 6px; font-size: 11px; }
.rd-open-toggle { border: 0; border-radius: 20px; padding: 7px 12px; font: 800 11px "DM Sans", sans-serif; cursor: pointer; background: #2fa84f; color: #fff; }
.rd-open-toggle.paused { background: var(--sun); color: var(--sun-ink); }
@media (max-width: 760px) { .rd-sections { top: 104px; } }

.ro-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 4px 0 18px; flex-wrap: wrap; }
.ro-head h1 { font: 800 26px "DM Sans", sans-serif; letter-spacing: -1px; margin: 0 0 4px; }
.ro-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 640px; line-height: 1.5; }
.ro-action { width: auto !important; margin: 0 !important; padding: 12px 18px !important; white-space: nowrap; }
.ro-toolbar { margin-bottom: 14px; }
.ro-search { width: min(420px, 100%); height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; font: 500 14px "DM Sans", sans-serif; }
.ro-section h2 { font: 800 16px "DM Sans", sans-serif; margin: 20px 0 10px; display: flex; gap: 8px; align-items: baseline; }
.ro-section h2 span { color: var(--muted); font-size: 12px; font-weight: 600; }

.ro-dish, .ro-deal { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.ro-dish.is-off { background: #fbf6f2; }
.ro-dish.is-off .ro-thumb img, .ro-dish.is-off .ro-thumb span { filter: grayscale(1); opacity: .6; }
.ro-dish.is-later { border-style: dashed; }
.ro-thumb { flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; font-size: 30px; }
.ro-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ro-dish-info, .ro-deal-info { flex: 1; min-width: 0; }
.ro-dish-info h3, .ro-deal-info h3 { font: 800 15px "DM Sans", sans-serif; margin: 0 0 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ro-dish-info p, .ro-deal-info p { margin: 0 0 6px; font-size: 12px; color: #5d5148; line-height: 1.45; }
.ro-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.ro-meta b { color: var(--accent-press); font-size: 14px; }
.ro-chip { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: #f3ece4; color: #5d5148; }
.ro-chip.soft { background: transparent; color: var(--muted); padding-left: 0; }
.ro-chip.warn { background: #fff1c9; color: #7a5200; }
.ro-dish-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.ro-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 10px; padding: 9px 13px; font: 700 12px "DM Sans", sans-serif; cursor: pointer; white-space: nowrap; }
.ro-btn:hover { border-color: var(--accent); color: var(--accent-press); }
.ro-btn.ghost { border-color: transparent; background: transparent; }
.ro-btn.danger { color: #b3261e; }
.ro-btn.danger.confirm { background: #b3261e; color: #fff; border-color: #b3261e; }

/* switch */
.ro-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; font-weight: 700; user-select: none; }
.ro-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ro-switch-ui { width: 40px; height: 24px; border-radius: 12px; background: #d7cdc3; position: relative; transition: background .15s; flex: none; }
.ro-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px #0003; }
.ro-switch input:checked + .ro-switch-ui { background: #2fa84f; }
.ro-switch input:checked + .ro-switch-ui::after { left: 19px; }
.ro-switch input:focus-visible + .ro-switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.ro-switch-text { min-width: 58px; }

.ro-empty { text-align: center; padding: 42px 18px; border: 1.5px dashed #e3d4c4; border-radius: 18px; background: #fffdf9; }
.ro-empty span { font-size: 40px; }
.ro-empty h3 { font: 800 18px "DM Sans", sans-serif; margin: 8px 0 4px; }
.ro-empty p { color: var(--muted); font-size: 13px; margin: 0; }
.ro-muted { color: var(--muted); font-size: 12px; }

/* modal */
.rd-modal { position: fixed; inset: 0; z-index: 30; background: #24191488; display: grid; place-items: center; padding: 18px; overflow-y: auto; }
.rd-modal.hidden { display: none; }
.rd-modal-card { width: min(560px, 100%); background: var(--cream); border-radius: 20px; padding: 20px 22px; box-shadow: 0 30px 70px #0006; max-height: calc(100dvh - 36px); overflow-y: auto; }
body.modal-open { overflow: hidden; }
.ro-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ro-modal-head h2 { font: 800 21px "DM Sans", sans-serif; margin: 0; }
.ro-modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ro-modal-foot > div { display: flex; gap: 8px; align-items: center; }
.ro-save { width: auto !important; margin: 0 !important; padding: 12px 20px !important; }
.ro-form .rd-field { margin: 12px 0; }
.ro-form .rd-field input, .ro-form .rd-field select, .ro-form .rd-field textarea { width: 100%; font: 500 14px "DM Sans", sans-serif; }
.ro-form .rd-field textarea { border: 1px solid #e6dccf; border-radius: 10px; padding: 10px 13px; background: #fffdf9; resize: vertical; }
.ro-form .rd-field select { height: 46px; border: 1px solid #e6dccf; border-radius: 10px; padding: 0 10px; background: #fffdf9; }
.ro-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .ro-row { grid-template-columns: 1fr; } }
.ro-hint, .ro-photo small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.4; }
.ro-check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; margin: 10px 0; }
.ro-check input { width: 18px; height: 18px; accent-color: var(--accent); }

.ro-photo, .ro-cover { display: flex; gap: 14px; align-items: center; margin: 6px 0 4px; }
.ro-photo-preview { flex: none; width: 110px; height: 110px; border-radius: 16px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; font-size: 34px; }
.ro-cover-preview { flex: none; width: 220px; height: 124px; border-radius: 16px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; font-size: 34px; }
.ro-photo-preview img, .ro-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.ro-photo-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ro-photo-actions small { flex-basis: 100%; }
@media (max-width: 520px) { .ro-cover { flex-direction: column; align-items: flex-start; } .ro-cover-preview { width: 100%; height: 160px; } }

.ro-days { display: flex; gap: 6px; flex-wrap: wrap; }
.ro-day input, .ro-segment input { position: absolute; opacity: 0; pointer-events: none; }
.ro-day span { display: inline-grid; place-items: center; min-width: 46px; height: 38px; border-radius: 10px; border: 1px solid #e6dccf; background: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.ro-day input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.ro-day input:focus-visible + span, .ro-segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ro-segment { display: inline-flex; background: #f1e7dc; border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.ro-segment span { display: inline-block; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 12px; cursor: pointer; color: #5d5148; }
.ro-segment input:checked + span { background: #fff; color: var(--accent-press); box-shadow: 0 2px 6px #0001; }
.ro-segment.small span { padding: 7px 11px; }
.ro-preview { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 12px; margin: 8px 0 0; }

/* deals */
.ro-deal-badge { flex: none; width: 76px; height: 76px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-content: center; text-align: center; font: 800 22px/1 "DM Sans", sans-serif; }
.ro-deal-badge small { display: block; font-size: 10px; letter-spacing: 1px; margin-top: 3px; }
.ro-deal.ended .ro-deal-badge, .ro-deal.off .ro-deal-badge { background: #cbbfb3; }
.ro-deal.soon .ro-deal-badge { background: var(--sun); color: var(--sun-ink); }
.ro-status { font: 800 10px "DM Sans", sans-serif; padding: 3px 8px; border-radius: 20px; background: #eee5db; color: #6b5d52; }
.ro-status.live { background: #dcf3e2; color: #1d7a3a; }
.ro-status.soon { background: #fff1c9; color: #7a5200; }

/* reviews */
.ro-rating-summary { display: flex; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 14px; flex-wrap: wrap; }
.ro-rating-big { display: grid; justify-items: start; }
.ro-rating-big b { font: 800 44px/1 "DM Sans", sans-serif; }
.ro-rating-big small { color: var(--muted); font-size: 12px; }
.ro-stars { color: #f2a900; letter-spacing: 1px; font-size: 16px; }
.ro-bars { flex: 1; min-width: 200px; display: grid; gap: 5px; }
.ro-bar { display: grid; grid-template-columns: 30px 1fr 30px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.ro-bar i { height: 8px; border-radius: 4px; background: #f1e7dc; overflow: hidden; }
.ro-bar em { display: block; height: 100%; background: var(--sun); border-radius: 4px; }
.ro-review { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.ro-review.is-hidden { opacity: .55; }
.ro-review-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.ro-review-top small { color: var(--muted); font-size: 11px; }
.ro-review p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }

/* insights + settings cards */
.ro-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ro-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ro-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.ro-tile b { display: block; font: 800 24px "DM Sans", sans-serif; }
.ro-tile b small { font-size: 13px; font-weight: 700; color: var(--muted); }
.ro-tile span { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--muted); text-transform: uppercase; }
.ro-tile.warn b { color: #b3261e; }
.ro-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.ro-card h2 { font: 800 17px "DM Sans", sans-serif; margin: 0 0 10px; }
.ro-payouts .ro-tile { background: var(--cream); }
.ro-insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .ro-insight-grid { grid-template-columns: 1fr; } }
.ro-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ro-table td { padding: 8px 6px; border-top: 1px solid var(--line); }
.ro-table td:first-child { color: var(--muted); width: 24px; }
.ro-table td:last-child { text-align: right; font-weight: 700; }
.ro-hours { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.ro-hours div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.ro-hours i { width: 100%; max-width: 26px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.ro-hours span { font-size: 10px; color: var(--muted); }
.ro-pause { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ro-pause h2 { margin-bottom: 4px; }
.ro-pause-btn { background: var(--sun) !important; color: var(--sun-ink) !important; box-shadow: none !important; }

@media (max-width: 620px) {
  .ro-dish, .ro-deal { flex-wrap: wrap; }
  .ro-dish-actions { width: 100%; justify-content: space-between; }
}

/* v15: dish options and notes on order lines */
.line-opts, .line-note { display: block; font-size: 12px; color: #6b5a4f; line-height: 1.35; font-weight: 500; }
.line-note { font-style: italic; color: #9a3412; font-weight: 700; }

/* v15: dish options editor + opening hours */
.ro-optg-add { margin-top: 4px; }
.ro-optg { border: 1px solid #ead9c2; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; background: #fffdf8; }
.ro-optg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ro-optg-name { flex: 1 1 160px; font-weight: 700; }
.ro-optg-rule { flex: 1 1 170px; }
.ro-optg input, .ro-optg select { border: 1px solid #e3d3bd; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; background: #fff; min-width: 0; }
.ro-optc { display: flex; gap: 6px; align-items: center; margin: 5px 0; }
.ro-optc-name { flex: 1; }
.ro-optc-plus { font-size: 11px; color: #8a7a6e; font-weight: 700; }
.ro-optc-price { width: 78px; }
.ro-icon-btn { border: 0; background: #f4ece1; color: #6b5a4f; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 15px; flex: none; }
.ro-icon-btn:hover { background: #fde4df; color: #b42318; }
.ro-link { border: 0; background: none; color: var(--accent-press, #c42a1e); font: 700 12px inherit; padding: 6px 0; cursor: pointer; }
.ro-hourscard h2 { margin: 0 0 4px; }
.ro-hours-day { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1e6d6; }
.ro-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.ro-slot { display: inline-flex; gap: 6px; align-items: center; background: #fffdf8; border: 1px solid #ead9c2; border-radius: 10px; padding: 4px 6px; font-size: 13px; }
.ro-slot input { border: 0; background: transparent; font: inherit; }
.ro-closed-day { font-size: 13px; }
.ro-auto { margin-top: 14px; align-items: flex-start; }
@media (max-width: 620px) { .ro-hours-day { grid-template-columns: 1fr; gap: 6px; } }

/* v16: tickets and driver distance */
.rd-print { border: 0; background: none; color: var(--muted, #7a6456); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 4px 0; margin: 2px 0 4px; }
.rd-print:hover { color: var(--ink, #22140e); text-decoration: underline; }
.rd-here { color: #1d7a3d; }
.rd-driver small { color: var(--muted, #7a6456); font-weight: 600; }
.rd-foot-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.rd-foot-note a { color: var(--accent-press, #b8271c); font-weight: 700; }
.rd-forgot { margin: -6px 0 0; text-align: right; font-size: 12.5px; }
.rd-forgot a { color: var(--muted, #7a6456); font-weight: 600; }
