:root {
  --admin-bg: #f5f3f1;
  --admin-surface: #fff;
  --admin-ink: #241c18;
  --admin-muted: #776d68;
  --admin-line: #e5ded9;
  --admin-brand: #d6a62b;
  --admin-brand-dark: #916706;
  --admin-success: #19734a;
  --admin-danger: #b8322e;
  --admin-warning: #9b6800;
  --admin-blue: #3266a8;
  --admin-purple: #7650a7;
  --sidebar: #211a17;
  --shadow: 0 10px 35px rgba(55, 37, 28, .08);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--admin-ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

.admin-body { min-height: 100vh; background: var(--admin-bg); }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 260px; display: flex; flex-direction: column; background: var(--sidebar); color: #fff; }
.admin-brand { min-height: 82px; padding: 16px 17px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand img { width: 92px; height: 42px; border-radius: 9px; object-fit: contain; background: #050505; }
.admin-brand div { min-width: 0; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { font-size: 16px; letter-spacing: .04em; }
.admin-brand small { margin-top: 3px; color: rgba(255,255,255,.6); font-size: 10px; }
.sidebar-close { display: none; margin-left: auto; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; }
.admin-nav { min-height: 0; padding: 17px 11px; display: grid; align-content: start; gap: 5px; flex: 1; overflow-y: auto; }
.admin-nav a { height: 45px; border-radius: 12px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.69); text-decoration: none; font-size: 13px; font-weight: 680; transition: .18s ease; }
.admin-nav a span { width: 23px; font-size: 18px; text-align: center; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: linear-gradient(135deg, var(--admin-brand), #d74922); color: #fff; box-shadow: 0 8px 18px rgba(212,67,31,.25); }
.admin-nav-form { margin: 0; }
.admin-nav-form button { width: 100%; height: 45px; border: 0; border-radius: 12px; padding: 0 13px; display: flex; align-items: center; gap: 12px; background: transparent; color: rgba(255,255,255,.69); text-align: left; font-size: 13px; font-weight: 680; cursor: pointer; transition: .18s ease; }
.admin-nav-form button span { width: 23px; font-size: 18px; text-align: center; }
.admin-nav-form button:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-footer { margin-top: auto; padding: 14px 17px 20px; border-top: 1px solid rgba(255,255,255,.09); display: grid; gap: 8px; }
.sidebar-footer a, .sidebar-footer button { width: 100%; border: 0; padding: 8px 0; background: transparent; color: rgba(255,255,255,.66); text-align: left; text-decoration: none; font-size: 12px; cursor: pointer; }
.sidebar-footer a:hover, .sidebar-footer button:hover { color: #fff; }
.sidebar-backdrop { display: none; }

.admin-main { min-height: 100vh; margin-left: 260px; }
.admin-topbar { position: sticky; top: 0; z-index: 30; min-height: 72px; padding: 0 28px; display: flex; align-items: center; border-bottom: 1px solid rgba(226,219,214,.9); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.admin-topbar > div:first-of-type p { margin: 0 0 2px; color: var(--admin-brand-dark); font-size: 9px; font-weight: 850; letter-spacing: .17em; }
.admin-topbar > div:first-of-type strong { font-size: 15px; }
.menu-button { display: none; }
.admin-user { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.admin-user > span { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f4e6e0; color: var(--admin-brand-dark); font-weight: 850; }
.admin-user strong, .admin-user small { display: block; }
.admin-user strong { font-size: 11px; }
.admin-user small { margin-top: 2px; color: var(--admin-muted); font-size: 9px; }
.admin-content { width: min(1400px, calc(100% - 50px)); margin: 0 auto; padding: 27px 0 55px; }

.admin-alert { margin-bottom: 14px; border: 1px solid #d8e8dd; border-radius: 12px; padding: 11px 13px; background: #f3faf6; color: #276240; font-size: 12px; line-height: 1.45; }
.admin-alert.error { border-color: #e7b4b2; background: #fff2f2; color: #912a27; }
.admin-alert.warning { border-color: #ead7ad; background: #fff9eb; color: #795210; }
.admin-alert.success { border-color: #c5e2d0; background: #f3fbf6; color: #276642; }
.admin-alert a { font-weight: 800; }
.page-heading { margin-bottom: 21px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-heading h1 { margin: 0; font-size: clamp(25px, 3.2vw, 35px); letter-spacing: -.04em; }
.page-heading > div > p:last-child { margin: 7px 0 0; color: var(--admin-muted); font-size: 13px; }
.admin-kicker { margin: 0 0 5px !important; color: var(--admin-brand-dark) !important; font-size: 9.5px !important; font-weight: 850; letter-spacing: .19em; }
.admin-primary, .admin-secondary, .danger-button { min-height: 41px; border-radius: 11px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 12px; font-weight: 800; cursor: pointer; }
.admin-primary { border: 0; background: var(--admin-brand); color: #fff; box-shadow: 0 7px 17px rgba(210,69,32,.19); }
.admin-primary:hover { background: var(--admin-brand-dark); }
.admin-secondary { border: 1px solid #d8d0cb; background: #fff; color: #4f4641; }
.admin-secondary:hover { border-color: #c8bdb7; background: #faf8f6; }
.inline-action-form { margin: 0; display: inline-flex; }
.inline-action-form .admin-secondary { width: 100%; }
.admin-primary.wide, .admin-secondary.wide { width: 100%; }
.danger-button { border: 1px solid #deb1ae; background: #fff5f5; color: var(--admin-danger); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.stat-card { min-height: 126px; border: 1px solid var(--admin-line); border-radius: 17px; padding: 16px; display: flex; gap: 13px; align-items: flex-start; background: var(--admin-surface); box-shadow: var(--shadow); }
.stat-icon { width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto; display: grid; place-items: center; background: #ffede6; color: var(--admin-brand-dark); font-size: 20px; font-weight: 850; }
.stat-icon.success { background: #e6f5ec; color: var(--admin-success); }
.stat-icon.muted { background: #efedeb; color: #6d625d; }
.stat-icon.danger { background: #fde9e8; color: var(--admin-danger); }
.stat-icon.purple { background: #f0eafd; color: var(--admin-purple); }
.stat-icon.blue { background: #e8f0fb; color: var(--admin-blue); }
.stat-card div { min-width: 0; }
.stat-card small, .stat-card strong, .stat-card a { display: block; }
.stat-card small { color: var(--admin-muted); font-size: 10px; }
.stat-card strong { margin-top: 2px; font-size: 28px; letter-spacing: -.035em; }
.stat-card a { margin-top: 8px; color: var(--admin-brand-dark); font-size: 10px; font-weight: 750; text-decoration: none; }
.dashboard-columns { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 16px; align-items: start; }

.admin-card { border: 1px solid var(--admin-line); border-radius: 17px; padding: 18px; background: var(--admin-surface); box-shadow: var(--shadow); }
.admin-card.flush { padding: 0; overflow: hidden; }
.card-heading { margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.card-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.card-heading p { margin: 5px 0 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }
.card-heading > a { color: var(--admin-brand-dark); font-size: 10.5px; font-weight: 750; text-decoration: none; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 13px; border-bottom: 1px solid #eee9e5; text-align: left; vertical-align: middle; white-space: nowrap; }
th { background: #faf8f6; color: #887e78; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: 11px; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--admin-muted); font-size: 9.5px; }
tbody tr:last-child td { border-bottom: 0; }
.table-regular { font-weight: 650; }
.strike { text-decoration: line-through; }
.status-pill { min-width: max-content; border-radius: 999px; padding: 5px 8px; display: inline-flex; align-items: center; background: #efedeb; color: #675e59; font-size: 9px; font-weight: 780; }
.status-pill.active, .status-pill.in, .status-pill.status-completed, .status-pill.status-confirmed { background: #e6f5ec; color: var(--admin-success); }
.status-pill.inactive, .status-pill.status-cancelled { background: #efedeb; color: #736964; }
.status-pill.out { background: #fde8e7; color: var(--admin-danger); }
.status-pill.low, .status-pill.status-preparing { background: #fff3d9; color: #966400; }
.status-pill.status-whatsapp-opened { background: #e7f1fb; color: var(--admin-blue); }
.admin-empty { padding: 48px 20px; text-align: center; }
.admin-empty.small { padding: 30px 15px; }
.admin-empty > span { width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 15px; display: grid; place-items: center; background: #f4eeea; color: var(--admin-brand-dark); font-size: 24px; }
.admin-empty h3 { margin: 0; font-size: 15px; }
.admin-empty p { margin: 6px auto 0; max-width: 360px; color: var(--admin-muted); font-size: 10.5px; line-height: 1.5; }
.compact-list { display: grid; }
.compact-list a { padding: 10px 0; display: grid; grid-template-columns: 43px minmax(0,1fr) auto; gap: 9px; align-items: center; border-top: 1px solid #eee8e4; color: inherit; text-decoration: none; }
.compact-list a:first-child { border-top: 0; }
.compact-list img { width: 43px; height: 43px; border-radius: 11px; object-fit: cover; background: #eee; }
.compact-list strong, .compact-list small { display: block; }
.compact-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.compact-list small { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.compact-list b { color: var(--admin-warning); font-size: 9.5px; }

.filter-card { margin-bottom: 13px; border: 1px solid var(--admin-line); border-radius: 15px; padding: 11px; display: grid; grid-template-columns: minmax(250px, 1fr) 185px 160px auto auto; gap: 8px; align-items: center; background: #fff; box-shadow: var(--shadow); }
.search-field { height: 40px; border: 1px solid #ded6d1; border-radius: 10px; padding: 0 10px; display: flex; align-items: center; gap: 8px; }
.search-field span { color: #837973; font-size: 19px; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; }
.filter-card > select { height: 40px; border: 1px solid #ded6d1; border-radius: 10px; padding: 0 10px; background: #fff; outline: 0; font-size: 11px; }
.filter-card .admin-secondary { min-height: 40px; border: 0; background: var(--admin-ink); color: #fff; }
.clear-link { padding: 6px; color: var(--admin-brand-dark); font-size: 10px; font-weight: 750; text-decoration: none; }
.product-table-wrap { max-height: calc(100vh - 255px); overflow: auto; }
.product-table thead { position: sticky; top: 0; z-index: 2; }
.product-cell { min-width: 260px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; }
.product-cell img { width: 56px; height: 47px; border-radius: 10px; object-fit: cover; background: #eee; }
.product-cell strong { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: normal; line-height: 1.35; font-size: 11px; }
.food-dot { width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; display: inline-block; background: var(--admin-success); }
.food-dot.nonveg { background: var(--admin-danger); }
.row-actions { display: flex; gap: 5px; }
.row-actions form { margin: 0; }
.icon-action { width: 32px; height: 32px; border: 1px solid #ddd5d0; border-radius: 9px; display: grid; place-items: center; background: #fff; color: #5e544f; text-decoration: none; cursor: pointer; }
.icon-action:hover { border-color: #d6a895; color: var(--admin-brand-dark); background: #fff8f5; }
.pagination { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--admin-muted); font-size: 10.5px; }
.pagination a { border: 1px solid var(--admin-line); border-radius: 9px; padding: 7px 10px; background: #fff; color: var(--admin-brand-dark); text-decoration: none; font-weight: 750; }

.editor-form { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.editor-main, .editor-side { display: grid; gap: 14px; }
.form-card { padding: 18px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.admin-field { min-width: 0; display: block; }
.admin-field > span:first-child { display: block; margin-bottom: 6px; color: #554c47; font-size: 10.5px; font-weight: 750; }
.admin-field input, .admin-field select, .admin-field textarea { width: 100%; min-height: 42px; border: 1px solid #ddd5d0; border-radius: 10px; padding: 9px 10px; background: #fff; color: var(--admin-ink); outline: 0; font-size: 11.5px; transition: border-color .18s, box-shadow .18s; }
.admin-field textarea { resize: vertical; line-height: 1.5; }
.admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus { border-color: var(--admin-brand); box-shadow: 0 0 0 3px rgba(239,91,42,.1); }
.admin-field > small { display: block; margin-top: 5px; color: var(--admin-muted); font-size: 9px; line-height: 1.45; }
.admin-field code { border-radius: 4px; padding: 1px 4px; background: #f3efed; }
.sticky-editor-card { position: sticky; top: 89px; }
.switch-row { min-height: 50px; padding: 9px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #eee9e5; cursor: pointer; }
.switch-row > span { min-width: 0; flex: 1; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 11px; }
.switch-row small { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 39px; height: 22px; border-radius: 999px; flex: 0 0 auto; background: #cfc7c2; transition: .2s; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .2s; }
.switch-row input:checked + i { background: var(--admin-success); }
.switch-row input:checked + i::after { transform: translateX(17px); }
.sticky-editor-card .admin-field { margin-top: 13px; }
.image-preview { width: 100%; height: 205px; border: 1px solid var(--admin-line); border-radius: 14px; overflow: hidden; background: #f2eeeb; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview.wide-preview { height: 270px; }
.image-preview.logo-preview { width: 240px; height: 104px; background: #050505; }
.image-preview.logo-preview img { object-fit: contain; }
.image-preview.hero-preview { height: 170px; }
.upload-control { margin: 10px 0; border: 1px dashed #cfc4bd; border-radius: 11px; padding: 11px; display: block; background: #fbf9f7; cursor: pointer; }
.upload-control input { display: none; }
.upload-control span, .upload-control small { display: block; }
.upload-control span { color: var(--admin-brand-dark); font-size: 10.5px; font-weight: 800; }
.upload-control small { margin-top: 3px; color: var(--admin-muted); font-size: 8.5px; }
.save-button { min-height: 48px; }
.danger-zone { border-color: #ebc4c1; background: #fffafa; }
.compact-fields { margin-top: 10px; }
.single-editor { max-width: 800px; display: grid; gap: 14px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.settings-layout > div { display: grid; gap: 14px; }
.mini-heading { margin: 4px 0 8px; font-size: 11px; }
.mini-heading.separated { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--admin-line); }
.color-input { display: grid; grid-template-columns: 47px 1fr; gap: 8px; }
.color-input input[type="color"] { padding: 4px; }
.password-form { max-width: 500px; display: grid; gap: 13px; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 58px !important; }
.password-wrap button { position: absolute; right: 5px; top: 5px; height: 32px; border: 0; border-radius: 7px; padding: 0 9px; background: #f1edeb; color: #5b524d; font-size: 9px; font-weight: 750; cursor: pointer; }

.category-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.category-admin-card { border: 1px solid var(--admin-line); border-radius: 17px; overflow: hidden; display: grid; grid-template-columns: 170px minmax(0, 1fr); background: #fff; box-shadow: var(--shadow); }
.category-admin-card > img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; background: #eee; }
.category-admin-copy { min-width: 0; padding: 15px; }
.category-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.category-title-line h2 { margin: 0; font-size: 16px; line-height: 1.25; }
.category-admin-copy > p { margin: 8px 0; min-height: 43px; color: var(--admin-muted); font-size: 10px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.category-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.category-meta span { border-radius: 999px; padding: 5px 7px; background: #f3efed; color: #746a65; font-size: 8.5px; font-weight: 700; }
.category-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.category-actions form { margin: 0; }
.category-actions .admin-secondary { min-height: 34px; padding: 0 10px; font-size: 9.5px; }

.order-table-wrap { max-height: calc(100vh - 205px); overflow: auto; }
.order-table-wrap thead { position: sticky; top: 0; z-index: 2; }
.view-items-button { border: 1px solid #d8d0cb; border-radius: 8px; padding: 6px 9px; background: #fff; color: var(--admin-brand-dark); font-size: 9.5px; font-weight: 750; cursor: pointer; }
.status-form select { height: 32px; border: 1px solid #d9d1cc; border-radius: 8px; padding: 0 8px; background: #fff; font-size: 9.5px; }
.items-dialog { width: min(500px, calc(100% - 24px)); border: 0; border-radius: 18px; padding: 18px; color: var(--admin-ink); box-shadow: 0 24px 70px rgba(31,20,15,.28); }
.items-dialog::backdrop { background: rgba(32,22,18,.55); }
.items-dialog > button { float: right; width: 34px; height: 34px; border: 1px solid var(--admin-line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 20px; }
.items-dialog h2 { margin: 5px 0 14px; font-size: 18px; }
.dialog-order-item { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #eee8e4; }
.dialog-order-item strong, .dialog-order-item small { display: block; }
.dialog-order-item strong { font-size: 11px; }
.dialog-order-item small { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.dialog-order-item > span { flex: 0 0 auto; font-size: 10px; font-weight: 750; }

.login-body { min-height: 100vh; background: #eee9e5; display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(1000px, 100%); min-height: 590px; border-radius: 25px; overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; background: #fff; box-shadow: 0 30px 90px rgba(55,35,25,.18); }
.login-visual { position: relative; isolation: isolate; padding: 28px; display: flex; flex-direction: column; background-image: var(--login-image); background-position: center; background-size: cover; color: #fff; }
.login-visual-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(145deg, rgba(25,15,10,.88), rgba(100,31,11,.5)); }
.login-brand { display: flex; align-items: center; gap: 11px; }
.login-brand img { width: 138px; height: 60px; border-radius: 10px; object-fit: contain; background: #050505; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 17px; letter-spacing: .04em; }
.login-brand span { margin-top: 2px; color: rgba(255,255,255,.73); font-size: 9px; }
.login-message { margin-top: auto; max-width: 490px; padding-bottom: 18px; }
.login-message p { margin: 0 0 9px; color: #ffd4c4; font-size: 9.5px; font-weight: 850; letter-spacing: .2em; }
.login-message h1 { margin: 0; font-size: clamp(32px, 4vw, 49px); line-height: 1.04; letter-spacing: -.045em; }
.login-message span { display: block; margin-top: 15px; color: rgba(255,255,255,.77); font-size: 11px; }
.login-form-side { padding: 48px 43px; display: grid; align-items: center; }
.login-form { width: 100%; max-width: 340px; margin: 0 auto; }
.mobile-login-logo { display: none; }
.form-eyebrow { margin: 0 0 7px; color: var(--admin-brand-dark); font-size: 9px; font-weight: 850; letter-spacing: .2em; }
.login-form h2 { margin: 0; font-size: 29px; letter-spacing: -.04em; }
.login-help { margin: 8px 0 22px; color: var(--admin-muted); font-size: 11px; line-height: 1.5; }
.login-form > label { display: block; margin-top: 13px; color: #554c47; font-size: 10px; font-weight: 750; }
.login-form > label > input, .login-form .password-wrap input { width: 100%; height: 44px; margin-top: 6px; border: 1px solid #dbd3ce; border-radius: 10px; padding: 0 10px; outline: 0; }
.login-form > label > input:focus, .login-form .password-wrap input:focus { border-color: var(--admin-brand); box-shadow: 0 0 0 3px rgba(239,91,42,.1); }
.login-form .admin-primary { margin-top: 18px; min-height: 46px; }
.back-store { margin-top: 15px; display: block; color: var(--admin-muted); text-align: center; font-size: 10px; text-decoration: none; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .category-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.menu-open { overflow: hidden; }
  .admin-sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  .admin-sidebar.open, .admin-sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-backdrop { position: fixed; z-index: 45; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(29,20,16,.48); transition: .22s; }
  .sidebar-backdrop.visible, .sidebar-backdrop.is-open { visibility: visible; opacity: 1; }
  .admin-main { margin-left: 0; }
  .menu-button { width: 38px; height: 38px; margin-right: 12px; border: 1px solid var(--admin-line); border-radius: 10px; display: grid; place-items: center; background: #fff; font-size: 18px; }
  .admin-content { width: calc(100% - 28px); }
  .editor-form, .settings-layout { grid-template-columns: 1fr; }
  .sticky-editor-card { position: static; }
  .editor-side .save-button { order: -1; }
  .product-table-wrap, .order-table-wrap { max-height: none; }
}

@media (max-width: 700px) {
  .admin-topbar { min-height: 64px; padding: 0 14px; }
  .admin-user div { display: none; }
  .admin-content { padding-top: 19px; }
  .page-heading { align-items: flex-start; }
  .page-heading > .admin-primary, .page-heading > .admin-secondary { min-height: 38px; padding: 0 11px; white-space: nowrap; }
  .page-heading > div > p:last-child { font-size: 11px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 112px; padding: 12px; gap: 9px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-card strong { font-size: 23px; }
  .filter-card { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-card .clear-link { text-align: center; }
  .form-grid.two { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .category-admin-card { grid-template-columns: 120px minmax(0,1fr); }
  .category-admin-card > img { min-height: 200px; }
  .category-title-line { display: block; }
  .category-title-line .status-pill { margin-top: 6px; }
  .login-body { padding: 0; background: #fff; }
  .login-shell { min-height: 100vh; border-radius: 0; display: block; box-shadow: none; }
  .login-visual { display: none; }
  .login-form-side { min-height: 100vh; padding: 28px 22px; }
  .mobile-login-logo { margin-bottom: 35px; display: flex; align-items: center; gap: 10px; }
  .mobile-login-logo img { width: 126px; height: 54px; border-radius: 9px; object-fit: contain; background: #050505; }
  .mobile-login-logo strong { font-size: 17px; }
}

@media (max-width: 440px) {
  .page-heading { display: block; }
  .page-heading > .admin-primary, .page-heading > .admin-secondary { margin-top: 13px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 95px; }
  .filter-card { grid-template-columns: 1fr; }
  .category-admin-card { grid-template-columns: 1fr; }
  .category-admin-card > img { height: 160px; min-height: 0; }
  .two-fields { grid-template-columns: 1fr; }
}

.user-filter-card {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: end;
}
.user-actions { display: flex; align-items: center; gap: 7px; }
.user-actions form { margin: 0; }
.user-actions a,
.user-actions button {
  border: 1px solid #d8d0cb;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: var(--admin-brand-dark);
  font-size: 9px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.user-actions button.danger-link { border-color: #e2b9b7; color: var(--admin-danger); background: #fff7f7; }
@media (max-width: 760px) {
  .user-filter-card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .user-filter-card { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   Back-office business suite: CRUD, offers, POS, rider and reporting
   ------------------------------------------------------------------------- */
.heading-actions, .form-actions, .document-actions, .danger-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-wide { grid-template-columns: minmax(0, 2fr) minmax(260px, .7fr); }
.chart-card canvas { width: 100%; max-width: 100%; }
.alert-stack { margin-bottom: 16px; display: grid; gap: 8px; }
.insight-alert { border: 1px solid #ead59a; border-radius: 13px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; background: #fff9e7; color: #75520b; font-size: 11px; }
.insight-alert strong { font-size: 12px; }
.insight-alert.danger { border-color: #e8b7b4; background: #fff2f1; color: #8d2d29; }
.insight-alert.warning { border-color: #ead59a; background: #fff9e7; color: #75520b; }
.top-customer-card { min-height: 100%; }
.customer-spotlight { padding: 10px 0 6px; text-align: center; }
.customer-avatar { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg,#f7e8b3,#d5a62b); color: #3e2c04; font-size: 24px; font-weight: 900; }
.customer-spotlight h3, .customer-spotlight p { margin: 4px 0; }
.customer-spotlight > strong { display: block; margin-top: 12px; font-size: 25px; }
.customer-spotlight > small { color: var(--admin-muted); }
.customer-spotlight.horizontal { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 14px; align-items: center; text-align: left; }
.customer-spotlight.horizontal .customer-avatar { margin: 0; }
.customer-spotlight.horizontal > strong { margin: 0; font-size: 25px; }
.table-link { color: var(--admin-brand-dark); font-weight: 850; text-decoration: none; }
.table-link:hover { text-decoration: underline; }

.status-badge, .pill, .soft-badge, .role-badge, .count-badge {
  width: max-content;
  border-radius: 999px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #efedeb;
  color: #675e59;
  font-size: 9px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}
.pill { cursor: pointer; }
.pill.on, .status-accepted, .status-confirmed, .status-completed, .status-ready, .status-out-for-delivery { background: #e7f5ec; color: var(--admin-success); }
.pill.off, .status-cancelled { background: #f0edeb; color: #6b625d; }
.status-whatsapp-opened, .status-booking-requested { background: #e7f0fb; color: var(--admin-blue); }
.status-preparing { background: #fff3d8; color: #8e6100; }
.soft-badge { background: #f6f1e4; color: #79560d; }
.role-badge.role-manager { background: #e8effa; color: #2d5b96; }
.role-badge.role-captain { background: #f0eafd; color: #6a449a; }
.role-badge.role-rider { background: #e7f5ec; color: #176d45; }
.count-badge { margin-left: 5px; min-width: 20px; background: #211a17; color: #fff; }

.filter-card { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filter-card > label { min-width: 150px; flex: 1 1 180px; }
.filter-card label > span { display: block; margin-bottom: 5px; color: var(--admin-muted); font-size: 9.5px; font-weight: 800; }
.filter-card input, .filter-card select { width: 100%; height: 41px; border: 1px solid #dcd4cf; border-radius: 10px; padding: 0 10px; background: #fff; outline: none; }
.filter-card input:focus, .filter-card select:focus { border-color: var(--admin-brand); box-shadow: 0 0 0 3px rgba(214,166,43,.14); }
.order-filter-grid { display: grid; grid-template-columns: repeat(4,minmax(130px,1fr)); gap: 10px; }
.order-filter-grid .filter-actions { grid-column: 1 / -1; display: flex; gap: 9px; }

.table-product { min-width: 230px; display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 9px; align-items: center; }
.table-product img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #eee; }
.table-product span { min-width: 0; }
.table-product strong { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-toggles, .row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-secondary.small { min-height: 33px; padding: 0 10px; font-size: 10px; }
.muted { color: var(--admin-muted); }
.pagination { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--admin-muted); font-size: 11px; }
.pagination a { border: 1px solid var(--admin-line); border-radius: 9px; padding: 7px 10px; background: #fff; text-decoration: none; }

.category-admin-grid, .promotion-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.category-admin-card, .promotion-admin-card { overflow: hidden; border: 1px solid var(--admin-line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.category-admin-card > img, .promotion-admin-card > img { width: 100%; height: 165px; object-fit: cover; background: #eee; }
.category-admin-copy, .promotion-admin-card > div { padding: 15px; }
.category-title-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.category-title-line h2 { margin: 0; font-size: 18px; }
.category-admin-copy > p { min-height: 34px; color: var(--admin-muted); font-size: 10.5px; line-height: 1.5; }
.category-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.category-meta span { border-radius: 999px; padding: 5px 8px; background: #f5f2ef; color: var(--admin-muted); font-size: 9px; }
.category-actions { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.danger-link, .text-button { border: 0; padding: 7px; background: transparent; color: var(--admin-danger); font-size: 10.5px; font-weight: 800; cursor: pointer; text-decoration: none; }
.text-button { color: var(--admin-brand-dark); }
.delete-dialog, .pos-product-dialog { width: min(590px,calc(100% - 24px)); max-height: calc(100dvh - 30px); overflow: auto; border: 0; border-radius: 19px; padding: 23px; box-shadow: 0 24px 75px rgba(36,24,18,.25); }
.delete-dialog::backdrop, .pos-product-dialog::backdrop { background: rgba(30,22,18,.55); backdrop-filter: blur(3px); }
.delete-dialog h2 { margin: 0; }
.delete-dialog > p { color: var(--admin-muted); font-size: 11px; }
.dialog-x { position: absolute; right: 13px; top: 13px; width: 35px; height: 35px; border: 1px solid var(--admin-line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 20px; }
.danger-button.strong { width: 100%; min-height: 45px; background: var(--admin-danger); color: #fff; }

.single-editor, .wide-editor, .narrow-editor { max-width: 980px; }
.wide-editor { max-width: 1180px; }
.narrow-editor { max-width: 720px; }
.form-card { margin-bottom: 15px; }
.form-card h2 { margin: 0 0 14px; font-size: 17px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 11px; }
.admin-field { display: block; }
.admin-field > span { display: block; margin-bottom: 5px; color: #544b46; font-size: 10px; font-weight: 780; }
.admin-field input, .admin-field select, .admin-field textarea { width: 100%; border: 1px solid #dcd4cf; border-radius: 10px; padding: 10px; background: #fff; outline: none; }
.admin-field input, .admin-field select { min-height: 41px; }
.admin-field textarea { resize: vertical; line-height: 1.45; }
.admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus { border-color: var(--admin-brand); box-shadow: 0 0 0 3px rgba(214,166,43,.14); }
.admin-field small { display: block; margin-top: 5px; color: var(--admin-muted); font-size: 9px; line-height: 1.4; }
.switch-row { min-height: 52px; border: 1px solid var(--admin-line); border-radius: 11px; padding: 9px 10px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-row > span { min-width: 0; flex: 1; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 10.5px; }
.switch-row small { margin-top: 3px; color: var(--admin-muted); font-size: 8.7px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 40px; height: 23px; border-radius: 999px; background: #ccc5c1; transition: .2s; }
.switch-row i::after { content:""; position:absolute; width:17px; height:17px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.2); transition:.2s; }
.switch-row input:checked + i { background: var(--admin-success); }
.switch-row input:checked + i::after { transform: translateX(17px); }
.inline-toggles .switch-row { min-height: 45px; }
.admin-image-preview, .admin-video-preview { width: 100%; max-height: 260px; margin-top: 9px; border-radius: 13px; object-fit: cover; background: #eee; }
.soft-rule { border: 0; border-top: 1px solid var(--admin-line); margin: 17px 0; }
.section-gap { margin-top: 17px; }

.promotion-admin-card { padding: 0; }
.promotion-admin-card h3 { margin: 0; }
.promotion-admin-card p { color: var(--admin-muted); font-size: 10.5px; line-height: 1.5; }
.coupon-list { display: grid; gap: 10px; }
.coupon-list article { border: 1px dashed #d4af4b; border-radius: 13px; padding: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; background: #fffaf0; }
.coupon-list h3 { margin: 5px 0; font-size: 14px; }
.coupon-list p, .coupon-list small { margin: 0; color: var(--admin-muted); font-size: 9.5px; line-height: 1.45; }

/* Customer and order detail pages. */
.customer-detail-grid, .order-detail-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.7fr); gap: 15px; align-items: start; }
.detail-side-stack { display: grid; gap: 15px; }
.detail-list { display: grid; gap: 9px; }
.detail-list > div { border-bottom: 1px solid var(--admin-line); padding-bottom: 8px; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--admin-muted); font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; }
.detail-list dd { margin: 4px 0 0; font-size: 11px; font-weight: 650; }
.customer-avatar.large { width: 72px; height: 72px; font-size: 28px; }
.preference-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.preference-grid > div { border: 1px solid var(--admin-line); border-radius: 11px; padding: 10px; }
.preference-grid strong, .preference-grid small { display: block; }
.preference-grid small { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.order-item-list { display: grid; }
.order-item-list article { border-top: 1px solid var(--admin-line); padding: 11px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.order-item-list article:first-child { border-top: 0; }
.order-item-list strong, .order-item-list small { display: block; }
.order-item-list small { margin-top: 4px; color: var(--admin-muted); font-size: 9px; }
.order-item-list b { font-size: 12px; }
.order-totals { margin-top: 12px; border-top: 1px solid var(--admin-line); padding-top: 10px; display: grid; gap: 7px; }
.order-totals > div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.order-totals .grand { margin-top: 3px; border-top: 1px dashed #cfc3bc; padding-top: 10px; font-size: 15px; }
.timeline { display: grid; gap: 0; }
.timeline > div { position: relative; padding: 0 0 15px 20px; border-left: 2px solid #e8dfda; }
.timeline > div::before { content:""; position:absolute; left:-5px; top:2px; width:8px; height:8px; border-radius:50%; background: var(--admin-brand); }
.timeline strong, .timeline small { display:block; }
.timeline small { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.document-actions { display: grid; align-items: stretch; }
.kot-action { border: 1px solid var(--admin-line); border-radius: 11px; padding: 9px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.kot-action strong, .kot-action small { display: block; }
.kot-action small { margin-top: 2px; color: var(--admin-muted); font-size: 8.5px; }
.kot-action > div { display: flex; gap: 6px; }
.kot-action a, .kot-action button { border: 1px solid #d9d0ca; border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--admin-brand-dark); text-decoration: none; font-size: 9px; font-weight: 800; cursor: pointer; }
.danger-zone { border-color: #e6bbb8; background: #fff8f8; }

/* Staff administration. */
.role-guide { margin-bottom: 15px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.role-guide article { border: 1px solid var(--admin-line); border-radius: 14px; padding: 13px; background: #fff; }
.role-guide h3 { margin: 7px 0 4px; font-size: 13px; }
.role-guide p { margin: 0; color: var(--admin-muted); font-size: 9.5px; line-height: 1.45; }

/* Reports. */
.report-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-chart-grid, .report-data-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.report-customer { margin-top: 15px; }
.report-filter { display: flex; }

/* Billing / POS terminal. */
.pos-heading { align-items: center; }
.pos-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(360px,.75fr); gap: 15px; align-items: start; }
.pos-catalog { min-width: 0; padding: 14px; }
.pos-catalog-toolbar { margin-bottom: 12px; display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 9px; }
.pos-search { height: 43px; border: 1px solid #dcd4cf; border-radius: 11px; padding: 0 11px; display: flex; align-items: center; gap: 8px; background: #fff; }
.pos-search input { min-width: 0; flex: 1; border: 0; outline: none; }
.pos-catalog-toolbar select { border: 1px solid #dcd4cf; border-radius: 11px; padding: 0 10px; background: #fff; }
.pos-product-grid { max-height: calc(100vh - 250px); overflow: auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; padding-right: 4px; }
.pos-product { min-width: 0; border: 1px solid var(--admin-line); border-radius: 13px; padding: 8px; display: grid; grid-template-columns: 55px minmax(0,1fr); grid-template-rows: auto auto; gap: 7px 9px; align-items: center; background: #fff; text-align: left; cursor: pointer; }
.pos-product:hover { border-color: var(--admin-brand); box-shadow: 0 6px 18px rgba(55,37,28,.08); }
.pos-product img { grid-row: 1 / 3; width: 55px; height: 55px; border-radius: 10px; object-fit: cover; background: #eee; }
.pos-product span { min-width: 0; }
.pos-product strong, .pos-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-product strong { font-size: 10.5px; }
.pos-product small { margin-top: 3px; color: var(--admin-muted); font-size: 8.5px; }
.pos-product b { color: var(--admin-brand-dark); font-size: 11px; }
.pos-cart { position: sticky; top: 88px; padding: 15px; }
.pos-cart-lines { max-height: 280px; overflow: auto; }
.pos-cart-row { border-top: 1px solid var(--admin-line); padding: 10px 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; }
.pos-cart-row:first-child { border-top: 0; }
.pos-cart-row strong, .pos-cart-row small, .pos-cart-row span { display: block; }
.pos-cart-row small { margin-top: 3px; color: var(--admin-muted); font-size: 8.5px; line-height: 1.35; }
.pos-cart-row span { margin-top: 3px; color: var(--admin-brand-dark); font-size: 8.5px; }
.pos-row-controls { height: 31px; border: 1px solid #ddd2cb; border-radius: 8px; display: grid; grid-template-columns: 28px 25px 28px; overflow: hidden; align-items: center; }
.pos-row-controls button { height: 100%; border: 0; background: #f7f3f0; cursor: pointer; }
.pos-row-controls b { text-align: center; font-size: 10px; }
.pos-total-box { margin: 10px 0 13px; border-radius: 12px; padding: 11px; display: grid; gap: 6px; background: #f7f4f1; }
.pos-total-box > div { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; }
.pos-total-box .grand { margin-top: 3px; border-top: 1px dashed #cbbfb8; padding-top: 9px; font-size: 14px; }
.pos-checkout fieldset { margin: 0 0 11px; border: 0; padding: 0; }
.pos-checkout legend { margin-bottom: 6px; font-size: 9.5px; font-weight: 800; }
.segmented-control { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid #dcd3ce; border-radius: 10px; padding: 3px; gap: 3px; background: #f6f3f1; }
.segmented-control label { cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; }
.segmented-control span { min-height: 34px; border-radius: 7px; display: grid; place-items: center; font-size: 9.5px; font-weight: 750; }
.segmented-control input:checked + span { background: #fff; color: var(--admin-brand-dark); box-shadow: 0 2px 8px rgba(50,34,26,.1); }
.compact-grid { gap: 8px; }
.pos-create-button { margin-top: 11px; }
.pos-open-orders { margin-top: 17px; }
.pos-product-dialog { position: relative; }
.dialog-product-heading { margin-bottom: 13px; display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 12px; align-items: center; }
.dialog-product-heading img { width: 90px; height: 90px; border-radius: 14px; object-fit: cover; }
.dialog-product-heading p, .dialog-product-heading h2 { margin: 3px 0; }
.dialog-product-heading p { color: var(--admin-muted); font-size: 9px; }
.dialog-product-heading h2 { font-size: 19px; }
.dialog-product-heading strong { color: var(--admin-brand-dark); }
.pos-product-dialog .option-group { margin: 11px 0; border: 1px solid var(--admin-line); border-radius: 12px; padding: 10px; }
.pos-product-dialog .option-group legend { padding: 0 5px; font-size: 10px; font-weight: 850; }
.pos-product-dialog .option-group label { min-height: 39px; border-top: 1px solid #eee9e5; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 8px; align-items: center; font-size: 10px; }
.pos-product-dialog .option-group label:first-of-type { border-top: 0; }

/* Rider mobile workspace. */
.rider-body { min-height: 100vh; background: #f4f2ef; }
.rider-header { min-height: 72px; padding: 10px 18px; display: flex; gap: 14px; align-items: center; background: #211a17; color: #fff; }
.rider-brand { display: flex; gap: 10px; align-items: center; }
.rider-brand img { width: 86px; height: 42px; border-radius: 8px; object-fit: contain; background: #050505; }
.rider-brand strong, .rider-brand small, .rider-person strong, .rider-person small { display: block; }
.rider-brand small { color: #e6c45c; font-size: 8px; letter-spacing: .12em; }
.rider-person { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.rider-person > span { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.rider-person strong { font-size: 10px; }
.rider-person small { color: rgba(255,255,255,.58); font-size: 8.5px; }
.rider-header form button { border: 1px solid rgba(255,255,255,.2); border-radius: 9px; padding: 8px 10px; background: transparent; color: #fff; font-size: 9px; cursor: pointer; }
.rider-main { width: min(980px,calc(100% - 24px)); margin: 22px auto 50px; }
.rider-title { margin-bottom: 14px; display: flex; justify-content: space-between; gap: 15px; align-items: end; }
.rider-title h1 { margin: 0; font-size: clamp(25px,5vw,36px); }
.rider-title p:last-child { margin: 7px 0 0; color: var(--admin-muted); font-size: 11px; }
.rider-title > a { color: var(--admin-brand-dark); font-size: 10px; font-weight: 800; }
.rider-location-status { margin-bottom: 13px; border: 1px solid #e2d5aa; border-radius: 12px; padding: 10px 12px; background: #fff9e6; color: #6c4b07; font-size: 10.5px; }
.rider-order-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.rider-order { border: 1px solid var(--admin-line); border-radius: 17px; padding: 15px; background: #fff; box-shadow: var(--shadow); }
.rider-order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rider-order-top h2 { margin: 6px 0 0; font-size: 17px; }
.rider-order dl { margin: 14px 0; display: grid; gap: 8px; }
.rider-order dl div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 8px; }
.rider-order dt { color: var(--admin-muted); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.rider-order dd { margin: 0; font-size: 10px; line-height: 1.4; }
.rider-map-link { min-height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #f2f6fb; color: #2b5e99; text-decoration: none; font-size: 10px; font-weight: 800; }
.rider-share-button { width: 100%; min-height: 42px; margin-top: 8px; border: 0; border-radius: 10px; background: #211a17; color: #fff; font-weight: 850; cursor: pointer; }
.rider-share-button.sharing { background: var(--admin-danger); }
.rider-actions { margin-top: 8px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.rider-actions button { width: 100%; }
.rider-empty { grid-column: 1 / -1; border: 1px solid var(--admin-line); border-radius: 17px; padding: 55px 20px; background: #fff; text-align: center; }
.rider-empty > span { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; background: #e7f5ec; color: var(--admin-success); font-size: 25px; }
.rider-empty h2, .rider-empty p { margin: 5px 0; }
.rider-empty p { color: var(--admin-muted); font-size: 11px; }

@media (max-width: 1120px) {
  .dashboard-stats, .report-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
  .pos-product-grid { max-height: none; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .order-filter-grid { grid-template-columns: repeat(3,minmax(130px,1fr)); }
}
@media (max-width: 760px) {
  .heading-actions { width: 100%; }
  .heading-actions > * { flex: 1; }
  .dashboard-wide, .customer-detail-grid, .order-detail-grid, .report-chart-grid, .report-data-grid { grid-template-columns: 1fr; }
  .category-admin-grid, .promotion-admin-grid, .role-guide, .rider-order-grid { grid-template-columns: 1fr; }
  .form-grid.two, .preference-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .order-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pos-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pos-catalog-toolbar { grid-template-columns: 1fr; }
  .rider-header { flex-wrap: wrap; }
  .rider-person { margin-left: 0; }
  .rider-header form { margin-left: auto; }
  .customer-spotlight.horizontal { grid-template-columns: 54px minmax(0,1fr); }
  .customer-spotlight.horizontal > strong { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .dashboard-stats, .report-stats, .order-filter-grid { grid-template-columns: 1fr; }
  .pos-product-grid { grid-template-columns: 1fr; }
  .rider-title { align-items: flex-start; flex-direction: column; }
  .rider-actions { grid-template-columns: 1fr; }
}

/* Windows Print Agent and persistent thermal-print queue. */
.printing-summary-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 15px; align-items: start; }
.print-workflow-card, .agent-token-card { padding: 17px; }
.workflow-strip { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: center; margin: 14px 0; }
.workflow-strip > div { min-height: 92px; border: 1px solid var(--admin-line); border-radius: 13px; padding: 11px; background: #fbfaf9; }
.workflow-strip > div span { width: 25px; height: 25px; margin-bottom: 8px; border-radius: 8px; display: grid; place-items: center; background: #211a17; color: #fff; font-size: 9px; font-weight: 850; }
.workflow-strip strong, .workflow-strip small { display: block; }
.workflow-strip strong { font-size: 10px; }
.workflow-strip small { margin-top: 5px; color: var(--admin-muted); font-size: 8.5px; line-height: 1.35; }
.workflow-strip > b { color: var(--admin-brand-dark); }
.compact-list { margin-top: 12px; }
.copy-field { min-height: 43px; border: 1px solid #dcd4cf; border-radius: 10px; padding: 5px 5px 5px 10px; display: flex; align-items: center; gap: 8px; background: #fff; }
.copy-field code { min-width: 0; flex: 1; overflow-wrap: anywhere; color: #33251f; font-size: 9px; }
.copy-field button { border: 0; border-radius: 7px; padding: 8px 10px; background: #211a17; color: #fff; font-size: 8.5px; cursor: pointer; }
.secret-code code { max-height: 58px; overflow: auto; }
.agent-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.agent-card { border: 1px solid var(--admin-line); border-radius: 14px; padding: 13px; background: #fff; }
.agent-card.online { border-color: #a8dbc0; box-shadow: inset 3px 0 #248a58; }
.agent-card.offline { box-shadow: inset 3px 0 #aa9489; }
.agent-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.agent-card-head strong, .agent-card-head small { display: block; }
.agent-card-head strong { font-size: 11px; }
.agent-card-head small { margin-top: 4px; color: var(--admin-muted); font-size: 8.5px; }
.agent-card-head > span { border-radius: 99px; padding: 5px 8px; background: #efeae7; color: #725f55; font-size: 8px; font-weight: 800; }
.agent-card.online .agent-card-head > span { background: #e2f5e9; color: #196b43; }
.agent-card dl { margin: 12px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.agent-card dl div { min-width: 0; }
.agent-card dt { color: var(--admin-muted); font-size: 7.5px; text-transform: uppercase; }
.agent-card dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 8.5px; }
.agent-printer-map { border-top: 1px solid var(--admin-line); padding-top: 8px; display: grid; gap: 6px; }
.agent-printer-map > div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 9px; }
.agent-printer-map span { color: var(--admin-muted); font-size: 8px; }
.agent-printer-map strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8.5px; }
.printer-test-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.printer-test-grid form { border: 1px solid var(--admin-line); border-radius: 12px; padding: 11px; display: grid; gap: 5px; background: #fbfaf9; }
.printer-test-grid strong, .printer-test-grid small { display: block; }
.printer-test-grid strong { font-size: 10px; }
.printer-test-grid small { color: var(--admin-muted); font-size: 8px; }
.printer-test-grid button { margin-top: 5px; }
.print-filter-row { margin: 2px 0 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.print-filter-row a { border: 1px solid var(--admin-line); border-radius: 99px; padding: 7px 10px; color: #58463d; text-decoration: none; font-size: 8.5px; font-weight: 750; }
.print-filter-row a.active { border-color: #211a17; background: #211a17; color: #fff; }
.print-filter-row b { margin-left: 3px; }
.print-job-table td strong, .print-job-table td small { display: block; }
.print-job-table td small { margin-top: 3px; color: var(--admin-muted); font-size: 7.8px; line-height: 1.35; }
.print-status { width: max-content; border-radius: 99px; padding: 4px 7px; display: inline-flex; text-transform: uppercase; letter-spacing: .04em; font-size: 7px; font-weight: 850; }
.print-status.status-queued { background: #fff4cf; color: #735400; }
.print-status.status-claimed { background: #e3f0ff; color: #225d9a; }
.print-status.status-printed { background: #e2f5e9; color: #176b42; }
.print-status.status-failed, .print-status.status-dead { background: #fee7e5; color: #a32923; }
.print-status.status-cancelled { background: #eee9e6; color: #6b5b53; }
.job-error { max-width: 260px; color: #a32923 !important; }
.job-actions { white-space: nowrap; }
.job-actions form { display: inline-block; margin-right: 4px; }
.job-actions button { border: 0; background: transparent; color: var(--admin-brand-dark); font-size: 8px; font-weight: 800; cursor: pointer; }
.job-actions .danger-link { color: var(--admin-danger); }
.agent-install-notes ol { margin: 5px 0 0; padding-left: 20px; display: grid; gap: 8px; color: #493c35; font-size: 9.5px; line-height: 1.5; }
.agent-install-notes code { border-radius: 5px; padding: 2px 5px; background: #f1edeb; }
.admin-details { border: 1px solid var(--admin-line); border-radius: 12px; padding: 11px; background: #faf8f7; }
.admin-details summary { cursor: pointer; font-size: 10px; font-weight: 850; }
.admin-details > p { color: var(--admin-muted); font-size: 9px; line-height: 1.45; }
.admin-details .form-grid { margin-top: 10px; }
.mini-print-jobs { margin-top: 14px; border-top: 1px solid var(--admin-line); padding-top: 12px; }
.mini-print-jobs h3 { margin: 0 0 8px; font-size: 10px; }
.mini-print-jobs > div { min-height: 35px; border-top: 1px solid #eee9e6; padding: 7px 0; display: grid; grid-template-columns: 65px minmax(0,1fr); gap: 3px 8px; align-items: center; }
.mini-print-jobs > div:first-of-type { border-top: 0; }
.mini-print-jobs strong { font-size: 8.5px; }
.mini-print-jobs small { grid-column: 2; color: var(--admin-muted); font-size: 7.8px; }

@media (max-width: 1120px) {
  .printing-summary-grid { grid-template-columns: 1fr; }
  .workflow-strip { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .workflow-strip > b { display: none; }
  .printer-test-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .agent-grid, .printer-test-grid { grid-template-columns: 1fr; }
  .workflow-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agent-card dl { grid-template-columns: 1fr; }
  .agent-printer-map > div { grid-template-columns: 1fr; }
}

/* Google Maps store-location picker. */
.admin-map-picker { border: 1px solid var(--admin-line); border-radius: 15px; padding: 13px; background: #fbfaf9; }
.admin-map-toolbar { margin-bottom: 10px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.admin-map-toolbar strong, .admin-map-toolbar small { display: block; }
.admin-map-toolbar strong { font-size: 11px; }
.admin-map-toolbar small { margin-top: 4px; color: var(--admin-muted); font-size: 8.8px; line-height: 1.45; }
.admin-map-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.admin-map-actions button { min-height: 36px; white-space: nowrap; }
.admin-location-map { width: 100%; height: 360px; overflow: hidden; border: 1px solid #ded6d1; border-radius: 13px; background: #f0ece9; }
.admin-map-placeholder { width: 100%; height: 100%; padding: 25px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--admin-muted); text-align: center; }
.admin-map-placeholder span { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #fff; color: var(--admin-brand-dark); box-shadow: 0 8px 22px rgba(42,31,25,.1); font-size: 22px; font-weight: 900; }
.admin-map-placeholder p { max-width: 360px; margin: 0; font-size: 9.5px; line-height: 1.5; }
.admin-map-placeholder.error { color: var(--admin-danger); }
.admin-map-placeholder.error span { background: #fee7e5; color: var(--admin-danger); }
.admin-map-status { min-height: 18px; margin: 9px 2px 0; color: var(--admin-muted); font-size: 8.8px; line-height: 1.45; }
.admin-map-status.success { color: var(--admin-success); }
.admin-map-status.error { color: var(--admin-danger); font-weight: 750; }

@media (max-width: 760px) {
  .admin-map-toolbar { align-items: stretch; flex-direction: column; }
  .admin-map-actions { justify-content: stretch; }
  .admin-map-actions button { flex: 1 1 150px; }
  .admin-location-map { height: 300px; }
}

/* -------------------------------------------------------------------------
   v3.8 live operations board, kitchen display and instruction workflow
   ------------------------------------------------------------------------- */
.live-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.live-stats .stat-card { min-height: 112px; }
.operations-dashboard-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: start;
}
.live-order-board, .booking-board { min-width: 0; }
.live-board-heading { align-items: center; }
.live-count {
  min-width: max-content;
  border-radius: 999px;
  padding: 7px 10px;
  background: #211a17;
  color: #fff;
  font-size: 9px;
  font-weight: 850;
}
.live-order-scroll {
  max-height: 1050px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 2px 5px 2px 1px;
}
.live-order-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
}
.live-order-card {
  min-width: 0;
  min-height: 248px;
  border: 1px solid #e4ddd9;
  border-top: 5px solid #9c8e87;
  border-radius: 13px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 7px 20px rgba(55,37,28,.07);
  transition: transform .16s ease, box-shadow .16s ease;
}
.live-order-card:hover { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(55,37,28,.11); }
.live-order-card.stage-pending { border-color: #e8a9a5; border-top-color: #c7352f; background: linear-gradient(180deg,#fff1f0 0,#fff 43%); }
.live-order-card.stage-progress { border-color: #edc378; border-top-color: #e38916; background: linear-gradient(180deg,#fff5df 0,#fff 43%); }
.live-order-card.stage-ready { border-color: #9dd4b5; border-top-color: #218952; background: linear-gradient(180deg,#ecf9f1 0,#fff 43%); }
.live-order-card.stage-transit { border-color: #9abce2; border-top-color: #326eaf; background: linear-gradient(180deg,#edf5ff 0,#fff 43%); }
.live-order-top, .booking-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.live-order-top > div { min-width: 0; }
.live-order-top a, .booking-card-top a { color: #281d18; font-size: 10px; font-weight: 900; text-decoration: none; letter-spacing: .025em; }
.live-order-top small { margin-top: 3px; display: block; color: var(--admin-muted); font-size: 7.5px; }
.live-order-top > span, .booking-card-top > span {
  max-width: 80px;
  border-radius: 999px;
  padding: 4px 6px;
  background: rgba(255,255,255,.75);
  color: #554944;
  font-size: 7px;
  font-weight: 850;
  text-align: center;
}
.live-customer { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(102,76,62,.12); }
.live-customer strong, .live-customer small { display: block; }
.live-customer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.live-customer small { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--admin-muted); font-size: 7.6px; }
.live-order-items { margin-top: 8px; min-height: 50px; }
.live-order-items b { font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.live-order-items p { margin: 4px 0 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: #554944; font-size: 8px; line-height: 1.38; }
.live-special {
  margin-top: 7px;
  border-radius: 8px;
  padding: 6px 7px;
  display: grid;
  gap: 2px;
  background: #211a17;
  color: #fff;
}
.live-special strong { color: #f4ca5d; font-size: 6.7px; letter-spacing: .07em; text-transform: uppercase; }
.live-special span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 7.4px; line-height: 1.35; }
.live-order-meta { margin-top: auto; padding-top: 9px; display: flex; justify-content: space-between; gap: 7px; align-items: end; }
.live-order-meta > span { font-size: 14px; font-weight: 900; }
.live-order-meta small { max-width: 82px; color: var(--admin-muted); font-size: 7px; text-align: right; }
.live-order-status { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.live-order-status .status-badge { max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; font-size: 7px; }
.live-order-status > a { width: 25px; height: 25px; flex: 0 0 auto; border: 1px solid rgba(66,45,35,.14); border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.8); color: #3d2d26; text-decoration: none; font-size: 12px; font-weight: 900; }
.live-order-actions, .booking-actions, .order-workflow-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.live-order-actions form, .booking-actions form { min-width: 0; flex: 1 1 55px; margin: 0; }
.workflow-button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 7.5px;
  line-height: 1.15;
  font-weight: 900;
  cursor: pointer;
}
.live-order-actions .workflow-button, .booking-actions .workflow-button { width: 100%; }
.workflow-button.wide { width: 100%; min-height: 39px; font-size: 10px; }
.workflow-button.accept { background: #c43b33; }
.workflow-button.cancel { border: 1px solid #dba8a5; background: #fff; color: #a72d28; }
.workflow-button.next { background: #db7e0b; }
.workflow-button.ready { background: #218650; }
.workflow-button.transit { background: #2f69a8; }
.workflow-button.settle { background: #211a17; }
.live-empty { min-height: 310px; display: grid; place-items: center; align-content: center; }

.booking-scroll {
  max-height: 1050px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 3px;
}
.booking-card { margin-top: 9px; border: 1px solid var(--admin-line); border-left: 5px solid #897b74; border-radius: 12px; padding: 11px; background: #fff; }
.booking-card:first-child { margin-top: 0; }
.booking-card.booking-new { border-color: #e4aaa7; border-left-color: #c7352f; background: #fff5f4; }
.booking-card.booking-confirmed { border-color: #edc87f; border-left-color: #d98a18; background: #fff9eb; }
.booking-card-top > div { min-width: 0; }
.booking-card-top a, .booking-card-top strong { display: block; }
.booking-card-top strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.booking-card > p { margin: 9px 0 3px; color: #43352f; font-size: 9px; font-weight: 800; }
.booking-card > small { color: var(--admin-muted); font-size: 8px; }
.booking-note { margin-top: 8px; border-radius: 8px; padding: 7px; background: #211a17; color: #fff; font-size: 8px; line-height: 1.4; }
.completed-and-stock,
.dashboard-insights-last {
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: stretch;
}
.completed-and-stock > .admin-card,
.dashboard-insights-last > .admin-card { min-width: 0; }
.card-heading.padded { margin: 0; padding: 16px 18px 12px; }
.table-open-button { min-height: 29px; border-radius: 8px; padding: 0 9px; font-size: 8px; }
.dashboard-insights-last { margin-top: 16px; }
.dashboard-insights-last .chart-card, .dashboard-insights-last .top-customer-card { min-height: 260px; }

.order-special-instructions {
  margin: -4px 0 16px;
  border: 1px solid #e7b54f;
  border-left: 6px solid #d98810;
  border-radius: 14px;
  padding: 12px 15px;
  background: #fff8e8;
  box-shadow: 0 8px 22px rgba(124,82,8,.08);
}
.order-special-instructions > div { display: flex; align-items: center; gap: 8px; color: #6f4a05; }
.order-special-instructions > div span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #d98810; color: #fff; font-weight: 900; }
.order-special-instructions strong { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.order-special-instructions p { margin: 7px 0 0 34px; color: #4f3b18; font-size: 11px; line-height: 1.5; }
.item-note { color: #a2332d !important; font-weight: 800; }
.order-workflow-actions { display: grid; grid-template-columns: 1fr; }
.order-workflow-actions form { margin: 0; }
.workflow-finished { border-radius: 10px; padding: 10px; background: #f3efed; color: var(--admin-muted); font-size: 9px; text-align: center; }
.kot-state { border-radius: 999px; padding: 2px 5px; font-size: 7px; text-transform: uppercase; }
.kot-state-open { background: #fff0d5; color: #875900; }
.kot-state-ready { background: #e3f5ea; color: #197047; }
.payment-help { margin: -2px 0 0; color: var(--admin-muted); font-size: 8.5px; line-height: 1.45; }
.field-disabled { opacity: .68; }
.payment-closed { border-radius: 12px; padding: 13px; display: flex; gap: 10px; align-items: center; background: #e8f7ee; color: #176d45; }
.payment-closed > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #218650; color: #fff; font-weight: 900; }
.payment-closed strong, .payment-closed small { display: block; }
.payment-closed small { margin-top: 3px; }
.role-guide.four-roles { grid-template-columns: repeat(4,minmax(0,1fr)); }
.role-badge.role-kitchen { background: #fff0d7; color: #8c5a00; }
.kitchen-counter-field.hidden { display: none !important; }

/* Kitchen counter display */
.kitchen-body { min-height: 100vh; background: #f3f0ed; color: #211a17; }
.kitchen-header { position: sticky; top: 0; z-index: 20; min-height: 78px; padding: 10px 22px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; border-bottom: 1px solid #ddd4ce; background: rgba(33,26,23,.97); color: #fff; box-shadow: 0 7px 24px rgba(30,20,16,.16); }
.kitchen-brand { display: flex; align-items: center; gap: 10px; }
.kitchen-brand img { width: 98px; height: 46px; border-radius: 8px; object-fit: contain; background: #050505; }
.kitchen-brand strong, .kitchen-brand small { display: block; }
.kitchen-brand strong { font-size: 14px; }
.kitchen-brand small { margin-top: 3px; color: rgba(255,255,255,.62); font-size: 8px; letter-spacing: .12em; }
.kitchen-counter-title { text-align: center; }
.kitchen-counter-title span, .kitchen-counter-title strong { display: block; }
.kitchen-counter-title span { color: #e7bd4a; font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.kitchen-counter-title strong { margin-top: 2px; font-size: 20px; }
.kitchen-user { justify-self: end; display: flex; gap: 9px; align-items: center; }
.kitchen-user > div { text-align: right; }
.kitchen-user strong, .kitchen-user small { display: block; }
.kitchen-user strong { font-size: 10px; }
.kitchen-user small { margin-top: 2px; color: rgba(255,255,255,.58); font-size: 8px; }
.kitchen-user a, .kitchen-user button { min-height: 34px; border: 1px solid rgba(255,255,255,.17); border-radius: 9px; padding: 0 10px; display: inline-flex; align-items: center; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; font-size: 8px; font-weight: 800; cursor: pointer; }
.kitchen-user form { margin: 0; }
.kitchen-main { width: min(1580px, calc(100% - 34px)); margin: 0 auto; padding: 25px 0 48px; }
.kitchen-page-heading { margin-bottom: 16px; display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.kitchen-page-heading h1 { margin: 0; font-size: 29px; letter-spacing: -.035em; }
.kitchen-page-heading p:last-child { margin: 6px 0 0; color: var(--admin-muted); font-size: 11px; }
.kitchen-kot-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; align-items: start; }
.kitchen-kot-card { min-width: 0; overflow: hidden; border: 1px solid #ded6d1; border-top: 7px solid #dd8210; border-radius: 15px; background: #fff; box-shadow: 0 10px 30px rgba(55,37,28,.1); }
.kitchen-kot-card.kot-ready { border-top-color: #218650; opacity: .78; }
.kitchen-kot-head { padding: 12px 13px 10px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; background: #fff7e8; }
.kot-ready .kitchen-kot-head { background: #ecf8f1; }
.kitchen-kot-head span { color: var(--admin-muted); font-size: 7.5px; font-weight: 800; }
.kitchen-kot-head h2 { margin: 3px 0 0; font-size: 15px; }
.kitchen-kot-head > strong { border-radius: 999px; padding: 5px 8px; background: #df810e; color: #fff; font-size: 8px; }
.kot-ready .kitchen-kot-head > strong { background: #218650; }
.kitchen-order-meta { padding: 10px 13px; border-top: 1px solid #eee7e2; border-bottom: 1px solid #eee7e2; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.kitchen-order-meta b { font-size: 10px; }
.kitchen-order-meta span { color: var(--admin-muted); font-size: 8px; text-align: right; }
.kitchen-order-meta small { grid-column: 1 / -1; color: #554944; font-size: 8.5px; }
.kitchen-item-list { padding: 4px 13px; }
.kitchen-item { padding: 10px 0; border-top: 1px dashed #ded5cf; }
.kitchen-item:first-child { border-top: 0; }
.kitchen-item strong, .kitchen-item span, .kitchen-item em { display: block; }
.kitchen-item strong { font-size: 11px; line-height: 1.35; }
.kitchen-item strong b { color: #b56500; font-size: 17px; }
.kitchen-item span { margin-top: 4px; color: var(--admin-muted); font-size: 8.3px; line-height: 1.35; }
.kitchen-item em { margin-top: 5px; border-radius: 6px; padding: 5px 6px; background: #fff0ee; color: #a02d28; font-size: 8px; font-style: normal; font-weight: 850; }
.kitchen-special { margin: 5px 13px 11px; border-radius: 9px; padding: 9px; background: #211a17; color: #fff; }
.kitchen-special strong { color: #edc759; font-size: 7px; letter-spacing: .08em; }
.kitchen-special p { margin: 4px 0 0; font-size: 9px; line-height: 1.45; }
.kitchen-kot-footer { padding: 11px 13px 13px; border-top: 1px solid #eee7e2; }
.kitchen-kot-footer form { margin: 0; }
.kitchen-ready-button { width: 100%; min-height: 44px; border: 0; border-radius: 10px; background: #218650; color: #fff; font-size: 11px; font-weight: 900; cursor: pointer; box-shadow: 0 7px 17px rgba(33,134,80,.22); }
.kitchen-ready-confirmation { min-height: 44px; border-radius: 10px; padding: 7px 10px; display: flex; align-items: center; gap: 9px; background: #e6f6ec; color: #176d45; }
.kitchen-ready-confirmation > span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #218650; color: #fff; font-weight: 900; }
.kitchen-ready-confirmation strong, .kitchen-ready-confirmation small { display: block; }
.kitchen-ready-confirmation strong { font-size: 9px; }
.kitchen-ready-confirmation small { margin-top: 2px; font-size: 7.5px; }
.kitchen-empty { grid-column: 1 / -1; min-height: 380px; border: 1px dashed #cdc1bb; border-radius: 17px; display: grid; place-items: center; align-content: center; background: #fff; text-align: center; }
.kitchen-empty > span { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: #e6f6ec; color: #218650; font-size: 25px; }
.kitchen-empty h2 { margin: 10px 0 0; }
.kitchen-empty p { margin: 6px 0 0; color: var(--admin-muted); font-size: 10px; }

@media (max-width: 1500px) {
  .kitchen-kot-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1280px) {
  .live-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .operations-dashboard-grid,
  .completed-and-stock,
  .dashboard-insights-last { grid-template-columns: minmax(0,1fr) 280px; }
  .live-order-grid { grid-template-columns: repeat(4,minmax(135px,1fr)); }
  .role-guide.four-roles { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1000px) {
  .operations-dashboard-grid,
  .completed-and-stock,
  .dashboard-insights-last { grid-template-columns: 1fr; }
  .live-order-grid { grid-template-columns: repeat(3,minmax(145px,1fr)); }
  .live-order-scroll, .booking-scroll { max-height: 850px; }
  .booking-scroll { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .booking-card { margin-top: 0; }
  .kitchen-header { grid-template-columns: 1fr auto; }
  .kitchen-counter-title { grid-row: 2; grid-column: 1 / -1; padding: 7px 0 3px; border-top: 1px solid rgba(255,255,255,.1); }
  .kitchen-user { grid-column: 2; grid-row: 1; }
  .kitchen-kot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .live-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .live-order-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .live-order-card { min-height: 235px; }
  .booking-scroll { grid-template-columns: 1fr; }
  .completed-and-stock, .dashboard-insights-last { grid-template-columns: 1fr; }
  .order-special-instructions p { margin-left: 0; }
  .kitchen-header { padding: 9px 12px; gap: 9px; }
  .kitchen-brand img { width: 74px; height: 38px; }
  .kitchen-brand div { display: none; }
  .kitchen-user > div { display: none; }
  .kitchen-user a, .kitchen-user button { padding: 0 8px; }
  .kitchen-main { width: calc(100% - 22px); padding-top: 16px; }
  .kitchen-page-heading { align-items: flex-start; }
  .kitchen-page-heading h1 { font-size: 23px; }
  .kitchen-page-heading p:last-child { font-size: 9px; }
  .kitchen-kot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .live-stats { grid-template-columns: 1fr; }
  .live-order-grid { grid-template-columns: 1fr; }
  .live-order-scroll { max-height: 1000px; }
  .role-guide.four-roles { grid-template-columns: 1fr; }
  .kitchen-page-heading { display: block; }
  .kitchen-page-heading button { margin-top: 10px; }
}
.compact-list .compact-row { padding: 10px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: center; border-top: 1px solid #eee8e4; }
.compact-list .compact-row:first-child { border-top: 0; }
.compact-list .compact-row strong, .compact-list .compact-row small { display: block; }
.compact-list .compact-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.compact-list .compact-row small { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }

/* v4.0 checkout/payment integration controls */
.operation-toggle {
  border: 1px solid #d9d2c8;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 13px;
  background: #fff;
  color: #3b302b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.operation-toggle.is-on { border-color: #b9dfc5; background: #edf9f1; color: #146d37; }
.operation-toggle.is-off { border-color: #f0b4ad; background: #fff0ee; color: #a32920; }
.operation-toggle.rush-on { border-color: #efbd5d; background: #fff6df; color: #8b5a00; }
.admin-form-divider { border: 0; border-top: 1px solid #e8e1da; margin: 24px 0; }
.compact-heading { margin-bottom: 16px; }
.compact-heading h3 { margin: 0; font-size: 1.05rem; }
.admin-field input[readonly] { background: #f7f5f2; color: #665f59; }
.rider-payment-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e2d9cf;
  border-radius: 14px;
  background: #fffaf0;
}
.rider-payment-panel h3 { margin: 0 0 4px; font-size: 1rem; }
.rider-payment-panel p { margin: 0 0 12px; color: #6f635b; }
.rider-payment-qr { width: min(240px, 100%); display: block; margin: 10px auto; border-radius: 12px; background: #fff; padding: 8px; }
.rider-payment-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rider-payment-actions form, .rider-payment-actions button { width: 100%; }
.rider-payment-paid { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #eaf8ee; color: #176d37; font-weight: 800; }
@media (max-width: 760px) {
  .heading-actions .operation-toggle { min-height: 36px; padding-inline: 10px; font-size: .82rem; }
  .rider-payment-actions { grid-template-columns: 1fr; }
}

/* v4.1 Fast2SMS setup and role-specific install buttons */
.admin-integration-panel {
  border: 1px solid #e4ddd6;
  border-radius: 14px;
  padding: 16px;
  background: #fbfaf8;
}
.admin-integration-panel[hidden], .otp-provider-details[hidden] { display: none !important; }
.integration-check-row > div:first-of-type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.integration-check-row small { display: block; color: var(--admin-muted); }
.integration-check-result {
  min-height: 38px;
  border-radius: 9px;
  padding: 10px 12px;
  background: #f3f0ed;
  color: var(--admin-muted);
  font-size: 10px;
  line-height: 1.45;
}
.integration-check-result:empty { display: none; }
.integration-check-result.loading { background: #fff7df; color: #7c5b00; }
.integration-check-result.success { background: #eaf8ee; color: #176d37; }
.integration-check-result.error { background: #fff0ee; color: #a32920; }
.admin-install-button,
.rider-install-button,
.kitchen-install-button {
  min-height: 34px;
  border: 1px solid rgba(197,153,34,.5);
  border-radius: 9px;
  padding: 0 11px;
  background: #fff7da;
  color: #735300;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.admin-install-button.install-ready,
.rider-install-button.install-ready,
.kitchen-install-button.install-ready { box-shadow: 0 0 0 3px rgba(218,176,52,.18); }
.admin-install-button.is-installed,
.rider-install-button.is-installed,
.kitchen-install-button.is-installed { opacity: .65; cursor: default; }
.rider-install-button,
.kitchen-install-button {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.11);
  color: #fff;
}
@media (max-width: 760px) {
  .admin-install-button { min-height: 32px; padding: 0 8px; font-size: 8px; }
  .rider-install-button { margin-left: auto; }
  .integration-check-row > div:first-of-type { align-items: stretch; flex-direction: column; }
}
@media (max-width: 480px) {
  .admin-user > span { display: none; }
  .rider-header .rider-person { order: 3; width: 100%; }
  .rider-install-button { margin-left: auto; }
  .kitchen-install-button { padding-inline: 7px; }
}

/* v4.2 new-order visual and audio alert */
.dashboard-sound-button {
  min-width: 132px;
  border-color: #c8ddd0;
  background: #eef8f2;
  color: #176d45;
}
.dashboard-sound-button.sound-off {
  border-color: #d9d2c8;
  background: #fff;
  color: #756861;
}
.dashboard-sound-button.needs-attention {
  border-color: #d7463e;
  background: #fff0ef;
  color: #a91f1a;
  animation: soundButtonNudge 1.1s ease-in-out infinite;
}
.new-order-alert[hidden] { display: none !important; }
.new-order-alert {
  position: fixed;
  top: 78px;
  right: 24px;
  z-index: 1200;
  width: min(470px, calc(100vw - 32px));
  min-height: 82px;
  border: 2px solid #ffb1ac;
  border-left: 9px solid #c82923;
  border-radius: 17px;
  padding: 13px 48px 13px 14px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  background: linear-gradient(135deg,#b71915,#e43d35);
  color: #fff;
  box-shadow: 0 20px 55px rgba(137,20,16,.38);
  opacity: 0;
  transform: translateY(-18px) scale(.92);
  pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2,.9,.2,1.25);
}
.new-order-alert.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: newOrderAlertPulse .72s ease-in-out 2;
}
.new-order-alert-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  font-size: 24px;
}
.new-order-alert strong,
.new-order-alert small { display: block; }
.new-order-alert strong { font-size: 13px; letter-spacing: .05em; }
.new-order-alert small { margin-top: 5px; color: rgba(255,255,255,.86); font-size: 9px; line-height: 1.35; }
.new-order-alert > a {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #9f1d18;
  text-decoration: none;
  font-size: 9px;
  font-weight: 900;
}
.new-order-alert > button {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.17);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}
.live-order-card.new-order-arrival {
  position: relative;
  z-index: 5;
  border-color: #d52620;
  outline: 3px solid rgba(220,39,32,.22);
  background: linear-gradient(180deg,#ffd9d6 0,#fff2f1 45%,#fff 100%);
  animation: newOrderCardPop .65s cubic-bezier(.17,.89,.32,1.35) 0s 3;
}
.live-order-card.new-order-arrival::before {
  content: 'NEW ORDER';
  position: absolute;
  top: -11px;
  left: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #c82923;
  color: #fff;
  box-shadow: 0 5px 14px rgba(159,29,24,.3);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .08em;
}
.live-order-card.awaiting-operator-action {
  position: relative;
  z-index: 4;
  border-color: #d52620;
  outline: 3px solid rgba(213,38,32,.22);
  background: linear-gradient(180deg,#ffd6d2 0,#fff0ef 50%,#fff 100%);
  animation: awaitingOperatorPop 1.05s cubic-bezier(.22,.88,.24,1.18) infinite;
}
.live-order-card.awaiting-operator-action::after {
  content: 'ACCEPT / CANCEL';
  position: absolute;
  top: 9px;
  right: 9px;
  border-radius: 999px;
  padding: 4px 7px;
  background: #c82923;
  color: #fff;
  box-shadow: 0 5px 14px rgba(159,29,24,.26);
  font-size: 6.8px;
  font-weight: 950;
  letter-spacing: .06em;
}
.new-order-alert.persistent {
  border-left-color: #fffcf8;
  animation: persistentAlertRing .85s ease-in-out infinite;
}
@keyframes newOrderCardPop {
  0% { transform: scale(.94); box-shadow: 0 0 0 rgba(193,35,29,0); }
  45% { transform: scale(1.045); box-shadow: 0 19px 42px rgba(193,35,29,.28); }
  100% { transform: scale(1); box-shadow: 0 10px 26px rgba(193,35,29,.17); }
}
@keyframes awaitingOperatorPop {
  0%,100% { transform: scale(1); box-shadow: 0 10px 26px rgba(193,35,29,.13); }
  42% { transform: scale(1.026); box-shadow: 0 18px 38px rgba(193,35,29,.31); }
}
@keyframes persistentAlertRing {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.012); }
}
@keyframes newOrderAlertPulse {
  0%,100% { box-shadow: 0 20px 55px rgba(137,20,16,.38), 0 0 0 0 rgba(225,63,54,.32); }
  50% { box-shadow: 0 20px 55px rgba(137,20,16,.42), 0 0 0 12px rgba(225,63,54,0); }
}
@keyframes soundButtonNudge {
  0%,100% { transform: translateX(0); }
  30% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
}
@media (max-width: 760px) {
  .dashboard-sound-button { min-width: 0; }
  .new-order-alert {
    top: 70px;
    right: 12px;
    width: calc(100vw - 24px);
    grid-template-columns: 42px minmax(0,1fr) auto;
    padding: 11px 42px 11px 11px;
  }
  .new-order-alert-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-order-card.new-order-arrival,
  .live-order-card.awaiting-operator-action,
  .new-order-alert.show,
  .new-order-alert.persistent,
  .dashboard-sound-button.needs-attention { animation: none; }
}

/* v4.6 order-only database tools in Store settings */
.order-maintenance-summary { margin: 12px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.order-maintenance-summary span { border: 1px solid var(--admin-line); border-radius: 999px; padding: 7px 10px; background: #fff; color: var(--admin-muted); font-size: 9px; }
.order-maintenance-summary strong { color: var(--admin-ink); }
.order-db-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin-top: 14px; }
.admin-tool-card { min-height: 100%; border: 1px solid var(--admin-line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; align-content: start; background: #fff; box-shadow: 0 8px 22px rgba(52,42,36,.05); }
.admin-tool-card h3 { margin: 0; font-size: 12px; }
.admin-tool-card p { margin: 0; color: var(--admin-muted); font-size: 9.5px; line-height: 1.5; }
.admin-tool-card.danger-tool { border-color: #e8c3c1; background: #fff8f8; }
.admin-danger { min-height: 38px; border: 0; border-radius: 10px; padding: 0 13px; background: var(--admin-danger); color: #fff; font-size: 10px; font-weight: 850; cursor: pointer; box-shadow: 0 10px 20px rgba(184,50,46,.18); }
@media (max-width: 920px) { .order-db-tools-grid { grid-template-columns: 1fr; } }

/* v4.8 operational refinements */
.inline-checkbox-stack { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 9px 10px; border: 1px solid var(--admin-border); border-radius: 12px; background: #fffaf3; }
.inline-checkbox-stack label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; color: #37261f; }
.inline-checkbox-stack input { width: auto; }
.offer-generator-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.offer-generator-grid .full { grid-column: 1 / -1; }
.generator-preview { border: 1px dashed rgba(169,117,8,.35); border-radius: 14px; padding: 12px; background: #fff9ed; }
.insight-recommendation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.insight-recommendation { padding: 17px; }
.insight-recommendation > span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #fff1cf; font-size: 20px; }
.insight-recommendation h2 { margin: 10px 0 6px; font-size: 18px; }
.insight-recommendation p { margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.5; }
.insight-recommendation strong { display: block; margin-top: 12px; color: #281d18; font-size: 18px; }
@media (max-width: 1180px) { .offer-generator-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .insight-recommendation-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .offer-generator-grid { grid-template-columns: 1fr; } }

/* v5.1 captain dine-in table dashboard */
.status-served { background: #dcfce7; color: #166534; }
.inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dine-service-actions { display: grid; gap: 9px; margin-bottom: 12px; }
.dine-service-actions form { margin: 0; }
.captain-body { margin: 0; min-height: 100vh; background: #f2f3f5; color: #1f2933; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.captain-appbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto auto auto; gap: 10px; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(31,41,51,.08); box-shadow: 0 10px 28px rgba(31,41,51,.06); backdrop-filter: blur(16px); }
.captain-title { display: grid; gap: 1px; min-width: 0; }
.captain-title strong { font-size: 22px; letter-spacing: -.04em; color: #2c3037; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.captain-title small { color: #7a818d; font-size: 11px; font-weight: 750; }
.captain-icon-button { width: 42px; height: 42px; border: 0; border-radius: 16px; display: grid; place-items: center; background: #fff; color: #7a1f2b; font-size: 21px; font-weight: 900; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(31,41,51,.08), 0 7px 18px rgba(31,41,51,.06); cursor: pointer; }
.captain-sound-button.is-on { background: #fff7dc; color: #935f00; box-shadow: inset 0 0 0 1px rgba(214,166,43,.34), 0 7px 18px rgba(214,166,43,.16); }
.captain-sound-button:not(.is-on) { color: #7d8794; }
.captain-appbar form { margin: 0; }
.captain-drawer { position: fixed; z-index: 30; top: 74px; left: 12px; right: 12px; display: grid; gap: 7px; padding: 12px; border-radius: 20px; background: #211a17; box-shadow: 0 22px 50px rgba(33,26,23,.25); }
.captain-drawer[hidden] { display: none; }
.captain-drawer a { color: #fff; text-decoration: none; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.08); font-weight: 850; }
.captain-main { padding: 18px 14px 94px; max-width: 760px; margin: 0 auto; }
.captain-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.captain-section-head h1 { margin: 2px 0 0; font-size: 15px; color: #313844; }
.captain-refresh-pill { flex: none; padding: 7px 10px; border-radius: 999px; background: #fff; color: #7d8794; font-size: 10px; font-weight: 850; box-shadow: inset 0 0 0 1px rgba(31,41,51,.08); }
.captain-table-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.captain-table-card { position: relative; min-height: 118px; border: 1px solid #d7dce3; border-radius: 15px; display: grid; align-content: center; justify-items: center; gap: 2px; overflow: hidden; background: linear-gradient(145deg,#f9fbfd,#e9edf2); color: #222831; text-decoration: none; box-shadow: inset 0 1px rgba(255,255,255,.85), 0 7px 15px rgba(31,41,51,.07); }
.captain-table-card .table-number { font-size: 31px; color: #8c929b; line-height: 1; }
.captain-table-card .table-minutes { font-size: 15px; color: #2d3748; }
.captain-table-card .table-amount { margin-top: 4px; font-weight: 900; font-size: 14px; color: #2d3748; }
.captain-table-card .table-customer { max-width: 92%; padding: 2px 10px; border-radius: 999px; background: rgba(122,31,43,.08); color: #394150; font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.captain-table-card .table-state { margin-top: 4px; font-style: normal; font-size: 10px; font-weight: 950; color: #7d8794; text-transform: uppercase; letter-spacing: .05em; }
.captain-table-card .table-pulse { position: absolute; top: 7px; left: 7px; right: 7px; padding: 4px 6px; border-radius: 999px; background: #dc2626; color: #fff; font-style: normal; font-size: 9px; font-weight: 950; text-align: center; box-shadow: 0 7px 18px rgba(220,38,38,.24); animation: tableReadyPulse 1.2s ease-in-out infinite; }
.captain-table-card .table-corner { position: absolute; top: 0; right: 0; width: 52px; height: 52px; background: linear-gradient(135deg, transparent 0 48%, rgba(122,31,43,.72) 50% 100%); }
.table-empty .table-state { color: #a1a8b2; }
.table-ordered { border-color: rgba(214,158,46,.52); background: linear-gradient(145deg,#fffaf0,#f4ead7); }
.table-cooking { border-color: rgba(234,88,12,.55); background: linear-gradient(145deg,#fff7ed,#fdebd3); }
.table-partial-ready { border-color: rgba(220,38,38,.56); background: linear-gradient(145deg,#fff1f2,#fee2e2); box-shadow: inset 0 1px rgba(255,255,255,.85), 0 9px 20px rgba(220,38,38,.12); }
.table-ready { border-color: rgba(22,163,74,.55); background: linear-gradient(145deg,#ecfdf5,#d8f5e5); }
.table-served { border-color: rgba(22,101,52,.55); background: linear-gradient(145deg,#dcfce7,#bbf7d0); }
.table-served .table-corner, .table-ready .table-corner { background: linear-gradient(135deg, transparent 0 48%, rgba(22,101,52,.75) 50% 100%); }
.table-served .table-number, .table-ready .table-number { color: #166534; }
.captain-shared-panel { margin: 18px 0 0; border: 1px solid #e2d6c7; border-radius: 20px; background: #fffaf0; padding: 14px; box-shadow: 0 10px 24px rgba(31,41,51,.05); }
.captain-shared-panel summary { cursor: pointer; font-size: 14px; font-weight: 950; color: #7a4d00; }
.captain-shared-panel p { margin: 10px 0 0; color: #7a6f64; font-size: 12px; line-height: 1.45; }
.captain-shared-form { display: grid; gap: 9px; margin-top: 12px; }
.captain-shared-form label { display: grid; gap: 5px; color: #4b4038; font-size: 11px; font-weight: 850; }
.captain-shared-form input { min-height: 44px; border-radius: 13px; border: 1px solid #dacfc4; padding: 0 13px; font: inherit; background: #fff; }
.captain-fab { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: #c43b4a; color: #fff; text-decoration: none; font-size: 35px; font-weight: 400; box-shadow: 0 18px 42px rgba(196,59,74,.35); z-index: 25; }
@keyframes tableReadyPulse { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-1px); opacity: .82; } }
@media (min-width: 740px) { .captain-table-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 390px) { .captain-table-grid { gap: 8px; } .captain-table-card { min-height: 110px; border-radius: 13px; } .captain-table-card .table-number { font-size: 27px; } }
.inline-remove-form { margin: 7px 0 0; }
.inline-remove-form button { min-height: 26px; border: 0; border-radius: 999px; padding: 0 10px; background: #fff2f2; color: #b42318; font-size: 10px; font-weight: 900; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(180,35,24,.12); }
.inline-remove-form button:hover { background: #fee4e2; }

/* v5.1.7 home-page banner slider settings */
.hero-slide-help {
  margin: -2px 0 14px;
  border: 1px dashed rgba(154, 110, 8, .28);
  border-radius: 13px;
  padding: 10px 12px;
  background: #fffaf0;
  color: var(--admin-muted);
  font-size: 10px;
  line-height: 1.55;
}
.hero-slide-help code {
  border-radius: 6px;
  padding: 1px 5px;
  background: #fff;
  color: #8a5c00;
  font-weight: 850;
}
.hero-slide-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.hero-slide-setting {
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(52,42,36,.04);
}
.hero-slide-setting h3 { margin: 0; font-size: 12px; }
.hero-slide-preview { aspect-ratio: 16 / 9; min-height: 128px; }
.hero-slide-preview img { width: 100%; height: 100%; object-fit: cover; }
.inline-check.danger-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b42318;
  font-size: 10px;
  font-weight: 850;
}
.inline-check.danger-check input { width: auto; }
@media (max-width: 920px) { .hero-slide-settings-grid { grid-template-columns: 1fr; } }
