﻿:root {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-muted: #f1f7f3;
  --text: #1a2230;
  --muted: #5b6472;
  --primary: #2f8f5b;
  --primary-dark: #246b45;
  --primary-soft: #e4f4ea;
  --secondary: #f97316;
  --secondary-soft: #ffedd9;
  --danger: #dc2626;
  --border: #e2e6ed;
  --border-strong: #cbd3df;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 22px;
  --bottom-nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* Layout shells */

.page-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3) 48px;
}

.small-shell {
  max-width: 440px;
  padding-top: 28px;
}

/* Surfaces */

.hero-card,
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.panel + .panel,
.card + .card {
  margin-top: var(--space-3);
}

.hero-card {
  margin: var(--space-3) 0 var(--space-4);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.hero-card h1 {
  color: #ffffff;
}

.hero-card p {
  color: rgba(228, 228, 228, 0.88);
}

.hero-card .button-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-card .button-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-card .button-primary {
  background: #ffffff;
  color: var(--primary-dark);
}

.hero-card .button-primary:hover {
  background: rgba(255, 255, 255, 0.92);
}

.hero-card,
.card,
.panel {
  margin-bottom: var(--space-3);
}

h1, .hero-card h1, .card h1, .panel h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.hero-card p, 
.card p,
.panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.hero-card p{
  color: var(--surface-muted);
}

.hero-card p:last-child,
.card p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

.panel-header {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.panel-header h1 {
  margin: 0;
}

.hero-description {
  margin: 0 0 18px;
  color: var(--surface-muted);
  line-height: 1.7;
  font-size: 1.1rem;
}

/* Buttons */

.hero-actions,
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.button:active {
  transform: scale(0.97);
}

.button:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: 2px;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.28);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-strong);
}

.button-secondary:hover {
  background: var(--surface-muted);
  border-color: var(--muted);
}

.button-small {
  padding: 0 14px;
  min-height: 38px;
  font-size: 0.88rem;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Forms */

.form-card label,
.form-card input,
.form-card textarea,
.form-card select,
.form-card button {
  width: 100%;
}

.form-card h1 {
  margin-bottom: 18px;
}

.form-card label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
}

.form-card label:first-of-type {
  margin-top: 0;
}

input,
textarea,
select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

input::placeholder,
textarea::placeholder {
  color: #9aa3b2;
}

textarea {
  resize: vertical;
}

.form-card button[type="submit"] {
  margin-top: 22px;
}

.small-note {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Top bar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  margin: 0;
  font-size: 1.05rem;
}

.topbar-actions {
  width: 100%;
  justify-content: flex-start;
}

