/* Approved dashboard layout. Scoped to the dashboard page. */
.dashboard-design #main {
  padding: 8px 12px 12px;
}
.dashboard-design #main .dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(264px, 1fr);
  gap: 12px;
  margin: 0;
}
.dashboard-design .dashboard-layout > :is(.dashboard-calendar, .dashboard-summary) {
  width: auto;
  max-width: none;
  padding: 0;
  margin-top: 0;
}
.dashboard-design .dashboard-calendar > .table-card {
  padding: 8px 12px 12px !important;
}
.dashboard-design .table-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 4%);
}
.dashboard-design #main .fc .fc-toolbar {
  margin-bottom: 6px;
  gap: 8px;
}
.dashboard-design #main .fc .fc-toolbar-title {
  font-size: 26px;
  font-weight: 700;
}
.dashboard-design #main .fc .fc-button-primary {
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 6px;
}
.dashboard-design #main .fc .fc-col-header-cell-cushion {
  padding: 6px 4px;
  font-size: 15px;
}
.dashboard-design #main .fc .fc-daygrid-day-number {
  padding: 5px 6px;
  font-size: 15px !important;
}
.dashboard-design .dashboard-summary .stat-card {
  padding: 10px 12px !important;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 4%);
}
.dashboard-design .dashboard-summary .stat-card > div:first-child {
  font-size: 13px !important;
}
.dashboard-design .dashboard-summary .stat-value {
  font-size: 28px !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
}
.dashboard-design #schedule-panel-content {
  padding: 14px !important;
}
.dashboard-design #panel-tab-bar {display:flex;align-items:center;gap:4px;padding:10px 12px 0;flex-shrink:0;min-width:0;}
.dashboard-design #panel-settings-btn {display:grid;place-items:center;width:36px;height:36px;flex:none;padding:0;border:1px solid #cbd5e1;border-radius:7px;background:#f8fafc;color:#475569;font-size:20px;line-height:1;cursor:pointer;}
.dashboard-design .panel-tab-items {display:flex;flex:1;min-width:0;flex-wrap:nowrap;gap:6px;overflow-x:auto;scrollbar-width:none;}
.dashboard-design .panel-tab-items::-webkit-scrollbar {display:none;}
.dashboard-design .panel-tab-items button {flex:none;padding:7px 10px;min-height:36px;border:0;border-radius:7px;background:transparent;color:#64748b;font-size:.85rem;font-weight:600;white-space:nowrap;cursor:pointer;}
.dashboard-design .panel-tab-items button.active {background:#e8efff;color:#1d4ed8;}
.dashboard-design .panel-tab-nav {flex:none;display:grid;place-items:center;width:24px;height:36px;padding:0;border:0;border-radius:7px;background:#f8fafc;color:#475569;font-size:22px;cursor:pointer;}
.dashboard-design .panel-tab-nav:hover:not(:disabled) {background:#e8efff;color:#1d4ed8;}
.dashboard-design .panel-tab-nav:disabled {opacity:.3;cursor:default;}
.dashboard-design .panel-tab-items button:focus-visible,
.dashboard-design .panel-tab-nav:focus-visible {outline:2px solid #2563eb;outline-offset:-2px;}
@media (max-width: 1100px) {
  .dashboard-design #main .fc .fc-toolbar-title { font-size: 22px; }
  .dashboard-design #main .fc .fc-button-primary { font-size: 13px; padding: 6px 8px; }
  .dashboard-design #main .dashboard-layout { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); }
}
@media (max-width: 980px) {
  html:has(body.dashboard-design), body.dashboard-design { overflow: auto; }
  .dashboard-design #main { width: 760px; min-width: 760px; }
}

/* Overflow events remain accessible without stretching the month grid. */
.dashboard-design .schedule-group-box {border:1px solid #cbd5e1;border-radius:8px;padding:0 9px;margin:8px 0 12px;background:#f8fafc;}
.dashboard-design .schedule-group-heading {padding:9px 0;font-size:.85rem;font-weight:700;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:context-menu;border-bottom:1px solid #e2e8f0;}
.dashboard-design .schedule-group-heading span {font-weight:400;color:#64748b;}
.dashboard-design .schedule-group-box > a:last-child {border-bottom:0 !important;}
.dashboard-design #calendar .sg-calendar-event {display:block;background:transparent !important;border:0 !important;padding:0 !important;}
.dashboard-design #calendar .sg-calendar-event .fc-event-main {border-radius:3px;padding:2px 3px;}
.dashboard-design #calendar .sg-calendar-title {display:none;padding:3px 4px;color:#334155;background:#eef2f7;font-weight:700;font-size:.75rem;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:3px 3px 0 0;}
.dashboard-design #calendar .sg-group-start .sg-calendar-title {display:block;}
.dashboard-design #schedule-group-dialog {width:min(2200px,96vw);max-width:96vw;max-height:90vh;border:1px solid #cbd5e1;border-radius:12px;padding:0;color:#1e293b;background:#fff;box-shadow:0 12px 40px #0f172a33;font-size:.875rem;}
.dashboard-design #schedule-group-dialog::backdrop {background:#0f172a66;}
.dashboard-design .sg-dialog-content {display:flex;flex-direction:column;gap:10px;padding:16px;max-height:88vh;}
.dashboard-design .sg-dialog-content h5 {margin:0;font-size:1.125rem;}
.dashboard-design .sg-dialog-content .form-control {font-size:.875rem;}
.dashboard-design .sg-toolbar {display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.dashboard-design .sg-toolbar input {flex:1;min-width:200px;}
.dashboard-design .sg-toolbar button {white-space:nowrap;}
.dashboard-design .sg-table-scroll {overflow:auto;min-height:120px;max-height:55vh;border:1px solid #e2e8f0;}
.dashboard-design .sg-table-scroll table {margin:0;width:100%;min-width:1120px;table-layout:fixed;font-size:.8125rem;}
.dashboard-design .sg-table-scroll th {position:sticky;top:0;background:#f1f5f9;z-index:1;white-space:normal;padding:7px 6px;font-size:.75rem;line-height:1.35;}
.dashboard-design .sg-table-scroll th:first-child {width:3%;text-align:center;}
.dashboard-design .sg-table-scroll th:nth-child(2),.dashboard-design .sg-table-scroll th:nth-child(3),.dashboard-design .sg-table-scroll th:last-child {width:7%;}
.dashboard-design .sg-table-scroll th:nth-child(4) {width:6%;}
.dashboard-design .sg-table-scroll th:nth-child(5) {width:12%;}
.dashboard-design .sg-table-scroll th:nth-child(6) {width:18%;}
.dashboard-design .sg-table-scroll th:nth-child(n+7):nth-child(-n+10) {width:10%;}
.dashboard-design .sg-table-scroll td {padding:7px 6px;min-width:0;vertical-align:middle;font-size:.8125rem;line-height:1.45;}
.dashboard-design .sg-table-scroll td:first-child {text-align:center;}
.dashboard-design .sg-table-scroll td div {max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;}
.dashboard-design .sg-table-scroll td small {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.75rem;color:#64748b;}
.dashboard-design .sg-table-scroll td.sg-expanded :is(div,small) {white-space:normal;min-width:0;overflow:visible;overflow-wrap:anywhere;}
.dashboard-design .sg-table-scroll input[type=checkbox] {width:17px;height:17px;accent-color:#2563eb;}
.dashboard-design .sg-source-group {color:#1d4ed8 !important;}
.dashboard-design #sg-count {font-size:.85rem;color:#475569;}
.dashboard-design #sg-error {color:#dc2626;font-size:.85rem;}
.dashboard-design .sg-footer {display:flex;gap:8px;justify-content:flex-end;}
.dashboard-design #sg-dissolve {margin-right:auto;}

.dashboard-design #calendar .fc-popover-body {
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

/* Week heights are allocated in event-line increments rather than equal sixths. */
.dashboard-design #calendar .fc-scrollgrid-sync-table {
  height: var(--dashboard-month-height) !important;
}
.dashboard-design #calendar .fc-scrollgrid-sync-table > tbody > tr {
  height: var(--dashboard-week-height) !important;
}
.dashboard-design #calendar .fc-daygrid-day-frame { min-height: 0; }
.dashboard-design #calendar .fc-scrollgrid-sync-table > tbody > tr:last-child > td {
  border-bottom: 1px solid var(--fc-border-color, #ddd) !important;
}

.calendar-review-badge { display:inline-block; max-width:min(18ch, 60%); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 4px; margin-right:4px; border-radius:4px; background:#f3e8ff; color:#7e22ce; font-size:.7rem; font-weight:700; line-height:1.5; vertical-align:middle; }
#calendar-work-kinds { flex-shrink:0; }
#calendar-work-kinds #work-kind-controls { margin-bottom:8px !important; }
