:root {
  --orange: #f15a24;
  --orange-dark: #c74717;
  --blue: #0071bc;
  --green: #16a34a;
  --red: #dc2626;
  --dark: #101828;
  --muted: #667085;
  --soft: #f8fafc;
  --line: #e4e7ec;
  --white: #fff;
  --shadow: 0 18px 48px rgba(16, 24, 40, .12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--dark);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(241, 90, 36, .22), transparent 32%),
    linear-gradient(180deg, #fff, #f7f8fb 42%, #eef2f7);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { width: min(680px, 100%); margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 14px 34px; }
.hero { position: relative; overflow: hidden; min-height: 210px; border-radius: 30px; padding: 18px; color: white; background: linear-gradient(145deg, #f15a24, #ff9f1c 52%, #0071bc); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -72px; bottom: -90px; width: 210px; height: 210px; border-radius: 999px; background: rgba(255,255,255,.19); }
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; margin-bottom: 18px; }
.logo { width: 82px; height: 82px; border-radius: 24px; display: grid; place-items: center; background: transparent; box-shadow: 0 14px 28px rgba(0,0,0,.18); overflow: hidden; }
.logo img { width: 82px; height: 82px; object-fit: contain; display: block; }
.install-btn { padding: 10px 14px; border-radius: 999px; color: white; background: rgba(255,255,255,.22); font-weight: 800; }
.eyebrow { position: relative; z-index: 1; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; font-weight: 900; opacity: .9; }
h1 { position: relative; z-index: 1; margin: 8px 0 10px; max-width: 420px; font-size: clamp(28px, 7.5vw, 46px); line-height: .98; letter-spacing: -.055em; }
.hero p:not(.eyebrow) { position: relative; z-index: 1; max-width: 440px; line-height: 1.45; color: rgba(255,255,255,.9); font-size: 14px; }
.version-pill { position: relative; z-index: 1; display: inline-flex; margin-top: 12px; padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.20); color: white; font-size: 12px; font-weight: 800; }
.quick-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin: 12px 0 10px; }
.action, .ghost { border-radius: 18px; min-height: 52px; padding: 12px 13px; background: white; color: var(--dark); box-shadow: 0 8px 22px rgba(16,24,40,.08); font-weight: 900; text-align: center; }
.action.primary { background: var(--orange); color: white; }
.ghost { min-height: auto; padding: 9px 12px; background: #f2f4f7; box-shadow: none; }
.search-box { margin: 12px 0; }
.search-box input { width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 22px; padding: 0 17px; outline: none; background: rgba(255,255,255,.92); box-shadow: 0 10px 28px rgba(16,24,40,.06); }
.search-box input:focus { border-color: var(--orange); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 12px; }
.section-title h2 { font-size: 19px; line-height: 1.15; }
.section-title span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; background: #fff3ed; color: var(--orange); font-weight: 900; }
.structures-list { display: grid; gap: 12px; }
.structure-card { display: grid; grid-template-columns: 78px 1fr; gap: 14px; align-items: center; background: white; border: 1px solid rgba(228, 231, 236, .9); border-radius: 24px; padding: 12px; box-shadow: 0 10px 26px rgba(16,24,40,.055); transition: transform .18s ease, box-shadow .18s ease; }
.structure-card:active { transform: scale(.985); }
.structure-img { width: 78px; height: 78px; border-radius: 20px; object-fit: cover; background: linear-gradient(135deg, #fff3ed, #e0f2fe); }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.structure-card h3 { font-size: 17px; line-height: 1.18; }
.meta { color: var(--muted); font-size: 13px; line-height: 1.45; }
.tag { display: inline-flex; margin-top: 9px; padding: 6px 9px; border-radius: 999px; color: var(--blue); background: #e6f3fb; font-size: 12px; font-weight: 900; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 900; white-space: nowrap; }
.status-pill.open { color: #067647; background: #dcfae6; }
.status-pill.closed { color: #b42318; background: #fee4e2; }
.status-pill.unknown { color: #344054; background: #f2f4f7; }
.empty-state { padding: 22px 18px; border-radius: 24px; background: rgba(255,255,255,.86); border: 1px dashed #d0d5dd; text-align: center; box-shadow: 0 10px 24px rgba(16,24,40,.045); }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 18px; background: #fff3ed; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--muted); line-height: 1.5; }
.update-box { margin: 10px 0 14px; padding: 14px; border-radius: 26px; background: white; box-shadow: var(--shadow); border: 1px solid var(--line); }
.update-box h2 { margin-bottom: 6px; }
.update-box p { color: var(--muted); line-height: 1.5; }
.update-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 14px; }
.scanner-panel { position: fixed; z-index: 30; left: 10px; right: 10px; top: max(48px, env(safe-area-inset-top)); width: min(660px, calc(100% - 20px)); max-height: calc(100vh - 72px); margin: 0 auto; overflow-y: auto; padding: 14px; border-radius: 28px; background: white; box-shadow: var(--shadow); border: 1px solid var(--line); }
.scanner-panel::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(16,24,40,.38); backdrop-filter: blur(10px); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#reader { overflow: hidden; border-radius: 24px; background: #101828; min-height: 245px; max-height: min(58vh, 420px); }
#reader video { width: 100% !important; height: min(58vh, 420px) !important; max-height: 420px !important; object-fit: cover !important; border-radius: 24px; }
#reader__scan_region { display: grid; place-items: center; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.detail-panel { position: fixed; inset: auto 0 0 0; z-index: 20; width: min(680px, 100%); max-height: 94vh; margin: 0 auto; overflow-y: auto; border-radius: 30px 30px 0 0; padding: 0 14px max(22px, env(safe-area-inset-bottom)); background: white; box-shadow: var(--shadow); border: 1px solid var(--line); }
.detail-close { position: sticky; top: 10px; z-index: 5; display: inline-flex; align-items: center; justify-content: center; height: 42px; min-width: 96px; padding: 0 16px; margin: 12px 0 10px; border-radius: 999px; background: #f2f4f7; color: var(--dark); font-size: 16px; font-weight: 900; line-height: 1; box-shadow: 0 8px 18px rgba(16,24,40,.08); }
.detail-cover-wrap { position: relative; min-height: 230px; margin-bottom: 46px; }
.detail-cover { width: 100%; height: 210px; border-radius: 26px; object-fit: cover; object-position: center; background: linear-gradient(135deg, #fff3ed, #e0f2fe); display: block; }
.detail-avatar { position: absolute; left: 18px; bottom: -38px; width: 86px; height: 86px; border-radius: 28px; object-fit: cover; background: white; border: 5px solid white; box-shadow: 0 12px 30px rgba(16,24,40,.18); }
.detail-status { position: absolute; right: 14px; bottom: -22px; padding: 9px 12px; box-shadow: 0 8px 20px rgba(16,24,40,.12); }
.detail-head { padding: 0 2px 4px; }
.detail-type { color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.detail-panel h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.05; letter-spacing: -.03em; }
.detail-description { color: var(--muted); line-height: 1.62; font-size: 15px; margin-bottom: 2px; }
.info-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0; }
.info-grid div { padding: 12px 14px; border-radius: 18px; background: #f8fafc; border: 1px solid #edf0f5; }
.info-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.info-grid strong { display: block; font-size: 14px; line-height: 1.35; }
.local-note { padding: 12px 14px; border-radius: 18px; background: #fffbeb; color: #92400e; line-height: 1.5; font-size: 13px; }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.contact-btn { min-height: 62px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 9px; color: white; font-weight: 900; box-shadow: 0 12px 24px rgba(16,24,40,.12); }
.contact-btn span { font-size: 20px; }
.contact-btn.call { background: linear-gradient(135deg, #f15a24, #ff9f1c); }
.contact-btn.whatsapp { background: linear-gradient(135deg, #17b26a, #039855); }
.contact-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.menu-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.menu-head h3 { font-size: 22px; line-height: 1.05; }
.selection-count { padding: 7px 10px; border-radius: 999px; background: #eef4ff; color: #175cd3; font-size: 12px; font-weight: 900; white-space: nowrap; }
.menu-list { display: grid; gap: 12px; margin-top: 12px; }
.menu-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; background: #f8fafc; border: 1px solid #edf0f5; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.menu-item.selectable { cursor: pointer; }
.menu-item:active { transform: scale(.99); }
.menu-item input { width: 21px; height: 21px; accent-color: var(--orange); margin-top: 2px; }
.menu-item.is-selected { border-color: rgba(241,90,36,.45); background: #fff7ed; }
.menu-text { min-width: 0; }
.menu-text strong { display: block; font-size: 16px; line-height: 1.25; margin-bottom: 8px; overflow-wrap: anywhere; }
.menu-text small { display: inline-flex; width: fit-content; margin-bottom: 7px; padding: 5px 8px; border-radius: 999px; color: var(--blue); background: #e6f3fb; font-size: 12px; font-weight: 900; }
.menu-text p { color: var(--muted); line-height: 1.45; font-size: 13px; overflow-wrap: anywhere; }
.menu-price { min-width: 86px; text-align: right; color: var(--orange); font-weight: 900; white-space: normal; font-size: 14px; line-height: 1.25; }
.empty-menu { padding: 14px; }
.send-selection { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 3; width: 100%; min-height: 58px; margin-top: 16px; border-radius: 20px; color: white; background: linear-gradient(135deg, #17b26a, #039855); box-shadow: 0 18px 34px rgba(3,152,85,.24); font-weight: 900; }
.toast { position: fixed; left: 18px; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; margin: 0 auto; width: min(640px, calc(100% - 36px)); padding: 14px 16px; color: white; background: rgba(16,24,40,.94); border-radius: 18px; text-align: center; font-weight: 800; }
.hidden { display: none !important; }
@media (min-width: 560px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .hero { min-height: 190px; border-radius: 26px; padding: 16px; }
  .hero-top { margin-bottom: 14px; }
  .logo { width: 68px; height: 68px; border-radius: 22px; }
  .logo img { width: 68px; height: 68px; }
  h1 { font-size: 30px; }
  .hero p:not(.eyebrow) { font-size: 13px; }
  .quick-actions { grid-template-columns: 1fr; margin-top: 10px; }
  .structure-card { grid-template-columns: 70px 1fr; padding: 10px; }
  .structure-img { width: 70px; height: 70px; }
  .card-title-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .update-actions { grid-template-columns: 1fr; }
  .scanner-panel { top: max(34px, env(safe-area-inset-top)); max-height: calc(100vh - 54px); }
  #reader { min-height: 245px; max-height: 50vh; }
  #reader video { height: 50vh !important; }
  .detail-panel { max-height: 95vh; padding-left: 12px; padding-right: 12px; }
  .detail-cover { height: 165px; }
  .detail-cover-wrap { min-height: 178px; margin-bottom: 48px; }
  .detail-avatar { width: 78px; height: 78px; border-radius: 25px; }
  .detail-panel h2 { font-size: 26px; }
  .contact-actions { grid-template-columns: 1fr 1fr; }
  .contact-btn { min-height: 56px; border-radius: 20px; font-size: 15px; }
  .menu-head { align-items: flex-start; }
  .menu-item { grid-template-columns: 24px minmax(0, 1fr); align-items: flex-start; }
  .menu-price { grid-column: 2; min-width: 0; text-align: left; }
}
