:root {
  --ink: #17212b;
  --muted: #66717d;
  --line: #d9dee4;
  --surface: #ffffff;
  --page: #f4f6f8;
  --brand: #1f6f78;
  --brand-dark: #14535b;
  --accent: #c24f38;
  --ok: #28785f;
  --warn: #bb7a17;
  --bad: #9c3d3d;
  --shadow: 0 14px 42px rgba(23, 33, 43, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(31, 111, 120, 0.88), rgba(194, 79, 56, 0.72)),
    url("assets/party-bg.svg") center / cover;
}

.login-panel {
  width: min(440px, 100%);
  padding: 32px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 7vw, 3.3rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

h3 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.login-copy,
.security-note,
.muted {
  color: var(--muted);
}

.security-note {
  margin: 20px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.login-form,
.task-form,
.toolbar {
  display: grid;
  gap: 8px;
}

label {
  display: grid;
  gap: 5px;
  color: #394652;
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--ink);
  background: var(--surface);
}

input,
select {
  height: 34px;
}

select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #66717d 50%),
    linear-gradient(135deg, #66717d 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 13px,
    calc(100% - 13px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(31, 111, 120, 0.22);
  outline-offset: 2px;
}

button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 5px 11px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}

.ghost-button {
  color: var(--brand-dark);
  background: #e8f1f2;
  border: 1px solid #c8dddf;
}

.icon-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  color: var(--ink);
  background: #eef2f5;
  font-size: 1.15rem;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--bad);
  font-weight: 700;
}

