/* ─── ORDERPODU — LIGHT THEME FOOD DELIVERY UI ─── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    --brand:       #E8410A;
    --brand-deep:  #C23309;
    --brand-soft:  #FFF1EC;
    --brand-mid:   #FF6B35;
    --orange-glow: rgba(232, 65, 10, 0.15);
    --green:       #16A34A;
    --green-soft:  #DCFCE7;
    --amber:       #D97706;
    --amber-soft:  #FEF3C7;
    --red:         #DC2626;

    --bg:          #F8F5F2;
    --surface:     #FFFFFF;
    --surface-2:   #FAF9F7;
    --border:      #EDE9E4;
    --border-mid:  #DDD7D0;

    --text:        #1A1410;
    --text-mid:    #4A403A;
    --text-muted:  #8A7E76;

    --shadow-sm:   0 1px 3px rgba(26,20,16,0.08), 0 1px 2px rgba(26,20,16,0.06);
    --shadow-md:   0 4px 12px rgba(26,20,16,0.10), 0 2px 6px rgba(26,20,16,0.06);
    --shadow-lg:   0 12px 32px rgba(26,20,16,0.12), 0 4px 12px rgba(26,20,16,0.08);
    --shadow-card: 0 2px 8px rgba(26,20,16,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── APP SHELL ─── */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ─── HEADER ─── */
.hdr {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 0 var(--border);
}

.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }

.brand-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.brand-tagline {
    font-size: 10px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hdr-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── LOCATION BAR ─── */
.loc-bar {
    background: var(--surface);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.loc-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-mid);
    font-weight: 500;
    flex: 1;
    min-width: 0;
}

.loc-info span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pulse-dot.searching {
    background: var(--amber);
    box-shadow: 0 0 0 0 rgba(217,119,6,0.5);
    animation: pulseAmber 1.5s infinite;
}
.pulse-dot.active {
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(22,163,74,0.5);
    animation: pulseGreen 2s infinite;
}
.pulse-dot.error { background: var(--red); }

@keyframes pulseAmber {
    0%   { box-shadow: 0 0 0 0 rgba(217,119,6,0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(217,119,6,0); }
    100% { box-shadow: 0 0 0 0 rgba(217,119,6,0); }
}
@keyframes pulseGreen {
    0%   { box-shadow: 0 0 0 0 rgba(22,163,74,0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

#btn-refresh-loc {
    background: var(--brand-soft);
    border: none;
    border-radius: 20px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.2s;
}
#btn-refresh-loc:active { background: #FFD9CC; }

/* ─── HERO BANNER ─── */
.hero-banner {
    background: linear-gradient(135deg, var(--brand) 0%, #FF6B35 60%, #FF9A5C 100%);
    padding: 24px 20px 28px;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.hero-banner::after {
    content: '';
    position: absolute;
    right: 40px; bottom: -60px;
    width: 150px; height: 150px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.hero-greeting {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    margin-bottom: 4px;
}
.hero-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-title span {
    color: #FFE4B5;
}

/* ─── SEARCH (inside hero) ─── */
.search-wrapper {
    position: relative;
}
.search-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: #fff;
    border: none;
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s;
    outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { box-shadow: 0 4px 24px rgba(0,0,0,0.2); }
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.5;
    pointer-events: none;
}

/* ─── FILTER CHIPS ─── */
.filters-section {
    background: var(--surface);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.filters-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.filters-wrapper::-webkit-scrollbar { display: none; }

.filter-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-mid);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    font-family: inherit;
}
.filter-chip:active { transform: scale(0.96); }
.filter-chip.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand);
}

/* ─── LIST SECTION ─── */
.list-section {
    padding: 16px 16px 100px;
    flex-grow: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}
.section-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.section-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 2px 8px;
    border-radius: 20px;
}

/* ─── RESTAURANT CARD ─── */
.restaurants-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rest-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    border: 1.5px solid var(--border);
}
.rest-card:hover {
    border-color: var(--brand-mid);
    box-shadow: var(--shadow-md);
}
.rest-card:active {
    transform: scale(0.975);
    box-shadow: var(--shadow-sm);
}

.rest-logo-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--brand-soft);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    overflow: hidden;
}
.rest-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.rest-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-grow: 1;
    min-width: 0;
}

