*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;overflow-x:hidden}
:root{color-scheme:dark;--green:#25D366;--green-dark:#1da851;--orange:#F97316;--bg:#111827;--surface:#1F2937;--surface2:#374151;--text:#F3F4F6;--muted:#9CA3AF;--border:#374151;--red:#EF4444}
html[data-theme="light"]{color-scheme:light;--bg:#f2f4f7;--surface:#ffffff;--surface2:#e9edf3;--text:#121826;--muted:#5b6b7f;--border:#dde3ea}
.app{max-width:430px;margin:0 auto;min-height:100vh;position:relative;padding-bottom:80px}

/* HEADER */
.header{background:var(--bg);padding:16px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50;border-bottom:1px solid var(--border)}
.logo{display:flex;align-items:center;gap:10px}
.logo-icon{width:38px;height:38px;background:var(--green);border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;color:#fff}
.logo-name{font-weight:700;font-size:18px;color:var(--green)}
.location-badge{display:flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:6px 12px;font-size:12px;color:var(--muted);cursor:pointer}

/* RESTAURANT HEADER (menu view) */
.rest-header{background:var(--bg);padding:0;position:sticky;top:0;z-index:50}
.rest-header-bar{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border)}
.back-btn{background:none;border:none;color:var(--text);cursor:pointer;font-size:22px;display:flex;align-items:center}
.rest-header-logo{width:36px;height:36px;border-radius:8px;object-fit:cover;background:var(--surface2)}
.rest-header-info h2{font-size:15px;font-weight:600;color:var(--text)}
.rest-header-info p{font-size:11px;color:var(--muted)}

/* SEARCH */
.search-wrap{padding:16px}
.search-box{background:var(--surface);border:1px solid var(--border);border-radius:12px;display:flex;align-items:center;gap:10px;padding:12px 14px}
.search-box input{background:none;border:none;outline:none;color:var(--text);font-size:15px;width:100%;font-family:'Inter',sans-serif}
.search-box input::placeholder{color:var(--muted)}
.search-box i{color:var(--muted);font-size:18px}

/* SECTION LABEL */
.section-label{padding:0 16px 12px;font-size:13px;color:var(--muted);font-weight:500}

/* RESTAURANT CARD */
.rest-list{padding:0 12px;display:flex;flex-direction:column;gap:10px}
.rest-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:14px;display:flex;align-items:flex-start;gap:12px;cursor:pointer;transition:background 0.15s}
.rest-card:active{background:var(--surface2)}
.rest-logo{width:62px;height:62px;border-radius:12px;background:var(--surface2);flex-shrink:0;object-fit:cover;display:flex;align-items:center;justify-content:center;font-size:22px}
.rest-info{flex:1;min-width:0}
.rest-name{font-size:15px;font-weight:600;color:var(--text);margin-bottom:3px}
.rest-address{font-size:12px;color:var(--muted);line-height:1.4;margin-bottom:8px}
.rest-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tag-open{background:#064e2a;color:#4ade80;border:1px solid #166534;border-radius:20px;padding:3px 10px;font-size:11px;font-weight:600}
.tag-closed{background:#450a0a;color:#f87171;border:1px solid #7f1d1d;border-radius:20px;padding:3px 10px;font-size:11px;font-weight:600}
.tag-location{background:var(--surface2);color:var(--muted);border-radius:20px;padding:3px 10px;font-size:11px;display:flex;align-items:center;gap:4px}
.rest-actions{display:flex;flex-direction:column;gap:6px;flex-shrink:0}
.btn-wa{background:var(--green);color:#fff;border:none;border-radius:10px;padding:9px 12px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;display:flex;align-items:center;gap:5px;transition:background 0.15s}
.btn-wa:active{background:var(--green-dark)}
.btn-menu{background:var(--surface2);color:var(--text);border:1px solid var(--border);border-radius:10px;padding:8px 12px;font-size:12px;font-weight:600;cursor:pointer;text-align:center;transition:background 0.15s}
.btn-menu:active{background:#4B5563}

/* RESTAURANT BANNER */
.rest-banner{width:100%;height:180px;object-fit:cover;background:var(--surface2);display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:14px}
.rest-banner img{width:100%;height:180px;object-fit:cover}

/* CATEGORY LIST */
.cat-list{padding:12px}
.cat-item{background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-bottom:8px;overflow:hidden}
.cat-header{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}
.cat-dot{width:8px;height:8px;background:var(--green);border-radius:50%;flex-shrink:0}
.cat-title{font-size:15px;font-weight:600;color:var(--text);flex:1;margin-left:10px}
.cat-count{font-size:12px;color:var(--muted);margin-right:8px}
.cat-body{border-top:1px solid var(--border)}
.menu-item{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);cursor:pointer;transition:background 0.1s}
.menu-item:last-child{border-bottom:none}
.menu-item:active{background:var(--surface2)}
.item-name{font-size:14px;color:var(--text);margin-bottom:3px}
.item-price{font-size:14px;font-weight:600;color:var(--orange)}
.item-desc{font-size:12px;color:var(--muted);margin-top:2px}
.btn-add{width:36px;height:36px;background:var(--orange);border:none;border-radius:8px;color:#fff;font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-weight:700;transition:transform 0.1s}
.btn-add:active{transform:scale(0.9)}

/* ITEM DETAIL */
.item-detail{padding:16px}
.item-back{display:flex;align-items:center;gap:8px;margin-bottom:16px;cursor:pointer;background:var(--surface);border:none;color:var(--orange);font-size:14px;font-weight:600;font-family:'Inter',sans-serif;border-radius:10px;padding:8px 14px}
.item-cat-badge{display:inline-block;background:#0d3d2d;color:#34d399;border:1px solid #065f46;border-radius:20px;padding:3px 10px;font-size:11px;font-weight:600;margin-bottom:10px}
.item-title{font-size:24px;font-weight:700;color:var(--text);margin-bottom:6px}
.item-price-lg{font-size:20px;font-weight:700;color:var(--orange);margin-bottom:16px}
.item-price-lg span{font-size:13px;font-weight:400;color:var(--muted);margin-left:4px}
.variation-box{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px;margin-bottom:16px}
.variation-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:4px}
.variation-sub{font-size:12px;color:var(--muted);margin-bottom:10px}
.var-opt{display:flex;align-items:center;gap:8px;padding:6px 0;font-size:14px;color:var(--text)}
.var-opt i{color:var(--muted);font-size:16px}
.btn-customize{width:100%;background:var(--surface);border:1.5px solid var(--text);border-radius:12px;padding:16px;font-size:15px;font-weight:700;color:var(--text);cursor:pointer;font-family:'Inter',sans-serif;transition:background 0.15s;margin-bottom:16px}
.btn-customize:active{background:var(--surface2)}
.rest-info-box{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px}
.info-label{font-size:11px;font-weight:700;color:var(--muted);letter-spacing:0.08em;margin-bottom:6px;margin-top:10px}
.info-label:first-child{margin-top:0}
.info-title{font-size:15px;font-weight:600;color:var(--text);margin-bottom:4px}
.info-text{font-size:13px;color:var(--muted);line-height:1.5}
.view-menu-link{color:var(--orange);font-size:13px;font-weight:600;cursor:pointer;display:inline-block;margin-top:10px}
.powered{text-align:center;font-size:12px;color:var(--muted);padding:16px;margin-top:8px}
.powered span{color:var(--orange);font-weight:600}

/* MODAL */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.65);z-index:100;display:flex;align-items:flex-end;justify-content:center}
.modal{background:var(--surface);border-radius:20px 20px 0 0;padding:20px 16px 32px;width:100%;max-width:430px}
.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.modal-title{font-size:17px;font-weight:700;color:var(--text)}
.modal-close{background:var(--surface2);border:none;border-radius:8px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text);font-size:18px}
.modal-section{font-size:14px;font-weight:600;color:var(--text);margin-bottom:10px}
.var-radio{background:var(--surface2);border:1.5px solid transparent;border-radius:10px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;cursor:pointer;transition:border-color 0.15s}
.var-radio.selected{border-color:var(--orange)}
.var-radio-left{display:flex;align-items:center;gap:10px}
.radio-dot{width:18px;height:18px;border-radius:50%;border:2px solid var(--muted);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.radio-dot.active{border-color:var(--orange);background:var(--orange)}
.radio-dot.active::after{content:'';width:6px;height:6px;background:#fff;border-radius:50%}
.var-radio-name{font-size:14px;color:var(--text)}
.var-radio-price{font-size:14px;font-weight:600;color:var(--muted)}
.qty-row{display:flex;align-items:center;justify-content:space-between;margin:16px 0}
.qty-label{font-size:14px;font-weight:600;color:var(--text)}
.qty-ctrl{display:flex;align-items:center;gap:14px}
.qty-btn{width:36px;height:36px;background:var(--surface2);border:1px solid var(--border);border-radius:8px;font-size:20px;color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:center;font-weight:700}
.qty-num{font-size:16px;font-weight:600;color:var(--text);min-width:20px;text-align:center}
.line-total{font-size:15px;font-weight:700;color:var(--orange);margin-bottom:16px}
.modal-btns{display:flex;gap:10px}
.btn-cancel{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:12px;padding:14px;font-size:14px;font-weight:600;color:var(--text);cursor:pointer;font-family:'Inter',sans-serif}
.btn-addcart{flex:2;background:var(--orange);border:none;border-radius:12px;padding:14px;font-size:14px;font-weight:700;color:#fff;cursor:pointer;font-family:'Inter',sans-serif;transition:background 0.15s}
.btn-addcart:active{background:#ea6c04}

/* BOTTOM NAV */
.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;background:var(--bg);border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-around;padding:10px 0 20px;z-index:50}
.nav-item{display:flex;flex-direction:column;align-items:center;gap:3px;cursor:pointer;color:var(--muted);font-size:10px;font-weight:500;min-width:60px;position:relative;transition:color 0.15s}
.nav-item.active{color:var(--green)}
.nav-item i{font-size:22px}
.cart-badge{position:absolute;top:-4px;right:10px;background:var(--red);color:#fff;border-radius:10px;font-size:9px;font-weight:700;padding:1px 5px;min-width:16px;text-align:center}

/* TOAST */
.toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:#065f46;color:#d1fae5;border-radius:12px;padding:12px 20px;font-size:13px;font-weight:600;z-index:200;opacity:0;transition:opacity 0.3s;white-space:nowrap;display:flex;align-items:center;gap:8px}
.toast.show{opacity:1}

@media(max-width:380px){.rest-actions{gap:5px}.btn-wa{font-size:11px;padding:8px 10px}.rest-logo{width:52px;height:52px}}
