/* =========================================================================
   HLS Property Care — design system
   Palette drawn from hansonlandandsea.com: deep sea green (header),
   warm ivory (light accent), dusty coastal blue (accent), charcoal ink.
   Class names are unchanged from the original markup; this file restyles
   every view in place. Tokens live in :root so the whole app stays in sync.
   ========================================================================= */

:root {
  /* Brand + neutrals */
  --teal-900: #052b1d;
  --teal-800: #0a3a28;
  --teal-700: #175c40;
  --teal-600: #1f7551;
  --teal-50: #e9f2ec;
  --coastal: #7cacbb;

  --ink: #1c1c1c;
  --ink-soft: #46504a;
  --ink-faint: #68716a;
  --ink-ghost: #9aa39b;

  --bg: #f5f5eb;
  --surface: #ffffff;
  --surface-sunken: #f8f8f0;
  --border: #e4e6d8;
  --border-strong: #cdd2bf;

  /* Status hues */
  --red-bg: #fff4ed;
  --red-border: #f2c2b4;
  --red-ink: #9a2a16;
  --amber-bg: #fffaeb;
  --amber-border: #f3d18a;
  --amber-ink: #7a5300;
  --green-bg: #ecfdf3;
  --green-border: #aadcc6;
  --green-ink: #05663c;

  /* Shape + depth */
  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 33, 36, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 33, 36, 0.06), 0 1px 2px rgba(16, 33, 36, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 33, 36, 0.08), 0 2px 4px rgba(16, 33, 36, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 33, 36, 0.12);

  --focus: 0 0 0 3px rgba(31, 117, 81, 0.30);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05", "ss01";
}

a {
  color: var(--teal-700);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

a:hover {
  color: var(--teal-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

::selection {
  background: rgba(31, 117, 81, 0.16);
}

/* ------------------------------------------------------------------ shell */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell.has-sidebar {
  flex-direction: row;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 4px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--teal-600), var(--coastal));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.brand.has-badge::before {
  content: none;
}

.brand-badge {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
}

.mobile-bar .brand-badge {
  width: 1.6rem;
  height: 1.6rem;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
}

.auth-bar {
  padding: 1.1rem 1.5rem;
}

.auth-bar .brand,
.auth-bar .brand:hover {
  color: var(--teal-900);
}

/* The badge art is white; give it the sea-green stamp disc on light pages. */
.auth-bar .brand-badge {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--teal-700), var(--teal-900) 70%);
  box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------------------- sidebar */

.sidebar {
  flex: 0 0 250px;
  width: 250px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.15rem 0.8rem 1rem;
  background: linear-gradient(180deg, var(--teal-800), var(--teal-900));
}

.sidebar-brand {
  padding: 0 0.6rem;
}

.side-nav {
  display: grid;
  gap: 0.15rem;
  align-content: start;
}

.side-link {
  display: flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.side-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

summary.side-link {
  list-style: none;
  user-select: none;
}

summary.side-link::-webkit-details-marker {
  display: none;
}

.side-caret {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.15rem;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transform: rotate(-45deg);
  transition: transform 0.18s var(--ease);
}

.side-group[open] > summary .side-caret {
  transform: translateY(-0.1rem) rotate(45deg);
}

.side-sublist {
  display: grid;
  gap: 1px;
  margin: 0.2rem 0 0.4rem 0.85rem;
  padding-left: 0.6rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.side-sublink {
  display: block;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.side-sublink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.side-sublink.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.side-sublink-more {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 0.45rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.side-foot .inline-form {
  display: block;
}

.side-user {
  display: grid;
  gap: 0.1rem;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  transition: background 0.15s var(--ease);
}

.side-user:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.side-user.active {
  background: rgba(255, 255, 255, 0.16);
}

.side-user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-user-meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  text-transform: capitalize;
}

.side-signout,
.side-signout:hover {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-size: 0.85rem;
  box-shadow: none;
}

.side-signout:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-toggle-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mobile-bar {
  display: none;
}

/* ------------------------------------------------------------- page frame */

.page {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
}

.auth-page {
  width: min(420px, calc(100% - 2rem));
  margin: 9vh auto;
  flex: 1;
}

/* --------------------------------------------------------- surfaces/cards */

.panel,
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 1.35rem 1.4rem;
}

.card {
  padding: 1.1rem 1.15rem;
  transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

a.card:hover,
.card.interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------- layout */

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 0.85rem;
}

/* Grid items default to min-width:auto, which lets long nowrap rows blow the
   track out past the viewport on small screens. Let them shrink instead. */
.grid > *,
.stack > *,
.inbox-sections > *,
.inbox-section > * {
  min-width: 0;
}

.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ------------------------------------------------------------ typography */

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
}

h1 {
  font-size: 1.7rem;
  font-weight: 700;
}

h2 {
  font-size: 1.2rem;
  font-weight: 650;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
}

p {
  margin: 0 0 0.75rem;
}

.muted {
  color: var(--ink-faint);
}

.muted-sm {
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- metric */

.metric {
  display: grid;
  gap: 0.3rem;
}

.metric .muted,
.metric > span:first-child {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.metric strong {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--teal-800);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.filter-shell {
  margin: 0 0 1rem;
}

.filter-toggle-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.filter-disclosure {
  display: inline-flex;
  min-height: 2rem;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.1rem;
  color: var(--teal-700);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.filter-disclosure:hover {
  color: var(--teal-800);
}

.filter-chevron {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  transform-origin: center;
  transition: transform 0.18s var(--ease);
}

.filter-toggle-input:checked + .filter-actions .filter-chevron {
  transform: translateY(0.1rem) rotate(225deg);
}

.filter-toggle-input:focus-visible + .filter-actions .filter-disclosure {
  box-shadow: var(--focus);
}

.filter-panel {
  display: none;
  margin-top: 0.75rem;
}

.filter-toggle-input:checked ~ .filter-panel {
  display: block;
}

.filter-panel .toolbar {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.quick-filter.active {
  color: var(--teal-900);
  border-color: var(--teal-700);
  background: var(--teal-50);
  box-shadow: 0 0 0 2px rgba(31, 117, 81, 0.34), var(--shadow-sm);
}

.quick-filter.active:hover {
  color: var(--teal-900);
  border-color: var(--teal-800);
  background: #dcebe2;
  box-shadow: 0 0 0 2px rgba(23, 92, 64, 0.46), var(--shadow-sm);
}

/* ----------------------------------------------------------------- forms */

label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.88rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 400;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--teal-700);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-ghost);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: var(--focus);
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2.2rem;
}

.check-control {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-weight: 400;
}

/* --------------------------------------------------------------- buttons */

.button,
button {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--teal-700);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.95rem;
  color: #fff;
  background: var(--teal-700);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease), transform 0.05s var(--ease);
}

.button:hover,
button:hover {
  background: var(--teal-800);
  border-color: var(--teal-800);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.button:active,
button:active {
  transform: translateY(0.5px);
}

.button:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.button.secondary,
button.secondary {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--surface);
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--surface-sunken);
  border-color: var(--ink-ghost);
  color: var(--ink);
}

