/*
 * nextShift onboarding styles. Loaded via the :app manifest (see the layout).
 * Designed mobile-first for the Hotwire Native wrappers; the screens are RTL
 * Hebrew.
 */

:root {
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-bg: #ffffff;

  --green-accent: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;

  --blue-accent: #2563eb;
  --blue-bg: #eef2ff;
  --blue-border: #c7d2fe;

  --purple-accent: #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 10px 30px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.05);

  --page-bg: #eef1f6;
  --field-bg: #f7faf8;
  --field-border: #e3e8ee;
  --brand-gradient: linear-gradient(90deg, #1fae6b 0%, #2f86d8 100%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Heebo", "Assistant", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Brand logo ---- */
.logo {
  display: block;
  width: auto;
  max-width: 100%;
}

/* ---- Splash ---- */
.splash {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ---- Welcome / user-type selection ---- */
.welcome {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom));
}

.welcome__header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome__greeting {
  margin: 8px 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.welcome__title {
  margin: 26px 0 6px;
  font-size: 1.3rem;
  font-weight: 800;
}
.welcome__subtitle {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.98rem;
}

.user-types {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0;
}

.user-types form { margin: 0; }

.user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.user-card:active { transform: scale(0.985); }

.user-card--worker       { background: var(--green-bg);  border-color: var(--green-border); }
.user-card--business     { background: var(--blue-bg);   border-color: var(--blue-border); }
.user-card--professional { background: var(--purple-bg); border-color: var(--purple-border); }

.user-card__icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-card__icon svg { width: 44px; height: 44px; }

.user-card__body { flex: 1; }
.user-card__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
}
.user-card__desc {
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.user-card__tag {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}
.user-card__tag--green  { color: var(--green-accent); }
.user-card__tag--blue   { color: var(--blue-accent); }
.user-card__tag--purple { color: var(--purple-accent); }

.welcome__footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
}
.welcome__footer form { margin: 0; }
.welcome__logout {
  border: 0;
  background: none;
  padding: 8px 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-muted);
  cursor: pointer;
}

/* ---- Auth / login ---- */
.auth {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--page-bg);
  padding: max(28px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.auth__card {
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  padding: 26px 22px;
}

.auth__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth__flash {
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  font-weight: 600;
}
.auth__flash--alert  { background: #fef2f2; color: #b91c1c; }
.auth__flash--notice { background: var(--green-bg); color: var(--green-accent); }

.auth__intro {
  text-align: center;
  margin-bottom: 22px;
}
.auth__eyebrow {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
}
.auth__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}
.auth__subtitle {
  margin: 6px 0 0;
  font-size: 0.98rem;
  color: var(--color-muted);
}
.auth__intro--green  .auth__title { color: var(--green-accent); }
.auth__intro--blue   .auth__title { color: var(--blue-accent); }
.auth__intro--purple .auth__title { color: var(--purple-accent); }

.auth__form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}
.field__control { position: relative; }
.field__input {
  width: 100%;
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  border-radius: 16px;
  padding: 16px 48px 16px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__input--password { padding-left: 48px; }
.field__input::placeholder { color: #9aa3af; }
.field__input:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 4px rgba(47, 134, 216, 0.12);
}

.field__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
}
.field__icon svg { width: 22px; height: 22px; }
.field__icon--leading { right: 14px; }
.field__icon--trailing {
  left: 14px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-text);
}

