:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --ink: #202624;
  --muted: #68706c;
  --line: #dfe4df;
  --panel: #ffffff;
  --panel-soft: #f7f8f6;
  --nav: #202824;
  --nav-soft: #2d3732;
  --nav-glow: #d7b86f;
  --accent: #5f7f74;
  --accent-strong: #46685c;
  --accent-soft: #e7eeea;
  --shadow: 0 18px 42px rgba(32, 38, 36, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-mode {
  background:
    radial-gradient(circle at 18% 12%, rgba(215, 184, 111, 0.22), transparent 18rem),
    radial-gradient(circle at 84% 30%, rgba(95, 127, 116, 0.22), transparent 20rem),
    linear-gradient(135deg, #f8faf7, #edf2ee);
}

body.auth-mode .app-layout {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 7px;
  font-size: 1.06rem;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.app-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background:
    radial-gradient(circle at 20% 0%, rgba(215, 184, 111, 0.28), transparent 15rem),
    radial-gradient(circle at 100% 38%, rgba(111, 151, 139, 0.32), transparent 18rem),
    linear-gradient(180deg, #263d36 0%, #1f312c 48%, #253129 100%);
  color: #fff;
  padding: 24px;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%);
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7dc, #dbeee7);
  color: #2f5e52;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(14, 39, 33, 0.2);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand span {
  color: #d5e1db;
  font-size: 0.82rem;
}

.nav-list {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d8e6df;
  font-weight: 800;
  padding: 0 12px;
  text-align: left;
  user-select: none;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-1px);
}

.nav-link.active {
  box-shadow:
    inset 3px 0 0 #e1c77f,
    0 10px 22px rgba(14, 39, 33, 0.16);
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #e5cc82;
  font-size: 1.1rem;
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 16px;
}

.sidebar-card span,
.sidebar-card small {
  display: block;
  color: #d4e0db;
}

.sidebar-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 2rem;
}

.signout-button {
  align-self: center;
  width: min(160px, 100%);
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1)),
    rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 28px rgba(14, 39, 33, 0.16);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.signout-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.13)),
    rgba(255, 255, 255, 0.12);
}

.content-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 44px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-chip,
.month-control,
.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.month-control {
  position: relative;
  display: grid;
  min-width: 176px;
  gap: 6px;
  border-color: #d7dfda;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 247, 0.98)),
    #fff;
  box-shadow:
    0 12px 26px rgba(32, 38, 36, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 10px 38px 10px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.month-control::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 18px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent-strong);
  pointer-events: none;
}

.month-control:hover,
.month-control:focus-within {
  transform: translateY(-1px);
  border-color: #b8cbc2;
  box-shadow:
    0 16px 32px rgba(32, 38, 36, 0.1),
    0 0 0 4px rgba(95, 127, 116, 0.1);
}

.month-control span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.month-control select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-weight: 900;
  cursor: pointer;
  outline: 0;
}

.select-tile,
.field-control {
  position: relative;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.select-tile::after,
.field-control::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 21px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent-strong);
  pointer-events: none;
}

.select-tile:hover,
.select-tile:focus-within,
.field-control:hover,
.field-control:focus-within {
  transform: translateY(-1px);
}

.select-tile select,
.field-control select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  padding: 0 38px 0 15px;
  font-weight: 900;
  cursor: pointer;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.select-tile select:focus,
.field-control select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(95, 127, 116, 0.14);
  background: #fff;
}

.select-static {
  min-height: 30px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 0.96rem;
}

.month-control.static-control::after {
  display: none;
}

.status-pill {
  border-color: #cad8d1;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.command-panel,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.command-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  margin-bottom: 18px;
}

.command-panel p {
  margin-bottom: 0;
}

.command-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.logger-control {
  display: grid;
  gap: 6px;
}

.logger-control span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  outline: none;
  padding: 0 15px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(95, 127, 116, 0.14);
}

.command-form button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-strong);
  color: white;
  font-weight: 900;
  padding: 0 22px;
  box-shadow: 0 10px 22px rgba(70, 104, 92, 0.18);
}

.parse-preview {
  grid-column: 1 / -1;
  min-height: 24px;
  margin-bottom: 0;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  box-shadow: none;
}

.metric-card.highlight {
  background: linear-gradient(135deg, #202824, #33413a);
  color: #fff;
}

.metric-card.highlight span,
.metric-card.highlight small {
  color: #c5d5e8;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card span {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 11px 0 5px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0;
}

.metric-card small {
  line-height: 1.4;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.client-panel {
  min-height: 480px;
}

.client-analytics {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(260px, 1.05fr);
  gap: 24px;
  align-items: center;
}

.donut-stage {
  display: grid;
  min-height: 330px;
  place-items: center;
  border-radius: 8px;
  background: #f8faf7;
}

.donut {
  position: relative;
  display: grid;
  width: min(330px, 72vw);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--line) 0 360deg);
  box-shadow:
    0 24px 54px rgba(70, 104, 92, 0.16),
    inset 0 0 22px rgba(255, 255, 255, 0.7);
}

.donut::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(#4f8a70, #7a6f9b, #92795f, #66838a, #4f8a70);
  filter: blur(16px);
  opacity: 0.2;
  z-index: -1;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(221, 229, 239, 0.85);
}

.donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.donut-center span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.donut-center strong {
  font-size: 2.1rem;
}

