:root {
  --orange: #fe7304;
  --orange-dark: #e75f00;
  --orange-soft: #fff1e6;
  --teal: #0e8c8c;
  --teal-dark: #007f80;
  --teal-soft: #e7f6f5;
  --ink: #202728;
  --muted: #708082;
  --line: #dde6e5;
  --surface: #ffffff;
  --bg: #f4f7f6;
  --danger: #c4493e;
  --shadow: 0 12px 34px rgba(20, 67, 67, .09);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; padding-bottom: 105px; }
.app-header { position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 max(18px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(221,230,229,.8); }
.header-actions { display: flex; align-items: center; gap: 7px; }
.language-row { display: flex; justify-content: flex-end; min-height: 34px; }
.language-picker { display: flex; grid-auto-flow: column; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.language-picker > span { color: var(--muted); font-size: 11px; }
.language-select { width: auto; min-width: 72px; padding: 8px 28px 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--teal-dark); background-color: white; font-size: 12px; font-weight: 900; cursor: pointer; }
.language-select.compact { min-width: 61px; height: 38px; padding-block: 6px; }
.brand-mini { display: flex; align-items: baseline; gap: 7px; letter-spacing: -.02em; }
.brand-mini strong { color: var(--orange); font-size: 21px; }
.brand-mini span { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 13px; background: transparent; display: grid; place-content: center; gap: 4px; color: var(--teal-dark); }
.icon-button:hover { background: var(--teal-soft); }
.icon-button > span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 4px; }
.history-button svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { width: min(100%, 760px); margin: 0 auto; padding: 18px 16px; }
.card { background: var(--surface); border: 1px solid rgba(221,230,229,.85); border-radius: 24px; box-shadow: var(--shadow); }
.hero { overflow: hidden; margin-bottom: 26px; }
.main-logo { display: block; width: 100%; max-height: 154px; object-fit: contain; padding: 22px 24px 10px; background: white; }
.hero-copy { padding: 18px 22px 22px; display: flex; gap: 14px; align-items: end; justify-content: space-between; background: linear-gradient(135deg, #fff8f1, #edf9f8); border-top: 1px solid var(--line); }
.eyebrow { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .13em; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 5px; font-size: clamp(27px, 6vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
.hero p { max-width: 450px; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.status-pill { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; color: var(--teal-dark); background: white; border: 1px solid #bfe1de; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-pill i, .drawer-footer i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(254,115,4,.13); }
.step-section { margin: 28px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 2px 15px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading.compact { margin: 0 0 18px; }
.section-heading h2 { font-size: 21px; letter-spacing: -.025em; }
.step-number { width: 27px; height: 27px; display: grid; place-content: center; border-radius: 9px; color: white; background: var(--teal); font-size: 13px; font-weight: 900; }
.text-button { border: 0; background: transparent; color: var(--orange-dark); font-size: 13px; font-weight: 800; padding: 8px; }
.text-button.danger { color: var(--danger); }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 1px 10px; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { flex: none; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 12px; font-weight: 750; }
.category-tabs button.active { background: var(--teal); border-color: var(--teal); color: white; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.service-card { position: relative; min-height: 118px; padding: 15px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: white; color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .15s; }
.service-card:active { transform: scale(.98); }
.service-card:hover { border-color: #f8ad72; box-shadow: 0 8px 20px rgba(254,115,4,.09); }
.service-card .service-icon { width: 34px; height: 34px; display: grid; place-content: center; border-radius: 11px; margin-bottom: 12px; color: var(--teal-dark); background: var(--teal-soft); font-size: 19px; font-weight: 900; }
.service-card strong { display: block; min-height: 34px; font-size: 14px; line-height: 1.23; }
.service-card small { display: block; margin-top: 7px; color: var(--orange-dark); font-weight: 850; }
.service-card .plus { position: absolute; right: 12px; top: 12px; width: 24px; height: 24px; display: grid; place-content: center; border-radius: 8px; color: white; background: var(--orange); font-weight: 900; }
.order-card, .details-card { padding: 20px; margin-bottom: 18px; }
.empty-state { padding: 22px 10px 16px; display: grid; justify-items: center; text-align: center; color: var(--muted); }
.empty-icon { width: 48px; height: 48px; display: grid; place-content: center; border-radius: 16px; margin-bottom: 10px; background: var(--orange-soft); color: var(--orange); font-size: 28px; }
.empty-state strong { color: var(--ink); }
.empty-state span { margin-top: 4px; font-size: 12px; }
.order-items { display: grid; gap: 10px; }
.order-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item-title { font-weight: 780; font-size: 14px; }
.item-meta { margin-top: 6px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.quantity-control { display: inline-flex; align-items: center; background: var(--teal-soft); border-radius: 10px; overflow: hidden; }
.quantity-control button { width: 28px; height: 28px; border: 0; background: transparent; color: var(--teal-dark); font-weight: 900; }
.quantity-control span { min-width: 23px; text-align: center; color: var(--ink); font-weight: 800; }
.item-right { text-align: right; }
.item-right strong { display: block; color: var(--orange-dark); white-space: nowrap; }
.remove-item { border: 0; background: transparent; color: var(--muted); padding: 6px 0 0 12px; font-size: 12px; }
.totals { margin-top: 14px; }
.discount-row, .total-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.discount-row { padding: 5px 0 15px; color: var(--muted); font-size: 13px; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fafcfc; }
.input-suffix input { width: 90px; padding: 9px 5px 9px 10px; border: 0; outline: 0; text-align: right; background: transparent; }
.input-suffix b { padding-right: 10px; color: var(--teal-dark); }
.total-row { padding-top: 15px; border-top: 2px solid var(--teal); }
.total-row span { font-weight: 750; }
.total-row strong { color: var(--orange); font-size: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; }
label > span, .field-label { color: var(--muted); font-size: 12px; font-weight: 750; }
label.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fbfcfc; border-radius: 13px; padding: 12px 13px; color: var(--ink); outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,140,140,.1); }
.field-label { display: block; margin: 18px 0 8px; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.payment-option { min-height: 74px; display: grid; justify-items: center; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: white; }
.payment-option b { font-size: 12px; }
.payment-option.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); box-shadow: inset 0 0 0 1px var(--orange); }
.pay-icon { font-size: 21px; font-weight: 850; }
.note-label { margin-top: 15px; }
textarea { resize: vertical; }
.action-bar { position: fixed; z-index: 18; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%,760px); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 32px rgba(20,67,67,.09); }
.action-bar > div { display: grid; }
.action-bar span { color: var(--muted); font-size: 11px; }
.action-bar strong { color: var(--teal-dark); font-size: 20px; }
.primary-button, .secondary-button { min-height: 48px; border-radius: 14px; padding: 0 18px; border: 0; font-weight: 850; }
.primary-button { color: white; background: linear-gradient(135deg, var(--orange), #ff902f); box-shadow: 0 8px 18px rgba(254,115,4,.22); }
.primary-button:disabled { color: #96a3a3; background: #e7eceb; box-shadow: none; cursor: not-allowed; }
.secondary-button { color: var(--teal-dark); background: var(--teal-soft); }
.full-width { width: 100%; margin-top: 18px; }
.drawer, .modal { position: fixed; inset: 0; z-index: 50; display: none; background: rgba(15,30,30,.48); backdrop-filter: blur(4px); }
.drawer.open, .modal.open { display: block; }
.drawer-panel { width: min(83vw,340px); height: 100%; padding: 24px; background: white; box-shadow: 20px 0 50px rgba(0,0,0,.15); animation: slideIn .2s ease-out; }
@keyframes slideIn { from { transform: translateX(-100%); } }
.drawer-logo { width: 100%; height: 105px; object-fit: contain; margin: 35px 0 28px; }
.close-button { width: 36px; height: 36px; border: 0; border-radius: 11px; background: var(--bg); color: var(--muted); font-size: 25px; line-height: 1; }
.drawer-panel > .close-button { float: right; }
.drawer nav { display: grid; gap: 8px; }
.drawer nav button { padding: 14px; text-align: left; border: 0; border-radius: 13px; color: var(--ink); background: var(--bg); font-weight: 750; }
.drawer nav button:first-child { color: white; background: var(--teal); }
.drawer-footer { position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; max-width: 260px; color: var(--muted); font-size: 12px; }
.modal { overflow-y: auto; padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)); place-items: center; }
.modal.open { display: grid; }
.modal-card { position: relative; width: min(100%,520px); padding: 22px; border-radius: 24px; background: white; box-shadow: 0 22px 70px rgba(0,0,0,.22); animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal-card.tall { max-height: min(780px,90vh); overflow-y: auto; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.modal-header h3 { font-size: 22px; }
.modal-card > label { margin-top: 12px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.helper-text { color: var(--muted); font-size: 13px; line-height: 1.45; margin-bottom: 14px; }
.history-list { display: grid; gap: 10px; }
.history-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcfc; }
.history-item strong { display: block; }
.history-item small { display: block; margin-top: 4px; color: var(--muted); }
.history-item .amount { color: var(--orange-dark); font-weight: 900; }
.history-item button { grid-column: 1/-1; border: 0; background: transparent; padding: 5px 0 0; text-align: left; color: var(--teal-dark); font-size: 12px; font-weight: 750; }
.receipt-shell { padding: 0; overflow: hidden; }
.receipt-close { position: absolute; z-index: 2; top: 12px; right: 12px; }
.receipt { padding: 28px 24px 20px; }
.receipt-logo { display: block; width: 210px; max-height: 74px; object-fit: contain; margin: 0 auto 13px; }
.receipt-head { text-align: center; border-bottom: 2px solid var(--teal); padding-bottom: 15px; }
.receipt-head h3 { font-size: 18px; }
.receipt-head p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.receipt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 15px 0; color: var(--muted); font-size: 11px; border-bottom: 1px dashed var(--line); }
.receipt-meta b { color: var(--ink); }
.receipt-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12px; }
.receipt-table th { padding: 6px 2px; text-align: left; color: var(--muted); font-size: 10px; }
.receipt-table td { padding: 8px 2px; border-top: 1px solid #edf1f0; }
.receipt-table td:last-child, .receipt-table th:last-child { text-align: right; }
.receipt-total { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 0; border-top: 2px solid var(--orange); }
.receipt-total strong { color: var(--orange); font-size: 22px; }
.fiscal-demo { margin-top: 12px; padding: 12px; display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; border-radius: 13px; background: var(--teal-soft); }
.fake-qr { width: 70px; height: 70px; display: grid; grid-template-columns: repeat(11,1fr); background: white; padding: 4px; gap: 1px; }
.fake-qr i { background: transparent; }
.fake-qr i.on { background: var(--ink); }
.fiscal-demo strong { color: var(--teal-dark); font-size: 12px; }
.fiscal-demo p { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.receipt-note { margin-top: 12px; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.4; }
.receipt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 13px; background: var(--bg); border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 105px; transform: translate(-50%,20px); padding: 11px 16px; border-radius: 12px; color: white; background: var(--ink); font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%,0); }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 15% 10%, #fff1e6 0, transparent 36%), radial-gradient(circle at 90% 90%, #dff4f3 0, transparent 38%), var(--bg); }
.auth-card { width: min(100%, 430px); padding: 25px; border: 1px solid var(--line); border-radius: 28px; background: white; box-shadow: 0 24px 70px rgba(20,67,67,.14); }
.auth-logo { width: 100%; height: 120px; object-fit: contain; margin-bottom: 14px; }
.auth-tabs, .filter-tabs { display: flex; gap: 5px; padding: 5px; border-radius: 14px; background: var(--bg); }
.auth-tabs button, .filter-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 800; }
.auth-tabs button.active, .filter-tabs button.active { color: white; background: var(--teal); box-shadow: 0 5px 14px rgba(14,140,140,.2); }
.auth-form { display: grid; gap: 13px; margin-top: 22px; }
.auth-form h1 { font-size: 25px; margin-bottom: 2px; }
.auth-hint { color: var(--muted); font-size: 12px; text-align: center; line-height: 1.45; }
.form-error { min-height: 18px; margin-top: 10px; color: var(--danger); font-size: 13px; text-align: center; }
.notification-button { position: relative; width: 42px; height: 42px; border: 0; border-radius: 13px; background: var(--teal-soft); font-size: 18px; }
.notification-button b { position: absolute; right: -3px; top: -4px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-content: center; border: 2px solid white; border-radius: 20px; color: white; background: var(--orange); font-size: 10px; }
.requests-card { padding: 20px; margin-bottom: 25px; }
.request-list { display: grid; gap: 12px; }
.request-card { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(20,67,67,.06); }
.request-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.request-id { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.request-top h3 { margin-top: 3px; font-size: 17px; }
.request-status { padding: 7px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; text-align: center; background: #f0f2f2; }
.request-status.pending { color: #9b5c00; background: #fff1d6; }.request-status.approved { color: var(--teal-dark); background: var(--teal-soft); }.request-status.paid { color: #2d743f; background: #e8f7ec; }.request-status.rejected { color: var(--danger); background: #fff0ee; }
.request-meta { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.request-card ul { list-style: none; margin: 13px 0 0; padding: 0; border-top: 1px dashed var(--line); }
.request-card li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf1f0; font-size: 12px; }
.request-card li b { white-space: nowrap; }
.request-note { margin-top: 10px; padding: 10px; border-radius: 10px; color: var(--muted); background: var(--bg); font-size: 12px; }
.request-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 13px; }.request-total span { color: var(--muted); font-size: 12px; }.request-total strong { color: var(--orange); font-size: 21px; }
.request-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; margin-top: 14px; }.request-actions .primary-button,.request-actions .secondary-button { min-height: 44px; font-size: 12px; }.request-actions:has(> :only-child) { grid-template-columns: 1fr; }
.receipt-link { display: block; width: 100%; text-align: left; margin-top: 8px; }
.admin-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 14px; }.admin-stats div { padding: 15px 10px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 17px; background: white; text-align: center; }.admin-stats span { color: var(--muted); font-size: 11px; }.admin-stats strong { color: var(--teal-dark); font-size: 26px; }
.filter-tabs { margin-bottom: 15px; overflow-x: auto; }.filter-tabs button { min-width: 76px; font-size: 12px; }
.account-box { display: grid; gap: 3px; margin-bottom: 18px; padding: 14px; border-radius: 14px; background: var(--teal-soft); }.account-box strong { color: var(--teal-dark); }.account-box span { color: var(--muted); font-size: 12px; }.drawer nav button.danger-nav { color: var(--danger); }
.notification-row { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; }.notification-row.unread { border-color: #f8ad72; background: var(--orange-soft); }.notification-row span,.notification-row small { color: var(--muted); font-size: 12px; }
.fiscal-warning { margin-top: 12px; padding: 12px; border-radius: 13px; background: #fff1d6; }.fiscal-warning strong { color: #9b5c00; font-size: 12px; }.fiscal-warning p { margin-top: 4px; color: #785c31; font-size: 10px; line-height: 1.4; }

@media (max-width: 500px) {
  main { padding-inline: 12px; }
  .hero-copy { align-items: flex-start; flex-direction: column; }
  .main-logo { max-height: 130px; padding-inline: 16px; }
  .service-grid { gap: 8px; }
  .service-card { min-height: 124px; padding: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  label.full { grid-column: auto; }
  .action-bar { border-radius: 18px 18px 0 0; }
  .action-bar .primary-button { padding: 0 14px; }
  .auth-screen { padding: 12px; }.auth-card { padding: 20px; border-radius: 22px; }.auth-logo { height: 98px; }
  .request-actions { grid-template-columns: 1fr; }
  .app-header { padding-inline: 10px; }
  .brand-mini { gap: 4px; }
  .brand-mini strong { font-size: 18px; }
  .language-select.compact { min-width: 56px; padding-inline: 7px 22px; }
}

@media print {
  body * { visibility: hidden !important; }
  #receiptContent, #receiptContent * { visibility: visible !important; }
  #receiptContent { position: fixed; inset: 0; background: white; }
  .receipt { width: 80mm; margin: 0 auto; padding: 8mm 5mm; }
  .receipt-actions, .receipt-close { display: none !important; }
}