/* Badges & status */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  margin-left: 10px;
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-featured {
  background: var(--secondary-soft);
  color: #9a3412;
  margin-left: 0;
  margin-top: 8px;
  display: inline-block;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-open,
.status-available { background: #d1fae5; color: #166534; }
.status-in_progress,
.status-busy { background: #dbeafe; color: #1e40af; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-partially_staffed { background: #fef3c7; color: #92400e; }
.status-fully_staffed { background: #d1fae5; color: #166534; }
.status-completed { background: #ede9fe; color: #6d28d9; }
.status-cancelled,
.status-offline { background: #fee2e2; color: #991b1b; }
.status-info { background: #cffafe; color: #155e75; }
.status-success { background: #dcfce7; color: #166534; }
.status-warning { background: #fef9c3; color: #92400e; }
.status-error { background: #fee2e2; color: #991b1b; }

/* Grids & stat cards */

.stats-grid,
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-grid article,
.stat-card,
.request-card {
  border-radius: var(--radius-md);
}

.info-grid article {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.info-grid article h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.info-grid article p {
  margin: 0;
}

.stat-card {
  padding: 18px;
  background: linear-gradient(160deg, #ffffff 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border);
  text-align: left;
}

.stat-card h2 {
  margin: 0 0 4px;
  font-size: 1.7rem;
  color: var(--primary-dark);
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Alerts */

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.94rem;
  border: 1px solid transparent;
}

.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.alert ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

/* Filter & inline forms */

.filter-form,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-form {
  margin-bottom: 14px;
}

.filter-form select,
.filter-form input {
  flex: 1 1 160px;
  width: auto;
}

.filter-form button {
  flex: 0 0 auto;
  width: auto;
}

.inline-form { margin: 0; }

/* Request / job cards */

.request-card {
  background: #ffffff;
  border: 2px solid rgba(47, 143, 91, 0.5);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.request-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.request-card .request-head {
  margin: -18px -18px 14px;
  padding: 16px 18px;
  background: var(--primary-soft);
  border-bottom: 1.5px solid rgba(47, 143, 91, 0.2);
}

.request-card .request-head h2 {
  color: var(--primary-dark);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.request-card > p {
  color: var(--text);
}

.jobs-grid .request-card > p:not(.meta) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Small uppercase label used as section heading inside detail cards */
.detail-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 5px;
}

/* Responsive job card grid â€” 1 col mobile, 2 tablet, 3 desktop */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.jobs-grid .request-card {
  margin-bottom: 0;
}

.request-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.request-head h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

.match-meta {
  color: var(--primary-dark);
  font-weight: 600;
  margin-top: 4px;
}

.match-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.match-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.request-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Card-bottom wraps mid-actions + card-actions; pushed to bottom of the flex-column card */
.request-card .card-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

/* Tinted action zone above the bottom button bar */
.request-card .card-mid-actions {
  margin: 0 -18px;
  padding: 10px 18px;
  background: var(--surface-muted);
  border-top: 1.5px solid rgba(47, 143, 91, 0.12);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.request-card .card-mid-actions .button,
.request-card .card-mid-actions > form > .button {
  width: 100%;
  text-align: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Inline status row (applied, approved, rejected) inside card-mid-actions */
.card-status-badge {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
  gap: 6px;
}
.card-status-badge.pending  { background: #fef3c7; color: #92400e; }
.card-status-badge.approved { background: #d1fae5; color: #065f46; }
.card-status-badge.rejected { background: #fee2e2; color: #991b1b; }
.card-status-badge.info     { background: var(--surface-muted); color: var(--muted); border: 1px solid var(--border); }

/* Flush bottom action bar â€” bleeds to card edges, corners clipped by card overflow:hidden */
.request-card .card-actions {
  display: flex;
  margin: 0 -18px -18px;
  border-top: 1.5px solid rgba(47, 143, 91, 0.15);
}

.request-card .card-actions .button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.request-card .card-actions .button + .button {
  border-left: 1.5px solid rgba(47, 143, 91, 0.15);
}

.request-card .card-actions .button:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.request-card .card-actions .button-primary {
  background: var(--primary);
  color: #fff;
}

.request-card .card-actions .button-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.job-action-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.job-action-bar > .button,
.job-action-bar > form > .button {
  width: 100%;
}

.job-action-bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-action-bar-row .button {
  flex: 1 1 calc(50% - 5px);
}

/* Tables */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead th {
  text-align: left;
  padding: 12px 14px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--surface-muted);
}

/* Empty state */

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.empty-state::before {
  content: "â€”";
  display: block;
  font-size: 1.6rem;
  color: var(--border-strong);
  margin-bottom: 8px;
}

/* Mobile-first base adjustments */

.topbar { flex-direction: row; }

@media (max-width: 540px) {
  .page-shell {
    padding: 12px 12px 40px;
  }

  .small-shell {
    padding-top: 18px;
  }

  .hero-card,
  .card,
  .panel {
    padding: 18px;
    border-radius: var(--radius-md);
  }

  h1, .hero-card h1, .card h1, .panel h1 {
    font-size: 1.3rem;
  }

  .topbar {
    padding: 12px;
  }

  .topbar h1 {
    order: 2;
    flex: 1 1 100%;
    text-align: center;
    margin-top: 4px;
  }

  .hero-actions .button,
  .button-group .button {
    flex: 1 1 calc(50% - 5px);
  }

  .request-head {
    flex-direction: column;
  }

  .request-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .request-footer > span {
    text-align: center;
  }

  .filter-form select,
  .filter-form input,
  .filter-form button {
    flex: 1 1 100%;
  }
}

/* Tablet and up */

@media (min-width: 640px) {
  .jobs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 700px) {
  .page-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  h1, .hero-card h1, .card h1, .panel h1 {
    font-size: 1.7rem;
  }

  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .panel-header .filter-form {
    flex-wrap: nowrap;
  }
}

@media (min-width: 960px) {
  .page-shell {
    padding-top: 28px;
  }

  .jobs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Wide screen: expand page width and enable sidebar layouts */
@media (min-width: 1100px) {
  .page-shell {
    max-width: 1280px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .jobs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Keep small forms (login / register) narrow on all screen sizes */
.page-shell.small-shell {
  max-width: 440px;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

/* ── Delivery Services — shared star-rating component ──────────────────────── */
.dl-stars .dl-star-full  { color: #f59e0b; }
.dl-stars .dl-star-empty { color: #e5e7eb; }
.dl-star-val             { font-size: .8rem; color: var(--text-muted, #6b7280); margin-left: 2px; }

/* Interactive star picker — CSS-only reverse trick */
.dl-stars-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}
.dl-stars-input input  { display: none; }
.dl-stars-input label  {
    font-size: 1.8rem;
    cursor: pointer;
    color: #e5e7eb;
    transition: color .1s;
    line-height: 1;
}
/* Highlight selected star and all stars before it (visually to the left) */
.dl-stars-input input:checked ~ label,
.dl-stars-input label:hover,
.dl-stars-input label:hover ~ label { color: #f59e0b; }

/* Sidebar layout utility: single col on mobile, sidebar+content on wide screens */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

@media (min-width: 900px) {
  .sidebar-layout {
    grid-template-columns: 260px 1fr;
  }
}

/* Bottom tab navigation */

body.has-bottom-nav {
  padding-bottom: var(--bottom-nav-height);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 22px rgba(15, 23, 42, 0.06);
  max-width: 980px;
  margin: 0 auto;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.bottom-nav-item:hover {
  color: var(--primary-dark);
}

.bottom-nav-item .nav-icon {
  font-size: 1.32rem;
  line-height: 1;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item .nav-badge {
  position: relative;
}

.bottom-nav-item .nav-badge::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--secondary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Compact app topbar (used alongside bottom nav) */

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--primary-dark);
}

.app-topbar .brand .brand-icon {
  font-size: 1.3rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.avatar-lg {
  width: 88px;
  height: 88px;
  font-size: 1.8rem;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}

/* Category grid */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 540px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.category-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-decoration: none !important;
  color: var(--text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.category-tile:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.category-tile .category-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--primary-soft);
  flex-shrink: 0;
}

.category-tile strong {
  display: block;
  font-size: 0.94rem;
}

.category-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Quick-pick category chips (horizontal scroller) */

.chip-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: var(--space-4);
}

.category-grid .chip-pick[hidden] {
  display: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  color: var(--text);
  flex-shrink: 0;
  width: 64px;
  text-align: center;
}

.chip-pick .chip-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--primary-soft);
}

.menu-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: var(--primary-soft);
}

.chip-pick span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

/* Search bar */

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.search-bar input {
  border: none;
  padding: 0;
  flex: 1;
}

.search-bar input:focus {
  box-shadow: none;
}

.search-bar .search-icon {
  color: var(--muted);
}

/* List rows (messages, notifications) */

.list-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none !important;
  color: var(--text);
}

.list-row:last-child {
  border-bottom: none;
}

.list-row .list-row-body {
  flex: 1;
  min-width: 0;
}

.list-row .list-row-body strong {
  display: block;
  font-size: 0.95rem;
}

.list-row .list-row-body p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row .list-row-meta {
  flex-shrink: 0;
  text-align: right;
  color: var(--muted);
  font-size: 0.76rem;
}

.list-row .unread-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 4px;
}

/* Weekly availability schedule */

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.schedule-row.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.schedule-day {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
  font-weight: 700;
  font-size: 0.92rem;
}

.day-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.day-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.day-switch .switch-track {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.day-switch .switch-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.day-switch input:checked + .switch-track {
  background: var(--primary);
}

.day-switch input:checked + .switch-track::before {
  transform: translateX(18px);
}

.schedule-time-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  color: var(--muted);
}

.schedule-time-range input[type="time"] {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.schedule-row:not(.is-active) .schedule-time-range {
  opacity: 0.45;
  pointer-events: none;
}

/* Worker job timeline cards */

.job-timeline-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 10px;
  text-decoration: none !important;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.job-timeline-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.job-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.job-timeline-head h3 {
  margin: 0;
  font-size: 1rem;
}

.job-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.job-timeline-meta .rating-pill {
  color: #92400e;
  font-weight: 700;
}

/* â”€â”€ Job type badge (remote / on-site / hybrid) â”€â”€ */
.job-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}
.job-type-badge.remote  { background: #dbeafe; color: #1e40af; }
.job-type-badge.on-site { background: #d1fae5; color: #065f46; }
.job-type-badge.hybrid  { background: #ede9fe; color: #5b21b6; }

/* â”€â”€ Rich Text Editor â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Used by RichEditor (assets/js/rich-editor.js).
   Add class="rich-editor" to any <textarea> to activate.
   Wrap rendered output in <div class="rich-content"> for styled display.
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rte-wrap { position: relative; }

.rte-editor {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    outline: none;
    font-size: .9rem;
    line-height: 1.65;
    font-family: inherit;
    color: var(--text, #111827);
    background: var(--surface, #fff);
    cursor: text;
    overflow-y: auto;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.rte-editor:focus {
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}
.rte-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}
.rte-editor[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted, #9ca3af);
    pointer-events: none;
}
.rte-editor p               { margin: 0 0 .7em; }
.rte-editor p:last-child    { margin-bottom: 0; }
.rte-editor h2              { font-size: 1.25em; font-weight: 800; margin: .9em 0 .35em; line-height: 1.25; }
.rte-editor h3              { font-size: 1.05em; font-weight: 700; margin: .8em 0 .3em;  line-height: 1.3; }
.rte-editor ul, .rte-editor ol { padding-left: 1.5em; margin: 0 0 .7em; }
.rte-editor li + li         { margin-top: .2em; }
.rte-editor a               { color: var(--primary, #0f766e); text-decoration: underline; }
.rte-editor blockquote      { border-left: 3px solid var(--primary, #0f766e); margin: 0 0 .7em; padding: .4em 1em; color: var(--text-muted, #6b7280); font-style: italic; }

/* Floating toolbar */
.rte-bar {
    position: fixed;
    z-index: 99999;
    display: none;
    align-items: center;
    gap: 2px;
    background: #1f2937;
    border-radius: 9px;
    padding: 5px 7px;
    box-shadow: 0 6px 24px rgba(0,0,0,.32);
    pointer-events: auto;
    white-space: nowrap;
    animation: rte-pop .12s ease;
}
@keyframes rte-pop {
    from { opacity: 0; transform: translateY(4px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}
.rte-bar::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom: none;
    border-top-color: #1f2937;
    pointer-events: none;
}
.rte-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px; padding: 0 7px;
    border: none; border-radius: 5px;
    background: transparent;
    color: #d1d5db;
    font-size: .82rem; font-weight: 700; font-family: inherit;
    cursor: pointer;
    transition: background .12s, color .12s;
    line-height: 1;
}
.rte-btn:hover    { background: rgba(255,255,255,.14); color: #fff; }
.rte-btn b, .rte-btn i, .rte-btn u, .rte-btn s { pointer-events: none; }
.rte-active       { background: rgba(255,255,255,.22) !important; color: #fff !important; }
.rte-sep          { display: inline-block; width: 1px; height: 20px; background: rgba(255,255,255,.15); margin: 0 3px; flex-shrink: 0; }

/* â”€â”€ Rich content display (wrap rendered HTML in .rich-content) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rich-content p               { margin: 0 0 .85em; }
.rich-content p:last-child    { margin-bottom: 0; }
.rich-content h2              { font-size: 1.35em; font-weight: 800; margin: 1em 0 .4em; line-height: 1.25; }
.rich-content h3              { font-size: 1.1em;  font-weight: 700; margin: .9em 0 .35em; line-height: 1.3; }
.rich-content ul, .rich-content ol { padding-left: 1.5em; margin: 0 0 .85em; }
.rich-content li + li         { margin-top: .25em; }
.rich-content a               { color: var(--primary, #0f766e); text-decoration: underline; }
.rich-content a:hover         { opacity: .8; }
.rich-content blockquote      { border-left: 3px solid var(--primary, #0f766e); margin: 0 0 .85em; padding: .5em 1em; color: var(--text-muted, #6b7280); font-style: italic; }
.rich-content strong, .rich-content b { font-weight: 700; }
.rich-content em,    .rich-content i  { font-style: italic; }