.auth__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 600;
}
.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle__box {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--field-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.toggle__box svg { width: 16px; height: 16px; opacity: 0; }
.toggle__input:checked + .toggle__box {
  background: #14152b;
  border-color: #14152b;
}
.toggle__input:checked + .toggle__box svg { opacity: 1; }
.toggle__input:focus-visible + .toggle__box {
  box-shadow: 0 0 0 4px rgba(47, 134, 216, 0.18);
}

.auth__forgot {
  color: var(--green-accent);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
}

.toggle--terms {
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.95rem;
}
.toggle--terms .toggle__label { color: var(--color-text); line-height: 1.5; }
.auth__terms-link {
  color: var(--blue-accent);
  font-weight: 700;
  text-decoration: none;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 17px 20px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn--primary {
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 8px 18px rgba(47, 134, 216, 0.28);
}
.btn--primary:active { transform: scale(0.99); }

.auth__card--social {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}
.auth__divider {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}
.btn--google {
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  color: var(--color-text);
  font-size: 1rem;
}
.btn--google:active { transform: scale(0.99); }
/* button_to wraps the Google button in a <form>; keep it a layout passthrough so
   the button still fills the social card the way the old bare <button> did. */
.auth__social-form { margin: 0; display: contents; }
.btn__icon { width: 22px; height: 22px; display: inline-flex; }
.btn__icon svg { width: 22px; height: 22px; }

/* ---- Language switch (profile + auth footers) ---- */
.language-switch-form { display: flex; justify-content: center; }
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--blue-border);
  background: var(--blue-bg);
  color: var(--blue-accent);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.language-switch:hover { background: #e3e9ff; }
.language-switch:active { transform: scale(0.97); }
.language-switch__icon { width: 20px; height: 20px; flex: none; }
.language-switch__label { line-height: 1; }

.auth__footer {
  margin-top: auto;
  text-align: center;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 600;
}
.auth__signup {
  color: var(--green-accent);
  font-weight: 800;
  text-decoration: none;
}
.auth__footer-sep { margin: 0 8px; color: var(--field-border); }
.auth__alt {
  color: var(--color-muted);
  font-weight: 700;
  text-decoration: none;
}

/* ---- Placeholder screens ---- */
.placeholder {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.placeholder h1 { margin: 0; font-size: 1.4rem; }
.placeholder p { margin: 0; color: var(--color-muted); }
.placeholder__back {
  margin-top: 8px;
  color: var(--blue-accent);
  font-weight: 700;
  text-decoration: none;
}
.placeholder__logout {
  margin-top: 12px;
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  border-radius: 999px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}
.placeholder__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}
.placeholder__actions .btn { max-width: 320px; }

/* ---- Worker "free today" availability toggle ---- */
.availability {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-top: 12px;
}
.availability__set { width: 100%; }
.availability__status {
  margin: 0;
  font-weight: 800;
  color: var(--green-accent);
}
.availability__clear {
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  border-radius: 999px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}

/* ---- Job posting form ---- */
.job-form,
.jobs {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--page-bg);
  padding: max(20px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.job-form__header,
.jobs__header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.job-form__back {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  text-decoration: none;
}
.job-form__back svg { width: 24px; height: 24px; }
.job-form__title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
}

.job-form__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Plain inputs (no leading/trailing icon) shouldn't reserve icon padding. */
.field__input--plain { padding: 16px; }
.field__input--icon { padding: 16px 48px 16px 16px; }
.field__textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.field__range-output {
  font-weight: 800;
  color: var(--blue-accent);
}
.field__range {
  display: flex;
  align-items: center;
  gap: 12px;
}
.field__range-bound {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-muted);
  direction: ltr;
}
.field__slider {
  flex: 1;
  accent-color: var(--blue-accent);
  height: 6px;
}

.job-form__schedule {
  display: flex;
  gap: 12px;
}
.job-form__date { flex: 1; }
.job-form__times {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.job-form__time { flex: 1; min-width: 0; }
.job-form__times-sep { color: var(--color-muted); font-weight: 700; }

/* ---- Job list / detail ---- */
.jobs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.jobs__empty {
  text-align: center;
  color: var(--color-muted);
  margin: 24px 0;
}
.jobs__cta { margin-top: auto; }

/* ---- Date filter ---- */
.jobs__filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jobs__filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.jobs__filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--field-border);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.jobs__filter-pill:hover { border-color: var(--blue-border); }
.jobs__filter-pill--active {
  background: var(--blue-accent);
  border-color: var(--blue-accent);
  color: #fff;
}
.jobs__filter-date {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
}
.jobs__filter-date.is-hidden { display: none; }

/* ---- Distance sorting bar ---- */
.jobs__location {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jobs__location-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.jobs__location-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-accent);
}
.jobs__location-note--muted { color: var(--color-muted); font-weight: 600; }
.jobs__location-pin { width: 18px; height: 18px; flex: none; }
.jobs__location-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--blue-accent);
  border: 1.5px solid var(--blue-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.jobs__location-btn:disabled { opacity: 0.6; cursor: default; }
.jobs__location-link {
  background: none;
  border: none;
  padding: 4px;
  color: var(--blue-accent);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.jobs__location-link:disabled { opacity: 0.6; cursor: default; }
.jobs__location-status:empty { display: none; }
.jobs__location-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.jobs__location-flash {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--blue-bg);
  border: 1.5px solid var(--blue-border);
  color: var(--blue-accent);
  font-size: 0.9rem;
  font-weight: 600;
}
.jobs__location-flash--alert {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.jobs__location-cityform { display: none; }

.job-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--field-border);
  box-shadow: var(--shadow);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--blue-border);
}
a.job-card:active { transform: translateY(0); }
.job-card--detail { box-shadow: var(--shadow-card); }
.job-card__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
}
.job-card__meta {
  margin: 0 0 4px;
  color: var(--color-muted);
  font-size: 0.95rem;
}
/* Live "starts in…" pill on the worker's upcoming jobs. */
.job-card__countdown {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blue-bg);
  color: var(--blue-accent);
  font-size: 0.9rem;
  font-weight: 700;
}
.job-card__countdown:empty {
  display: none;
}

