/* Prolux Smart — home services (customer + admin) prototype.
   Dark forest-green / mint identity, matching the source Prolux Smart brand. */

.px {
    --px-forest: #064e3b;
    --px-forest-2: #0a5c45;
    --px-mint: #10b981;
    --px-mint-2: #6ee7b7;
    --px-ink: #0c1f18;
    --px-bg: #f4faf7;
    --px-panel: var(--panel, #fff);
    --px-line: #e1ede8;
    --px-muted: #5f7268;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--px-ink);
}
.px * { box-sizing: border-box; }

.px-topbar { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; background: var(--px-forest); border-bottom: 1px solid #000; position: sticky; top: 0; z-index: 20; }
.px-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: #fff; }
.px-brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--px-mint); display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.px-brand small { display: block; font-weight: 600; color: #9fc2b3; font-size: .64rem; }
.px-nav { display: flex; gap: .3rem; margin-left: .5rem; }
.px-navbtn { border: none; background: none; padding: .45rem .9rem; border-radius: 999px; font: 700 .8rem/1 inherit; color: #a9c7bb; cursor: pointer; }
.px-navbtn.active { background: var(--px-mint); color: #04241a; }
.px-top-actions { margin-left: auto; }
.px-live-dot { font-size: .66rem; font-weight: 800; color: #6ee7b7; display: inline-flex; align-items: center; gap: .3rem; }
.px-live-dot::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #34d399; }

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

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

.px-app-hd { display: flex; align-items: center; gap: .6rem; padding: .3rem 1.1rem .7rem; }
.px-user { display: flex; align-items: center; gap: .5rem; }
.px-user img { width: 34px; height: 34px; border-radius: 50%; }
.px-user small { display: block; color: var(--px-muted); font-size: .66rem; font-weight: 700; }
.px-user b { font-size: .92rem; font-weight: 800; }
.px-wallet { margin-left: auto; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 999px; padding: .3rem .7rem; font-size: .76rem; font-weight: 800; color: #047857; }
.px-gift { font-size: 1.1rem; }

.px-search { padding: 0 1.1rem .9rem; }
.px-search input { width: 100%; border: 1px solid var(--px-line); border-radius: .8rem; padding: .6rem .8rem; font-size: .8rem; background: var(--px-bg); }

.px-promo { margin: 0 1.1rem .9rem; border-radius: 1.1rem; padding: 1.1rem 1.2rem; background: linear-gradient(135deg, var(--px-forest), var(--px-forest-2)); color: #fff; cursor: pointer; }
.px-promo small { font-weight: 800; opacity: .8; font-size: .66rem; letter-spacing: .04em; }
.px-promo h3 { font-size: 1.15rem; margin: .2rem 0 .8rem; font-weight: 800; line-height: 1.25; }
.px-promo button { background: var(--px-mint); color: #04241a; border: none; border-radius: 999px; padding: .45rem 1rem; font-weight: 800; font-size: .76rem; cursor: pointer; }

.px-track-mini { margin: 0 1.1rem .9rem; background: var(--px-forest); color: #fff; border-radius: 1rem; padding: .8rem 1rem; }
.px-track-mini b { display: block; font-size: .82rem; } .px-track-mini span { font-size: .72rem; opacity: .85; }
.px-track-mini .bar { height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; margin-top: .5rem; overflow: hidden; }
.px-track-mini .bar i { display: block; height: 100%; background: var(--px-mint-2); }

.px-sect-hd { display: flex; justify-content: space-between; align-items: center; padding: 0 1.1rem .5rem; margin-top: .3rem; }
.px-sect-hd h4 { font-size: .9rem; font-weight: 800; }
.px-sect-hd a { font-size: .72rem; color: var(--px-mint); font-weight: 700; cursor: pointer; }

.px-svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; padding: 0 1.1rem 1rem; }
.px-svc { background: var(--px-panel); border: 1px solid var(--px-line); border-radius: .9rem; padding: .6rem .3rem; text-align: center; cursor: pointer; }
.px-svc .ic { font-size: 1.2rem; display: block; margin-bottom: .25rem; }
.px-svc .nm { font-size: .6rem; font-weight: 700; }

.px-offer-row, .px-trend-row { display: flex; gap: .7rem; padding: 0 1.1rem 1rem; overflow-x: auto; }
.px-offer-card { flex: none; width: 150px; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: .9rem; padding: .7rem; }
.px-offer-card .tag { font-size: .6rem; font-weight: 800; color: #047857; } .px-offer-card .t { font-weight: 800; font-size: .78rem; margin: .2rem 0; }
.px-offer-card .code { font-size: .62rem; font-family: ui-monospace, monospace; color: var(--px-muted); }

.px-trend-card { flex: none; width: 140px; background: var(--px-panel); border: 1px solid var(--px-line); border-radius: .9rem; padding: .7rem; cursor: pointer; }
.px-trend-card .rate { font-size: .68rem; font-weight: 800; color: #d97706; } .px-trend-card .t { font-weight: 800; font-size: .78rem; margin: .3rem 0 .15rem; }
.px-trend-card .px { font-size: .7rem; color: var(--px-muted); }

.px-review-card { margin: 0 1.1rem 1rem; background: var(--px-panel); border: 1px solid var(--px-line); border-radius: 1rem; padding: .9rem; }
.px-review-card .stars { color: #f59e0b; font-size: .82rem; margin-bottom: .4rem; }
.px-review-card p { font-size: .78rem; line-height: 1.55; margin-bottom: .5rem; color: #374151; }
.px-review-card .who { font-size: .72rem; font-weight: 800; } .px-review-card .loc { font-size: .68rem; color: var(--px-muted); }

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

.px-hero { margin: 0 1.1rem 1rem; height: 130px; border-radius: 1rem; background-size: cover; background-position: center; }
.px-badges { display: flex; gap: .5rem; padding: 0 1.1rem 1rem; }
.px-badge { flex: 1; background: var(--px-panel); border: 1px solid var(--px-line); border-radius: .8rem; padding: .6rem; text-align: center; }
.px-badge .ic { font-size: 1rem; color: var(--px-mint); } .px-badge .t { font-size: .66rem; font-weight: 700; margin-top: .2rem; }

.px-steps { padding: 0 1.1rem 1rem; }
.px-step { display: flex; gap: .7rem; padding: .4rem 0; }
.px-step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--px-forest); color: var(--px-mint-2); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; flex: none; }
.px-step .t { font-weight: 800; font-size: .8rem; } .px-step .d { font-size: .7rem; color: var(--px-muted); }

.px-price-row { margin: 0 1.1rem; display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--px-line); font-size: .8rem; }
.px-price-row .v { font-weight: 800; color: var(--px-forest); }

.px-pro-card { margin: 0 1.1rem 1rem; background: var(--px-panel); border: 1px solid var(--px-line); border-radius: 1rem; padding: .9rem; display: flex; align-items: center; gap: .8rem; }
.px-pro-card .av { width: 44px; height: 44px; border-radius: 50%; background: var(--px-forest); color: var(--px-mint-2); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.px-pro-card .t { font-weight: 800; font-size: .84rem; } .px-pro-card .meta { font-size: .7rem; color: var(--px-muted); }
.px-pro-card .px2 { margin-left: auto; font-weight: 800; color: var(--px-forest); font-size: .9rem; }

.px-book-bar { position: sticky; bottom: 0; padding: .8rem 1.1rem; background: var(--px-panel); border-top: 1px solid var(--px-line); }
.px-book-bar button { width: 100%; background: var(--px-forest); color: var(--px-mint-2); border: none; border-radius: .8rem; padding: .75rem; font-weight: 800; font-size: .85rem; cursor: pointer; }

.px-track-card { margin: 0 1.1rem 1rem; background: linear-gradient(135deg, var(--px-forest), var(--px-forest-2)); color: #fff; border-radius: 1rem; padding: 1rem; }
.px-track-card b { font-size: 1rem; display: block; color: var(--px-mint-2); } .px-track-card span { font-size: .76rem; opacity: .85; }
.px-timeline { margin: 0 1.1rem 1rem; }
.px-tl-step { display: flex; gap: .7rem; padding: .3rem 0; }
.px-tl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--px-line); display: flex; align-items: center; justify-content: center; font-size: .7rem; flex: none; }
.px-tl-step.done .px-tl-dot { background: var(--px-mint-2); color: #04241a; }
.px-tl-step.active .px-tl-dot { background: var(--px-forest); color: var(--px-mint-2); box-shadow: 0 0 0 4px rgba(6,78,59,.15); }
.px-tl-label b { display: block; font-size: .82rem; font-weight: 800; } .px-tl-label span { font-size: .68rem; color: var(--px-muted); }
.px-provider-mini { margin: 0 1.1rem; background: var(--px-panel); border: 1px solid var(--px-line); border-radius: 1rem; padding: .8rem; display: flex; align-items: center; gap: .7rem; }
.px-provider-mini .av { width: 38px; height: 38px; border-radius: 50%; background: var(--px-forest); color: var(--px-mint-2); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.px-provider-mini button { margin-left: auto; background: var(--px-mint); color: #04241a; border: none; border-radius: .6rem; padding: .4rem .8rem; font-weight: 800; font-size: .74rem; cursor: pointer; }

.px-rate-card { margin: 2rem 1.4rem; text-align: center; }
.px-rate-ic { font-size: 2.4rem; margin-bottom: .5rem; }
.px-rate-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.px-rate-card p { font-size: .8rem; color: var(--px-muted); margin-bottom: .8rem; }
.px-stars { font-size: 1.6rem; color: #f59e0b; margin-bottom: 1.2rem; letter-spacing: .3rem; }
.px-primary-btn { width: 100%; background: var(--px-forest); color: var(--px-mint-2); border: none; border-radius: .8rem; padding: .75rem; font-weight: 800; font-size: .85rem; cursor: pointer; }

.px-bottomnav { position: absolute; bottom: 0; left: 0; right: 0; background: var(--px-panel); border-top: 1px solid var(--px-line); display: flex; padding: .6rem 0 .7rem; }
.px-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(--px-muted); cursor: pointer; }
.px-bottomnav button.active { color: var(--px-forest); }
.px-bottomnav .ic { font-size: 1.15rem; }

.px-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--px-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; }
.px-toast.show { opacity: 1; }

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

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