.schedule-board {
  width: 100%;
  margin-top: 0;
  margin-inline: auto;
}

.schedule-board-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "views";
  gap: 14px;
  align-items: start;
  width: 100%;
  margin: 0 auto;
}

.schedule-title {
  display: grid;
  gap: 4px;
  justify-items: center;
  width: 100%;
  max-width: none;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  text-align: center;
}

.schedule-title .eyebrow {
  margin: 0;
}

.schedule-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.schedule-actions {
  grid-area: actions;
  display: grid;
  gap: 10px;
  justify-items: end;
  align-self: start;
  width: min(370px, 100%);
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f7faf8;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.82);
}

.view-tools {
  grid-area: views;
  display: grid;
  justify-items: stretch;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(31, 122, 95, 0.06), rgba(255, 255, 255, 0) 42%),
    #fbfcfd;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.07);
}

.view-tools-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  width: 100%;
}

.view-tools-head .schedule-title {
  grid-column: 1 / -1;
}

.view-mode-label {
  margin: 0;
  justify-self: end;
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--green);
  background: rgba(30, 127, 95, 0.08);
  text-align: center;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
}

.segmented {
  display: grid;
  grid-template-columns: minmax(320px, 1.14fr) minmax(220px, 0.78fr) minmax(240px, 0.82fr);
  gap: 8px;
  width: min(1240px, 100%);
  justify-self: center;
  border-radius: 10px;
  padding: 8px;
  background: #e9f3ef;
  box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.05);
}

.view-mode-group {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 10px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.62);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.view-mode-group > span {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 950;
}

.view-mode-group.active {
  border-color: rgba(30, 127, 95, 0.18);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.05);
}

.view-mode-group.active::before {
  content: "";
  position: absolute;
  inset: 0 16px auto;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
}

.view-mode-group.active > span {
  color: var(--green);
}

.view-mode-group > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 7px;
}

.view-toggle {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 9px;
  padding: 13px 36px 11px 18px;
  color: var(--muted);
  background: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.view-toggle-label {
  position: relative;
  z-index: 2;
}

.view-toggle:hover {
  color: var(--ink);
  border-color: rgba(30, 127, 95, 0.18);
  background: #fbfdfc;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.07);
  transform: translateY(-1px);
}

.view-toggle:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}

.view-toggle:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.view-toggle.active {
  border-color: transparent;
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 14px rgba(30, 127, 95, 0.18);
  transform: translateY(-1px);
}

.view-toggle.has-badge {
  padding-right: 38px;
}

.view-toggle.has-badge::after {
  content: attr(data-badge);
  position: absolute;
  top: 8px;
  right: 9px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 5px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 0 0 1px rgba(30, 127, 95, 0.12),
    0 4px 10px rgba(16, 24, 40, 0.06);
  font-size: 11px;
  font-weight: 950;
  line-height: 20px;
  backdrop-filter: blur(5px);
  z-index: 1;
}

.view-toggle.active.has-badge::after {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.view-select-label {
  display: none;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.view-select-label span {
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
}

.view-select-label select {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 900;
}

.view-info-panel {
  display: grid;
  gap: 10px;
  width: min(1240px, 100%);
  justify-self: center;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.56);
}

.view-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
}

.view-hint strong {
  color: var(--green);
  font-size: 17px;
}

.view-hint span {
  color: var(--muted);
}

.view-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.view-metrics span {
  display: inline-flex;
  justify-content: center;
  align-items: baseline;
  gap: 5px;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: #f7faf8;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.82);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  min-width: 0;
}

.view-metrics span.attention {
  color: #9a3412;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.36);
}

.view-metrics span.attention strong {
  color: #c2410c;
}

.view-metrics span.active {
  color: var(--green);
  background: #eef8f3;
  box-shadow: inset 0 0 0 1px rgba(30, 127, 95, 0.2);
}

.view-metrics span.active strong {
  color: var(--green);
}

.view-metrics span.active.attention {
  color: #9a3412;
  background: #fff4e6;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.42);
}

.view-metrics span.active.attention strong {
  color: #c2410c;
}

.view-metrics strong {
  color: var(--ink);
  font-size: 18px;
}

.view-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ec 100%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.06);
}

.view-suggestion:empty {
  display: none;
}

.view-suggestion strong {
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: #c45b07;
  font-size: 12px;
  white-space: nowrap;
}

.view-suggestion span {
  color: #9a4f05;
  min-width: 0;
  line-height: 1.4;
}

.view-suggestion .mini-button {
  min-height: 36px;
  border-color: #fed7aa;
  color: #9a4f05;
  background: #fff;
  white-space: nowrap;
}

.view-suggestion .suggestion-dismiss {
  width: 32px;
  min-width: 32px;
  height: 32px;
  color: #9a4f05;
  background: #fff;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.86);
}

.scheduled {
  background: var(--blue);
}

.completed {
  background: var(--green);
}

.conflict {
  background: var(--red);
}

.cancelled {
  background: var(--amber);
}

.time-block {
  background: var(--green);
}
