@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-primary: #4F46E5;
  --color-secondary: #7C3AED;
  --color-text: #0F172A;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --shadow-card: 0 4px 20px -2px rgba(79, 70, 229, 0.1);
  --shadow-card-hover: 0 10px 25px -5px rgba(79, 70, 229, 0.15), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
  --shadow-button: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
  --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --bg: var(--color-bg);
  --panel: rgba(255, 255, 255, 0.94);
  --line: var(--color-border);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --accent: var(--color-primary);
  --accent-strong: #4338CA;
  --ok: var(--color-success);
  --warn: var(--color-warning);
  --danger: var(--color-danger);
  --shadow: var(--shadow-card);
  --time-rail-width: 88px;
  --slot-height: 40px;
}

body[data-board-density="compact"] {
  --slot-height: 40px;
}

body[data-board-density="standard"] {
  --slot-height: 56px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 223, 185, 0.55), transparent 28%),
    linear-gradient(180deg, #f2e5d3 0%, #f8f4ed 100%);
  color: var(--text);
}

.schedule-app {
  min-height: 100vh;
  padding: 20px;
}

.workbench-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.workbench-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 600;
}

.workbench-tab.is-active {
  background: rgba(162, 75, 42, 0.1);
  color: var(--accent-strong);
}

.workbench-panel {
  display: none;
}

.workbench-panel.is-active {
  display: block;
}

