:root {
  --bg: #f6f3ee;
  --panel: #ffffff;
  --panel-soft: #f8faf7;
  --text: #1c2530;
  --muted: #68717c;
  --line: #dce2df;
  --green: #2f7d5a;
  --amber: #b66b21;
  --red: #a33d3d;
  --blue: #316c9e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #16201b;
  color: #f4f6f1;
  padding: 24px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: #2f7d5a;
  font-size: 14px;
}

.nav-list {
  display: grid;
  gap: 4px;
  margin-top: 34px;
}

.nav-list a {
  border-radius: 8px;
  color: #dce7df;
  padding: 10px 12px;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-link-with-badge {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.nav-badge {
  background: var(--red);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-width: 22px;
  padding: 2px 7px;
}

.main-panel {
  padding: 32px;
}

.notification-strip {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(49, 108, 158, 0.22);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(28, 37, 48, 0.08);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 16px;
}

.notification-strip h2 {
  margin-bottom: 4px;
}

.notification-strip p {
  color: var(--muted);
  margin-bottom: 0;
}

.notification-strip a:not(.button-primary) {
  color: var(--blue);
  font-weight: 700;
}

.notification-icon {
  background: rgba(49, 108, 158, 0.14);
  border-radius: 999px;
  color: var(--blue);
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
}

.notification-icon svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card,
.module-panel,
.login-panel,
.table-panel,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(28, 37, 48, 0.04);
}

.metric-card {
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 20px;
}

.metric-label,
.metric-note {
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  font-size: 42px;
  line-height: 1;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.module-panel {
  min-height: 150px;
  padding: 22px;
}

.module-panel p {
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.5;
}

.login-panel {
  max-width: 420px;
  padding: 24px;
}

.login-panel form {
  display: grid;
  gap: 14px;
}

.login-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

.login-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.login-panel button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 14px;
}

.onboarding-panel,
.timeline-panel,
.quick-actions-panel {
  margin-bottom: 18px;
  min-height: auto;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.attention-panel {
  margin-bottom: 24px;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.attention-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  gap: 10px;
  min-height: 176px;
  padding: 16px;
}

.attention-card-warning {
  border-left-color: var(--amber);
}

.attention-card-danger {
  border-left-color: var(--red);
}

.attention-card-empty {
  border-left-color: var(--line);
}

.attention-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.attention-card-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.attention-card-head strong {
  font-size: 32px;
  line-height: 1;
}

.attention-card p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.attention-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.attention-card li {
  overflow-wrap: anywhere;
}

.attention-link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  justify-self: start;
}

.next-action-panel {
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px;
}

.next-action-panel h2 {
  margin-bottom: 6px;
}

.next-action-panel p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 70ch;
}

.next-action-warning {
  border-left-color: var(--amber);
}

.next-action-danger {
  border-left-color: var(--red);
}

.next-action-done {
  border-left-color: var(--green);
}

.next-action-muted {
  border-left-color: var(--line);
}

.access-denied {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  max-width: 620px;
  padding: 28px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.button-primary,
.button-secondary {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 12px;
}

.button-primary {
  background: var(--green);
  color: #ffffff;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--blue);
}

.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  gap: 14px;
  max-width: 760px;
  padding: 20px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

.form-field input[type="checkbox"] {
  justify-self: start;
  min-height: auto;
  width: auto;
}

.form-panel button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  justify-self: start;
  min-height: 40px;
  padding: 9px 14px;
}

.form-errors,
.field-errors {
  color: var(--red);
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.empty-state {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 10px 0;
  white-space: normal;
}

.empty-state span {
  color: var(--muted);
}

.empty-state-panel {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 18px;
  padding: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.compact-filter {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.fleet-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) minmax(160px, 200px) auto;
}

.table-panel {
  overflow-x: auto;
  padding-bottom: 4px;
}

.secondary-table {
  margin-top: 18px;
  padding: 18px;
}

.secondary-table h2 {
  margin-bottom: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
}

.filter-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
}

.filter-panel button {
  align-self: end;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 14px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 7px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

tbody td {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transition: background-color 0.15s ease;
}

tbody tr:nth-child(even) td {
  background: #f7faf8;
}

tbody tr:hover td {
  background: #edf6f1;
}

tbody td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

tbody td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

tbody td:only-child {
  border-radius: 8px;
}

.table-action-header,
.table-open-cell {
  text-align: right;
  width: 1%;
}

.table-open-button {
  align-items: center;
  border: 1px solid rgba(47, 125, 90, 0.32);
  border-radius: 8px;
  background: rgba(47, 125, 90, 0.1);
  color: var(--green);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 11px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.table-open-button:hover,
.table-open-button:focus-visible {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
  outline: none;
}

.status-chip {
  border-radius: 999px;
  background: rgba(47, 125, 90, 0.12);
  color: var(--green);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 8px;
}

.status-chip-muted {
  background: rgba(104, 113, 124, 0.12);
  color: var(--muted);
}

.status-chip-client {
  background: rgba(49, 108, 158, 0.14);
  color: var(--blue);
}

.count-badge-hot {
  background: rgba(163, 61, 61, 0.14);
  color: var(--red);
  font-weight: 800;
}

.unread-request-row td {
  background: rgba(49, 108, 158, 0.1);
  border-color: rgba(49, 108, 158, 0.24);
}

.unread-dot {
  background: var(--red);
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  margin-left: 7px;
  width: 9px;
}

.page-note {
  color: var(--muted);
  margin: 8px 0 0;
}

.client-request-panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(49, 108, 158, 0.22);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px;
}

.client-request-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.actions-cell a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
}

.availability-reason {
  color: var(--muted);
  white-space: normal;
}

.checkbox-filter input {
  justify-self: start;
  min-height: auto;
  width: auto;
}

.calendar-panel {
  margin-bottom: 18px;
  padding: 18px;
}

.calendar-cell {
  border-radius: 8px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-width: 76px;
  padding: 6px 8px;
}

.calendar-cell-free {
  background: rgba(47, 125, 90, 0.12);
  color: var(--green);
}

.calendar-cell-busy {
  background: rgba(49, 108, 158, 0.14);
  color: var(--blue);
}

.calendar-cell-return {
  background: rgba(182, 107, 33, 0.16);
  color: var(--amber);
}

.calendar-cell-blocked {
  background: rgba(163, 61, 61, 0.14);
  color: var(--red);
}

.timeline-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-height: 42px;
  padding: 10px;
  text-align: center;
}

.timeline-step-done {
  background: rgba(47, 125, 90, 0.12);
  color: var(--green);
}

.timeline-step-current {
  border-color: rgba(49, 108, 158, 0.4);
  background: rgba(49, 108, 158, 0.14);
  color: var(--blue);
}

.count-badge {
  border-radius: 999px;
  background: rgba(104, 113, 124, 0.12);
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  padding: 3px 7px;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.task-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
  padding: 14px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  display: grid;
  gap: 5px;
  padding: 10px;
}

.task-card span,
.task-card small {
  color: var(--muted);
}

.quick-actions-panel form {
  margin: 0;
}

.quick-actions-panel button {
  cursor: pointer;
  font: inherit;
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-panel {
    padding: 22px;
  }

  .page-header,
  .metric-grid,
  .workspace-grid,
  .attention-grid,
  .filter-panel,
  .detail-grid,
  .timeline-list,
  .task-board {
    grid-template-columns: 1fr;
  }

  .button-row {
    justify-content: flex-start;
  }

  .page-header {
    display: grid;
  }

  .section-heading {
    display: grid;
  }

  .next-action-panel {
    align-items: flex-start;
    display: grid;
  }
}