.app-view {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px max(14px, calc((100vw - 1180px) / 2));
  background: rgba(244, 246, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.more-actions {
  position: relative;
}

.more-actions summary {
  min-height: 30px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8dddf;
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--brand-dark);
  background: #e8f1f2;
  font-weight: 800;
  cursor: pointer;
}

.more-actions summary::-webkit-details-marker {
  display: none;
}

.more-actions summary::after {
  content: "▾";
  margin-left: 8px;
  font-size: 0.78rem;
}

.more-actions[open] summary::after {
  content: "▴";
}

.more-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 8;
  display: grid;
  gap: 8px;
  min-width: 190px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.more-actions-menu button {
  width: 100%;
}

.hidden-input {
  display: none;
}

.work-status {
  min-width: 130px;
  color: var(--ok);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.work-status.error {
  color: var(--bad);
}

.tabs {
  display: flex;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 9px 14px 5px;
  overflow-x: auto;
}

.tab {
  min-width: max-content;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

.tab.active {
  color: #fff;
  background: var(--ink);
}

.view {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 14px 28px;
}

.active-view {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.kpi,
.panel,
.guest-card,
.task-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.06);
}

.kpi {
  padding: 11px;
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 1.55rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

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

.panel {
  padding: 12px;
}

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

.panel-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.bar-list {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 105px 1fr 46px;
  align-items: center;
  gap: 8px;
  color: #33414f;
  font-size: 0.9rem;
  font-weight: 700;
}

.bar-track {
  height: 11px;
  overflow: hidden;
  background: #edf0f3;
  border-radius: 99px;
}

.bar-fill {
  height: 100%;
  background: var(--brand);
}

.mini-table,
.guest-list,
.task-list {
  display: grid;
  gap: 8px;
}

.mini-row,
.guest-card,
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
}

.mini-row .pill-row {
  justify-self: end;
  align-self: start;
  margin-top: 2px;
}

.mini-row {
  border-bottom: 1px solid var(--line);
}

.mini-row:last-child {
  border-bottom: 0;
}

.toolbar {
  grid-template-columns: minmax(0, 1fr) 150px 150px auto;
  align-items: end;
  margin-bottom: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.planning-filterbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 135px 155px minmax(150px, 0.75fr) auto;
  gap: 8px;
  align-items: end;
  padding-top: 2px;
}

.planning-filterbar label {
  gap: 4px;
}

.guest-card {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr) auto;
}

.guest-card button {
  min-width: 96px;
}

.guest-people {
  color: var(--muted);
  font-size: 0.9rem;
}

.guest-phone {
  margin-bottom: 0;
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.pill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 6px;
  align-items: stretch;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 99px;
  background: #edf0f3;
  color: #33414f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pill-button {
  min-height: 30px;
  cursor: pointer;
}

.pill-button:hover {
  filter: brightness(0.96);
}

.pill-placeholder {
  display: block;
  min-height: 30px;
}

.pill.ok {
  color: #14513f;
  background: #dff0e9;
}

.pill.warn {
  color: #704707;
  background: #f7e6c7;
}

.pill.bad {
  color: #752929;
  background: #f4d8d8;
}

.task-form,
.planning-form,
.provider-form {
  grid-template-columns: minmax(0, 1fr) 155px 155px auto;
  align-items: end;
  margin-bottom: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.planning-form {
  grid-template-columns: minmax(140px, 0.9fr) minmax(170px, 1.1fr) minmax(135px, 0.8fr) minmax(140px, 0.8fr) 125px 125px;
}

.provider-form {
  grid-template-columns: minmax(150px, 1fr) minmax(135px, 0.8fr) minmax(135px, 0.8fr) minmax(125px, 0.75fr) minmax(160px, 0.9fr) 115px 135px;
}

.planning-notes-field,
.provider-notes-field {
  grid-column: 1 / -3;
}

.planning-form button,
.provider-form button {
  align-self: end;
}

.task-row.done {
  opacity: 0.63;
}

.task-row.done h3 {
  text-decoration: line-through;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.budget-summary div {
  padding: 10px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.budget-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.budget-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.budget-guest-count {
  color: var(--brand-dark);
  white-space: nowrap;
}

.budget-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.budget-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) 145px 145px auto;
  gap: 8px;
  align-items: end;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.suggestion-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.suggestion-grid span {
  padding: 5px 9px;
  color: #33414f;
  background: #edf0f3;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-preview {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.task-preview li {
  padding-left: 8px;
}

.task-preview strong {
  display: inline-block;
  margin-right: 10px;
}

.task-preview span {
  display: inline-block;
  color: var(--muted);
  font-weight: 500;
}

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

.report-button {
  min-height: 72px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.25;
}

.report-button strong,
.report-button span {
  display: block;
}

.report-button span {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

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

.report-output {
  min-height: 240px;
  overflow: auto;
  margin: 0;
  color: #17212b;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
}

.report-text {
  padding: 15px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.styled-report {
  min-width: 760px;
  padding: 16px;
  background: #fff;
}

.report-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.report-card {
  padding: 9px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.report-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
}

.report-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.report-section h3 {
  margin-bottom: 10px;
}

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

.report-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-list p {
  margin: 3px 0 0;
}

.empty-report {
  padding: 13px;
  color: var(--muted);
  background: #f7f9fb;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.people-report {
  min-width: 840px;
  padding: 18px;
  background: #fff;
}

.print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.print-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.report-metrics div {
  padding: 10px;
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-metrics span,
.report-metrics strong {
  display: block;
}

.report-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.report-metrics strong {
  margin-top: 3px;
  font-size: 1.25rem;
}

.people-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.86rem;
}

.people-table th,
.people-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.people-table th {
  color: #17212b;
  background: #eef2f5;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.people-table tr:nth-child(even) td {
  background: #fafbfc;
}

.people-table td:first-child,
.people-table th:first-child {
  width: 42px;
  color: var(--muted);
  text-align: right;
}

.report-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 99px;
  background: #edf0f3;
  color: #33414f;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.report-status.ok {
  color: #14513f;
  background: #dff0e9;
}

.report-status.warn {
  color: #704707;
  background: #f7e6c7;
}

.report-status.bad {
  color: #752929;
  background: #f4d8d8;
}

.report-status.muted-status {
  color: var(--muted);
  background: #edf0f3;
}

.planning-list,
.planning-items,
.provider-list,
.provider-items {
  display: grid;
  gap: 8px;
}

.planning-section,
.provider-section {
  margin-top: 8px;
}

.planning-card,
.provider-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.planning-card.done {
  opacity: 0.68;
}

.planning-card.done h3 {
  text-decoration: line-through;
}

.planning-card p,
.provider-card p {
  margin: 5px 0 0;
}

.planning-card-head,
.provider-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.planning-card-head h3,
.provider-card-head h3 {
  margin: 0;
}

.planning-card-head .pill {
  width: auto;
  min-width: 108px;
  flex: 0 0 auto;
}

.provider-side .pill {
  min-width: 118px;
  width: auto;
  flex: 0 0 auto;
}

.provider-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.provider-side > strong {
  color: var(--brand-dark);
  font-size: 1rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(23, 33, 43, 0.42);
}

.modal.open {
  display: grid;
}

.modal-panel {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-panel .icon-button {
  float: right;
}

.modal-panel h2 {
  margin-bottom: 12px;
}

.modal .provider-form,
.modal .planning-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.modal .provider-notes-field,
.modal .planning-notes-field,
.modal-actions {
  grid-column: 1 / -1;
}

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

.linked-line {
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 750;
}

.linked-box {
  margin-top: 8px;
  padding: 8px;
  color: #33414f;
  background: #eef5f6;
  border: 1px solid #c8dddf;
  border-radius: 7px;
}

.linked-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 0.78rem;
}

.linked-box ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.linked-box li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.linked-box span {
  color: var(--muted);
  white-space: nowrap;
}

.planning-report-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.82rem;
}

.planning-report-table th,
.planning-report-table td {
  padding: 8px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.planning-report-table th {
  color: #17212b;
  background: #eef2f5;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.planning-report-table tr:nth-child(even) td {
  background: #fafbfc;
}

.planning-report .planning-report-table {
  table-layout: fixed;
}

.planning-report .planning-report-table th:nth-child(1),
.planning-report .planning-report-table td:nth-child(1) {
  width: 19%;
}

.planning-report .planning-report-table th:nth-child(2),
.planning-report .planning-report-table td:nth-child(2) {
  width: 27%;
}

.planning-report .planning-report-table th:nth-child(3),
.planning-report .planning-report-table td:nth-child(3),
.planning-report .planning-report-table th:nth-child(4),
.planning-report .planning-report-table td:nth-child(4) {
  width: 14%;
}

.planning-report .planning-report-table th:nth-child(5),
.planning-report .planning-report-table td:nth-child(5) {
  width: 112px;
}

.planning-report .planning-report-table th:nth-child(6),
.planning-report .planning-report-table td:nth-child(6) {
  width: 118px;
  white-space: nowrap;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  justify-content: flex-end;
  background: rgba(23, 33, 43, 0.38);
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  width: min(460px, 100%);
  height: 100%;
  overflow: auto;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.drawer-panel .icon-button {
  float: right;
}

.drawer-section {
  clear: both;
  padding-top: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.twofa-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.twofa-box,
.setup-link-box {
  margin-top: 14px;
  padding: 14px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.twofa-box pre,
.setup-link-box pre {
  min-height: auto;
  margin: 8px 0 12px;
  padding: 10px;
  word-break: break-all;
  white-space: pre-wrap;
}

.user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  align-items: end;
}

.audit-log {
  display: grid;
  gap: 8px;
}

.audit-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.audit-entry:last-child {
  border-bottom: 0;
}

.audit-entry p {
  margin: 4px 0 0;
}

.audit-entry time {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.note-box {
  min-height: 100px;
  resize: vertical;
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .topbar-actions button {
    width: 100%;
  }

  .more-actions,
  .more-actions summary {
    width: 100%;
  }

  .more-actions-menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }

  .work-status {
    width: 100%;
    text-align: left;
  }

  .kpi-grid,
  .dashboard-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .planning-filterbar,
  .task-form,
  .planning-form,
  .provider-form,
  .budget-row,
  .field-grid,
  .user-card,
  .audit-entry,
  .user-edit-grid,
  .guest-card,
  .mini-row,
  .task-row,
  .planning-card,
  .provider-card {
    grid-template-columns: 1fr;
  }

  .planning-notes-field,
  .provider-notes-field {
    grid-column: auto;
  }

  .planning-card-head,
  .provider-card-head {
    flex-direction: column;
  }

  .planning-card-head .pill {
    width: 100%;
  }

  .panel-heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .panel-heading-actions button {
    width: 100%;
  }

  .provider-side {
    justify-items: stretch;
  }

  .modal {
    align-items: start;
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .modal .provider-form,
  .modal .planning-form,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
  }

  .budget-summary {
    grid-template-columns: 1fr;
  }

  .budget-guest-count {
    white-space: normal;
  }

  .mini-row .pill-row {
    justify-self: stretch;
  }

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

  .pill-placeholder {
    display: none;
  }

  .audit-entry time {
    white-space: normal;
  }

  .styled-report {
    min-width: 0;
    width: 100%;
    padding: 14px;
  }

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

  .report-list li {
    grid-template-columns: 1fr;
  }

  .guest-card button,
  .toolbar button,
  .planning-filterbar button,
  .budget-row button,
  .task-form button,
  .planning-form button,
  .provider-form button {
    width: 100%;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .people-report {
    min-width: 0;
    width: 100%;
    padding: 14px;
  }

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

  .people-table {
    min-width: 680px;
  }

  .planning-report {
    overflow-x: auto;
  }

  .planning-report-table {
    min-width: 760px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 11mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #fff;
  }

  .topbar,
  .tabs,
  .toolbar,
  .report-grid,
  .report-actions,
  .drawer {
    display: none !important;
  }

  .view {
    display: none;
  }

  #reports {
    display: block;
    max-width: none;
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }

  .report-panel {
    padding: 0;
  }

  .report-panel > .panel-heading {
    display: none;
  }

  .report-output {
    min-height: 0;
    overflow: visible;
    border: 0;
    background: #fff;
  }

  .people-report,
  .styled-report {
    min-width: 0;
    padding: 0;
    color: #17212b;
    background: #fff;
  }

  .report-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .report-metrics div {
    padding: 6px;
    background: #f4f6f8;
    border-color: #cfd5dc;
  }

  .print-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .print-header h2 {
    font-size: 22pt;
  }

  .people-table {
    font-size: 8.4pt;
  }

  .people-table th,
  .people-table td {
    padding: 5px 6px;
  }

  .people-table tr {
    break-inside: avoid;
  }

  .people-table th {
    color: #17212b;
    background: #eef2f5;
  }

  .people-table tr:nth-child(even) td {
    background: #fafbfc;
  }

  .report-status {
    padding: 1px 5px;
    border: 1px solid rgba(23, 33, 43, 0.08);
  }

  .report-status.ok {
    color: #14513f !important;
    background: #dff0e9 !important;
  }

  .report-status.warn {
    color: #704707 !important;
    background: #f7e6c7 !important;
  }

  .report-status.bad {
    color: #752929 !important;
    background: #f4d8d8 !important;
  }

  .report-status.muted-status {
    color: #66717d !important;
    background: #edf0f3 !important;
  }
}