.embedded-header {
  margin-bottom: 16px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.embedded-header p:last-child {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.schedule-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.toolbar-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-group--headline {
  align-items: flex-start;
  justify-content: space-between;
}

.toolbar-group--filters {
  justify-content: flex-end;
}

.toolbar-group--actions {
  justify-content: flex-end;
  align-items: flex-end;
}

.toolbar-group label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 132px;
  color: var(--muted);
  font-size: 13px;
}

.operator-field {
  min-width: 180px;
}

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

.summary-card {
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid rgba(185, 159, 123, 0.4);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-value {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
}

.summary-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.schedule-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 256px minmax(0, 1fr) 286px;
}

.schedule-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  min-height: 70vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.panel-head--board {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.panel-head h2 {
  font-size: 18px;
}

.panel-head p {
  color: var(--muted);
  line-height: 1.5;
}

.board-scale-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.board-scale-switch .mini-button {
  min-height: 34px;
}

.board-scale-switch .mini-button.is-active {
  border-color: rgba(162, 75, 42, 0.88);
  background: rgba(162, 75, 42, 0.12);
  color: var(--accent-strong);
}

.host-pool,
.room-board {
  padding: 12px;
}

.board-grid {
  display: grid;
  grid-template-columns: var(--time-rail-width) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 70vh;
  max-height: 72vh;
  overflow: auto;
  scrollbar-gutter: stable;
}

.board-grid__corner {
  display: grid;
  place-items: center;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 248, 238, 0.88);
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4;
}

.board-grid__days {
  display: grid;
  grid-template-columns: repeat(var(--board-days, 7), minmax(140px, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 238, 0.88);
  position: sticky;
  top: 0;
  z-index: 3;
}

.board-grid__day {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 58px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  border-right: 1px solid rgba(215, 196, 168, 0.55);
}

.board-grid__rooms {
  grid-column: 1 / -1;
  display: grid;
}

.room-section {
  border-top: 1px solid rgba(215, 196, 168, 0.65);
}

.room-section__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(215, 196, 168, 0.45);
  background: rgba(255, 250, 243, 0.82);
}

.room-section__head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.room-section__board {
  display: grid;
  grid-template-columns: var(--time-rail-width) minmax(0, 1fr);
}

.room-time-rail {
  display: grid;
  grid-template-rows: repeat(24, var(--slot-height));
  border-right: 1px solid rgba(215, 196, 168, 0.45);
  background: rgba(255, 248, 238, 0.74);
}

.room-time-rail__slot {
  min-height: var(--slot-height);
  padding: 0 10px;
  border-bottom: 1px solid rgba(215, 196, 168, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.room-time-rail__slot span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.room-week-grid {
  display: grid;
  grid-template-columns: repeat(var(--board-days, 7), minmax(140px, 1fr));
}

.room-day-column {
  border-right: 1px solid rgba(215, 196, 168, 0.45);
}

.room-day-column__header {
  display: none;
}

.room-day-column__body {
  position: relative;
  min-height: calc(var(--slot-height) * 24);
}

.room-day-column__slots {
  display: grid;
  grid-template-rows: repeat(24, var(--slot-height));
}

.room-hour-slot {
  position: relative;
  min-height: var(--slot-height);
  border-bottom: 1px solid rgba(215, 196, 168, 0.45);
  background: rgba(255, 255, 255, 0.64);
}

.room-hour-slot.is-over {
  background: rgba(250, 226, 196, 0.72);
  box-shadow: inset 0 0 0 2px rgba(162, 75, 42, 0.22);
}

.room-hour-slot::after {
  content: "拖拽主播到这里排班";
  position: absolute;
  inset: 6px 8px;
  border: 1px dashed rgba(162, 75, 42, 0.12);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(112, 99, 83, 0.45);
  font-size: 10px;
  opacity: 0;
  transition: opacity 120ms ease, border-color 120ms ease;
}

.room-hour-slot:hover::after,
.room-hour-slot.is-over::after {
  opacity: 1;
}

.room-day-column__blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.entry-block {
  position: absolute;
  top: calc((var(--block-start) * var(--slot-height)) + 2px);
  left: calc(4px + (var(--member-index) * ((100% - 8px) / var(--member-count))));
  width: calc((100% - 8px) / var(--member-count) - 2px);
  height: calc((var(--slot-hours) * var(--slot-height)) - 4px);
  min-height: calc((var(--slot-hours) * var(--slot-height)) - 4px);
  padding: 5px 6px 20px;
  border-radius: 12px;
  background: var(--anchor-color, #D97706);
  color: #fff;
  display: grid;
  gap: 2px;
  align-content: start;
  box-shadow: 0 8px 18px rgba(47, 36, 27, 0.14);
  pointer-events: auto;
  cursor: grab;
  border: 2px solid transparent;
  z-index: 1;
  overflow: hidden;
  transition: top 120ms ease, height 120ms ease, min-height 120ms ease, box-shadow 120ms ease;
}

.entry-block.is-selected {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 28px rgba(47, 36, 27, 0.24);
}

.entry-block[data-has-conflict="true"] {
  border-color: rgba(127, 29, 29, 0.92);
  box-shadow:
    0 0 0 2px rgba(255, 238, 238, 0.72),
    0 12px 24px rgba(127, 29, 29, 0.24);
}

.entry-block[data-has-conflict="true"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(127, 29, 29, 0.96);
  border-radius: 14px;
  pointer-events: none;
}

.entry-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.entry-block__name,
.entry-block__time {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.entry-block__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.15;
}

.entry-block__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.entry-block__account {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 1.1;
  opacity: 0.94;
}

.entry-block__time {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  opacity: 0.92;
}

.entry-block__account-select {
  width: auto;
  max-width: 44%;
  min-width: 62px;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.entry-block__account-select:disabled {
  opacity: 0.96;
  cursor: default;
}

.entry-block__account-select option {
  color: var(--text);
}

.entry-block__badge {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.94);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.entry-block__resize {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.18);
  cursor: ns-resize;
}

.entry-block__resize::before {
  content: "";
  position: absolute;
  inset: 4px 5px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
}

.detail-panel {
  display: flex;
  flex-direction: column;
}

.entry-form,
.detail-block {
  padding: 14px 16px;
}

.detail-block + .detail-block {
  border-top: 1px solid rgba(215, 196, 168, 0.65);
}

.detail-advanced {
  padding: 0;
  background: rgba(255, 251, 246, 0.68);
}

.detail-advanced__toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.detail-advanced__toggle::-webkit-details-marker {
  display: none;
}

.detail-advanced__toggle::after {
  content: "展开";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(185, 159, 123, 0.78);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.detail-advanced[open] .detail-advanced__toggle::after {
  content: "收起";
}

.detail-advanced__intro {
  display: grid;
  gap: 4px;
}

.detail-advanced__intro span {
  color: var(--muted);
  font-size: 12px;
}

.detail-advanced__body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(215, 196, 168, 0.6);
}

.detail-advanced__section + .detail-advanced__section {
  padding-top: 14px;
  border-top: 1px dashed rgba(215, 196, 168, 0.72);
}

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

.detail-readonly label {
  display: grid;
  gap: 8px;
}

.detail-readonly output {
  display: block;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(215, 196, 168, 0.8);
  border-radius: 14px;
  background: rgba(255, 250, 243, 0.9);
  color: var(--text);
  font-weight: 600;
}

.detail-collaborators {
  display: grid;
  gap: 10px;
}

.detail-collaborators__head {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.collaborator-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.collaborator-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(215, 196, 168, 0.7);
  background: color-mix(in srgb, var(--anchor-color, #D97706) 18%, white);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.collaborator-chip--empty {
  color: var(--muted);
  font-weight: 500;
}

.detail-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-block__head span {
  color: var(--muted);
  font-size: 12px;
}

.host-card,
.room-row,
.entry-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.host-card {
  padding: 14px;
  margin-bottom: 12px;
  cursor: grab;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  box-shadow: inset 4px 0 0 var(--anchor-color, transparent);
}

.host-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(87, 62, 28, 0.08);
}

.host-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.host-card__head span,
.host-card__slots {
  color: var(--muted);
  font-size: 13px;
}

.host-card__slots {
  margin-top: 10px;
  line-height: 1.5;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.metric-row + .metric-row {
  margin-top: 8px;
}

.metric-row--highlight {
  color: var(--text);
  font-weight: 600;
}

.host-card[data-status="ok"] {
  border-color: rgba(45, 125, 70, 0.22);
}

.host-card[data-status="warn"] {
  border-color: rgba(183, 121, 31, 0.35);
}

.host-card[data-status="danger"] {
  border-color: rgba(182, 64, 51, 0.35);
}

.room-row {
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 247, 240, 0.95));
}

.room-row__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.room-row__head h3 {
  font-size: 18px;
}

.room-row__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.room-row__entries {
  display: grid;
  gap: 10px;
}

.entry-card {
  padding: 10px 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.entry-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(87, 62, 28, 0.08);
}

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

.entry-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(162, 75, 42, 0.18);
}

.entry-card[data-status="draft"] {
  border-left: 5px solid var(--warn);
}

.entry-card[data-status="confirmed"] {
  border-left: 5px solid var(--ok);
}

.entry-card[data-status="cancelled"] {
  border-left: 5px solid var(--danger);
  opacity: 0.75;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff7ef;
}

.status-pill[data-status="draft"] {
  background: var(--warn);
}

.status-pill[data-status="confirmed"] {
  background: var(--ok);
}

.status-pill[data-status="cancelled"] {
  background: var(--danger);
}

.room-drop-target {
  min-height: 76px;
  border: 1px dashed rgba(185, 159, 123, 0.9);
  border-radius: 16px;
  margin-bottom: 12px;
  padding: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(249, 239, 223, 0.55);
}

.room-drop-target.is-over {
  border-color: var(--accent);
  background: rgba(162, 75, 42, 0.09);
  color: var(--accent-strong);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(185, 159, 123, 0.7);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
}

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

select[multiple] {
  min-height: 160px;
}

.entry-block__account-select {
  width: auto;
  padding: 0 8px;
  border-radius: 999px;
}

button {
  border: 1px solid transparent;
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.button {
  min-height: 42px;
}

.button--primary {
  background: linear-gradient(135deg, #b05832, #8b371b);
  color: #fff8f2;
  border-color: rgba(139, 55, 27, 0.5);
}

.button--ghost {
  border-color: rgba(185, 159, 123, 0.9);
  background: rgba(255, 255, 255, 0.92);
}

.button--danger {
  border-color: rgba(182, 64, 51, 0.4);
  background: rgba(182, 64, 51, 0.08);
  color: var(--danger);
}

.mini-button {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(185, 159, 123, 0.85);
  background: rgba(255, 249, 240, 0.95);
  color: var(--text);
  font-size: 12px;
}

.entry-form {
  display: grid;
  gap: 14px;
}

.entry-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-message {
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.5;
}

.detail-message[data-tone="info"] {
  background: rgba(162, 75, 42, 0.08);
  color: var(--accent-strong);
}

.detail-message[data-tone="success"] {
  background: rgba(45, 125, 70, 0.1);
  color: var(--ok);
}

.detail-message[data-tone="error"] {
  background: rgba(182, 64, 51, 0.1);
  color: var(--danger);
}

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

.detail-list__item,
.detail-list__empty {
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(215, 196, 168, 0.85);
  background: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}

.detail-list__empty {
  color: var(--muted);
}

.detail-list__item[data-tone="danger"] {
  border-width: 2px;
  border-color: rgba(182, 64, 51, 0.52);
  background: linear-gradient(135deg, rgba(182, 64, 51, 0.14), rgba(255, 246, 244, 0.96));
  box-shadow: inset 4px 0 0 rgba(182, 64, 51, 0.94);
}

.detail-list__item[data-tone="warn"] {
  border-color: rgba(183, 121, 31, 0.32);
  background: rgba(183, 121, 31, 0.06);
}

.detail-list__item[data-tone="ok"] {
  border-color: rgba(45, 125, 70, 0.28);
  background: rgba(45, 125, 70, 0.05);
}

.recommendation-action {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 700;
  text-align: left;
}

.empty-state {
  border: 1px dashed rgba(185, 159, 123, 0.8);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
}

.empty-state--inline {
  padding: 16px;
  border-radius: 16px;
}

.my-schedule-shell {
  min-height: auto;
}

.my-schedule-summary {
  margin: 0;
  padding: 18px;
}

.my-schedule-list {
  padding: 0 18px 18px;
  display: grid;
  gap: 12px;
}

.my-schedule-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px 16px;
  line-height: 1.6;
  box-shadow: 0 8px 20px rgba(87, 62, 28, 0.06);
}

.my-schedule-card strong {
  display: block;
  margin-bottom: 8px;
}

body {
  position: relative;
  margin: 0;
  font-family: "Plus Jakarta Sans", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at 8% 10%, rgba(99, 102, 241, 0.22), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(124, 58, 237, 0.16), transparent 20%),
    linear-gradient(180deg, #F8FAFC 0%, #EEF2FF 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(96px);
  opacity: 0.4;
  z-index: 0;
}

body::before {
  top: -120px;
  left: -120px;
  background: rgba(79, 70, 229, 0.2);
}

body::after {
  right: -120px;
  bottom: -120px;
  background: rgba(124, 58, 237, 0.18);
}

.schedule-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 24px;
}

.workbench-tabs,
.embedded-header,
.schedule-toolbar,
.board-view-toolbar,
.schedule-panel,
.summary-card,
.my-schedule-card {
  box-shadow: var(--shadow-card);
}

.workbench-tabs,
.embedded-header,
.schedule-toolbar,
.board-view-toolbar,
.schedule-panel,
.summary-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
}

.workbench-tabs {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.workbench-tab {
  color: var(--color-muted);
  font-weight: 700;
}

.workbench-tab.is-active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(124, 58, 237, 0.12));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.12);
}

