/* SparkNest Cleaning Services — Production Stylesheet */
:root {
  --teal:      #0F6E56;
  --teal-d:    #085041;
  --teal-l:    #E1F5EE;
  --teal-m:    #1D9E75;
  --green:     #3B6D11;
  --white:     #ffffff;
  --gray-50:   #f8fafb;
  --gray-100:  #f1f3f5;
  --gray-200:  #e0e4e8;
  --gray-300:  #c8cdd4;
  --gray-400:  #8d9399;
  --gray-600:  #4a5260;
  --gray-800:  #1c2028;
  --amber:     #f59e0b;
  --red:       #dc2626;
  --red-l:     #fef2f2;
  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 6px 24px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: system-ui,-apple-system,'Segoe UI',sans-serif; color: var(--gray-800); background: var(--white); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ──────────────────────────────────────────────── */
h1 { font-size: clamp(2rem,5vw,3rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem,3vw,2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { line-height: 1.7; }

/* ── Layout helpers ───────────────────────────────────────────── */
.container   { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.section     { padding: 4.5rem 0; }
.section-sm  { padding: 2.5rem 0; }
.text-center { text-align: center; }
.mt-2        { margin-top: .5rem; }
.mt-3        { margin-top: 1rem; }
.mt-4        { margin-top: 1.5rem; }
.gap-1       { gap: .25rem; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.4rem; border-radius: var(--radius); font-size: .9rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all .18s; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--teal);  color: #fff; border-color: var(--teal); }
.btn-primary:hover  { background: var(--teal-d); border-color: var(--teal-d); }
.btn-outline  { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover  { background: var(--teal-l); }
.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover   { background: #b91c1c; }
.btn-white    { background: #fff; color: var(--teal); border-color: #fff; }
.btn-white:hover    { background: var(--teal-l); }
.btn-sm  { padding: .35rem .8rem; font-size: .8rem; }
.btn-lg  { padding: .85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Navigation ───────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 900; background: var(--white);
  border-bottom: 1px solid var(--gray-200); }
.nav-inner { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; max-width: 1160px; margin: 0 auto; }
.nav-logo, .nav-brand  { font-size: 1.2rem; font-weight: 800; color: var(--teal); text-decoration: none; display: flex; align-items: center; gap: .4rem; }
.nav-logo:hover, .nav-brand:hover { text-decoration: none; }
/* Logo image — on white/light backgrounds, show full colour logo */
.sn-logo { height: 44px; width: auto; display: block; }
/* Transparent PNG logo — colours show naturally on any background.
   On dark/teal portal navbars add a subtle drop-shadow so the
   teal icon elements remain visible against the dark teal background. */
.sn-logo-light { height: 44px; width: auto; display: block; filter: drop-shadow(0 0 1px rgba(255,255,255,0.35)) brightness(1.12); }
.portal-brand { display: flex; align-items: center; }
.nav-links { display: flex; gap: .2rem; align-items: center; flex: 1; }
.nav-links a { padding: .45rem .75rem; border-radius: var(--radius); font-size: .88rem; color: var(--gray-600); font-weight: 500; transition: all .15s; }
.nav-links a:hover { color: var(--teal); background: var(--teal-l); text-decoration: none; }
.nav-links a.active { color: var(--teal); font-weight: 600; }
.nav-cta   { display: flex; gap: .5rem; align-items: center; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; color: var(--gray-600); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg,#063326 0%,#0F6E56 60%,#1D9E75 100%); color: #fff; padding: 1.5rem 0 3rem; }
.hero h1 { color: #fff; }
.hero p   { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 560px; margin: 1rem 0 2rem; }
.hero-badges { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-badge  { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); color: #fff; padding: .3rem .8rem; border-radius: 20px; font-size: .82rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Cards & Grids ────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; }
.card-header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gray-200); }
.cards-grid  { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.5rem; }
.section-label { color: var(--teal); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }

/* ── Services / Pricing ───────────────────────────────────────── */
.pricing-tabs { display: flex; gap: .4rem; justify-content: center; margin-bottom: 2.5rem; flex-wrap: wrap; }
.ptab { padding: .5rem 1.2rem; border-radius: 20px; border: 2px solid var(--gray-200); background: var(--white); font-weight: 600; font-size: .88rem; cursor: pointer; transition: all .15s; }
.ptab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.ptab-panel { display: none; }
.ptab-panel.active { display: block; }
.price-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.price-card.featured { border-color: var(--teal); border-width: 2px; }
.price-card .price { font-size: 1.6rem; font-weight: 800; color: var(--teal); }
.price-tag { display: inline-block; background: var(--teal-l); color: var(--teal); font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 20px; }
.features { list-style: none; display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--gray-600); }
.features li::before { content: '✓ '; color: var(--teal); font-weight: 700; }
.surcharge-notice { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius); padding: .75rem 1rem; font-size: .88rem; color: #92400e; margin-top: 1rem; display: none; }
.surcharge-notice.show { display: block; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group  { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label  { font-size: .85rem; font-weight: 600; color: var(--gray-600); }
.form-control { width: 100%; padding: .6rem .9rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: .92rem; color: var(--gray-800); background: var(--white); transition: border-color .15s; }
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,110,86,.1); }
.form-control[disabled] { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Alerts ───────────────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: var(--radius); font-size: .9rem; display: none; }
.alert.show   { display: block; }
.alert-error  { background: var(--red-l); border: 1px solid #fecaca; color: #991b1b; }
.alert-success{ background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info   { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Portal nav ───────────────────────────────────────────────── */
.portal-nav       { background: #1c2028; color: #fff; position: sticky; top: 0; z-index: 900; }
.portal-nav-inner { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.portal-brand     { font-size: 1rem; font-weight: 800; color: var(--teal-m); white-space: nowrap; }
.portal-nav-links { display: flex; gap: .1rem; flex: 1; flex-wrap: wrap; }
.portal-nav-links a { padding: .4rem .8rem; border-radius: var(--radius); color: rgba(255,255,255,.7); font-size: .85rem; font-weight: 500; transition: all .15s; }
.portal-nav-links a:hover,
.portal-nav-links a.active { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }
.portal-nav-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.portal-user      { font-size: .82rem; color: rgba(255,255,255,.6); }
.portal-logout    { background: none; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.7); padding: .3rem .75rem; border-radius: var(--radius); font-size: .8rem; cursor: pointer; transition: all .15s; }
.portal-logout:hover { background: rgba(255,255,255,.1); color: #fff; }
.portal-body      { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.portal-section   { display: none; }
.portal-section.active { display: block; }
.section-head     { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem; }
.section-head h2  { margin: 0; font-size: 1.25rem; }

/* ── KPI Grid ─────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: .85rem; margin-bottom: 2rem; }
.kpi-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.1rem; text-align: center; }
.kpi-val  { font-size: 1.8rem; font-weight: 800; color: var(--teal); line-height: 1; }
.kpi-lbl  { font-size: .75rem; color: var(--gray-400); margin-top: .35rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 600px; }
th,td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
th    { background: var(--gray-50); font-weight: 700; color: var(--gray-600); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
tr:hover td { background: var(--gray-50); }

/* ── Badges ───────────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-pending   { background: #fef9c3; color: #854d0e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-en-route  { background: #ede9fe; color: #5b21b6; }
.badge-arrived   { background: #fce7f3; color: #9d174d; }
.badge-cleaning  { background: #cffafe; color: #0e7490; }
.badge-completed { background: #dcfce7; color: #15803d; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-client    { background: var(--teal-l); color: var(--teal-d); }
.badge-supervisor{ background: #ede9fe; color: #5b21b6; }
.badge-cleaner   { background: #fef9c3; color: #854d0e; }

/* ── Modals ───────────────────────────────────────────────────── */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--gray-200); }
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--gray-400); line-height: 1; padding: 0 .25rem; }
.modal-close:hover { color: var(--gray-800); }

/* ── Toast ────────────────────────────────────────────────────── */
.toast-wrap { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { padding: .75rem 1.1rem; border-radius: var(--radius); font-size: .88rem; font-weight: 500; min-width: 240px; max-width: 340px; animation: slideIn .25s ease; }
.toast.success { background: #166534; color: #fff; }
.toast.error   { background: #991b1b; color: #fff; }
.toast.info    { background: #1e40af; color: #fff; }
@keyframes slideIn { from { transform:translateX(120%); opacity:0; } to { transform:translateX(0); opacity:1; } }

/* ── Upload area ──────────────────────────────────────────────── */
.upload-area { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; cursor: pointer; transition: all .2s; }
.upload-area:hover, .upload-area.drag { border-color: var(--teal); background: var(--teal-l); }
.upload-area p { color: var(--gray-400); margin-top: .5rem; font-size: .88rem; }
.upload-area input[type=file] { display: none; }

/* ── Stars ────────────────────────────────────────────────────── */
.stars { display: flex; gap: .3rem; margin: .75rem 0; }
.star  { font-size: 2rem; color: var(--gray-300); cursor: pointer; transition: color .15s; line-height: 1; }
.star.active, .star:hover ~ .star, .stars:hover .star { color: var(--amber); }
.stars:hover .star:hover ~ .star { color: var(--gray-300); }
.stars:not(:hover) .star.active { color: var(--amber); }

/* ── Tutorial cards ───────────────────────────────────────────── */
.tutorial-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.tutorial-body { padding: 1.25rem; }
.tutorial-video { background: var(--gray-100); aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.rating-form { background: var(--gray-50); padding: 1rem; border-top: 1px solid var(--gray-200); }

/* ── Steps ────────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step-item { display: flex; gap: 1.25rem; }
.step-num  { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; font-size: 1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body { padding-top: .4rem; flex: 1; }
.step-body h4 { font-size: 1rem; margin-bottom: .25rem; }
.step-body p  { color: var(--gray-600); font-size: .9rem; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer { background: #111; color: rgba(255,255,255,.7); padding: 3rem 0 1.5rem; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer h4   { color: #fff; margin-bottom: .85rem; font-size: .95rem; }
.footer a    { color: rgba(255,255,255,.65); display: block; margin-bottom: .4rem; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-200); padding: .75rem; z-index: 800; }
  .nav-toggle { display: flex; }
  .hero { padding: 3rem 0; }
  h1 { font-size: 2rem; }
  .portal-nav-links { gap: 0; }
  .portal-nav-links a { padding: .35rem .6rem; font-size: .78rem; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
}

/* ── Footer inner helper ──────────────────────────────────────── */
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 1.5rem 1.25rem; text-align: center; }
.footer-inner p { margin-bottom: .5rem; }
.footer-inner a { color: rgba(255,255,255,.65); }
.footer-inner a:hover { color: #fff; text-decoration: none; }
