.page.dashboard-page {
  width: min(1420px, calc(100% - 24px));
  margin: 20px auto 36px;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dashboard-head .eyebrow { margin-bottom: 1px; }
.dashboard-head h1 { margin: 0 0 2px; font-size: 26px; line-height: 1.1; }
.dashboard-head small { font-size: 11px; }

.dashboard-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 12px; margin: 14px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.dashboard-filters label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; }
.dashboard-filters input[type=checkbox] { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.dashboard-filters small { color: var(--muted); font-size: 11px; }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.dashboard-stats article {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.dashboard-stats strong { font-size: 24px; line-height: 1; }
.dashboard-stats span { color: var(--muted); font-size: 12px; }

.compact-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(310px, 5fr);
  gap: 10px;
  align-items: start;
}
.dashboard-column { display: grid; gap: 10px; align-content: start; }
.dashboard-panel {
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(25, 35, 31, .05);
}
.dashboard-panel.accent-red,
.dashboard-panel.accent-gold,
.dashboard-panel.accent-blue,
.dashboard-panel.accent-green { border-top-width: 3px; }
.dashboard-panel.accent-green { border-top-color: var(--green); }
.dashboard-panel .panel-title { margin-bottom: 8px; }
.dashboard-panel .panel-title .eyebrow { margin-bottom: 0; font-size: 9px; }
.dashboard-panel .panel-title h2 { font-size: 17px; }
.dashboard-panel .panel-title > a { color: var(--green); font-size: 11px; font-weight: 800; }
.dashboard-panel .count { min-width: 25px; height: 25px; font-size: 12px; }
.workshop-groups { display: grid; gap: 7px; }
.workshop-group { overflow: hidden; border: 1px solid #e1e0da; border-radius: 6px; }
.workshop-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px;
  background: #f1efe8;
  font-size: 11px;
}
.workshop-group-head span { color: var(--muted); }
.workshop-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(160px, 1fr) 42px;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-top: 1px solid #eceae3;
  font-size: 11px;
}
.workshop-line:hover { background: #f9f8f4; }
.workshop-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workshop-line small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.workshop-line time { text-align: right; color: var(--muted); }

.dashboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 5px 2px;
  border-top: 1px solid #eceae3;
  font-size: 12px;
}
.dashboard-row strong,
.dashboard-row small { display: block; }
.dashboard-row small { font-size: 10px; }
.dashboard-row time { color: var(--muted); white-space: nowrap; }
.dashboard-row:hover strong { color: var(--green); }
.compact-empty { margin: 8px 0 0; font-size: 12px; }

.active-order-list { overflow: hidden; border: 1px solid #e1e0da; border-radius: 6px; }
.active-order-table-head {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(170px, 1.45fr) minmax(120px, .95fr) 58px;
  gap: 7px;
  padding: 4px 7px;
  background: #efeee9;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}
.active-order-table-head span:last-child { text-align: right; }
.active-order-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(170px, 1.45fr) minmax(120px, .95fr) 58px;
  align-items: start;
  gap: 7px;
  min-height: 48px;
  padding: 6px 7px;
  border-top: 1px solid #eceae3;
  font-size: 10px;
}
.active-order-row:hover { background: #f9f8f4; }
.active-order-name,
.active-order-status-form { min-width: 0; }
.active-order-name strong,
.active-order-name small,
.active-order-status-form small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-order-name strong { font-size: 11px; }
.active-order-name small,
.active-order-status-form small { margin-top: 1px; font-size: 8px; }
.active-order-name .active-order-reference { color: #8b928f; font-size: 7px; }
.active-order-lines { min-width: 0; color: #56605c; line-height: 1.35; }
.active-order-lines span { display: block; overflow-wrap: anywhere; font-size: 9px; }
.active-order-lines span + span { margin-top: 2px; }
.active-order-status-form { position: relative; }
.active-order-status-form select {
  width: 100%;
  height: 24px;
  min-width: 0;
  padding: 2px 20px 2px 5px;
  border: 1px solid #c9d8d1;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}
.active-order-status-form select:focus { border-color: var(--green); outline: 2px solid rgba(31, 102, 80, .12); }
.status-save { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.active-order-meta { text-align: right; white-space: nowrap; }
.active-order-meta time,
.active-order-meta strong { display: block; }
.active-order-meta time { color: var(--muted); font-size: 9px; }
.active-order-meta strong { margin-top: 2px; font-size: 10px; }

.recent-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.recent-contact {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #eceae3;
  border-radius: 5px;
  font-size: 11px;
}
.recent-contact:hover { border-color: #bfd6cb; background: var(--green-2); }
.recent-contact small { white-space: nowrap; font-size: 9px; }

@media (max-width: 900px) {
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .compact-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .dashboard-head { align-items: flex-start; }
  .dashboard-head h1 { font-size: 22px; }
  .dashboard-stats article { display: block; }
  .workshop-line { grid-template-columns: 1fr 45px; }
  .workshop-line small { grid-column: 1; }
  .workshop-line time { grid-column: 2; grid-row: 1 / span 2; }
  .active-order-table-head { display: none; }
  .active-order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 8px; }
  .active-order-lines { grid-column: 1 / -1; grid-row: 2; padding: 4px 0; border-top: 1px solid #efede7; border-bottom: 1px solid #efede7; }
  .active-order-status-form { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: minmax(140px, .8fr) 1fr; align-items: center; gap: 6px; }
  .active-order-status-form small { margin: 0; }
  .active-order-meta { grid-column: 2; grid-row: 1; }
  .recent-contact-grid { grid-template-columns: 1fr; }
}