.embedded-header,
.schedule-toolbar,
.board-view-toolbar,
.schedule-panel,
.summary-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.eyebrow {
  color: var(--color-primary);
  font-weight: 800;
}

.schedule-toolbar {
  gap: 18px;
  padding: 18px 20px;
}

.schedule-toolbar h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.toolbar-group label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
}

.summary-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0.72;
}

.summary-label {
  font-weight: 600;
  color: var(--color-muted);
}

.summary-value {
  color: var(--color-text);
  font-weight: 800;
}

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

.board-view-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 24px;
}

.room-view-switcher {
  display: flex;
  gap: 10px;
  flex: 1 1 460px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.room-view-button {
  white-space: nowrap;
}

.anchor-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 0 1 360px;
}

.anchor-filter-field {
  display: grid;
  gap: 8px;
  min-width: 220px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.anchor-filter-summary {
  margin-bottom: 16px;
}

.anchor-filter-card {
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-radius: 24px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.06)),
    rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}

.anchor-filter-card__head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.anchor-filter-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.anchor-filter-card__head strong {
  font-size: 22px;
  line-height: 1.15;
}

.anchor-filter-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.anchor-filter-card__metrics div {
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.anchor-filter-card__metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
}

.anchor-filter-card__metrics strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  color: var(--color-text);
}

