/* ==========================================================================
   Lisio Clean — premium look
   Cleaning Services Uplifted. Deep navy + emerald brand, soft neutrals.
   Plain CSS only — no external fonts, no CDN, no framework.
   Every class/ID used by assets/app.js is preserved.
   ========================================================================== */
:root {
  --navy: #041e3a;
  --navy-2: #07294f;
  --deep: #0a4a94;
  --blue: #0b6ee0;
  --blue-dark: #0a5cbd;
  --sky: #e8f2fe;
  --sky-2: #f2f7ff;
  --emerald: #0da678;
  --emerald-dark: #087a58;
  --emerald-soft: #dcf5ea;
  --gold: #f0a500;
  --text: #16283e;
  --muted: #5f7288;
  --border: #dfe7f0;
  --border-soft: #e9eef4;
  --bg: #f4f7fb;
  --card: #ffffff;
  --warn: #9a6b00;
  --warn-bg: #fef3c7;
  --danger: #c0392b;
  --danger-bg: #fdecec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(4, 30, 58, .05), 0 2px 8px rgba(4, 30, 58, .05);
  --shadow-md: 0 6px 20px rgba(4, 30, 58, .09);
  --shadow-lg: 0 16px 40px rgba(4, 30, 58, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 320px at 85% -80px, rgba(13, 166, 120, .08), transparent 60%),
    radial-gradient(900px 360px at 8% -100px, rgba(11, 110, 224, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
::selection { background: var(--sky); }

/* ---------- header ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    radial-gradient(560px 180px at 88% -40px, rgba(13, 166, 120, .35), transparent 65%),
    linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 48%, var(--deep) 100%);
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 4px 18px rgba(4, 30, 58, .28);
}
.top-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  flex-shrink: 0;
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: .04em;
  font-weight: 800;
}
.brand h1 span { color: #7ee2a0; }
.tagline {
  margin: 3px 0 0;
  opacity: .92;
  font-size: 13.5px;
  letter-spacing: .02em;
}
.badge {
  background: #ffcf3f;
  color: #3a2b00;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  margin-left: 5px;
  font-weight: 800;
}

/* ---------- layout ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 8px; }
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 800;
}
.card h3 {
  margin: 20px 0 10px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.card h3:first-of-type { margin-top: 14px; }
.muted { color: var(--muted); }
.card > .muted { font-size: 15px; }
#cleanersAreaNote { display: block; margin-top: 4px; font-weight: 700; color: var(--emerald-dark); }

/* ---------- hero (customer view) ---------- */
.hero {
  background:
    radial-gradient(420px 200px at 92% 0%, rgba(13, 166, 120, .28), transparent 60%),
    radial-gradient(420px 220px at 0% 110%, rgba(11, 110, 224, .22), transparent 55%),
    linear-gradient(125deg, var(--navy) 0%, var(--navy-2) 55%, #0b3f7d 100%);
  color: #fff;
  border-radius: 20px;
  padding: 30px 28px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
}
.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7ee2a0;
}
.hero-title {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
  max-width: 620px;
}
.hero-sub {
  margin: 0 0 18px;
  color: #cfe0f2;
  font-size: 16px;
  max-width: 640px;
}
.hero-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-trust li {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #eaf3ff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13.5px;
  font-weight: 700;
}

/* ---------- services ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.service {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.service:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service.selected {
  border-color: var(--blue);
  background: linear-gradient(180deg, var(--sky-2), #fff 70%);
  box-shadow: 0 0 0 3px rgba(11, 110, 224, .16), var(--shadow-md);
}
.service.selected::after {
  content: "✓ Selected";
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--emerald);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 3px 9px;
  border-radius: 999px;
}
.service b { font-size: 16.5px; color: var(--navy); display: inline-block; max-width: calc(100% - 96px); }
.service .price {
  font-size: 22px;
  font-weight: 800;
  color: var(--deep);
  float: right;
  line-height: 1.2;
}
.service .muted { font-size: 14px; clear: both; }
.service ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.service ul li { margin: 3px 0; }
.service ul li::marker { color: var(--emerald); }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; font-size: 14px; color: var(--navy); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #93a3b5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 110, 224, .18);
}
input[type="checkbox"] { width: auto; accent-color: var(--emerald); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

/* ---------- extras ---------- */
.extras { display: flex; flex-wrap: wrap; gap: 9px; }
.extra {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 15px;
  cursor: pointer;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s ease;
}
.extra:hover { border-color: var(--emerald); color: var(--emerald-dark); box-shadow: var(--shadow-sm); }
.extra.selected {
  background: linear-gradient(135deg, var(--emerald), #0a8a5f);
  color: #fff;
  border-color: var(--emerald);
  box-shadow: 0 4px 12px rgba(13, 166, 120, .35);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--font);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(11, 110, 224, .4); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--deep));
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 110, 224, .32);
}
.btn-green {
  background: linear-gradient(135deg, #12b981, var(--emerald-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(13, 166, 120, .3);
}
.btn-ghost { background: #edf2f8; color: var(--navy); box-shadow: none; }
.btn-ghost:hover { background: #dfe9f4; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 4px 12px rgba(192, 57, 43, .25); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
#fastestBtn { width: 100%; padding: 15px 20px; font-size: 16px; margin-top: 4px; }

/* ---------- price box ---------- */
.price-box {
  background:
    radial-gradient(300px 120px at 95% 0%, rgba(13, 166, 120, .3), transparent 60%),
    linear-gradient(125deg, var(--navy), var(--navy-2) 60%, #0b3f7d);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
  color: #dbe8f8;
  box-shadow: var(--shadow-md);
}
.price-box .total {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-top: 4px;
}
.price-box .muted { color: #a9c2de; }
.price-box b { color: #fff; }

/* ---------- cleaners / jobs ---------- */
.cleaner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.cleaner:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.cleaner > div { min-width: 0; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--deep));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(10, 74, 148, .28);
}
.stars { color: var(--gold); letter-spacing: 1px; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #edf2f8;
  color: var(--navy);
  margin: 2px 2px 2px 0;
}
.pill.green { background: var(--emerald-soft); color: var(--emerald-dark); }
.pill.amber { background: var(--warn-bg); color: var(--warn); }
.pill.red { background: var(--danger-bg); color: var(--danger); }

/* ---------- bookings / timeline ---------- */
#myBookings .card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.timeline { display: flex; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.timeline span {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 9px 4px 8px;
  border-top: 4px solid var(--border);
  border-radius: 0 0 8px 8px;
  background: #f7f9fc;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.timeline span.done { border-color: var(--emerald); color: var(--emerald-dark); font-weight: 800; background: var(--emerald-soft); }
.timeline span.now { border-color: var(--blue); color: var(--deep); font-weight: 800; background: var(--sky); }
.review-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
thead th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #f7fafd; }
tbody tr:last-child td { border-bottom: none; }
td .btn { margin: 2px 2px 2px 0; }

/* ---------- admin stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--emerald);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.stat:nth-child(4n+2) { border-left-color: var(--blue); }
.stat:nth-child(4n+3) { border-left-color: var(--gold); }
.stat:nth-child(4n) { border-left-color: var(--deep); }
.stat span { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat b { font-size: 27px; color: var(--navy); display: block; line-height: 1.2; margin-top: 2px; letter-spacing: -.02em; }

/* ---------- alerts ---------- */
.notice {
  background: #fff8e1;
  border: 1px solid #f0d48a;
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.error {
  background: var(--danger-bg);
  border: 1px solid #f5b5b5;
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 16px;
  color: #7a1f1f;
  box-shadow: var(--shadow-sm);
}

/* ---------- login ---------- */
.login-card {
  max-width: 460px;
  margin: 24px auto;
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.login-card::before {
  content: "";
  display: block;
  height: 6px;
  margin: -30px -28px 22px;
  background: linear-gradient(90deg, var(--blue), var(--emerald));
}
.login-card h2 { font-size: 24px; }
.login-card .btn-primary { width: 100%; margin-top: 6px; }

/* ---------- invoice (invoice.php — public, shareable) ---------- */
.invoice-card { max-width: 760px; margin: 24px auto; }
.invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 14px;
  margin-bottom: 8px;
}
.invoice-head h2 { font-size: 26px; }
.invoice-status { padding-top: 6px; }
.invoice-card table td:last-child { text-align: right; white-space: nowrap; }
@media print {
  header.top, footer, .btn { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; margin: 0; }
}

/* ---------- admin jump navigation ---------- */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-nav a {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.admin-nav a:hover { border-color: var(--blue); color: var(--deep); }
#view-admin .card, #faq { scroll-margin-top: 150px; }

/* ---------- home — two role cards ONLY ---------- */
/* The home view is the whole front door: logo + exactly two
   cards (Customer, Cleaner). Admin is not here — it lives at
   /admin. There is no header nav at all (it was removed from
   index.php), no hero, no trust chips, no extra text. */
.role-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 18px;
}
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border-soft);
  border-radius: 22px;
  padding: 30px 26px 26px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.role-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--emerald));
}
.role-card-cleaner::before { background: linear-gradient(90deg, var(--emerald), #34d399); }
.role-card-admin::before { background: linear-gradient(90deg, var(--navy-2), var(--gold)); }
.role-card:hover, .role-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
  outline: none;
}
.role-card:focus-visible { box-shadow: 0 0 0 3px rgba(11, 110, 224, .35), var(--shadow-lg); }
.role-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--deep));
  box-shadow: 0 8px 18px rgba(11, 110, 224, .35);
  margin-bottom: 4px;
}
.role-card-cleaner .role-icon { background: linear-gradient(135deg, #12b981, var(--emerald-dark)); box-shadow: 0 8px 18px rgba(13, 166, 120, .35); }
.role-card-admin .role-icon { background: linear-gradient(135deg, var(--navy-2), #0b3f7d); box-shadow: 0 8px 18px rgba(4, 30, 58, .35); }
.role-name { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; line-height: 1.2; }
.role-desc { font-size: 15.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.back-home { margin-bottom: 4px; }

/* ---------- in-page role toolbar ---------- */
/* Sign in / account / contact / FAQ live INSIDE the Customer page
   (and Sign out inside each role page) — never in the header. */
.role-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.role-toolbar .btn { box-shadow: none; }

/* ---------- FAQ ---------- */
#faq details {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fbfdff;
}
#faq details[open] { background: #fff; border-color: var(--border); }
#faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
}
#faq summary:focus-visible { outline: 3px solid rgba(11, 110, 224, .4); outline-offset: 2px; }
#faq details p { margin: 8px 0 2px; color: var(--text); font-size: 15px; }

/* ---------- footer ---------- */
footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px 34px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.7;
}
footer div { margin: 3px 0; }
footer strong { color: var(--text); }
.hidden { display: none !important; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  main { padding: 16px 14px 4px; }
  .top-inner { gap: 10px; }
  .logo { width: 52px; height: 52px; border-radius: 13px; }
  .brand h1 { font-size: 21px; }
  .tagline { font-size: 12px; }
  .hero { padding: 24px 20px 20px; border-radius: 16px; }
  .hero-title { font-size: 26px; }
  .role-cards { grid-template-columns: 1fr; gap: 14px; }
  .role-card { padding: 24px 20px 20px; }
  .role-icon { width: 56px; height: 56px; border-radius: 15px; }
  .hero-sub { font-size: 15px; }
  .hero-trust li { font-size: 12.5px; padding: 6px 11px; }
  .card { padding: 18px 16px; }
  .card h2 { font-size: 20px; }
  .grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 0; }
  .row > * { min-width: 0; }
  .service .price { font-size: 20px; }
  .service.selected::after { top: 10px; right: 10px; }
  .price-box .total { font-size: 28px; }
  .cleaner { flex-wrap: wrap; }
  .cleaner .btn { width: 100%; margin-top: 8px; }
  .cleaner .btn + .btn { margin-top: 6px; }
  .timeline span { min-width: calc(50% - 3px); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .login-card { margin: 12px auto; padding: 24px 20px; }
  .login-card::before { margin: -24px -20px 18px; }
  th, td { padding: 9px 8px; }
}
/* ---------- booking chat ---------- */
.chat-thread { margin-top: 12px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.chat-messages { max-height: 260px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--border-soft); align-self: flex-start; overflow-wrap: anywhere; }
.chat-msg.mine { align-self: flex-end; background: var(--sky); border-color: #cfe3fb; }
.chat-meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; min-width: 0; }
.chat-note { font-size: 13px; margin-top: 8px; }
.cleaner > .chat-holder { flex: 1 1 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- live map (Admin only) ---------- */
#liveMap { height: 420px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); z-index: 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.map-marker { background: transparent; border: none; }
.map-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); vertical-align: -3px; }
.map-dot-live { background: #1d9d55; }
.map-dot-stale { background: #8a8f98; }
.map-dot-job { background: #2563eb; }