.button.danger,
button.danger {
  border-color: #b3402c;
  background: #b3402c;
}

.button.danger:hover,
button.danger:hover {
  border-color: #962f1d;
  background: #962f1d;
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

button.is-loading::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: checklist-spin 0.75s linear infinite;
}

@keyframes checklist-spin {
  to {
    transform: rotate(360deg);
  }
}

.inline-form {
  display: inline;
}

/* ----------------------------------------------------------------- table */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.table thead th {
  color: var(--ink-faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border-strong);
}

.table thead th:first-child {
  border-top-left-radius: var(--radius-sm);
}

.table thead th:last-child {
  border-top-right-radius: var(--radius-sm);
}

.table tbody tr {
  transition: background 0.12s var(--ease);
}

.table tbody tr:hover {
  background: var(--surface-sunken);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.sort-link:hover {
  color: var(--teal-700);
  text-decoration: none;
}

.sort-link.active {
  color: var(--teal-700);
}

.sort-arrow {
  display: inline-flex;
  width: 0.8rem;
  justify-content: center;
  color: var(--ink-ghost);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.sort-link.active .sort-arrow {
  color: var(--teal-700);
}

.sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sort-bar-label {
  color: var(--ink-ghost);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pagination-summary,
.pagination-page {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.button.disabled,
button.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ----------------------------------------------------------------- badge */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.6rem;
  color: var(--ink-soft);
  background: var(--surface-sunken);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.badge.high,
.badge.urgent {
  border-color: var(--red-border);
  color: var(--red-ink);
  background: var(--red-bg);
}

.badge.medium,
.badge.normal {
  border-color: var(--amber-border);
  color: var(--amber-ink);
  background: var(--amber-bg);
}

.badge.low,
.badge.good,
.badge.active,
.badge.stable {
  border-color: var(--green-border);
  color: var(--green-ink);
  background: var(--green-bg);
}

/* ----------------------------------------------------------------- flash */

.flash {
  margin: 0 0 1.25rem;
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  color: var(--green-ink);
  background: var(--green-bg);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.flash.error {
  border-color: var(--red-border);
  color: var(--red-ink);
  background: var(--red-bg);
}

/* ------------------------------------------------------------------ tabs */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.tabs a {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  background: var(--surface);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.tabs a:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}

/* -------------------------------------------------------------- timeline */

.timeline {
  border-left: 2px solid var(--border-strong);
  padding-left: 1.25rem;
  margin-left: 0.35rem;
}

.timeline-item {
  display: block;
  position: relative;
  margin: 0 0 1.25rem;
}

.timeline-link {
  color: inherit;
  text-decoration: none;
}

.timeline-link:hover strong {
  color: var(--teal-700);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 1px);
  top: 0.45rem;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: -0.3rem;
  border-radius: 50%;
  background: var(--teal-600);
  box-shadow: 0 0 0 3px var(--bg);
}

/* ----------------------------------------------------------- page header */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.page-header h1 {
  margin: 0;
}

.page-header p {
  margin: 0.25rem 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --------------------------------------------------------------- subnav */

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 1.25rem 0 1.75rem;
  border-bottom: 1px solid var(--border-strong);
}

.subnav a {
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid transparent;
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.subnav a:hover {
  color: var(--teal-800);
  text-decoration: none;
}

.subnav a.active {
  color: var(--teal-800);
  border-bottom-color: var(--teal-700);
}

.subnav .count {
  margin-left: 0.4rem;
  color: var(--ink-ghost);
  font-weight: 700;
  font-size: 0.82rem;
}

/* --------------------------------------------------------- section head */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.section-head h2 {
  margin: 0;
}

/* ----------------------------------------------------------------- empty */

.empty {
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-sunken);
  color: var(--ink-faint);
  text-align: center;
}

.empty p {
  margin: 0 0 0.85rem;
}

/* --------------------------------------------------------- definition list */

.dl {
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
}

.dl dt {
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 0.88rem;
}

.dl dd {
  margin: 0;
}

/* AI Suggestions: card list that lets each suggestion use the full width
   instead of cramming everything into a single table cell. */
.proposals {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proposal-card {
  padding: 1.1rem 1.25rem;
}

.proposal-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.proposal-headline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.proposal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
}

a.meta-chip:hover {
  color: var(--teal-700);
}

.proposal-title {
  margin: 0;
  font-size: 1rem;
}

.proposal-card-body {
  margin-top: 0.75rem;
}

.proposal-summary {
  margin: 0 0 0.6rem;
}

.proposal-source {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
}

.proposal-source .source-label {
  color: var(--ink-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.proposal-source .source-page {
  color: var(--ink-soft);
  font-weight: 600;
}

.proposal-fields {
  margin-top: 0.5rem;
  gap: 0.3rem 1rem;
  font-size: 0.9rem;
}

/* Inline auto-saving controls (asset link, approval target). */
.proposal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.proposal-controls .control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.proposal-controls .control-label {
  color: var(--ink-faint);
  font-size: 0.84rem;
  font-weight: 600;
}

.proposal-controls select {
  min-width: 11rem;
}

.save-cue {
  min-width: 4.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-ghost);
}

.save-cue.saving {
  color: var(--ink-faint);
}

.save-cue.saved {
  color: var(--green-ink);
}

.save-cue.error {
  color: var(--red-ink);
}

.proposal-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}

.recheck-link {
  min-height: auto;
  padding: 0;
  font-size: 0.85rem;
}

/* ----------------------------------------------------------------- forms */

.form-narrow {
  width: 100%;
}

.page:has(.form-narrow) .page-header {
  width: 100%;
  margin-inline: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.button.small,
button.small {
  min-height: 2rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.82rem;
}

.button.link,
button.link {
  min-height: auto;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--teal-700);
  font-weight: 600;
}

.button.link:hover,
button.link:hover {
  background: none;
  color: var(--teal-600);
  text-decoration: underline;
  box-shadow: none;
}

/* -------------------------------------------------------------- settings */

.settings-layout {
  align-items: start;
}

.password-fields {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.password-fields legend {
  padding: 0 0.3rem;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.88rem;
}

.g-recaptcha {
  margin: 0.25rem 0;
}

/* ---------------------------------------------------------------- health */

.health {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 650;
}

.health-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--ink-ghost);
  box-shadow: 0 0 0 4px rgba(152, 162, 179, 0.15);
}

.health-dot.stable {
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.15);
}

.health-dot.attention {
  background: #f79009;
  box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.15);
}

.health-dot.risk {
  background: #d92d20;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.15);
}

/* ------------------------------------------------------------- list rows */

.list-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

a.list-row {
  color: inherit;
  text-decoration: none;
}

a.list-row:hover,
.list-row-main:hover {
  color: inherit;
  background: var(--surface-sunken);
  text-decoration: none;
}

.list-row-main {
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.list-row-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row .label {
  display: block;
  font-weight: 500;
}

/* ------------------------------------------------------------- dashboard */

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.dashboard-layout .panel,
.dashboard-secondary-grid .panel {
  align-content: start;
}

.dashboard-layout .section-head {
  align-items: flex-start;
}

.dashboard-layout .section-head p {
  margin: 0.2rem 0 0;
}

.inbox-sections {
  display: grid;
  gap: 1rem;
}

.inbox-section {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.inbox-section:first-child {
  padding-top: 0;
  border-top: none;
}

.inbox-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.inbox-section-title {
  color: var(--ink);
  font-weight: 650;
}

.inbox-section-title:hover {
  color: var(--teal-700);
}

.dashboard-layout .list-row,
.dashboard-planning-panel .list-row,
.property-health-panel .list-row {
  align-items: flex-start;
}

.dashboard-layout .list-row > a:first-child,
.dashboard-layout .list-row > span:first-child,
.dashboard-layout .list-row-main,
.dashboard-planning-panel .list-row > span:first-child,
.property-health-panel .list-row > span:first-child {
  min-width: 0;
  flex: 1;
}

.dashboard-layout .list-row .label,
.dashboard-layout .list-row .muted-sm,
.dashboard-planning-panel .list-row .label,
.dashboard-planning-panel .list-row .muted-sm,
.property-health-panel .list-row .label,
.property-health-panel .list-row .muted-sm {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-layout .queue-foot,
.dashboard-planning-panel .queue-foot {
  justify-self: start;
  margin-top: 0.2rem;
  font-weight: 600;
}

.property-health-panel .health {
  align-items: flex-start;
}

.property-health-panel .health-dot {
  flex: 0 0 auto;
  margin-top: 0.22rem;
}

.dashboard-secondary-grid {
  align-items: start;
  margin-top: 1rem;
}

/* ------------------------------------------------------------ work items */

.work-item-layout {
  align-items: start;
}

.work-item-summary {
  align-content: start;
}

/* --------------------------------------------------------- notifications */

.notification-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s var(--ease);
}

.notification-item:hover {
  box-shadow: var(--shadow-md);
}

.notification-item.unread {
  border-left: 3px solid var(--teal-600);
}

.notification-item h2 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.notification-recipients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0.45rem;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 18rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  color: var(--ink-soft);
  background: var(--surface-sunken);
  font-size: 0.78rem;
  font-weight: 600;
}

.recipient-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------- tasks */

.task-list {
  display: grid;
  gap: 0.85rem;
}

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}

.task-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.task-title {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

/* --------------------------------------------------------------- crumbs */

.crumbs {
  margin: 0 0 0.75rem;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

.crumbs a {
  color: var(--ink-faint);
}

.crumbs a:hover {
  color: var(--teal-700);
}

/* ---------------------------------------------------------------- emails */

.email-body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.email-shell {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 24px;
  color: var(--ink);
  font-family: Arial, sans-serif;
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .shell.has-sidebar {
    flex-direction: column;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(180deg, var(--teal-800), var(--teal-900));
    box-shadow: var(--shadow-md);
  }

  .menu-toggle {
    display: inline-flex;
    min-height: 2.1rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    cursor: pointer;
  }

  .sidebar {
    display: none;
  }

  .sidebar-toggle-input:checked ~ .sidebar {
    display: flex;
    position: fixed;
    top: 3.55rem;
    bottom: 0;
    left: 0;
    z-index: 55;
    width: min(19rem, 86vw);
    height: auto;
    box-shadow: var(--shadow-lg);
  }

  .sidebar-toggle-input:focus-visible ~ .mobile-bar .menu-toggle {
    box-shadow: var(--focus);
  }

  .page {
    padding: 1.5rem 1.1rem 3rem;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14.5px;
  }

  /* Wide operational tables scroll sideways instead of stretching the page. */
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .split,
  .page-header,
  .task-card {
    align-items: stretch;
    flex-direction: column;
  }

  .task-meta {
    justify-content: flex-start;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    font-size: 1.45rem;
  }
}

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

.checklist-editor {
  border: 1px solid var(--line, #d8d8d8);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checklist-editor legend {
  font-weight: 600;
  padding: 0 0.3rem;
}

.checklist-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.checklist-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.checklist-row.completed input[type="text"] {
  color: var(--ink-soft);
  background: var(--surface-sunken);
}

.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.checklist-step {
  align-items: flex-start;
}

.checklist-step .muted-sm {
  display: block;
}

.checklist-step.done {
  color: var(--ink-soft);
}

.inline-form[data-checklist-suggestion-form] {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checklist-suggestion-status {
  min-height: 1.25rem;
}

.checklist-suggestion-status.success {
  color: var(--green-ink);
}

.checklist-suggestion-status.error {
  color: var(--red-ink);
}