/* ---- Worker's "my jobs" card (app-card) ---- */
.app-card {
  padding: 0;
  overflow: hidden;
}
/* Header band: a prominent business logo beside the business name + job title. */
.app-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--blue-bg), #fff);
  border-bottom: 1px solid #eef1f6;
}
.app-card__logo {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--field-border);
  box-shadow: 0 2px 8px rgba(20, 40, 80, 0.08);
}
.app-card__logo--default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--blue-accent);
  border-color: var(--blue-border);
}
.app-card__logo--default svg { width: 34px; height: 34px; }
.app-card__heading {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-card__business {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}
.app-card__heading .job-card__badge,
.app-card__heading .job-card__countdown {
  align-self: flex-start;
  margin: 4px 0 0;
}
/* Job description, shown only on the detail page. */
.app-card__body {
  padding: 14px 18px 0;
  color: var(--color-text);
  line-height: 1.5;
}
.app-card__body p { margin: 0 0 8px; }
.app-card__body p:last-child { margin-bottom: 0; }
.app-card__meta {
  padding: 14px 18px;
}
.app-card__meta .job-card__meta:last-child {
  margin-bottom: 0;
}
.app-card__footer {
  padding: 14px 18px;
  border-top: 1px solid #eef1f6;
}
.job-card__rate {
  margin: 0;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--blue-accent);
}
.job-card__rate-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}
.job-card__pay {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.job-card__pay-total {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--blue-accent);
}
.job-card__pay-total-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}
/* In the pay row the total leads, so the hourly rate steps back to a note. */
.job-card__pay .job-card__rate {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
}
.job-card__badge {
  display: inline-block;
  flex-shrink: 0;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}
.job-card__badge--open  { background: var(--green-bg); color: var(--green-accent); }
.job-card__badge--taken { background: #fef2f2; color: #b91c1c; }

/* ---- Applicants (poster's view of a job) ---- */
.applicants__heading {
  margin: 4px 0 12px;
  font-size: 1.1rem;
  font-weight: 800;
}
.applicants__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.applicant {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid var(--field-border);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.applicant__email { font-weight: 700; }
.applicant__note { margin: 0; color: var(--color-text); font-size: 0.95rem; }
.applicant__date { color: var(--color-muted); font-size: 0.85rem; }

/* ---- Today's workers (home screen, hiring accounts) ---- */
/* ---- Home dashboard ---- */
.home {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: max(20px, env(safe-area-inset-top)) 20px 28px;
  background: var(--page-bg);
}

.home__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--color-muted);
  cursor: pointer;
  transition: transform 0.12s ease, color 0.15s ease;
}
.home__logout:active { transform: scale(0.94); }
.home__logout svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home__greeting { text-align: start; }
.home__hello {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.home__name {
  margin: 2px 0 8px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.home__role {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
  color: var(--blue-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.home__hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 22px;
  border-radius: 24px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #1fae6b 0%, #2f86d8 100%);
  box-shadow: 0 18px 34px rgba(47, 134, 216, 0.28);
}
.home__hero::after {
  content: "";
  position: absolute;
  inset-block-start: -60px;
  inset-inline-end: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.home__hero--on {
  background: linear-gradient(135deg, #15a34a 0%, #1fae6b 100%);
  box-shadow: 0 18px 34px rgba(22, 163, 74, 0.28);
}
.home__hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
}
.home__hero-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home__hero-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}
.home__hero-sub {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}
.home__hero-cta {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 6px;
  color: #1b6fb8;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.16);
}
.home__hero-cta:active { transform: scale(0.99); }
.home__hero-link {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  text-decoration: none;
}
.home__hero-link--button {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

.home__action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.home__action:active { transform: scale(0.99); }
.home__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  background: var(--blue-bg);
  color: var(--blue-accent);
}
.home__action-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home__action-label {
  flex: 1;
  font-weight: 700;
  font-size: 1.05rem;
}
.home__action-chevron { color: var(--color-muted); display: inline-flex; }
.home__action-chevron svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home__section { text-align: start; }
.home__section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 800;
}
.home__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed var(--field-border);
  text-align: center;
}
.home__empty-icon { font-size: 1.8rem; }
.home__empty p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.worker-card {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid var(--field-border);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.worker-card__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.worker-card__name { font-weight: 700; font-size: 1.05rem; }
.worker-card__profession {
  color: var(--color-muted);
  font-size: 0.9rem;
}
.worker-card__job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--color-text);
  font-size: 0.9rem;
}
.worker-card__job-title { font-weight: 600; }
.worker-card__time,
.worker-card__location { color: var(--color-muted); }
.worker-card__phone {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green-accent);
  font-weight: 700;
  text-decoration: none;
  direction: ltr;
}
.worker-card__distance {
  margin-inline-start: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent, var(--green-accent));
}

