/* AquaGo — water delivery (customer + driver + admin) prototype.
   Blue/cyan gradient, droplet-wave identity — distinct from TapFix & Job Vista. */

.aq {
    --aq-blue: #0369a1;
    --aq-cyan: #06b6d4;
    --aq-grad: linear-gradient(135deg, #0369a1 0%, #06b6d4 100%);
    --aq-ink: #0c2233;
    --aq-bg: #eef7fb;
    --aq-panel: var(--panel, #fff);
    --aq-line: #d8ecf3;
    --aq-muted: #5c7d8c;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--aq-ink);
}
.aq * { box-sizing: border-box; }

.aq-topbar { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; background: var(--aq-panel); border-bottom: 1px solid var(--aq-line); position: sticky; top: 0; z-index: 20; }
.aq-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.aq-brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--aq-grad); display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.aq-brand small { display: block; font-weight: 600; color: var(--aq-muted); font-size: .66rem; }
.aq-nav { display: flex; gap: .3rem; margin-left: .5rem; }
.aq-navbtn { border: none; background: none; padding: .45rem .9rem; border-radius: 999px; font: 700 .8rem/1 inherit; color: var(--aq-muted); cursor: pointer; }
.aq-navbtn.active { background: var(--aq-grad); color: #fff; }
.aq-top-actions { margin-left: auto; }
.aq-live-dot { font-size: .66rem; font-weight: 800; color: #0891b2; display: inline-flex; align-items: center; gap: .3rem; }
.aq-live-dot::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #22d3ee; }

.aq-view { display: none; } .aq-view.active { display: block; }

/* ── Phone frame ─────────────────────────────────────────────────── */
.aq-app-wrap { background: var(--aq-bg); min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; }
.aq-phone { width: 100%; max-width: 360px; background: #071b29; border-radius: 2.1rem; padding: .55rem; box-shadow: 0 40px 80px -30px rgba(3, 105, 161, .35); }
.aq-phone-screen { background: var(--aq-panel); border-radius: 1.7rem; overflow: hidden; position: relative; height: 700px; display: flex; flex-direction: column; }
.aq-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: #071b29; border-radius: 0 0 14px 14px; z-index: 5; }
.aq-statusbar { display: flex; justify-content: space-between; padding: .5rem 1.1rem .2rem; font-size: .72rem; font-weight: 700; flex: none; }
.aq-screen-scroll { flex: 1; overflow-y: auto; padding-bottom: 4.4rem; }

.aq-app-hd { display: flex; align-items: center; justify-content: space-between; padding: .3rem 1.1rem .7rem; }
.aq-app-hd b { font-size: 1.05rem; font-weight: 800; color: var(--aq-blue); }

.aq-banner { margin: 0 1.1rem .9rem; border-radius: 1.1rem; padding: 1.1rem 1.2rem; background: var(--aq-grad); color: #fff; position: relative; overflow: hidden; }
.aq-banner::after { content: "〰️〰️〰️"; position: absolute; bottom: -.4rem; right: -.4rem; font-size: 1.6rem; opacity: .25; }
.aq-banner small { font-weight: 700; opacity: .85; font-size: .7rem; }
.aq-banner h3 { font-size: 1.2rem; margin: .15rem 0 .7rem; font-weight: 800; line-height: 1.25; }
.aq-banner button { background: #fff; color: var(--aq-blue); border: none; border-radius: 999px; padding: .45rem 1rem; font-weight: 800; font-size: .76rem; cursor: pointer; }

.aq-sect-hd { padding: 0 1.1rem .5rem; margin-top: .3rem; } .aq-sect-hd h4 { font-size: .9rem; font-weight: 800; }

.aq-sub-card { margin: 0 1.1rem 1rem; background: #f0fbff; border: 1px solid var(--aq-line); border-radius: 1rem; padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.aq-sub-card .plan { font-weight: 800; font-size: .86rem; color: var(--aq-blue); }
.aq-sub-card .next { font-size: .72rem; color: var(--aq-muted); }
.aq-sub-card button { background: var(--aq-panel); border: 1px solid var(--aq-blue); color: var(--aq-blue); border-radius: .6rem; padding: .35rem .7rem; font-size: .72rem; font-weight: 800; cursor: pointer; }

.aq-again-row { display: flex; gap: .7rem; padding: 0 1.1rem; overflow-x: auto; }
.aq-again-card { flex: none; width: 130px; background: var(--aq-panel); border: 1px solid var(--aq-line); border-radius: .9rem; padding: .7rem; text-align: center; cursor: pointer; }
.aq-again-card .ic { font-size: 1.6rem; }
.aq-again-card .nm { font-size: .74rem; font-weight: 700; margin: .3rem 0 .1rem; }
.aq-again-card .px { font-size: .68rem; color: var(--aq-muted); }

.aq-back-row { display: flex; align-items: center; gap: .6rem; padding: .3rem 1.1rem .8rem; }
.aq-back-row .back { font-size: 1.1rem; cursor: pointer; }
.aq-back-row b { font-size: .95rem; font-weight: 800; flex: 1; text-align: center; margin-right: 1.5rem; }

.aq-plantabs { display: flex; gap: .4rem; padding: 0 1.1rem .8rem; }
.aq-plantab { flex: 1; text-align: center; padding: .4rem; border-radius: .7rem; font-size: .74rem; font-weight: 700; background: var(--aq-bg); border: 1px solid var(--aq-line); color: var(--aq-muted); cursor: pointer; }
.aq-plantab.on { background: var(--aq-grad); color: #fff; border-color: transparent; }

.aq-product-card { margin: 0 1.1rem .7rem; background: var(--aq-panel); border: 1px solid var(--aq-line); border-radius: 1rem; padding: .85rem; display: flex; align-items: center; gap: .8rem; }
.aq-product-card .ic { font-size: 1.8rem; }
.aq-product-card .t { font-weight: 800; font-size: .84rem; }
.aq-product-card .meta { font-size: .7rem; color: var(--aq-muted); }
.aq-product-card .px { margin-left: auto; font-weight: 800; color: var(--aq-blue); font-size: .88rem; }
.aq-qty { display: flex; align-items: center; gap: .5rem; margin-left: .6rem; }
.aq-qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--aq-line); background: var(--aq-bg); font-weight: 800; cursor: pointer; }
.aq-qty span { min-width: 16px; text-align: center; font-weight: 800; font-size: .82rem; }

.aq-cart-bar { position: sticky; bottom: 0; background: var(--aq-blue); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.1rem; font-weight: 800; font-size: .82rem; }
.aq-cart-bar button { background: #fff; color: var(--aq-blue); border: none; border-radius: .6rem; padding: .5rem 1rem; font-weight: 800; font-size: .8rem; cursor: pointer; }

.aq-track-card { margin: 0 1.1rem 1rem; background: var(--aq-grad); color: #fff; border-radius: 1rem; padding: 1rem; }
.aq-track-card b { font-size: 1rem; display: block; } .aq-track-card span { font-size: .76rem; opacity: .9; }
.aq-timeline { margin: 0 1.1rem 1rem; }
.aq-tl-step { display: flex; gap: .7rem; padding: .3rem 0; }
.aq-tl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--aq-line); display: flex; align-items: center; justify-content: center; font-size: .7rem; flex: none; }
.aq-tl-step.done .aq-tl-dot { background: var(--aq-cyan); color: #04303d; }
.aq-tl-step.active .aq-tl-dot { background: var(--aq-blue); color: #fff; box-shadow: 0 0 0 4px rgba(3,105,161,.18); }
.aq-tl-label b { display: block; font-size: .82rem; font-weight: 800; } .aq-tl-label span { font-size: .68rem; color: var(--aq-muted); }
.aq-driver-mini { margin: 0 1.1rem; background: var(--aq-panel); border: 1px solid var(--aq-line); border-radius: 1rem; padding: .8rem; display: flex; align-items: center; gap: .7rem; }
.aq-driver-mini .av { width: 38px; height: 38px; border-radius: 50%; background: var(--aq-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.aq-driver-mini button { margin-left: auto; background: var(--aq-cyan); color: #04303d; border: none; border-radius: .6rem; padding: .4rem .8rem; font-weight: 800; font-size: .74rem; cursor: pointer; }

.aq-bottomnav { position: absolute; bottom: 0; left: 0; right: 0; background: var(--aq-panel); border-top: 1px solid var(--aq-line); display: flex; padding: .6rem 0 .7rem; }
.aq-bottomnav button { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .62rem; font-weight: 700; color: var(--aq-muted); cursor: pointer; }
.aq-bottomnav button.active { color: var(--aq-blue); }
.aq-bottomnav .ic { font-size: 1.15rem; }

.aq-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--aq-ink); color: #fff; padding: .5rem 1rem; border-radius: 999px; font-size: .74rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.aq-toast.show { opacity: 1; }

/* ── Driver app extras ───────────────────────────────────────────── */
.aq-badge { background: var(--aq-grad); color: #fff; font-size: .68rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; }
.aq-day-card { margin: 0 1.1rem 1rem; background: var(--aq-ink); color: #fff; border-radius: 1rem; padding: 1rem; display: flex; justify-content: space-around; }
.aq-day-card small { display: block; opacity: .7; font-size: .68rem; margin-bottom: .2rem; }
.aq-day-card b { font-size: 1.2rem; }
.aq-stop-card { margin: 0 1.1rem .7rem; background: var(--aq-panel); border: 1px solid var(--aq-line); border-radius: 1rem; padding: .8rem; }
.aq-stop-card.done { opacity: .5; }
.aq-stop-card .t { font-weight: 800; font-size: .82rem; } .aq-stop-card .addr { font-size: .72rem; color: var(--aq-muted); margin: .15rem 0 .6rem; }
.aq-stop-actions { display: flex; gap: .5rem; align-items: center; }
.aq-stop-actions label { display: flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; color: var(--aq-muted); }
.aq-stop-actions button { background: var(--aq-blue); color: #fff; border: none; border-radius: .6rem; padding: .4rem .8rem; font-weight: 800; font-size: .74rem; cursor: pointer; margin-left: auto; }

/* ── Admin ────────────────────────────────────────────────────────── */
.aq-admin { display: flex; min-height: calc(100vh - 56px); background: var(--aq-bg); }
.aq-admin-side { width: 220px; flex: none; background: var(--aq-ink); color: #b9d3de; padding: 1rem .6rem; }
.aq-admin-side .brand { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem 1.1rem; color: #fff; font-weight: 800; }
.aq-admin-side .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--aq-grad); display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.aq-admin-side .brand small { display: block; font-weight: 600; color: #6f909e; font-size: .66rem; }
.aq-admin-nav { display: flex; flex-direction: column; }
.aq-admin-nav button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: .6rem; font: 700 .8rem/1 inherit; color: #b9d3de; background: none; border: none; cursor: pointer; margin-bottom: .1rem; }
.aq-admin-nav button:hover { background: rgba(255,255,255,.06); }
.aq-admin-nav button.active { background: var(--aq-grad); color: #fff; }
.aq-admin-main { flex: 1; padding: 1.4rem 1.8rem; overflow-x: auto; }
.aq-admin-hd h2 { font-size: 1.2rem; font-weight: 800; } .aq-admin-hd p { font-size: .8rem; color: var(--aq-muted); }
.aq-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1.1rem 0; }
.aq-stat { background: var(--aq-panel); border: 1px solid var(--aq-line); border-radius: .9rem; padding: .9rem 1rem; }
.aq-stat .ic { width: 34px; height: 34px; border-radius: .6rem; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .95rem; margin-bottom: .5rem; }
.aq-stat .v { font-size: 1.3rem; font-weight: 800; } .aq-stat .k { font-size: .72rem; color: var(--aq-muted); font-weight: 700; }
.aq-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.aq-chart-card { background: var(--aq-panel); border: 1px solid var(--aq-line); border-radius: 1rem; padding: 1rem; }
.aq-chart-card h4 { font-size: .84rem; font-weight: 800; margin-bottom: .7rem; }
.aq-chart-card svg { width: 100%; height: 180px; display: block; }

@media (max-width: 860px) {
    .aq-admin { flex-direction: column; }
    .aq-admin-side { width: 100%; display: flex; overflow-x: auto; padding: .6rem; }
    .aq-admin-side .brand { display: none; }
    .aq-admin-nav { flex-direction: row; gap: .3rem; }
    .aq-admin-nav button { white-space: nowrap; }
    .aq-charts { grid-template-columns: 1fr; }
}
