:root {
    --brand: #e85a1a;
    --brand-dark: #c9480f;
    --navy: #001840;
    --navy-dark: #000f28;
    --ink: #1c1c1c;
    --muted: #5b5b5b;
    --line: #e6e6e6;
    --bg: #ffffff;
    --bg-alt: #fdf6f0;
    --ok: #1f9d55;
    --info: #2563eb;
    --warn: #b7791f;
    --bad: #d1352b;
    --whatsapp: #25d366;
    --radius: 14px;
    --radius-sm: 10px;
    --wrap: 740px;
    --header-wrap: 1120px;
    --app-header-h: 61px;
    --shadow: 0 8px 24px rgba(28, 28, 28, .08);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.app-body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: #f5f6f8;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }

.app-wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 18px;
}

/* Skip link */
.app-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 50;
    background: #fff;
    color: var(--brand);
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    box-shadow: var(--shadow);
}
.app-skip:focus { left: 12px; top: 12px; }

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f7f7f7;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(28, 28, 28, .05);
}
.app-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: nowrap;
    max-width: var(--header-wrap);
    padding: 8px 20px;
}
.app-logo { display: inline-flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.app-logo img { height: 44px; width: auto; max-width: 190px; }
.app-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}
.app-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
}
.app-nav-link:hover { background: var(--bg-alt); color: var(--brand); }
.app-nav-call {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
}
.app-nav-call:hover { background: var(--brand-dark); color: #fff; }

/* Header actions (install / bell / profile) */
.app-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.app-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.app-icon-btn:hover { background: var(--bg-alt); border-color: var(--brand); color: var(--brand); }
.app-icon-btn .cmb-ico { width: 22px; height: 22px; }
.app-icon-btn[hidden] { display: none; }

/* Install (PWA) button — label swaps to "Installed" once installed */
.app-install {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 2px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.app-install:hover { background: var(--brand); color: #fff; }
.app-install .cmb-ico { width: 18px; height: 18px; }
.app-install-label { display: inline-flex; align-items: center; }
.app-install-icon { display: inline-flex; align-items: center; }
.app-install-icon-done { display: none; }
.app-install-label-done { display: none; }
.app-install.is-installed {
    border-color: var(--ok);
    color: var(--ok);
    background: #fff;
    cursor: default;
}
.app-install.is-installed:hover { background: #fff; color: var(--ok); }
.app-install.is-installed .app-install-icon-install { display: none; }
.app-install.is-installed .app-install-icon-done { display: inline-flex; }
.app-install.is-installed .app-install-label-install { display: none; }
.app-install.is-installed .app-install-label-done { display: inline-flex; }
.app-install[hidden] { display: none; }

/* PC / tablet — match the SEO site header width */
.app-header-inner { max-width: var(--header-wrap); }

.app-header-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
}
.app-header-link:hover { background: var(--brand-dark); color: #fff; }

/* Main */
.app-main { display: block; min-height: 60vh; padding-bottom: 84px; }

/* Headings block */
.app-head { margin: 22px 0 6px; }
.app-head h1 { margin-bottom: 6px; }
.app-head .app-sub { color: var(--muted); margin: 0; }

/* Cards */
.app-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 18px;
}
.app-card-narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Branded intro card under the page heading */
.app-intro {
    border-left: 4px solid var(--brand);
    background: linear-gradient(135deg, var(--bg-alt) 0%, #fff 70%);
    padding: 10px 22px;
    margin-bottom: 13px;
}
.app-intro .app-sub { margin: 0; color: #3a3a3a; font-size: 1rem; line-height: 1.4; }
.app-intro .app-sub strong { color: var(--brand); font-weight: 700; }
.app-intro .app-sub-note { font-size: .78em; }

/* Customer dashboard — welcome banner */
.app-hello {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 24px;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--navy) 0%, var(--brand-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(28, 28, 28, .18);
}
.app-hello::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}
.app-hello-text { position: relative; z-index: 1; max-width: 560px; }
.app-hello-hi {
    margin: 0;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}
.app-hello-title { margin: 6px 0 6px; font-size: clamp(1.35rem, 1rem + 1.6vw, 1.9rem); color: #fff; }
.app-hello-sub { margin: 0; color: rgba(255, 255, 255, .82); font-size: .96rem; }
.app-hello-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.app-hello .app-btn-primary { background: #fff; color: var(--brand-dark); }
.app-hello .app-btn-primary:hover { background: #fff; color: var(--brand-dark); }
.app-hello-ico { display: inline-flex; align-items: center; }
.app-hello-ico .cmb-ico { width: 18px; height: 18px; }

/* Customer dashboard — stat tiles */
.app-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.app-dash-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.app-dash-num { font-size: 1.7rem; font-weight: 800; line-height: 1.05; color: var(--navy); }
.app-dash-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.app-dash-stat.is-accent { border-top: 3px solid var(--brand); }
.app-dash-stat.is-accent .app-dash-num { color: var(--brand); }

/* Customer dashboard — quick actions */
.app-dash-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.app-dash-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}
.app-dash-action:hover { transform: translateY(-2px); border-color: var(--brand); }
.app-dash-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--brand);
}
.app-dash-icon .cmb-ico { width: 22px; height: 22px; }
.app-dash-action-body { display: flex; flex-direction: column; }
.app-dash-action-title { font-weight: 700; }
.app-dash-action-text { color: var(--muted); font-size: .84rem; }

/* Alerts */
.app-alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: .95rem;
    border: 1px solid var(--line);
    background: var(--bg-alt);
}
.app-alert-error { background: #fdecea; border-color: #f3c3bd; color: #7d241d; }
.app-alert-info { background: #eaf1fd; border-color: #c6d8f7; color: #1b3d7a; }
.app-alert-ok { background: #e9f7ee; border-color: #bfe6cd; color: #14532d; }
.app-alert ul { margin: 6px 0 0; padding-left: 18px; }

/* Forms */
.app-field { margin-bottom: 16px; }
.app-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.app-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.app-label-row .app-label { margin-bottom: 6px; }
.app-forgot { font-size: .86rem; font-weight: 600; }
.app-input,
.app-select,
.app-textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.app-textarea { min-height: 110px; resize: vertical; }
.app-input:focus,
.app-select:focus,
.app-textarea:focus {
    outline: 2px solid rgba(232, 90, 26, .35);
    border-color: var(--brand);
}
.app-input.is-invalid,
.app-select.is-invalid,
.app-textarea.is-invalid { border-color: var(--bad); background: #fff7f6; }
.app-help { display: block; color: var(--muted); font-size: .85rem; margin-top: 5px; }
.app-error { display: block; color: var(--bad); font-size: .85rem; margin-top: 5px; font-weight: 600; }
.app-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Searchable area combobox */
.app-combo { position: relative; }
.app-combo-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 25;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 264px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.app-combo-list li {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .95rem;
}
.app-combo-list li mark { background: transparent; color: var(--brand); font-weight: 700; }
.app-combo-list li.is-active,
.app-combo-list li:hover { background: var(--bg-alt); }
.app-combo-list li[aria-selected="true"] { font-weight: 700; }
.app-combo-empty { color: var(--muted); padding: 10px 12px; font-size: .9rem; }

/* Steps indicator — sticky progress bar */
.app-steps {
    position: sticky;
    top: var(--app-header-h);
    z-index: 15;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0;
    list-style: none;
    padding: 10px 18px 12px;
    margin: 0 -18px 16px;
    background: #f5f6f8;
    border-bottom: 1px solid var(--line);
}
.app-steps li {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
}
.app-steps li .n {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}
.app-steps li::before,
.app-steps li::after {
    content: "";
    position: absolute;
    top: 13px;
    width: 50%;
    height: 2px;
    background: var(--line);
}
.app-steps li::before { left: 0; }
.app-steps li::after { right: 0; }
.app-steps li:first-child::before { display: none; }
.app-steps li:last-child::after { display: none; }
.app-steps li.is-active { color: var(--ink); }
.app-steps li.is-active .n { border-color: var(--brand); background: var(--brand); color: #fff; }
.app-steps li.is-done { color: var(--ink); }
.app-steps li.is-done .n { border-color: var(--ok); background: var(--ok); color: #fff; }
.app-steps li.is-active::before,
.app-steps li.is-done::before,
.app-steps li.is-done::after { background: var(--brand); }

/* Step panes */
.app-step { display: none; }
.app-step.is-active { display: block; }
.app-step-title { margin-top: 0; scroll-margin-top: calc(var(--app-header-h) + 64px); }

/* Choice grids (selects rendered as cards on small screens is avoided; keep selects) */
.app-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.app-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
}
.app-choice input { position: absolute; opacity: 0; pointer-events: none; }
.app-choice:hover { border-color: var(--brand); }
.app-choice:has(input:checked) { border-color: var(--brand); background: var(--bg-alt); box-shadow: 0 0 0 2px rgba(232, 90, 26, .18); }

/* Date cards */
.app-dates {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.app-date {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 12px 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
}
.app-date input { position: absolute; opacity: 0; pointer-events: none; }
.app-date .d-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.app-date .d-day { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.app-date .d-mon { font-size: .78rem; color: var(--muted); }
.app-date:hover { border-color: var(--brand); }
.app-date:has(input:checked) { border-color: var(--brand); background: var(--bg-alt); box-shadow: 0 0 0 2px rgba(232, 90, 26, .18); }

/* Time windows */
.app-windows {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.app-window {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}
.app-window input { position: absolute; opacity: 0; pointer-events: none; }
.app-window:hover { border-color: var(--brand); }
.app-window:has(input:checked) { border-color: var(--brand); background: var(--bg-alt); box-shadow: 0 0 0 2px rgba(232, 90, 26, .18); }
.app-window[hidden] { display: none; }
.app-window.is-past {
    opacity: .45;
    cursor: not-allowed;
    background: #f6f6f6;
}
.app-windows-empty {
    margin: 10px 0;
    padding: 12px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: .9rem;
}
.app-windows-empty[hidden] { display: none; }

/* Buttons */
.app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.app-actions .app-btn-block { flex: 1 1 100%; }
.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.app-btn:hover { transform: translateY(-1px); }
.app-btn-primary { background: var(--brand); color: #fff; }
.app-btn-primary:hover { background: var(--brand-dark); color: #fff; }
.app-btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.app-btn-navy:hover { background: var(--navy-dark); color: #fff; }
.app-btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.app-btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.app-btn-wa { background: var(--whatsapp); color: #fff; border-color: var(--whatsapp); }
.app-btn-block { width: 100%; }

/* Summary / review */
.app-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    margin: 0 0 8px;
}
.app-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}
.app-summary dt { color: var(--muted); font-weight: 600; }
.app-summary dd { margin: 0; font-weight: 600; text-align: right; }

/* Status badges */
.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    background: var(--bg-alt);
    color: var(--ink);
    border: 1px solid var(--line);
}
.app-badge-pending { background: #fdf3d8; border-color: #f0dc9b; color: #7a5a12; }
.app-badge-ok { background: #e9f7ee; border-color: #bfe6cd; color: #14532d; }
.app-badge-info { background: #eaf1fd; border-color: #c6d8f7; color: #1b3d7a; }
.app-badge-done { background: #e7f6ef; border-color: #a9e2c4; color: #14532d; }
.app-badge-bad { background: #fdecea; border-color: #f3c3bd; color: #7d241d; }

/* Appointment list */
.app-list { list-style: none; padding: 0; margin: 0; }
.app-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.app-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.app-item-num { font-weight: 800; font-size: 1.05rem; }
.app-item-svc { font-weight: 600; }
.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    color: #3a3a3a;
    font-size: .92rem;
    margin: 0 0 10px;
}
.app-meta span { display: inline-flex; gap: 6px; }
.app-item-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Detail rows */
.app-detail { margin: 0; padding: 0; }
.app-detail div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.app-detail dt { color: var(--muted); font-weight: 600; }
.app-detail dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

/* Timeline */
.app-timeline { list-style: none; padding: 0; margin: 0; }
.app-timeline li {
    position: relative;
    padding: 0 0 16px 28px;
    border-left: 2px solid var(--line);
}
.app-timeline li:last-child { padding-bottom: 0; }
.app-timeline li::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
}
.app-timeline .t-time { display: block; color: var(--muted); font-size: .82rem; }

/* Success screen */
.app-success { text-align: center; padding: 12px 0 6px; }
.app-success .tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e9f7ee;
    color: var(--ok);
    font-size: 2rem;
    margin-bottom: 12px;
}
.app-success-num { font-size: 1.5rem; font-weight: 800; color: var(--brand); }

/* Offline / empty state */
.app-empty { text-align: center; padding: 28px 12px; }
.app-empty h2 { margin-bottom: 6px; }

/* Footer */
.app-footer {
    background: #17161a;
    color: #cfcfcf;
    padding: 28px 0;
    text-align: center;
    font-size: .9rem;
    margin-top: 24px;
}
.app-footer-brand { color: #fff; font-size: 1.02rem; margin-bottom: 4px; font-weight: 700; }
.app-footer-wa { display: inline-flex; align-items: center; gap: 8px; margin: 10px auto 12px; padding: 9px 18px; border-radius: 999px; background: var(--whatsapp); color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none; }
.app-footer-wa:hover { background: #1ebe5b; color: #fff; }
.app-footer-wa .cmb-ico { width: 20px; height: 20px; }
.app-footer-wa-icon { display: inline-flex; }
.app-footer-copy { color: #8d8d8d; margin: 0; }

/* Spacer so the fixed bottom tab bar never covers the footer copy */
.app-footer-spacer { height: 76px; }

/* Admin read-only view */
.app-admin-flag {
    background: #1b3d7a;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
}

/* Staff admin portal */
.app-body-admin { background: #f5f6f8; }
.app-header-admin { background: #f7f7f7; }
.app-main-admin { padding-bottom: 24px; }
.app-admin-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.app-admin-ico { display: inline-flex; align-items: center; }
.app-admin-ico .cmb-ico { width: 18px; height: 18px; }
.app-btn-sm { padding: 7px 14px; font-size: .88rem; gap: 6px; }
.app-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.app-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}
.app-stat:hover { border-color: var(--brand); }
.app-stat.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(232, 90, 26, .15); }
.app-stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.app-stat-label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.app-filters { display: grid; gap: 12px; }
.app-status-form { display: grid; gap: 12px; margin-top: 6px; }
.app-wa-preview {
    white-space: normal;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-left: 3px solid #25d366;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 4px 0 14px;
    font-size: .92rem;
    line-height: 1.5;
    color: #3a3a3a;
}

/* Bottom tab bar */
.app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(28, 28, 28, .06);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.app-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    text-decoration: none;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}
.app-tab .app-tab-icon { display: inline-flex; }
.app-tab .app-tab-icon .cmb-ico { width: 24px; height: 24px; }
.app-tab.is-active { color: var(--brand); }
.app-tab.is-active .app-tab-label { color: var(--brand); }
.app-tab:not(.is-active):hover { color: var(--ink); }

/* Reviews */
.app-rating-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.app-rating-score { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--brand); }
.app-rating-meta { color: var(--muted); font-size: .9rem; }
.app-rating-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 26px 20px;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--navy) 0%, var(--brand-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(28, 28, 28, .18);
}
.app-rating-hero-score { font-size: 2.6rem; font-weight: 800; line-height: 1; color: #fff; }
.app-rating-hero-stars { display: inline-flex; }
.app-rating-hero-stars .cmb-ico { width: 26px; height: 26px; }
.app-rating-hero-meta { font-size: .9rem; color: rgba(255, 255, 255, .82); }
.app-review {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.app-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.app-review-name { font-weight: 700; }
.app-review-title { font-weight: 700; margin: 0 0 4px; }
.app-review-body { margin: 0; color: #3a3a3a; }
.app-review-meta { color: var(--muted); font-size: .82rem; margin-top: 8px; }

/* Stars */
.app-stars { display: inline-flex; gap: 2px; color: #f5a623; }
.app-stars .cmb-ico { width: 18px; height: 18px; }
.app-stars.is-large .cmb-ico { width: 26px; height: 26px; }

/* Star picker (leave a review) */
.app-rating-picker { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.app-rating-picker input { position: absolute; opacity: 0; pointer-events: none; }
.app-rating-picker label {
    cursor: pointer;
    color: #d8d8d8;
    line-height: 1;
}
.app-rating-picker label .cmb-ico { width: 34px; height: 34px; }
.app-rating-picker label:hover,
.app-rating-picker label:hover ~ label,
.app-rating-picker input:checked ~ label { color: #f5a623; }

/* Review sort toggle + pager */
.app-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
}
.app-sort-link {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.app-sort-link:hover { border-color: var(--brand); color: var(--brand); }
.app-sort-link.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.app-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.app-pager-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}
.app-pager-link:hover { border-color: var(--brand); color: var(--brand); }
.app-pager-link.is-disabled { opacity: .45; pointer-events: none; }
.app-pager-status { color: var(--muted); font-size: .86rem; }

/* Utility */
.app-muted { color: var(--muted); }
.app-mt { margin-top: 16px; }
.app-hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.app-hidden { display: none !important; }

/* Tablet — scale the header down like the SEO site header */
@media (max-width: 900px) {
    :root { --app-header-h: 57px; }
    .app-header-inner { gap: 16px; }
    .app-logo img { height: 40px; max-width: 160px; }
    .app-icon-btn { width: 40px; height: 40px; }
    .app-install { min-height: 40px; padding: 0 14px; font-size: .9rem; }
}

@media (max-width: 600px) {
    :root { --app-header-h: 53px; }
    .app-row { grid-template-columns: 1fr; }
    .app-header-inner { gap: 10px; }
    .app-logo img { height: 36px; }
    .app-nav { gap: 4px; }
    .app-nav-link { padding: 7px 9px; font-size: .9rem; }
    .app-nav-call { padding: 8px 13px; font-size: .9rem; }
    .app-card { padding: 16px; }
    .app-steps li { font-size: .7rem; }
    .app-dates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .app-windows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .app-date .d-day { font-size: 1.2rem; }
    .app-detail div,
    .app-summary div { flex-direction: column; gap: 2px; }
    .app-detail dd,
    .app-summary dd { text-align: left; }
    .app-icon-btn { width: 38px; height: 38px; }
    .app-icon-btn .cmb-ico { width: 20px; height: 20px; }
    .app-install { min-height: 38px; padding: 0 12px; font-size: .85rem; gap: 5px; }
    .app-install .cmb-ico { width: 16px; height: 16px; }
    .app-tab-label { font-size: .68rem; }
}