:root {
  --bg: #f5f6f8;
  --panel: rgba(255, 255, 255, 0.88);
  --line: #dfe3ea;
  --text: #182230;
  --muted: #667085;
  --blue: #0a84ff;
  --green: #24c20f;
  --red: #e5484d;
  --amber: #f6b700;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0, #f7f9fc 36%, #eef1f5 100%);
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  font-size: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #0a84ff);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 4px 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #344054;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: #344054;
  flex: 0 0 16px;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-icon.home {
  color: #0a84ff;
}

.nav-icon.home svg {
  fill: rgba(10, 132, 255, 0.16);
}

.nav:hover,
.nav.active {
  color: #101828;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
}

.nav-group {
  margin: 10px 0;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.shell {
  margin-left: 260px;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 28px;
  background: rgba(246, 248, 251, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

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

#crumbIcon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #344054;
}

#crumbIcon svg,
.metric-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.content {
  padding: 24px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.panel,
.metric,
.report-paper {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.metric {
  padding: 22px;
  min-height: 124px;
}

.metric strong {
  display: block;
  font-size: 34px;
}

.metric span,
.muted {
  color: var(--muted);
}

.dashboard {
  display: grid;
  gap: 14px;
  max-width: 1120px;
}

.date-mini-card,
.month-card,
.dash-metric,
.dashboard-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(212, 219, 230, 0.74);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.10);
}

.dashboard-date-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: -8px;
}

.date-mini-card {
  min-width: 92px;
  padding: 8px 14px 10px;
  text-align: center;
}

.date-mini-card span {
  display: block;
  margin-bottom: 3px;
  color: #1f2937;
  font-size: 14px;
}

.date-mini-card strong {
  color: #0b5fff;
  font-size: 21px;
  line-height: 1.1;
}

.month-intelligence {
  display: grid;
  grid-template-columns: minmax(190px, 0.78fr) minmax(340px, 1.45fr) minmax(220px, 0.9fr);
  gap: 14px;
}

.month-card {
  position: relative;
  min-height: 116px;
  padding: 16px 18px;
  overflow: hidden;
}

.month-arrow {
  position: absolute;
  top: 11px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  color: #101828;
  background: #eef2f7;
  cursor: pointer;
}

.month-arrow.right {
  left: auto;
  right: 10px;
}

.month-arrow:hover {
  background: #dbe5f4;
}

.holiday-count-card {
  display: grid;
  place-items: center;
  text-align: center;
}

.holiday-count-card strong {
  margin-top: 8px;
  font-size: 30px;
}

.holiday-count-card p,
.month-hours-card p {
  margin: 4px 0 0;
  color: #667085;
  line-height: 1.25;
}

.holiday-count-card span {
  color: #ff1616;
}

.holidays-list-card h3 {
  margin: 0 0 18px;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.holiday-list {
  margin: 0;
  padding-left: 22px;
}

.holiday-list li {
  margin: 9px 0;
  line-height: 1.35;
}

.month-hours-card {
  display: grid;
  place-items: center;
  text-align: center;
}

.month-hours-card strong {
  display: block;
  margin-top: 8px;
  color: #000;
  font-size: 31px;
  font-weight: 500;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.dash-metric {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  min-height: 96px;
  padding: 20px 22px;
}

.dash-metric strong {
  align-self: end;
  color: #101828;
  font-size: 28px;
  line-height: 1;
}

.dash-metric small {
  grid-column: 1 / -1;
  margin-top: 7px;
  color: #667085;
  font-size: 13px;
}

.metric-icon {
  align-self: end;
  display: inline-flex;
  width: 25px;
  height: 25px;
  color: #475467;
}

.metric-icon.danger {
  color: #e5484d;
}

.metric-icon.warn {
  color: #f6b700;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 14px;
}

.dashboard-card {
  padding: 18px 20px;
}

.dashboard-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.dashboard-card p {
  margin: -6px 0 14px;
  color: #667085;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-table {
  min-width: 0;
}

.compact-table th,
.compact-table td {
  padding: 13px 10px;
}

.accumulated-card {
  overflow: hidden;
}

.accumulated-wrap {
  margin-top: 8px;
  padding-bottom: 4px;
}

.accumulated-table {
  min-width: 980px;
}

.accumulated-table th,
.accumulated-table td {
  padding: 13px 12px;
  white-space: nowrap;
}

.accumulated-table th:first-child,
.accumulated-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 190px;
  background: rgba(255, 255, 255, 0.96);
}

.accumulated-table th:first-child {
  z-index: 2;
}

.accumulated-table th:last-child,
.accumulated-table td:last-child {
  border-left: 3px solid #98a2b3;
}

.accumulated-total {
  font-weight: 800;
}

.traffic-face {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 3px solid #111827;
  border-radius: 50%;
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.2);
  vertical-align: middle;
}

.traffic-face.good {
  background: #8ff24b;
}

.traffic-face.bad {
  background: #ff4646;
}

.traffic-face.neutral {
  background: #ffb739;
}

.face-eye {
  position: absolute;
  top: 10px;
  width: 4px;
  height: 4px;
  background: #111827;
  border-radius: 50%;
}

.face-eye.left {
  left: 9px;
}

.face-eye.right {
  right: 9px;
}

.face-mouth {
  position: absolute;
  left: 9px;
  width: 12px;
  height: 8px;
  border: 3px solid #111827;
  border-left: 0;
  border-right: 0;
}

.traffic-face.good .face-mouth {
  bottom: 8px;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.traffic-face.bad .face-mouth {
  bottom: 5px;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.traffic-face.neutral .face-mouth {
  bottom: 10px;
  height: 0;
  border-top: 0;
  border-radius: 0;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.actions-inline,
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 14px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) repeat(4, minmax(135px, 1fr)) minmax(105px, 0.7fr);
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding: 6px 0 2px;
}

.schedule-head {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.schedule-day {
  color: #475467;
  font-weight: 600;
}

.schedule-select {
  min-width: 135px;
  min-height: 48px;
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
}

.day-total {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #d7dde7;
  border-radius: 10px;
  color: #101828;
  background: #f8fafc;
  font-weight: 700;
}

label span {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd6e3;
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.save,
.ghost,
.icon-btn {
  border: 0;
  cursor: pointer;
}

.save {
  min-width: 150px;
  height: 48px;
  padding: 0 22px;
  color: white;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(180deg, #45db32, #13ad03);
  box-shadow: 0 10px 18px rgba(36, 194, 15, 0.28);
}

.ghost {
  min-height: 42px;
  padding: 0 16px;
  color: #075ec7;
  border: 1px solid rgba(10, 132, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #175cd3;
  border-radius: 9px;
  background: #eef4ff;
}

.icon-btn:hover {
  background: #dbeafe;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-btn.danger {
  color: #b42318;
  background: #fef3f2;
}

.icon-btn.danger:hover {
  background: #fee4e2;
}

.table-wrap {
  overflow: auto;
  margin-top: 18px;
}

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

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

th {
  color: #475467;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  color: white;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a84ff, #34c759);
  font-size: 13px;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
}

.status.on {
  color: #027a48;
  background: #ecfdf3;
}

.status.off {
  color: #b42318;
  background: #fef3f2;
}

.positive {
  color: #009951;
  font-weight: 700;
}

.negative {
  color: var(--red);
  font-weight: 700;
}

.report-paper {
  max-width: 920px;
  margin: 20px auto;
  padding: 34px;
  background: white;
}

.report-paper h2 {
  color: #18365d;
  text-align: center;
}

.manual-report-editor {
  margin: 8px 0 0;
  padding: 14px 22px 8px;
  border-top: 3px solid rgba(0, 0, 0, 0.42);
  border-bottom: 3px solid rgba(0, 0, 0, 0.42);
  background: linear-gradient(90deg, rgba(255,255,255,.72), rgba(246,248,251,.86), rgba(255,255,255,.72));
}

.manual-report-editor h3 {
  margin: 0 0 8px;
  color: #667085;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.manual-report-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, .75fr) minmax(160px, .7fr) minmax(160px, .7fr) auto;
  gap: 8px;
  align-items: end;
  max-width: 900px;
  margin: 0 auto;
}

.manual-report-grid label span,
.manual-report-grid legend {
  display: block;
  margin-bottom: 5px;
  color: #475467;
  font-size: 12px;
  text-align: center;
}

.manual-report-grid fieldset {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 4px;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.manual-report-grid fieldset input {
  min-width: 0;
  padding: 10px 6px;
  text-align: center;
}

.manual-report-grid .save {
  min-width: 92px;
  height: 40px;
}

.settings-page {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: 1120px;
}

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

.settings-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.settings-summary span,
.section-kicker {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-summary strong { font-size: 20px; }

.settings-summary small,
.settings-section label small,
.settings-optional summary small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.settings-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-section {
  min-width: 0;
  border-radius: 10px;
}

.settings-section .table-wrap {
  max-width: 100%;
}

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

.settings-heading h3 { margin: 4px 0 5px; font-size: 18px; }
.settings-heading p { margin: 0; color: #667085; }
.settings-section label { align-content: start; }
.settings-section label > span:first-child { font-weight: 600; }
.settings-section label small { display: block; margin-top: 6px; }

.settings-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.settings-badge.success { background: #ecfdf3; color: #027a48; }
.settings-badge.warning { background: #fffaeb; color: #b54708; }
.settings-device-table { margin-top: 20px; }

.input-suffix,
.copy-field,
.secret-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-suffix { gap: 0; }
.input-suffix input { border-radius: 8px 0 0 8px; }

.input-suffix > span {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 48px;
  border: 1px solid #cfd8e8;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  color: #667085;
}

.copy-field input,
.secret-field input { min-width: 0; flex: 1; }
.copy-field .icon-btn { flex: 0 0 42px; height: 42px; }

.secondary.compact {
  min-width: 68px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #98c4ff;
  border-radius: 8px;
  background: #fff;
  color: #0566d6;
  cursor: pointer;
  font-weight: 700;
}

.wide-field { grid-column: span 2; }
.settings-optional { padding: 0; }

.settings-optional summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
}

.settings-optional summary::-webkit-details-marker { display: none; }
.settings-optional summary > span:first-child { display: grid; gap: 4px; }
.settings-optional summary strong { font-size: 17px; }
.settings-optional[open] summary { border-bottom: 1px solid #e4e7ec; }
.settings-details-body { padding: 20px 22px 22px; }

.settings-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.15);
  backdrop-filter: blur(12px);
}

.settings-savebar div { display: grid; gap: 2px; }
.settings-savebar span { color: #667085; font-size: 12px; }

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24);
}

.confirm-dialog h3 { margin: 0 0 6px; }
.confirm-dialog p { margin: 0; color: #667085; line-height: 1.5; }

.confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fef3f2;
  color: #b42318;
}

.confirm-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.danger-action {
  min-width: 96px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #d92d20;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.danger-action:hover { background: #b42318; }

.report-actions {
  position: sticky;
  bottom: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.compact-save { min-width: auto; height: 42px; padding: 0 18px; }
.save:disabled { cursor: not-allowed; opacity: 0.48; box-shadow: none; }
.rh-docs-page { display: grid; gap: 16px; width: 100%; max-width: 1240px; min-width: 0; }
.rh-command-bar { display: grid; grid-template-columns: minmax(170px, 220px) minmax(230px, 1fr) auto; align-items: end; gap: 14px; }
.rh-command-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.rh-metrics { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; }
.rh-metrics article { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; min-height: 104px; padding: 18px; border: 1px solid #dbe2ec; border-radius: 8px; background: rgba(255, 255, 255, 0.9); box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08); }
.rh-metrics span { color: #475467; font-size: 13px; }
.rh-metrics strong { grid-row: span 2; font-size: 30px; }
.rh-metrics small { color: #667085; }
.rh-metrics .danger strong { color: #d92d20; }
.rh-metrics .success strong { color: #039855; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 5px 0 0; color: #667085; }
.rh-documents-panel { min-width: 0; padding-top: 20px; overflow: hidden; }
.rh-table { min-width: 1020px; }
.rh-table td { height: 68px; }
.rh-doc-link { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
.rh-doc-link:hover .rh-status { box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12); }
.rh-doc-link small { color: #98a2b3; }
.rh-empty-doc { color: #98a2b3; font-size: 13px; }
.rh-status { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; color: #475467; background: #f2f4f7; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rh-status.success { color: #027a48; background: #ecfdf3; }
.rh-status.warning { color: #b54708; background: #fffaeb; }
.rh-status.danger { color: #b42318; background: #fef3f2; }
.empty-state { padding: 42px 18px; color: #667085; text-align: center; }
.rh-modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24); }
.rh-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.rh-modal-head h2 { margin: 0; font-size: 20px; }
.rh-modal-head p { margin: 5px 0 0; color: #667085; }
.rh-modal-head .icon-btn { color: #475467; background: #f2f4f7; font-size: 22px; }
.rh-modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rh-modal-form small { display: block; margin-top: 6px; color: #667085; }
.rh-modal-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 8px; }
.rh-modal-actions.left { justify-content: flex-start; }
.link-button { display: inline-grid; place-items: center; text-decoration: none; }
.danger-text { color: #b42318; border-color: #fda29b; }
.rh-document-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; padding: 14px 0; border-top: 1px solid #e4e7ec; border-bottom: 1px solid #e4e7ec; }
.rh-document-summary div { display: grid; gap: 7px; align-content: start; }
.rh-document-summary span { color: #667085; font-size: 12px; }
.rh-document-summary strong { overflow-wrap: anywhere; font-size: 13px; }
.rh-event-list { margin-top: 22px; }
.rh-event-list h3 { margin: 0 0 8px; font-size: 15px; }
.rh-event-list > div { display: grid; grid-template-columns: 125px 1fr 1.2fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eaecf0; font-size: 13px; }
.rh-event-list span, .rh-event-list small { color: #667085; }
.rh-event-list.full { margin-top: 0; }

@media (max-width: 1400px) {
  .rh-command-bar { grid-template-columns: minmax(170px, 220px) minmax(220px, 1fr); }
  .rh-command-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 920px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .shell {
    margin-left: 0;
  }

  .grid.two,
  .grid.three,
  .form-grid,
  .manual-report-grid,
  .dashboard-metrics,
  .dashboard-columns,
  .month-intelligence {
    grid-template-columns: 1fr;
  }

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

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

  .settings-savebar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .settings-savebar .save {
    width: 100%;
  }

  .dashboard-date-row {
    justify-content: stretch;
  }

  .rh-command-bar,
  .rh-metrics,
  .rh-modal-form,
  .rh-document-summary {
    grid-template-columns: 1fr;
  }

  .rh-command-actions { justify-content: stretch; }
  .rh-command-actions > * { flex: 1; }
  .rh-event-list > div { grid-template-columns: 1fr; gap: 3px; }

  .date-mini-card {
    flex: 1;
  }
}

@media print {
  .sidebar,
  .topbar,
  .report-actions,
  .panel:not(.printable-filter) {
    display: none;
  }

  .shell {
    margin: 0;
  }

  .content {
    padding: 0;
  }

  .report-paper {
    box-shadow: none;
    border: 0;
    margin: 0;
    max-width: none;
  }
}
