@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Archivo+Black&display=swap");

:root {
  --ink: #f6f3ea;
  --muted: #c8c0ad;
  --line: rgba(255, 255, 255, 0.14);
  --paper: rgba(24, 26, 29, 0.92);
  --field: rgba(7, 7, 7, 0.54);
  --wash: #070707;
  --yellow: #f1bd28;
  --yellow-dark: #b58112;
  --teal: #35d0a2;
  --blue: #4aa3ff;
  --danger: #d94a3a;
  --charcoal: #111315;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

/* WorkerOps CR commercial theme, aligned with the Concierge visual language. */
@supports (color: #000) {
  :root {
    --ink: #0b1220;
    --muted: #536174;
    --line: #d9e2ef;
    --paper: #ffffff;
    --field: #ffffff;
    --wash: #f5f7fb;
    --yellow: #155eef;
    --yellow-dark: #0f49c9;
    --teal: #12b981;
    --blue: #155eef;
    --danger: #dc2626;
    --charcoal: #0b1220;
    --shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  }
  body { background: radial-gradient(circle at top left, rgba(21,94,239,.10), transparent 32rem), #f5f7fb; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
  body::before { display: none; }
  .app-sidebar { background: rgba(255,255,255,.94); border-right-color: var(--line); box-shadow: 8px 0 28px rgba(15,23,42,.05); color: var(--ink); }
  .brand img { background: transparent; border: 0; height: 52px; object-fit: contain; width: 190px; }
  .brand span { display: none; }
  .app-sidebar nav a:hover { background: #eef4ff; border-color: #bfd2ff; color: var(--blue); }
  .app-sidebar nav a.active, .app-sidebar nav a.active:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
  .user-chip { background: #eef4ff; border-color: #bfd2ff; color: var(--muted); }
  .user-chip strong { color: var(--ink); }
  .nav-label { color: #64748b; }
  .card, .panel, .login-card, details, table { box-shadow: 0 8px 24px rgba(15,23,42,.05); }
  input, select, textarea { background: #fff; color: var(--ink); border-color: var(--line); }
  button, .button { border-radius: 8px; }
  .login-page { background: radial-gradient(circle at 18% 12%, rgba(21,94,239,.14), transparent 34rem), #f5f7fb; }
  .login-brand img { width: 230px; height: auto; object-fit: contain; }
  .login-brand > div { display: none; }
}

[hidden] {
  display: none !important;
}

body {
  background:
    radial-gradient(circle at 12% 18%, rgba(53, 208, 162, 0.12), transparent 28vw),
    radial-gradient(circle at 88% 30%, rgba(74, 163, 255, 0.10), transparent 30vw),
    var(--wash);
  color: var(--ink);
  font-family: "Archivo", Arial, Helvetica, sans-serif;
  margin: 0;
}

body::before {
  background:
    radial-gradient(circle at 20% 18%, rgba(53, 208, 162, 0.08), transparent 22%),
    radial-gradient(circle at 86% 72%, rgba(74, 163, 255, 0.08), transparent 24%),
    linear-gradient(90deg, rgba(241, 189, 40, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  inset: 0;
  opacity: 0.45;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: var(--ink);
  font-weight: 800;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.mobile-header {
  display: none;
}

.app-sidebar {
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 7, 0.82);
  border-right: 1px solid var(--line);
  box-sizing: border-box;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100dvh;
  left: 0;
  overflow: hidden;
  padding: 20px 14px 14px;
  position: fixed;
  top: 0;
  width: 248px;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  background: var(--wash);
  border: 1px solid rgba(241, 189, 40, 0.42);
  border-radius: 0;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 3px;
  text-transform: uppercase;
}

.app-sidebar nav {
  align-items: stretch;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.app-sidebar nav a {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  text-decoration: none;
}

.app-sidebar nav a:hover {
  background: rgba(53, 208, 162, 0.10);
  border-color: rgba(53, 208, 162, 0.36);
  color: var(--teal);
}

.app-sidebar nav a.active,
.app-sidebar nav a.active:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #100d06;
}

.message-badge {
  background: var(--danger);
  border-radius: 999px;
  color: #fff;
  float: right;
  font-size: 11px;
  line-height: 18px;
  min-width: 18px;
  padding: 0 5px;
  text-align: center;
}

.user-chip {
  align-items: center;
  background: rgba(53, 208, 162, 0.10);
  border: 1px solid rgba(53, 208, 162, 0.26);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
}

.user-chip strong {
  color: var(--ink);
  font-size: 13px;
}

.nav-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 16px 12px 5px;
  text-transform: uppercase;
}

.sidebar-footer {
  align-items: stretch;
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: 0;
}

.company-switcher select {
  font-size: 12px;
  font-weight: 800;
  width: 100%;
}

.sidebar-footer .user-chip,
.sidebar-footer .nav-form,
.sidebar-footer .nav-form button {
  width: 100%;
}

.sidebar-footer .nav-form button {
  min-height: 38px;
}

.button-link {
  background: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 6px;
  color: #100d06;
  display: inline-flex;
  font-weight: 900;
  min-height: 36px;
  padding: 8px 12px;
  text-decoration: none;
}

.button-link.compact {
  min-height: 32px;
  padding: 6px 9px;
}

main {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  margin-left: 248px;
  max-width: 1688px;
  padding: 22px 28px;
}

section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.page-intro {
  align-items: end;
  background:
    radial-gradient(circle at 80% 20%, rgba(53, 208, 162, 0.18), transparent 210px),
    radial-gradient(circle at 92% 70%, rgba(74, 163, 255, 0.13), transparent 210px),
    var(--charcoal);
  border-color: rgba(241, 189, 40, 0.22);
  color: #fff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 132px;
}

.page-intro h1 {
  font-size: 34px;
  margin: 2px 0 0;
}

.page-intro p:last-child {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  max-width: 520px;
}

.eyebrow {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0;
  text-transform: uppercase;
}

.metric-grid,
.module-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.metric-card,
.module-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  padding: 18px;
  text-decoration: none;
}

.metric-card {
  box-shadow: var(--shadow);
}

.metric-card span,
.module-card span {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  font-size: 36px;
  margin-top: 8px;
}

.module-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.module-card:hover,
.metric-card:hover {
  border-color: rgba(53, 208, 162, 0.42);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

.section-title-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin: 0;
}

.section-help,
.empty-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 0;
}

h1,
h2 {
  font-family: "Archivo Black", "Archivo", Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
  margin: 0 0 14px;
}

form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.form-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
}

.assignment-form {
  grid-template-columns: repeat(2, minmax(240px, 1fr)) auto;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.field {
  align-items: stretch;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 900;
  gap: 5px;
}

.field small,
.help-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.checkbox-field {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  min-height: 38px;
}

input,
select,
button,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 11px;
}

input,
select,
textarea {
  background: var(--field);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: rgba(200, 192, 173, 0.74);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(53, 208, 162, 0.20);
  outline: none;
}

textarea {
  font-family: inherit;
  line-height: 1.45;
  min-height: 96px;
  resize: vertical;
}

.ai-draft-panel {
  align-items: end;
  background:
    radial-gradient(circle at 90% 10%, rgba(53, 208, 162, 0.13), transparent 180px),
    rgba(7, 7, 7, 0.32);
  border: 1px solid rgba(53, 208, 162, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 1fr) auto;
  margin-bottom: 14px;
  padding: 14px;
}

.task-form {
  display: grid;
  gap: 18px;
}

.task-form-group {
  border: 0;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.task-form-group legend {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 10px;
  padding: 0;
}

.task-basics {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.task-payment {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.task-requirements {
  align-items: center;
  display: flex;
  gap: 22px;
}

.task-helper {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.task-helper summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.task-helper-content {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
}

.task-helper-content .field {
  min-width: min(100%, 320px);
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-secondary-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.task-advanced {
  margin: 0;
}

.task-submit-row {
  display: flex;
  justify-content: flex-end;
}

.task-submit-row button {
  min-width: 220px;
}

.ai-instruction-field {
  min-width: 0;
}

.ai-draft-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  grid-column: 1 / -1;
  margin: -4px 0 0;
}

button {
  background: linear-gradient(135deg, var(--yellow), #ffe27a 52%, var(--yellow-dark));
  border-color: var(--yellow);
  color: #100d06;
  cursor: pointer;
  font-weight: 900;
}

button:hover {
  filter: brightness(1.05);
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.nav-form,
.inline-form {
  display: inline-flex;
  margin: 0;
}

.nav-form input,
.inline-form input {
  min-height: 0;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 420px;
}

.password-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.password-form input {
  min-width: 150px;
  width: 150px;
}

.password-form button,
.inline-form button {
  min-height: 34px;
  padding: 7px 10px;
}

.self-note {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
}

.status-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  text-transform: none;
}

.status-pill {
  background: rgba(53, 208, 162, 0.12);
  border: 1px solid rgba(53, 208, 162, 0.28);
  border-radius: 999px;
  color: var(--teal);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
  text-transform: uppercase;
}

.status-pill.cancelled,
.status-pill.rejected,
.status-pill.disabled {
  background: rgba(217, 74, 58, 0.14);
  border-color: rgba(217, 74, 58, 0.34);
  color: #ffb4aa;
}

.status-pill.completed,
.status-pill.pending_approval {
  background: rgba(241, 189, 40, 0.12);
  border-color: rgba(241, 189, 40, 0.32);
  color: var(--yellow);
}

.status-pill.started,
.status-pill.accepted,
.status-pill.assigned,
.status-pill.offered {
  background: rgba(74, 163, 255, 0.12);
  border-color: rgba(74, 163, 255, 0.32);
  color: #9fcaff;
}

.detail-hero {
  align-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(53, 208, 162, 0.16), transparent 220px),
    var(--charcoal);
  border-color: rgba(241, 189, 40, 0.22);
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.detail-hero h1 {
  margin: 2px 0 4px;
}

.detail-hero p:last-child {
  color: var(--muted);
  margin: 0;
}

.progress-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 14px;
}

.progress-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.progress-panel h3 {
  margin-top: 0;
}

.fact-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.fact-list div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
}

.fact-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fact-list dd {
  font-weight: 800;
  margin: 0;
}

.timeline {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 14px 0;
  padding: 0;
}

.timeline li {
  display: grid;
  gap: 12px;
  grid-template-columns: 20px 1fr;
  padding: 0 0 18px;
  position: relative;
}

.timeline li::before {
  background: var(--line);
  content: "";
  height: 100%;
  left: 9px;
  position: absolute;
  top: 18px;
  width: 2px;
}

.timeline li:last-child::before {
  display: none;
}

.timeline li > span {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 50%;
  height: 20px;
  position: relative;
  width: 20px;
  z-index: 1;
}

.timeline li.done > span {
  background: var(--yellow);
  border-color: var(--yellow);
}

.timeline strong,
.timeline small {
  display: block;
}

.timeline small {
  color: var(--muted);
  font-weight: 800;
  margin-top: 3px;
}

.evidence-list {
  display: grid;
  gap: 12px;
}

.inbox-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}

.conversation-list {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 5px;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 12px;
}

.conversation-item {
  border: 1px solid transparent;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 11px;
  position: relative;
  text-decoration: none;
}

.conversation-item:hover {
  background: rgba(53, 208, 162, 0.08);
  border-color: rgba(53, 208, 162, 0.24);
}

.conversation-item.active {
  background: rgba(241, 189, 40, 0.13);
  border-color: rgba(241, 189, 40, 0.38);
}

.conversation-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.conversation-item b {
  background: var(--danger);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  min-width: 19px;
  padding: 3px 6px;
  position: absolute;
  right: 10px;
  top: 10px;
  text-align: center;
}

.conversation-panel {
  background: rgba(7, 7, 7, 0.18);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
}

.conversation-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.conversation-heading h2,
.conversation-heading p {
  margin: 0;
}

.conversation-heading p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.message-thread {
  display: grid;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px 2px;
}

.message-bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: min(760px, 92%);
  padding: 11px 12px;
}

.message-bubble.worker {
  background: rgba(74, 163, 255, 0.10);
  justify-self: start;
}

.message-bubble.manager {
  background: rgba(53, 208, 162, 0.10);
  justify-self: end;
}

.message-meta {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.message-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.message-bubble p {
  margin: 8px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-task-link {
  font-size: 12px;
}

.message-reply,
.message-compose {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 10px 0 0;
}

.message-compose {
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) auto;
  margin: 0;
  padding-top: 14px;
}

.message-reply input,
.message-compose textarea,
.message-compose select {
  width: 100%;
}

.message-compose textarea {
  min-height: 72px;
}

.evidence-list article,
.manager-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.evidence-list article div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.evidence-list small {
  color: var(--muted);
  font-weight: 800;
}

.location-proof {
  align-items: center;
  background: rgba(53, 208, 162, 0.08);
  border: 1px solid rgba(53, 208, 162, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  margin: 10px 0;
  padding: 12px;
}

.location-proof div {
  display: grid;
  gap: 3px;
}

.location-proof span,
.location-proof small {
  color: var(--muted);
  font-weight: 800;
}

.distance-pill {
  background: rgba(241, 189, 40, 0.14);
  border: 1px solid rgba(241, 189, 40, 0.34);
  border-radius: 999px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.evidence-photo-link {
  display: inline-block;
  margin: 8px 0;
}

.evidence-photo {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  max-height: 320px;
  max-width: min(420px, 100%);
  object-fit: contain;
}

.detail-actions {
  margin-top: 10px;
}

.detail-actions .approval-form {
  display: flex;
  gap: 8px;
}

.detail-actions input {
  min-height: 32px;
}

.work-log-table td {
  vertical-align: top;
}

.work-log-main strong,
.work-log-detail {
  display: block;
}

.work-log-detail {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.nav-form button {
  background: linear-gradient(135deg, var(--yellow), #ffe27a 52%, var(--yellow-dark));
  border-color: var(--yellow);
  color: #100d06;
  min-height: 34px;
  padding: 7px 12px;
}

.login-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(53, 208, 162, 0.18), transparent 260px),
    radial-gradient(circle at 86% 82%, rgba(74, 163, 255, 0.16), transparent 300px),
    var(--wash);
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0;
  max-width: none;
  min-height: 100dvh;
  padding: 20px;
  width: 100%;
}

.login-card {
  border: 0;
  max-width: 430px;
  padding: 28px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.login-brand img {
  background: #070707;
  border: 1px solid rgba(241, 189, 40, 0.42);
  border-radius: 0;
  height: 74px;
  object-fit: cover;
  width: 74px;
}

.login-brand h1 {
  font-size: 34px;
  margin: 2px 0 0;
}

.login-copy {
  color: var(--muted);
  margin: 0 0 18px;
}

.login-card form,
.login-card label {
  align-items: stretch;
  display: flex;
  flex-direction: column;
}

.login-card label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  gap: 6px;
  width: 100%;
}

.login-card button {
  background: linear-gradient(135deg, var(--yellow), #ffe27a 52%, var(--yellow-dark));
  border-color: var(--yellow);
  color: #100d06;
  margin-top: 4px;
  width: 100%;
}

.form-error {
  background: rgba(217, 74, 58, 0.14);
  border: 1px solid rgba(217, 74, 58, 0.34);
  border-radius: 6px;
  color: var(--danger);
  font-weight: 800;
  margin: 0 0 8px;
  padding: 9px 10px;
}

.notice-list {
  background: rgba(241, 189, 40, 0.12);
  border-color: rgba(241, 189, 40, 0.34);
  box-shadow: none;
  padding: 10px 14px;
}

.notice-list p {
  font-weight: 800;
  margin: 4px 0;
}

.wa-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.wa-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.wa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.wa-actions button:first-child {
  background: linear-gradient(135deg, var(--yellow), #ffe27a 52%, var(--yellow-dark));
  border-color: var(--yellow);
  color: #100d06;
}

.wa-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-top: 14px;
}

.wa-facts {
  display: grid;
  gap: 9px 12px;
  grid-template-columns: 110px minmax(0, 1fr);
  margin: 0;
}

.wa-facts dt {
  color: var(--muted);
  font-weight: 900;
}

.wa-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.wa-qr {
  align-items: center;
  background: rgba(7, 7, 7, 0.38);
  border: 2px dashed rgba(241, 189, 40, 0.44);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 260px;
  padding: 14px;
  text-align: center;
}

.wa-qr img {
  background: #fff;
  border: 10px solid #fff;
  height: auto;
  max-width: 260px;
  width: 100%;
}

.wa-qr code {
  background: rgba(241, 189, 40, 0.15);
  border-radius: 6px;
  display: inline-block;
  font-size: 18px;
  padding: 8px 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  padding: 10px 9px;
  text-align: left;
}

th {
  background: #070707;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr:hover td {
  background: rgba(53, 208, 162, 0.07);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.table-actions .inline-form button {
  min-height: 32px;
  padding: 6px 9px;
}

.subscription-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.subscription-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.subscription-card-header {
  align-items: center;
  background: rgba(37, 99, 235, 0.08);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 18px;
}

.subscription-card-header h3,
.subscription-card-header p {
  margin: 0;
}

.subscription-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.subscription-usage span {
  background: rgba(37, 99, 235, 0.11);
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  font-size: 13px;
  padding: 7px 11px;
}

.subscription-form {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.25fr) minmax(260px, 1fr);
  padding: 18px;
}

.subscription-group {
  align-content: start;
  background: rgba(7, 7, 7, 0.24);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.subscription-group h4 {
  margin: 0 0 2px;
}

.subscription-group .field {
  margin: 0;
}

.subscription-group .field small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 5px;
}

.subscription-limits {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.subscription-limits h4 {
  grid-column: 1 / -1;
}

.subscription-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.row-editor {
  min-width: 220px;
}

.row-editor summary {
  cursor: pointer;
  font-weight: 900;
  padding: 7px 0;
}

.row-edit-form {
  align-items: stretch;
  background: rgba(7, 7, 7, 0.40);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin: 6px 0 0;
  max-width: 640px;
  padding: 12px;
}

.row-edit-form button,
.row-edit-form .checkbox-field {
  align-self: end;
}

@media (max-width: 760px) {
  .mobile-header,
  .page-intro,
  .wa-header {
    align-items: stretch;
    flex-direction: column;
  }

  .wa-actions {
    justify-content: flex-start;
  }

  main {
    margin-left: 0;
    padding: 14px;
  }

  .page-intro h1 {
    font-size: 28px;
  }

  .metric-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .assignment-form,
  .ai-draft-panel {
    grid-template-columns: 1fr;
  }

  .task-basics,
  .task-payment,
  .task-secondary-fields {
    grid-template-columns: 1fr;
  }

  .task-requirements,
  .task-helper-content {
    align-items: stretch;
    flex-direction: column;
  }

  .task-submit-row,
  .task-submit-row button {
    width: 100%;
  }

  .form-grid button,
  .ai-draft-panel button {
    width: 100%;
  }

  .row-edit-form {
    grid-template-columns: 1fr;
  }

  .subscription-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .subscription-usage {
    justify-content: flex-start;
  }

  .subscription-form,
  .subscription-limits {
    grid-template-columns: 1fr;
  }

  .subscription-limits h4,
  .subscription-actions {
    grid-column: 1;
  }

  .subscription-actions button {
    width: 100%;
  }

  .wa-grid {
    grid-template-columns: 1fr;
  }

  .wa-facts {
    grid-template-columns: 1fr;
  }

  .location-proof {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .inbox-layout,
  .message-compose {
    grid-template-columns: 1fr;
  }

  .conversation-list {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    max-height: 220px;
    padding-bottom: 10px;
    padding-right: 0;
  }

  .message-bubble {
    max-width: 100%;
  }

  .user-actions {
    min-width: 0;
  }

  .password-form,
  .password-form input,
  .password-form button,
  .inline-form,
  .inline-form button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .mobile-header {
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(7, 7, 7, 0.88);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .sidebar-toggle {
    min-height: 36px;
    padding: 7px 10px;
  }

  .mobile-brand {
    font-size: 17px;
    text-decoration: none;
  }

  .mobile-user {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-sidebar {
    box-shadow: 18px 0 42px rgba(0, 0, 0, 0.42);
    transform: translateX(-102%);
    transition: transform 160ms ease;
    z-index: 30;
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    background: rgba(0, 0, 0, 0.56);
    inset: 0;
    position: fixed;
    z-index: 25;
  }

  main {
    margin-left: 0;
  }
}

/* Final commercial-theme overrides must remain after responsive source rules. */
:root {
  --ink: #0b1220;
  --muted: #536174;
  --line: #d9e2ef;
  --paper: #ffffff;
  --field: #ffffff;
  --wash: #f5f7fb;
  --yellow: #155eef;
  --yellow-dark: #0f49c9;
  --teal: #12b981;
  --blue: #155eef;
  --danger: #dc2626;
  --charcoal: #0b1220;
  --shadow: 0 12px 36px rgba(15,23,42,.08);
}
body { background: radial-gradient(circle at top left, rgba(21,94,239,.10), transparent 32rem), #f5f7fb; color: var(--ink); font-family: Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; }
body::before { display: none; }
.app-sidebar { background: rgba(255,255,255,.94); border-right-color: var(--line); box-shadow: 8px 0 28px rgba(15,23,42,.05); color: var(--ink); }
.brand img { background: transparent; border: 0; height: 52px; object-fit: contain; width: 190px; }
.brand span { display: none; }
.app-sidebar nav a:hover { background: #eef4ff; border-color: #bfd2ff; color: var(--blue); }
.app-sidebar nav a.active, .app-sidebar nav a.active:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.user-chip { background: #eef4ff; border-color: #bfd2ff; color: var(--muted); }
.user-chip strong { color: var(--ink); }
.nav-label { color: #64748b; }
.card,.panel,.login-card,details,table { box-shadow: 0 8px 24px rgba(15,23,42,.05); }
input,select,textarea { background: #fff; color: var(--ink); border-color: var(--line); }
button,.button { border-radius: 8px; }
.login-page { background: radial-gradient(circle at 18% 12%, rgba(21,94,239,.14), transparent 34rem), #f5f7fb; }
.login-brand img {
  background: transparent;
  border: 0;
  border-radius: 0;
  height: auto;
  object-fit: contain;
  width: min(230px, 100%);
}
.login-brand > div { display: none; }
.login-card button {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(21, 94, 239, 0.22);
  color: #fff;
}
.login-card button:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  filter: none;
}
.page-intro {
  background:
    radial-gradient(circle at 82% 18%, rgba(53, 211, 154, 0.22), transparent 18rem),
    linear-gradient(135deg, #155eef 0%, #0f49c9 58%, #0e7490 100%);
  border-color: rgba(21, 94, 239, 0.28);
  box-shadow: 0 14px 34px rgba(21, 94, 239, 0.18);
}
.page-intro .eyebrow { color: #dbeafe; }
.page-intro p:last-child { color: #e0f2fe; }
button,
.button-link,
.wa-actions button:first-child {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
button:hover,
.button-link:hover,
.wa-actions button:first-child:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  color: #fff;
  filter: none;
}
button.danger,
button.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.sidebar-footer .nav-form button {
  background: #eef4ff;
  border-color: #bfd2ff;
  color: var(--blue);
  box-shadow: none;
}
.sidebar-footer .nav-form button:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
@media (max-width:900px) { .mobile-header { background: rgba(255,255,255,.95); } }

.recurring-hero {
  background: linear-gradient(135deg, #071528, #0f49c9 68%, #0e7490);
  color: #fff;
}
.recurring-hero p:last-child { color: #dbeafe; max-width: 760px; }
.recurring-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.recurring-span-2 { grid-column: 1 / -1; }
.coordinate-help {
  background: #eef4ff;
  border: 1px solid #bfd2ff;
  border-radius: 10px;
  justify-content: center;
  padding: 12px 14px;
}
.weekday-field {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  padding: 14px;
}
.weekday-field legend { color: var(--muted); font-size: 13px; font-weight: 800; padding: 0 6px; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 10px; }
.weekday-options label { cursor: pointer; }
.weekday-options input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-options span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: block;
  font-size: 13px;
  font-weight: 800;
  min-width: 52px;
  padding: 8px 12px;
  text-align: center;
}
.weekday-options input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.recurring-photo { align-self: end; min-height: 46px; }
.recurring-submit {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #bfd2ff;
  border-radius: 12px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px;
}
.recurring-submit p { color: var(--muted); margin: 0; }
.service-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
  padding: 20px;
}
.service-card.selected { border-color: var(--blue); box-shadow: 0 10px 28px rgba(21,94,239,.15); }
.service-card-head { align-items: center; display: flex; justify-content: space-between; }
.service-card h3 { margin: 16px 0 4px; }
.service-card > p { color: var(--muted); margin: 0 0 16px; }
.service-card dl { display: grid; gap: 10px; margin: 0 0 18px; }
.service-card dl div { border-top: 1px solid var(--line); padding-top: 9px; }
.service-card dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.service-card dd { margin: 2px 0 0; }
.table-wrap { overflow-x: auto; }
@media (max-width: 1100px) { .service-card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .recurring-form,.service-card-grid { grid-template-columns: 1fr; }
  .recurring-span-2 { grid-column: 1; }
  .recurring-submit { align-items: stretch; flex-direction: column; }
}
/* Reporting tables can be wider than operational forms without breaking the page. */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.report-filters {
  align-items: end;
}

.report-actions {
  justify-content: flex-end;
}

.report-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.report-totals span {
  background: #eef4ff;
  border: 1px solid #c9d9fb;
  border-radius: 999px;
  color: #17345f;
  padding: 0.45rem 0.75rem;
}