.rest-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rest-name {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rest-cuisines {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-soft);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.rest-address {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rest-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.rest-distance {
    font-size: 12px;
    font-weight: 800;
    color: var(--green);
    background: var(--green-soft);
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.btn-fav {
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    user-select: none;
}
.btn-fav:hover {
    transform: scale(1.1);
    background: var(--brand-soft);
    border-color: var(--brand-mid);
}
.btn-fav:active {
    transform: scale(0.9);
}
.btn-fav.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    box-shadow: 0 2px 8px var(--orange-glow);
}

/* ─── SKELETON LOADER ─── */
.skeleton-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--border);
}
.skeleton-logo {
    width: 64px; height: 64px;
    border-radius: 14px;
    background: var(--border);
    animation: shimmer 1.4s infinite ease-in-out;
    flex-shrink: 0;
}
.skeleton-text-wrapper { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    animation: shimmer 1.4s infinite ease-in-out;
}
.skeleton-line.title { width: 55%; height: 16px; }
.skeleton-line.sub   { width: 35%; height: 10px; }
.skeleton-line.desc  { width: 70%; height: 10px; }

@keyframes shimmer {
    0%   { opacity: 0.6; }
    50%  { opacity: 1.0; }
    100% { opacity: 0.6; }
}

/* ─── EMPTY / ERROR STATE ─── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-icon { font-size: 52px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 14px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.empty-state small { font-size: 12px; color: var(--text-muted); }

/* ─── PWA INSTALL BANNER ─── */
.install-banner {
    position: fixed;
    bottom: 80px; left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 14px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 300;
    box-shadow: var(--shadow-lg);
}
.install-text { font-size: 13px; font-weight: 600; color: var(--text-mid); }
.install-text strong { display: block; font-size: 14px; font-weight: 800; color: var(--text); }
.install-buttons { display: flex; gap: 8px; flex-shrink: 0; }

.install-btn {
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.15s;
}
.install-btn.primary {
    background: var(--brand);
    color: #fff;
}
.install-btn.primary:active { background: var(--brand-deep); }
.install-btn.secondary {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

/* ─── IOS MODAL ─── */
.ios-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(26,20,16,0.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ios-modal-overlay.show { opacity: 1; pointer-events: auto; }

.ios-modal {
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    width: 100%; max-width: 480px;
    padding: 28px 24px 40px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ios-modal-overlay.show .ios-modal { transform: translateY(0); }

.ios-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.ios-title { font-size: 18px; font-weight: 900; color: var(--text); }
.ios-close {
    background: var(--surface-2); border: none; border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 16px; cursor: pointer;
    font-family: inherit; font-weight: 700;
}

.ios-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; font-weight: 500; }

.ios-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.ios-step-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-mid);
}
.ios-icon-bg {
    width: 38px; height: 38px;
    background: var(--brand-soft);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* ─── TOAST ─── */
.toast {
    position: fixed;
    bottom: 80px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: #fff;
    padding: 11px 20px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 700;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    max-width: calc(100% - 40px);
    text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ─── ADMIN STYLES ─── */
.admin-login-wrapper {
    max-width: 360px;
    margin: 48px auto;
    padding: 28px 24px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.admin-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--brand);
    margin-bottom: 6px;
}
.admin-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-weight: 500;
}

.form-group { margin-bottom: 14px; text-align: left; }
.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-mid);
}
.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--brand); background: #fff; }
.form-input::placeholder { color: var(--text-muted); }

.btn {
    width: 100%;
    padding: 12px;
    background: var(--brand);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn:active { background: var(--brand-deep); transform: scale(0.99); }
.btn-secondary {
    background: var(--surface-2);
    color: var(--text-mid);
    border: 1.5px solid var(--border);
}
.btn-secondary:active { background: var(--border); }

.admin-panel { padding: 20px 20px 80px; display: none; }
.admin-hdr {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--border);
}
.admin-hdr h2 { font-size: 18px; font-weight: 900; color: var(--text); }
.admin-hdr p { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 640px) {
    .admin-grid { grid-template-columns: 1.1fr 1.9fr; }
}

.admin-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.admin-card-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.form-checkbox input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-checkbox label { font-size: 13px; color: var(--text-mid); font-weight: 600; cursor: pointer; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-list-item {
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.admin-list-left { display: flex; align-items: center; gap: 10px; }
.admin-list-actions { display: flex; gap: 6px; }

.btn-small {
    padding: 6px 10px;
    font-size: 11.5px;
    border-radius: 8px;
    width: auto;
    font-weight: 700;
}
.btn-small.edit { background: #DBEAFE; color: #1D4ED8; border: none; }
.btn-small.delete { background: #FEE2E2; color: var(--red); border: none; }
.btn-inline { width: auto; padding: 9px 14px; font-size: 12.5px; border-radius: 8px; }

@media (min-width: 480px) {
    .container { box-shadow: var(--shadow-lg); }
}

/* ─── BOTTOM NAVIGATION ─── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(26, 20, 16, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 400;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.nav-tab {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    flex-grow: 1;
    height: 100%;
    gap: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-icon {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.nav-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-tab.active {
    color: var(--brand);
}

.nav-tab.active .nav-icon {
    transform: scale(1.15) translateY(-2px);
}

.nav-tab:active {
    transform: scale(0.92);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