/* ---- Workers (available-today list) ---- */
.workers__origin {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.workers__origin-label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}
.workers__origin-switch {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-accent);
  text-decoration: none;
}
.workers__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
}
.workers__divider::before,
.workers__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border, rgba(0, 0, 0, 0.12));
}
.workers__choose-intro {
  margin: 0 0 16px;
  font-weight: 600;
}
.job-card__meta--warn { color: var(--color-danger, #c0392b); }

/* ---- Profile ---- */
.profile {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--page-bg);
  padding: max(20px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.profile__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--field-border);
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  text-align: center;
}
.profile__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand-gradient);
  direction: ltr;
}
/* Uploaded profile/business photo, sized to match the fallback avatar. */
.profile__picture,
.business__picture {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
.profile__name {
  margin: 8px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
}
.profile__type {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-muted);
}

/* Accent the avatar to match the account type's colour from the welcome cards. */
.profile--worker       .profile__avatar { background: var(--green-accent); }
.profile--business     .profile__avatar { background: var(--blue-accent); }
.profile--professional .profile__avatar { background: var(--purple-accent); }
.profile--worker       .profile__type { color: var(--green-accent); }
.profile--business     .profile__type { color: var(--blue-accent); }
.profile--professional .profile__type { color: var(--purple-accent); }

.profile__details {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--field-border);
  box-shadow: var(--shadow);
  padding: 6px 18px;
}
.profile__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--field-border);
}
.profile__row:last-child { border-bottom: 0; }
.profile__row-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-muted);
}
.profile__row-value {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}
.profile__row-value p { margin: 0; }

.profile__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile__actions form { margin: 0; }
.profile__logout {
  width: 100%;
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  border-radius: 999px;
  padding: 14px 28px;
  font: inherit;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}

.profile-edit__subtitle {
  margin: -6px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-muted);
}

/* ---- Bottom tab bar ---- */
.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 4px;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--field-border);
  box-shadow: 0 -1px 3px rgba(16, 24, 40, 0.04);
}
.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.tabbar__item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar__item--active { color: var(--blue-accent); }
.tabbar__label { line-height: 1; }

/* Keep page content clear of the fixed tab bar. */
.has-tabbar main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

/* Custom file-upload control (business picture). */
.upload {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--field-border);
  background: var(--field-bg);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.upload:hover { border-color: var(--blue-accent); }
.upload:focus-within {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 4px rgba(47, 134, 216, 0.12);
}
.upload--filled { border-style: solid; }

.upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.upload__preview {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.upload__image { width: 100%; height: 100%; object-fit: cover; display: block; }

.upload__placeholder {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #fff;
  color: var(--blue-accent);
}
.upload__icon { width: 26px; height: 26px; stroke-linecap: round; stroke-linejoin: round; }

.upload__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.upload__title { font-weight: 700; color: var(--color-text); }
.upload__filename {
  font-size: 0.85rem;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload__action {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 6px 14px rgba(47, 134, 216, 0.24);
}

/* Native select styled to match the plain text inputs (chevron drawn via
   .field__icon--leading, so hide the browser's default arrow). */
.field__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Business identity on a job post: picture/default storefront + name. */
.biz-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.biz-badge__picture {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--field-border);
}
.biz-badge__picture--default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-bg);
  color: var(--blue-accent);
  border-color: var(--blue-border);
}
.biz-badge__picture--default svg { width: 24px; height: 24px; }
.biz-badge__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