.legend,
.bar-list {
  display: grid;
  gap: 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 11px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.92rem;
  padding: 12px;
}

.legend-item strong {
  color: var(--ink);
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 5px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.bar-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-hours {
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}

.bar-track {
  grid-column: 1 / -1;
  height: 13px;
  border-radius: 999px;
  background: #e9eef6;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.client-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.muted-row {
  opacity: 0.55;
}

.muted-row .bar-fill {
  min-width: 0;
}

.people-panel {
  box-shadow: none;
}

.department-panel {
  margin-bottom: 18px;
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.person-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  box-shadow: none;
}

.person-card:hover,
.person-card.selected {
  border-color: #c4d2cb;
  background: #fff;
  box-shadow: 0 14px 28px rgba(70, 104, 92, 0.1);
}

.person-card.selected {
  outline: 3px solid rgba(95, 127, 116, 0.12);
}

.person-card .bar-track {
  grid-column: 1 / -1;
}

.person-card strong,
.person-card span {
  display: block;
}

.person-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.person-card b {
  font-size: 1.08rem;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.logger-detail {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.detail-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.detail-heading span {
  color: var(--accent-strong);
  font-weight: 900;
}

.log-panel {
  box-shadow: none;
}

.manual-panel {
  margin-bottom: 18px;
  box-shadow: none;
}

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

.manual-form label {
  display: grid;
  gap: 6px;
}

.manual-form label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-form .wide-field {
  grid-column: span 4;
}

.manual-form button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 900;
  padding: 0 18px;
}

.quick-log-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.filter-control {
  width: min(280px, 100%);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1220px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  line-height: 1.35;
}

td input,
td select {
  min-height: 40px;
  padding: 0 10px;
}

tbody tr:hover {
  background: #f9fbff;
}

.number-cell {
  text-align: right;
  font-weight: 900;
}

.number-input {
  text-align: right;
}

.actions-cell {
  width: 120px;
  text-align: right;
}

.ghost-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  padding: 0 12px;
}

.ghost-button.primary {
  border-color: #c4d2cb;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.action-stack {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.editing-row {
  background: #f9fbff;
}

.client-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.client-badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--badge-color);
}

.thread-parent td {
  background: #fff;
}

.thread-child td {
  background: #fafbf9;
}

.thread-child td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-soft);
}

.thread-title {
  display: block;
  font-weight: 900;
}

.thread-title + small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

.status {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
  text-transform: capitalize;
}

.status-approved {
  background: #e8f1ec;
  color: #3c735d;
}

.status-rejected {
  background: #f5e9e8;
  color: #8b514b;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.admin-kpi-panel {
  grid-column: 1 / -1;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--panel-soft));
  padding: 14px;
}

.summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.billing-tools,
.billing-preview,
.user-form {
  display: grid;
  gap: 12px;
}

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

.user-form label,
.user-form button,
.user-form .parse-preview {
  grid-column: span 1;
}

.user-form label {
  display: grid;
  gap: 8px;
}

.user-form label span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-form button,
.user-form .parse-preview {
  grid-column: 1 / -1;
}

.field-control span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-total,
.billing-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.billing-total {
  background: linear-gradient(135deg, #202824, #33413a);
  color: #fff;
}

.billing-total span,
.billing-row span {
  color: var(--muted);
}

.billing-total span {
  color: #d4e0db;
}

.billing-row b {
  color: var(--accent-strong);
}

.approval-list,
.audit-list,
.client-list {
  display: grid;
  gap: 10px;
}

.approval-row,
.audit-row,
.client-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.client-row {
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.approval-row span,
.audit-row span,
.client-row span {
  color: var(--muted);
}

.login-screen {
  min-height: 100vh;
  display: none;
  place-items: center;
  padding: 32px;
}

.login-screen.active {
  display: grid;
}

.login-card {
  display: grid;
  grid-template-columns: 1fr;
  width: min(560px, 100%);
  gap: 18px;
  border: 1px solid rgba(215, 223, 218, 0.9);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(32, 38, 36, 0.16);
  padding: 36px;
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.login-brand .brand-mark {
  margin-bottom: 2px;
}

.login-brand > div {
  display: grid;
  justify-items: center;
  text-align: center;
}

.login-brand .eyebrow {
  margin-bottom: 7px;
}

.login-card h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  text-align: center;
}

.login-card p {
  margin-bottom: 0;
  text-align: center;
}

.login-card label {
  display: grid;
  grid-column: 1;
  gap: 8px;
}

.login-card label span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card button {
  grid-column: 1;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 900;
}

.login-card .parse-preview {
  grid-column: 1;
  min-height: 20px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .nav-list {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-card {
    margin-top: 0;
  }

  .signout-button {
    grid-column: 2;
    grid-row: 2;
    width: 140px;
    justify-self: center;
  }
}

@media (max-width: 920px) {
  .command-panel,
  .dashboard-grid,
  .admin-grid,
  .admin-summary,
  .metric-grid,
  .client-analytics,
  .people-grid,
  .manual-form {
    grid-template-columns: 1fr;
  }

  .manual-form .wide-field {
    grid-column: auto;
  }

  .parse-preview {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .content-shell {
    width: min(100% - 22px, 1220px);
    padding-top: 22px;
  }

  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-heading {
    display: grid;
  }

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

  .date-chip,
  .month-control,
  .status-pill {
    width: min(100%, 240px);
  }
}