.schedule-layout {
  gap: 18px;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
}

.schedule-panel {
  border-radius: 28px;
}

.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.panel-head--board {
  background:
    radial-gradient(circle at right top, rgba(124, 58, 237, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(79, 70, 229, 0.06), rgba(255, 255, 255, 0.98));
}

.panel-head h2 {
  font-size: 20px;
  line-height: 1.15;
}

.panel-head p {
  color: var(--color-muted);
}

.board-scale-switch .mini-button.is-active,
.room-view-button.is-active {
  border-color: transparent;
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
}

.board-grid {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.42), rgba(255, 255, 255, 0.94));
}

.board-grid__corner,
.board-grid__days {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(14px);
}

.board-grid__corner {
  border-right: 1px solid rgba(226, 232, 240, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  color: var(--color-muted);
}

.board-grid__day {
  min-height: 64px;
  border-right: 1px solid rgba(226, 232, 240, 0.88);
  color: var(--color-muted);
}

.board-grid__rooms {
  gap: 18px;
  padding: 18px;
}

.room-section {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px -12px rgba(79, 70, 229, 0.22);
}

.room-section__head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.04)),
    rgba(255, 255, 255, 0.96);
}

.room-section__head h3 {
  font-size: 18px;
  line-height: 1.15;
}

.room-section__head p {
  color: var(--color-muted);
}

.room-time-rail {
  border-right: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(248, 250, 252, 0.88);
}

.room-time-rail__slot,
.room-hour-slot {
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.room-time-rail__slot span {
  color: var(--color-muted);
  font-weight: 600;
}

.room-day-column {
  border-right: 1px solid rgba(226, 232, 240, 0.88);
}

.room-hour-slot {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
}

.room-hour-slot.is-over {
  background: rgba(79, 70, 229, 0.08);
  box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.22);
}

.room-hour-slot::after {
  border: 1px dashed rgba(79, 70, 229, 0.18);
  color: rgba(100, 116, 139, 0.62);
}

.entry-block {
  border-radius: 14px;
  padding: 8px 8px 22px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.2);
}

.entry-block.is-selected {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.38),
    0 18px 32px rgba(79, 70, 229, 0.24);
}

.entry-block[data-has-conflict="true"] {
  border-color: rgba(220, 38, 38, 0.96);
  box-shadow:
    0 0 0 2px rgba(255, 238, 238, 0.84),
    0 14px 26px rgba(220, 38, 38, 0.26);
}

.entry-block[data-has-conflict="true"]::before {
  border-color: rgba(220, 38, 38, 0.96);
}

.entry-block__account-select {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.entry-block__badge {
  background: rgba(220, 38, 38, 0.94);
}

.detail-panel {
  background: rgba(255, 255, 255, 0.94);
}

.detail-block + .detail-block,
.detail-advanced__body {
  border-top-color: rgba(226, 232, 240, 0.92);
}

.detail-advanced {
  background: rgba(248, 250, 252, 0.84);
}

.detail-advanced__toggle::after {
  border-color: rgba(79, 70, 229, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
}

.detail-readonly output,
.detail-list__item,
.detail-list__empty,
.empty-state,
.my-schedule-card {
  border-color: rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.92);
}

.detail-readonly output {
  border-radius: 16px;
}

.collaborator-chip {
  border-color: rgba(79, 70, 229, 0.16);
}

.host-card,
.room-row,
.entry-card {
  border-color: rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
}

.host-card {
  box-shadow:
    inset 4px 0 0 var(--anchor-color, transparent),
    0 8px 24px -14px rgba(79, 70, 229, 0.24);
}

.host-card:hover,
.entry-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.host-card.is-filtered {
  border-color: rgba(79, 70, 229, 0.42);
  box-shadow:
    inset 4px 0 0 var(--anchor-color, transparent),
    0 0 0 2px rgba(79, 70, 229, 0.12),
    var(--shadow-card-hover);
}

.host-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.host-card__actions .mini-button {
  flex: 1 1 0;
}

.host-card__slots,
.host-card__head span,
.metric-row {
  color: var(--color-muted);
}

.metric-row--highlight {
  color: var(--color-text);
}

input,
select,
textarea {
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  border-radius: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.7);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.button,
.mini-button {
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button--primary {
  border-color: transparent;
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
}

.button--ghost,
.mini-button,
.mini-button--ghost {
  border-color: rgba(226, 232, 240, 0.96);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
}

.button--ghost:hover,
.mini-button:hover,
.mini-button--ghost:hover {
  border-color: rgba(79, 70, 229, 0.22);
  background: rgba(238, 242, 255, 0.82);
}

.button--danger {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(254, 242, 242, 0.92);
  color: var(--color-danger);
}

.detail-message[data-tone="info"] {
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-strong);
}

.detail-message[data-tone="success"] {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.detail-message[data-tone="error"] {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.detail-list__item[data-tone="danger"] {
  border-color: rgba(239, 68, 68, 0.44);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(255, 255, 255, 0.96));
  box-shadow: inset 4px 0 0 rgba(239, 68, 68, 0.92);
}

.detail-list__item[data-tone="warn"] {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.9);
}

.detail-list__item[data-tone="ok"] {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(236, 253, 245, 0.88);
}

.recommendation-action {
  color: var(--accent-strong);
}

.empty-state {
  border: 1px dashed rgba(79, 70, 229, 0.2);
  color: var(--color-muted);
  background: rgba(248, 250, 252, 0.88);
}

@media (max-width: 1200px) {
  .summary-grid,
  .schedule-layout {
    grid-template-columns: 1fr;
  }

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

  .schedule-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-group--headline,
  .toolbar-group--actions {
    justify-content: flex-start;
  }

  .panel-head--board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .schedule-app {
    padding: 14px;
  }

  .board-view-toolbar,
  .anchor-filter-bar,
  .host-card__actions {
    flex-direction: column;
  }

  .anchor-filter-field,
  .anchor-filter-bar,
  .room-view-switcher {
    width: 100%;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

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

  .anchor-filter-card__metrics {
    grid-template-columns: 1fr;
  }

  .workbench-tabs {
    gap: 8px;
  }

  .workbench-tab {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

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