:root {
  --bg: #eaf1f9;
  --panel: #f9fbfe;
  --ink: #173042;
  --muted: #5a7082;
  --line: #c6d6e5;
  --line-strong: #aec4d8;
  --accent: #2f6ea6;
  --accent-soft: #d9e9f7;
  --accent-strong: #1f4f7f;
  --success: #1d6b74;
  --shadow: 0 22px 60px rgba(24, 52, 78, 0.12);
  --shadow-soft: 0 14px 32px rgba(24, 52, 78, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Segoe UI Variable", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(47, 110, 166, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(31, 79, 127, 0.12), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
}

#auth-panel[hidden],
#app-content[hidden] {
  display: none !important;
}

.app-shell {
  width: min(1920px, calc(100% - 16px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.app-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 20px;
}

.app-main {
  min-width: 0;
}

.hero {
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(173, 198, 220, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, rgba(249, 251, 254, 0.99) 0%, rgba(233, 242, 251, 0.94) 100%);
  box-shadow: var(--shadow);
  border-radius: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.auth-panel {
  max-width: 620px;
  margin: 72px auto 24px;
}

.login-shell {
  display: block;
}

.permission-banner {
  margin-bottom: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #fff9ef 0%, #f9eed7 100%);
  border-radius: 20px;
}

.permission-banner-inline {
  margin-bottom: 0;
  padding: 12px 14px;
  border: 1px solid rgba(224, 191, 108, 0.36);
}

.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.workspace-tab {
  min-width: 150px;
  color: var(--accent-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #f7fbff 0%, #e6f0fa 100%);
  border: 1px solid rgba(170, 194, 215, 0.88);
  box-shadow: var(--shadow-soft);
}

.sidebar-nav .workspace-tab {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 14px;
}

.workspace-tab:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #eff6fd 0%, #dbeaf8 100%);
}

.workspace-tab.active {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  box-shadow:
    0 14px 30px rgba(47, 110, 166, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.workspace-tab-panel[hidden] {
  display: none !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.55), transparent 34%),
    linear-gradient(135deg, #eef6ff 0%, #dcecfb 100%);
}

.dashboard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

#dashboard-schedule-chart-panel {
  grid-column: 2 / span 3;
}

.dashboard-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 240px;
  padding: 8px 2px 2px;
}

.dashboard-chart-toolbar {
  grid-template-columns: 160px minmax(260px, 1fr);
  align-items: end;
  margin-bottom: 10px;
}

.dashboard-chart-rich {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: 0;
  padding: 4px 0 0;
}

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

.dashboard-kpi-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(172, 197, 219, 0.76);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #fbfdff 0%, #edf4fb 100%);
  box-shadow: var(--shadow-soft);
}

.dashboard-kpi-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.dashboard-kpi-value {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
  color: var(--accent-strong);
}

.dashboard-kpi-meta {
  font-size: 13px;
  color: var(--muted);
}

.dashboard-chart-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(172, 197, 219, 0.76);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #fbfdff 0%, #eef4fb 100%);
  box-shadow: var(--shadow-soft);
}

.dashboard-chart-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dashboard-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
}

.legend-dot.lessons {
  background: #d64d73;
}

.legend-dot.average {
  background: #2f6ea6;
}

.dashboard-line-chart {
  width: 100%;
  height: 240px;
}

.dashboard-grid-line {
  stroke: rgba(164, 188, 211, 0.48);
  stroke-width: 1;
}

.dashboard-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-line.lessons {
  stroke: #d64d73;
}

.dashboard-line.average {
  stroke: #2f6ea6;
  stroke-dasharray: 6 6;
}

.dashboard-line-point {
  fill: #ffffff;
  stroke: #d64d73;
  stroke-width: 3;
}

.dashboard-line-labels {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.dashboard-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 240px;
}

.dashboard-chart-bar-card {
  display: grid;
  gap: 8px;
  align-items: end;
}

.dashboard-chart-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  text-align: center;
}

.dashboard-chart-bar-shell {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 168px;
  padding: 10px 8px;
  border: 1px solid rgba(172, 197, 219, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #f8fbfe 0%, #edf4fb 100%);
  box-shadow: var(--shadow-soft);
}

.dashboard-chart-bar {
  width: min(52px, 100%);
  min-height: 16px;
  border-radius: 16px 16px 10px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #6aaee6 0%, #2f6ea6 100%);
  box-shadow:
    0 10px 18px rgba(47, 110, 166, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dashboard-chart-label {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}

.soft-badge {
  background: rgba(31, 79, 127, 0.08);
  color: var(--accent-strong);
}

.soft-badge.success {
  background: rgba(35, 131, 91, 0.12);
  color: #1e6c4c;
}

.soft-badge.active {
  background: rgba(31, 79, 127, 0.12);
  color: var(--accent-strong);
}

.soft-badge.warning {
  background: rgba(214, 131, 37, 0.14);
  color: #8b5200;
}

.soft-badge.danger {
  background: rgba(201, 87, 60, 0.16);
  color: #9a3412;
}

.subtle-action-button {
  justify-self: start;
  margin-top: 6px;
  padding: 7px 11px;
  border-radius: 12px;
  border: 1px solid rgba(170, 194, 215, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f7fbff 0%, #e6f0fa 100%);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.subtle-action-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #eff6fd 0%, #dbeaf8 100%);
}

.soft-badge.muted {
  background: rgba(112, 132, 151, 0.12);
  color: var(--muted);
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-actions button {
  width: 100%;
}

.summary-lines {
  display: grid;
  gap: 10px;
}

.module-overview {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

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

.metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(172, 197, 219, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f8fbfe 0%, #edf4fb 100%);
  box-shadow: var(--shadow-soft);
  border-radius: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: 22px;
  line-height: 1.1;
  color: var(--ink);
}

.tag-group {
  display: grid;
  gap: 10px;
}

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

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(173, 197, 219, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.2) 100%),
    #fff;
  color: var(--ink);
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(24, 52, 78, 0.06);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(29, 107, 116, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 40%),
    rgba(29, 107, 116, 0.08);
  color: var(--success);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(29, 107, 116, 0.08);
}

.hero-actions button:nth-child(2),
.hero-actions button:nth-child(3) {
  background: var(--accent-strong);
}

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

h1,
h2 {
  margin: 0 0 12px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.intro,
.card p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.stats-grid,
.workspace-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workspace-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.workspace-grid.masterdata-workbench-layout {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-grid.masterdata-workbench-layout > .card.panel {
  width: 100%;
}

.workspace-grid.masterdata-selection-layout {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-grid.masterdata-selection-layout .selection-primary-panel,
.workspace-grid.masterdata-selection-layout .selection-secondary-panel {
  width: 100%;
}

.workspace-grid.cluster-workspace-layout {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.workspace-grid.cluster-workspace-layout #cluster-panel {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.workspace-grid.cluster-workspace-layout #cluster-proposals-panel {
  grid-column: 2 / span 2;
  grid-row: 1;
}

.workspace-grid.cluster-workspace-layout #cluster-analysis-panel {
  grid-column: 2;
  grid-row: 2;
}

.workspace-grid.cluster-workspace-layout #cluster-analysis-detail-panel {
  grid-column: 3;
  grid-row: 2;
}

.workspace-grid.cluster-workspace-layout #cluster-assignments-panel {
  grid-column: 2;
  grid-row: 3;
}

.workspace-grid.cluster-workspace-layout #cluster-materialization-panel {
  grid-column: 3;
  grid-row: 3;
}

.workspace-grid.cluster-workspace-layout #cluster-solver-analysis-panel {
  grid-column: 2;
  grid-row: 4;
}

.workspace-grid.cluster-workspace-layout #cluster-solver-proposals-panel {
  grid-column: 3;
  grid-row: 4;
}

.workspace-grid.masterdata-workbench-layout #people-list {
  max-height: 560px;
}

.workspace-grid.masterdata-workbench-layout #people-detail-panel {
  margin-top: 0;
}

.workspace-grid.masterdata-selection-layout .selection-secondary-panel {
  display: none;
}

.schedule-workspace {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.schedule-main-panel {
  min-width: 0;
  padding: 18px 18px 20px;
}

.schedule-panel-header {
  margin-bottom: 8px;
}

.schedule-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.schedule-main-panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.schedule-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(31, 79, 127, 0.12);
  border-radius: 999px;
  background: rgba(31, 79, 127, 0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card {
  padding: 24px;
  border: 1px solid rgba(173, 198, 220, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 24%),
    var(--panel);
  box-shadow: var(--shadow);
  border-radius: 22px;
}

.sidebar-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.sidebar-brand {
  display: grid;
  gap: 8px;
}

.sidebar-brand h1 {
  margin-bottom: 0;
  font-size: 26px;
}

.sidebar-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.sidebar-status-panel {
  display: grid;
  gap: 10px;
}

.sidebar-group,
.sidebar-subgroup {
  margin: 0;
  border: 1px solid rgba(173, 197, 219, 0.76);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #fbfdff 0%, #eef5fc 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.sidebar-group > summary,
.sidebar-subgroup > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.sidebar-group > summary::-webkit-details-marker,
.sidebar-subgroup > summary::-webkit-details-marker {
  display: none;
}

.sidebar-group > summary::after,
.sidebar-subgroup > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.sidebar-group[open] > summary::after,
.sidebar-subgroup[open] > summary::after {
  content: "-";
}

.sidebar-group > :not(summary),
.sidebar-subgroup > :not(summary) {
  padding: 0 12px 12px;
}

.sidebar-subgroup {
  margin-top: 6px;
}

.compact-subgroup {
  min-width: 140px;
}

.sidebar-subnav {
  display: grid;
  gap: 8px;
}

.sidebar-actions {
  display: grid;
  gap: 8px;
}

.sidebar-actions button {
  width: 100%;
  padding: 10px 12px;
}

.sidebar-summary {
  display: grid;
  gap: 8px;
}

.sidebar-summary-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(176, 199, 219, 0.7);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.sidebar-summary-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-summary-value {
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
}

.sidebar-summary-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #fbfdff 0%, #f0f6fc 100%);
}

.panel {
  min-height: 0;
}

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

.panel-kicker,
.stat-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
}

.workspace-tab-panel .panel-header {
  margin-bottom: 10px;
}

.workspace-tab-panel .panel-header > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-tab-panel .panel-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.workspace-tab-panel .panel-kicker {
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgba(31, 79, 127, 0.12);
  border-radius: 999px;
  background: rgba(31, 79, 127, 0.08);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.stat-value {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.date-filter {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.edit-form {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(173, 197, 219, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #f6fafe 0%, #edf4fb 100%);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.schedule-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) auto auto;
  column-gap: 14px;
  row-gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.schedule-toolbar > .detail-summary,
.schedule-admin-adjustment-status {
  margin-bottom: 0;
}

.schedule-filter-grid {
  grid-template-columns: 170px minmax(320px, 1.2fr) minmax(240px, 0.8fr);
  align-items: end;
  grid-column: 1 / span 2;
  gap: 10px;
}

.schedule-date-grid {
  grid-template-columns: 220px 220px;
  align-items: end;
  gap: 10px;
}

.schedule-actions {
  gap: 10px;
  margin-top: -2px;
  justify-self: start;
}

.schedule-actions .inline-status {
  min-width: 0;
}

.schedule-controls-inline {
  margin-bottom: 0;
  padding-top: 0;
  justify-self: end;
}

.schedule-summary-inline {
  margin-bottom: 10px;
  font-size: 14px;
}

.toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.cluster-toolbar {
  align-items: end;
}

.cluster-list-item {
  gap: 6px;
}

.cluster-list-item.active {
  border-color: rgba(31, 79, 127, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #eff7ff 0%, #e1effc 100%);
}

.cluster-detail-card {
  gap: 12px;
}

.cluster-detail-grid {
  display: grid;
  gap: 12px;
}

.cluster-detail-section {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.cluster-detail-heading {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cluster-detail-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cluster-detail-pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(152, 191, 220, 0.88);
  background: rgba(231, 242, 252, 0.9);
  color: var(--accent-strong);
  font-size: 12px;
}

.cluster-detail-pill-saved {
  border-color: rgba(72, 154, 102, 0.54);
  background: rgba(226, 246, 233, 0.96);
  color: #1f6f3d;
}

.cluster-detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.cluster-detail-list li + li {
  margin-top: 4px;
}

.cluster-combined-proposal {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #eef7ff 0%, #ddeefe 100%);
}

.cluster-proposal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.cluster-proposal-chip {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(152, 191, 220, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #f7fbff 0%, #e5f1fc 100%);
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.cluster-proposal-chip:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #eef7ff 0%, #d9ecfb 100%);
}

.list-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.people-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.schedule-admin-tabs {
  margin-top: 18px;
  margin-bottom: 0;
}

.tab-button {
  min-width: 130px;
  color: var(--accent-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #f7fbff 0%, #e6f0fa 100%);
  border: 1px solid rgba(170, 194, 215, 0.88);
  box-shadow: var(--shadow-soft);
}

.tab-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #eff6fd 0%, #dbeaf8 100%);
}

.tab-button.active {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  box-shadow:
    0 14px 30px rgba(47, 110, 166, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.paging-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.paging-controls button {
  padding: 10px 14px;
}

.compact-field {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: 14px;
}

.check-grid {
  display: grid;
  gap: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.check-row input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
  accent-color: var(--accent);
}

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

.edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

select,
input[type="search"],
input[type="text"],
input[type="password"],
input[type="number"] {
  border: 1px solid rgba(170, 194, 215, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 251, 255, 0.98) 100%);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(24, 52, 78, 0.04);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-status {
  color: var(--muted);
  line-height: 1.5;
}

input[type="date"] {
  border: 1px solid rgba(170, 194, 215, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 251, 255, 0.98) 100%);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(24, 52, 78, 0.04);
}

button {
  border: 1px solid rgba(20, 61, 96, 0.14);
  padding: 12px 16px;
  font: inherit;
  color: white;
  background: linear-gradient(180deg, #3b7bb3 0%, #2f6ea6 58%, #285f90 100%);
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  box-shadow:
    0 10px 24px rgba(47, 110, 166, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

button:hover {
  background: linear-gradient(180deg, #4a89c0 0%, #3578b1 58%, #2b679a 100%);
  border-color: rgba(20, 61, 96, 0.22);
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(47, 110, 166, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

button:active {
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(47, 110, 166, 0.18),
    inset 0 2px 4px rgba(18, 49, 78, 0.16);
}

button:disabled {
  cursor: not-allowed;
  background: #90a8bb;
  border-color: rgba(90, 112, 130, 0.14);
  transform: none;
  box-shadow: none;
}

.list-shell {
  display: grid;
  gap: 12px;
}

.user-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

#people-list,
#modules-list,
#enrollments-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

#people-list.selection-table {
  max-height: none;
  overflow: visible;
}

.empty-state {
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  padding: 24px;
  color: var(--muted);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(245, 250, 255, 0.8) 100%);
}

.list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(173, 197, 219, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.list-item:hover,
.list-item.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #f7fbff 0%, var(--accent-soft) 100%);
}

.list-item-title {
  font-weight: 600;
  font-size: 18px;
}

.list-item-meta,
.detail-summary,
.enrollment-meta {
  color: var(--muted);
  line-height: 1.5;
}

.detail-summary {
  margin-bottom: 16px;
}

.selection-table {
  display: grid;
  gap: 8px;
}

.selection-table-row {
  display: grid;
  grid-template-columns: 90px 1.2fr 1.15fr 1.2fr 1fr 90px 100px 120px 120px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
}

.selection-table-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border: 1px solid rgba(170, 194, 215, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.22) 100%),
    linear-gradient(180deg, #eef6fd 0%, #dfeaf7 100%);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(24, 52, 78, 0.08);
}

.selection-table-item {
  border: 1px solid rgba(170, 194, 215, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #f9fcff 0%, #edf4fb 100%);
  box-shadow: var(--shadow-soft);
  text-align: left;
  color: #23415f;
}

.selection-table-item:hover,
.selection-table-item.active {
  border-color: rgba(53, 116, 171, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #edf5fd 0%, #dceafa 100%);
  transform: translateY(-1px);
}

.selection-table-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-table-item span:first-child,
.selection-table-item span:nth-child(2),
.selection-table-item span:nth-child(3) {
  color: #173754;
  font-weight: 600;
}

.selection-inline-editor {
  margin: -2px 0 8px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(170, 194, 215, 0.74);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.08) 40%),
    linear-gradient(180deg, #f6fbff 0%, #eaf3fb 100%);
  box-shadow: var(--shadow-soft);
  overflow: visible;
}

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

.selection-inline-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.selection-inline-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.selection-multi-shell {
  display: grid;
  gap: 8px;
}

.selection-multi-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.selection-multi-add {
  min-width: 44px;
  padding-inline: 0;
}

.selection-picked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}

.selection-picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(76, 134, 184, 0.45);
  border-radius: 999px;
  background: rgba(231, 241, 251, 0.94);
  color: #173754;
  font-size: 12px;
  font-weight: 600;
}

.selection-picked-chip strong {
  font-size: 11px;
  color: #2f608b;
}

.selection-picked-empty,
.selection-group-note {
  color: var(--muted);
  font-size: 12px;
}

.schedule-lesson-group-count {
  color: #c25f0c;
  font-weight: 700;
}

.selection-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.selection-inline-actions .check-row {
  margin-right: 4px;
}

.selection-inline-save {
  min-width: 160px;
}

.selection-inline-context {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(173, 197, 219, 0.5);
}

.selection-inline-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selection-inline-context-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.selection-inline-open-admin {
  min-width: 190px;
}

.selection-inline-related-list {
  display: grid;
  gap: 8px;
}

.selection-inline-related-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(239, 246, 252, 0.82) 100%);
}

.selection-inline-related-item strong {
  color: var(--ink);
  font-size: 14px;
}

.selection-inline-related-item span,
.selection-inline-related-item.empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.people-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.people-detail-actions button {
  padding: 10px 14px;
}

.people-metric-grid {
  margin-bottom: 16px;
}

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

.masterdata-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(174, 196, 216, 0.7);
}

.masterdata-form[hidden] {
  display: none !important;
}

.compact-panel-header {
  margin-bottom: 12px;
}

.field-picker-options {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.field-picker-row {
  margin: 0;
}

.related-panel {
  margin-top: 8px;
  padding-top: 4px;
}

.related-header {
  margin-bottom: 12px;
}

.schedule-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.schedule-admin-workspace {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

[data-workspace-panel="schedule-admin"] {
  align-items: start;
}

[data-workspace-panel="schedule-admin"] > .card {
  min-width: 0;
}

[data-workspace-panel="schedule-admin"] .panel {
  padding: 18px 18px 20px;
}

[data-schedule-admin-panel][hidden] {
  display: none !important;
}

.schedule-admin-header-panel {
  padding-bottom: 16px;
}

.schedule-admin-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.schedule-admin-header-summary {
  flex: 1 1 520px;
  margin-bottom: 0;
}

.schedule-admin-header-actions {
  flex: 0 1 auto;
  margin-bottom: 0;
}

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

.schedule-admin-card {
  align-content: start;
  min-height: 120px;
}

.schedule-admin-file {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(176, 199, 219, 0.7);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

button.schedule-admin-file {
  color: var(--ink);
}

.schedule-admin-file.active,
.schedule-admin-file:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(221, 236, 248, 0.96) 100%);
}

.schedule-admin-file strong {
  font-size: 14px;
  line-height: 1.3;
}

.schedule-admin-file span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.schedule-admin-detail-panel pre {
  min-height: 260px;
}

.schedule-admin-adjustment-toolbar {
  gap: 10px;
  margin-bottom: 14px;
}

.schedule-admin-adjustment-week-controls {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(239, 246, 252, 0.82) 100%);
}

.schedule-admin-week {
  margin-bottom: 14px;
}

.schedule-admin-adjustment-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr);
  gap: 12px;
}

.schedule-admin-quick-actions {
  margin-bottom: 12px;
  padding: 12px 14px;
  position: sticky;
  top: 12px;
  z-index: 9;
}

.schedule-admin-quick-actions-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(120px, 150px) minmax(120px, 150px) minmax(320px, 1fr);
  gap: 12px;
  align-items: end;
}

.schedule-admin-quick-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.schedule-admin-planning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
  gap: 12px;
  align-items: start;
}

[data-workspace-panel="schedule-admin"] .panel {
  padding: 14px 16px 16px;
}

.schedule-admin-header-panel {
  padding-bottom: 12px;
}

.schedule-admin-header-bar {
  gap: 8px 14px;
  margin-bottom: 10px;
}

.schedule-admin-header-summary,
.schedule-admin-header-actions {
  margin-bottom: 0;
}

.schedule-admin-adjustment-toolbar {
  gap: 8px 10px;
  margin-bottom: 10px;
}

.schedule-admin-adjustment-toolbar {
  grid-template-columns: minmax(0, 1fr);
}

.schedule-admin-adjustment-toolbar .detail-summary {
  font-size: 13px;
  line-height: 1.45;
}

.schedule-admin-adjustment-toolbar label > span,
.schedule-admin-adjustment-week-controls .schedule-week-picker > span,
.schedule-admin-quick-actions label > span {
  font-size: 11px;
  letter-spacing: 0.05em;
}

.schedule-admin-adjustment-toolbar input[type="search"],
.schedule-admin-adjustment-toolbar input[type="date"],
.schedule-admin-adjustment-toolbar select,
.schedule-admin-quick-actions input[type="date"],
.schedule-admin-quick-actions input[type="time"] {
  min-height: 38px;
  padding: 7px 10px;
}

.schedule-filter-grid {
  grid-template-columns: 150px minmax(260px, 1.08fr) minmax(210px, 0.72fr);
  gap: 8px;
}

.schedule-admin-filter-grid {
  grid-template-columns: 118px 138px 146px 168px 168px minmax(250px, 1fr) minmax(250px, 0.95fr);
  grid-column: 1 / -1;
  align-items: end;
  column-gap: 14px;
  row-gap: 8px;
}

.schedule-admin-filter-grid label {
  min-width: 0;
}

.schedule-admin-filter-entity {
  grid-column: 6;
}

.schedule-admin-filter-query {
  grid-column: 7;
}

.schedule-date-grid {
  grid-template-columns: 190px 190px;
  gap: 8px;
}

.schedule-controls {
  gap: 8px;
  margin-bottom: 10px;
}

.schedule-admin-adjustment-week-controls {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.schedule-admin-adjustment-week-controls button,
.schedule-admin-quick-actions-buttons button,
.schedule-toolbar button {
  padding: 9px 12px;
}

.schedule-admin-quick-actions {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.schedule-admin-quick-actions-grid {
  grid-template-columns: minmax(156px, 190px) minmax(96px, 124px) minmax(96px, 124px) minmax(280px, 1fr);
  gap: 10px;
}

.schedule-admin-quick-actions-buttons {
  gap: 8px;
}

.schedule-admin-planning-grid {
  grid-template-columns: minmax(0, 1.56fr) minmax(300px, 0.74fr);
  gap: 10px;
}

.schedule-admin-pending-table-header,
.schedule-admin-pending-row {
  gap: 8px;
  padding: 8px 10px;
}

.schedule-admin-pending-row strong {
  font-size: 12px;
}

.schedule-admin-pending-row span {
  font-size: 11px;
  line-height: 1.35;
}

.schedule-admin-adjustment-detail,
.schedule-admin-change-summary,
.schedule-admin-series-toggle,
.schedule-admin-series-preview,
.schedule-admin-conflict-box,
.schedule-admin-adjustment-room-editor {
  gap: 8px;
}

.schedule-admin-change-summary,
.schedule-admin-series-toggle,
.schedule-admin-series-preview,
.schedule-admin-conflict-box {
  padding: 8px 10px;
  border-radius: 12px;
}

.schedule-admin-adjustment-room-editor {
  margin-top: 12px;
  padding-top: 12px;
}

.schedule-admin-picker summary {
  padding: 8px 10px;
}

.schedule-admin-pending-panel {
  align-self: start;
  position: sticky;
  top: 12px;
}

@media (max-width: 1380px) {
  .schedule-admin-quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .schedule-admin-quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .schedule-admin-quick-actions {
    position: static;
  }
}

.schedule-admin-pending-list {
  display: grid;
  gap: 0;
  max-height: 720px;
  overflow: auto;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(239, 246, 252, 0.82) 100%);
}

.schedule-admin-pending-table-header,
.schedule-admin-pending-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.68fr) minmax(82px, 0.62fr) minmax(130px, 1fr) minmax(74px, 0.5fr) minmax(96px, 0.8fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.schedule-admin-pending-table-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid rgba(173, 197, 219, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(234, 244, 252, 0.96) 100%);
}

.schedule-admin-pending-table-header span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.schedule-admin-pending-item {
  display: contents;
}

.schedule-admin-pending-row {
  text-align: left;
  border: 0;
  border-top: 1px solid rgba(173, 197, 219, 0.38);
  background: transparent;
  cursor: grab;
}

.schedule-admin-pending-row:hover,
.schedule-admin-pending-row.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(229, 239, 250, 0.92) 100%);
}

body.schedule-admin-dragging .schedule-admin-pending-row.active {
  cursor: grabbing;
}

.schedule-admin-pending-row strong,
.schedule-admin-pending-row span {
  display: block;
}

.schedule-admin-pending-row strong {
  color: var(--ink);
  font-size: 13px;
}

.schedule-admin-pending-row span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-matrix {
  display: grid;
  gap: 10px;
}

.schedule-matrix-header {
  position: sticky;
  top: 12px;
  z-index: 8;
}

.schedule-matrix-header,
.schedule-matrix-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.schedule-matrix-corner,
.schedule-matrix-row-label {
  padding: 12px 14px;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(239, 246, 252, 0.82) 100%);
}

.schedule-matrix-corner {
  position: sticky;
  left: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.schedule-matrix-row-label {
  position: sticky;
  left: 0;
  z-index: 6;
  display: grid;
  gap: 4px;
}

.schedule-matrix-row-label strong {
  font-size: 15px;
  color: var(--ink);
}

.schedule-matrix-row-label span {
  font-size: 13px;
  color: var(--muted);
}

.schedule-matrix-timeline,
.schedule-matrix-body {
  position: relative;
  min-width: 0;
  overflow-x: auto;
}

.schedule-matrix-timeline {
  min-height: 48px;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(239, 246, 252, 0.82) 100%);
}

.schedule-matrix-timeline::before,
.schedule-matrix-body::before {
  content: "";
  display: block;
  width: var(--schedule-grid-width, 1100px);
}

.schedule-matrix-time-label {
  position: absolute;
  top: 12px;
  z-index: 1;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.schedule-matrix-body {
  min-height: 138px;
  border: 1px solid rgba(173, 197, 219, 0.62);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(239, 246, 252, 0.82) 100%);
}

.schedule-matrix-placement-cell {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
}

.schedule-matrix-placement-cell.valid {
  background:
    linear-gradient(180deg, rgba(62, 168, 92, 0.18) 0%, rgba(62, 168, 92, 0.1) 100%);
  box-shadow: inset 0 0 0 1px rgba(32, 123, 59, 0.28);
}

.schedule-matrix-placement-cell.blocked {
  background:
    linear-gradient(180deg, rgba(255, 170, 82, 0.28) 0%, rgba(255, 140, 36, 0.18) 100%);
  box-shadow: inset 0 0 0 1px rgba(214, 90, 18, 0.34);
}

.schedule-matrix-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 1px;
  border-left: 1px dashed rgba(173, 197, 219, 0.7);
}

.schedule-matrix-line.hour-marker {
  border-left-color: rgba(120, 156, 191, 0.78);
}

.schedule-matrix-line.quarter-marker {
  border-left-color: rgba(173, 197, 219, 0.42);
  border-left-style: dotted;
}

.schedule-matrix-lesson {
  position: absolute;
  top: 12px;
  z-index: 2;
  min-height: auto;
  padding: 12px 14px 11px;
  display: grid;
  align-content: start;
  gap: 5px;
}

.schedule-matrix-lesson .schedule-lesson-title {
  font-size: 15px;
  line-height: 1.2;
}

.schedule-matrix-lesson .schedule-lesson-subline {
  font-size: 12px;
  line-height: 1.25;
}

.schedule-matrix-lesson .schedule-lesson-subline-soft {
  color: var(--muted);
}

.schedule-matrix-lesson.medium {
  padding: 10px 11px 9px;
}

.schedule-matrix-lesson.medium .schedule-lesson-title {
  font-size: 14px;
}

.schedule-matrix-lesson.medium .schedule-lesson-subline {
  font-size: 11px;
}

.schedule-matrix-lesson.compact {
  padding: 9px 10px 8px;
  gap: 3px;
}

.schedule-matrix-lesson.compact .schedule-lesson-title {
  font-size: 13px;
  line-height: 1.15;
}

.schedule-matrix-lesson.compact .schedule-lesson-subline {
  font-size: 10px;
  line-height: 1.15;
}

.schedule-matrix-lesson.compact .schedule-lesson-subline-soft {
  display: none;
}

.schedule-matrix-body.has-drop-preview.drop-preview-valid .schedule-admin-matrix-drop-zone {
  background: rgba(62, 168, 92, 0.24);
  border-color: rgba(32, 123, 59, 0.82);
}

.schedule-matrix-body.placement-hint-active.placement-hint-valid {
  background:
    linear-gradient(180deg, rgba(211, 243, 220, 0.94) 0%, rgba(245, 252, 247, 0.9) 28%, rgba(235, 244, 250, 0.86) 100%);
}

.schedule-matrix-body.placement-hint-active.placement-hint-blocked {
  background:
    linear-gradient(180deg, rgba(255, 181, 96, 0.96) 0%, rgba(255, 228, 192, 0.94) 28%, rgba(239, 246, 252, 0.86) 100%);
}

.schedule-matrix-body.has-drop-preview.drop-preview-blocked .schedule-admin-matrix-drop-zone {
  background: rgba(224, 116, 116, 0.14);
  border-color: rgba(186, 78, 78, 0.64);
}

.schedule-matrix-body.has-drop-preview.drop-preview-pending .schedule-admin-matrix-drop-zone {
  background: rgba(47, 110, 166, 0.12);
  border-color: rgba(47, 110, 166, 0.45);
}

.schedule-admin-matrix-drop-zone {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border: 2px dashed transparent;
  border-radius: 16px;
  pointer-events: none;
}

.schedule-admin-adjustment-toolbar .schedule-filter-grid,
.schedule-admin-adjustment-toolbar .schedule-date-grid {
  margin-bottom: 0;
}

.schedule-admin-adjustment-toolbar .schedule-actions {
  margin-bottom: 0;
}

.schedule-admin-adjustment-toolbar .schedule-date-grid {
  display: none;
}

.schedule-admin-adjustment-detail {
  display: grid;
  gap: 10px;
}

.schedule-admin-adjustment-detail p {
  margin: 0;
}

.schedule-admin-change-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(176, 199, 219, 0.5);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0) 40%),
    rgba(238, 245, 252, 0.85);
}

.schedule-admin-change-summary.active {
  border-color: rgba(47, 110, 166, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(240, 247, 255, 0.96) 0%, rgba(228, 239, 251, 0.94) 100%);
}

.schedule-admin-change-summary strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.schedule-admin-change-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.schedule-admin-change-list li + li {
  margin-top: 4px;
}

.schedule-admin-series-toggle {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(176, 199, 219, 0.5);
  border-radius: 14px;
  background: rgba(245, 250, 255, 0.88);
}

.schedule-admin-series-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(176, 199, 219, 0.5);
  border-radius: 14px;
  background: rgba(249, 252, 255, 0.88);
}

.schedule-admin-series-preview.active {
  border-color: rgba(47, 110, 166, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(240, 247, 255, 0.96) 0%, rgba(228, 239, 251, 0.94) 100%);
}

.schedule-admin-series-preview strong {
  display: block;
  margin-bottom: 6px;
}

.schedule-admin-series-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.schedule-admin-series-list li + li {
  margin-top: 4px;
}

.schedule-admin-lesson-block.series-target {
  box-shadow:
    0 0 0 2px rgba(47, 110, 166, 0.22),
    0 14px 32px rgba(24, 52, 78, 0.12);
  border-color: rgba(47, 110, 166, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.16) 42%),
    linear-gradient(180deg, rgba(238, 246, 255, 0.98) 0%, rgba(225, 237, 250, 0.95) 100%);
}

.schedule-admin-lesson-block.active,
.schedule-matrix-lesson.active {
  box-shadow:
    0 0 0 3px rgba(21, 87, 148, 0.34),
    0 16px 34px rgba(20, 46, 74, 0.16);
  border-color: rgba(27, 99, 164, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.18) 36%),
    linear-gradient(180deg, rgba(219, 236, 255, 1) 0%, rgba(196, 221, 248, 0.98) 100%);
}

.schedule-admin-lesson-block.active .schedule-lesson-title,
.schedule-matrix-lesson.active .schedule-lesson-title {
  color: #103a60;
}

.schedule-admin-conflict-box {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(205, 122, 122, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(255, 243, 243, 0.96) 0%, rgba(255, 233, 233, 0.9) 100%);
}

.schedule-admin-conflict-box.success {
  border-color: rgba(70, 147, 106, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(241, 252, 245, 0.96) 0%, rgba(228, 247, 235, 0.9) 100%);
}

.schedule-admin-conflict-box strong,
.schedule-admin-conflict-box span {
  display: block;
}

.schedule-admin-conflict-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.schedule-admin-conflict-list li + li {
  margin-top: 6px;
}

.schedule-admin-adjustment-room-editor {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(176, 199, 219, 0.5);
  display: grid;
  gap: 12px;
}

.schedule-admin-tabs .tab-button {
  min-width: 150px;
}

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

.schedule-admin-room-option {
  width: 100%;
  text-align: left;
}

.schedule-admin-room-option strong,
.schedule-admin-room-option span {
  display: block;
}

.schedule-admin-room-option span {
  color: var(--muted);
}

.schedule-admin-roomless-list {
  display: grid;
  gap: 10px;
}

.schedule-admin-roomless-item {
  width: 100%;
  text-align: left;
}

.schedule-admin-roomless-item strong,
.schedule-admin-roomless-item span {
  display: block;
}

.schedule-admin-roomless-item span {
  color: var(--muted);
}

.schedule-admin-room-option.available {
  border-color: rgba(69, 154, 101, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(240, 252, 244, 0.98) 0%, rgba(226, 247, 233, 0.94) 100%);
}

.schedule-admin-room-option.blocked {
  border-color: rgba(198, 92, 92, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 243, 243, 0.98) 0%, rgba(247, 226, 226, 0.94) 100%);
}

.schedule-admin-picker {
  border: 1px solid rgba(176, 199, 219, 0.6);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(245, 250, 255, 0.9) 100%);
}

.schedule-admin-picker summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--accent-strong);
  user-select: none;
}

.schedule-admin-picker summary::-webkit-details-marker {
  display: none;
}

.schedule-admin-picker[open] summary {
  border-bottom: 1px solid rgba(176, 199, 219, 0.45);
}

.schedule-admin-picker .list-shell {
  margin: 0;
  border: 0;
  border-radius: 0 0 14px 14px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: none;
}

.schedule-admin-lesson-block {
  cursor: pointer;
  touch-action: none;
}

.schedule-admin-lesson-block.conflict {
  border-color: rgba(214, 90, 18, 0.96);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 238, 214, 0.99) 0%, rgba(255, 183, 94, 0.96) 100%);
  box-shadow:
    0 16px 30px rgba(214, 90, 18, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.schedule-admin-dragging .schedule-admin-lesson-block {
  cursor: grabbing;
}

.schedule-admin-drop-preview {
  z-index: 3;
  pointer-events: auto;
  border-style: dashed;
  box-shadow: none;
  opacity: 0.94;
}

.schedule-admin-drop-preview::after {
  display: none;
}

.schedule-admin-place-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  inline-size: 28px;
  block-size: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #26854a 0%, #1f6f3d 100%);
  border: 1px solid rgba(18, 92, 45, 0.88);
  box-shadow:
    0 10px 18px rgba(31, 111, 61, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.schedule-admin-place-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #2c9554 0%, #247b45 100%);
}

.schedule-admin-drop-preview.is-valid {
  border-color: rgba(32, 123, 59, 0.96);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(218, 246, 226, 0.99) 0%, rgba(176, 227, 191, 0.98) 100%);
  box-shadow:
    0 16px 28px rgba(32, 123, 59, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.schedule-admin-drop-preview.is-valid.is-solver {
  border-color: rgba(30, 116, 138, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(218, 244, 248, 0.99) 0%, rgba(139, 214, 225, 0.98) 100%);
  box-shadow:
    0 16px 28px rgba(30, 116, 138, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.schedule-admin-drop-preview.is-blocked {
  border-color: rgba(214, 90, 18, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 236, 209, 0.99) 0%, rgba(255, 163, 52, 0.97) 100%);
  box-shadow:
    0 16px 28px rgba(214, 90, 18, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.schedule-admin-drop-preview.is-current {
  border-color: rgba(115, 139, 164, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(240, 246, 252, 0.98) 0%, rgba(225, 236, 247, 0.94) 100%);
}

.schedule-admin-drop-preview.is-pending {
  border-color: rgba(168, 184, 198, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(244, 248, 252, 0.98) 0%, rgba(232, 239, 246, 0.94) 100%);
}

.schedule-admin-drop-zone {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 1;
  border-radius: 16px;
  pointer-events: none;
}

.schedule-day-body.has-drop-preview.drop-preview-valid .schedule-admin-drop-zone {
  background:
    linear-gradient(180deg, rgba(62, 168, 92, 0.28) 0%, rgba(62, 168, 92, 0.14) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(32, 123, 59, 0.38),
    0 0 0 1px rgba(32, 123, 59, 0.12);
}

.schedule-day-body.has-drop-preview.drop-preview-valid.drop-preview-solver .schedule-admin-drop-zone,
.schedule-matrix-body.has-drop-preview.drop-preview-valid.drop-preview-solver .schedule-admin-matrix-drop-zone {
  background:
    linear-gradient(180deg, rgba(64, 176, 196, 0.28) 0%, rgba(64, 176, 196, 0.14) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(30, 116, 138, 0.38),
    0 0 0 1px rgba(30, 116, 138, 0.12);
}

.schedule-day-body.placement-hint-active.placement-hint-valid {
  background:
    linear-gradient(180deg, rgba(211, 243, 220, 0.94) 0%, rgba(245, 252, 247, 0.9) 26%, rgba(239, 246, 252, 0.86) 100%);
}

.schedule-day-body.placement-hint-active.placement-hint-blocked {
  background:
    linear-gradient(180deg, rgba(255, 181, 96, 0.96) 0%, rgba(255, 228, 192, 0.94) 26%, rgba(239, 246, 252, 0.86) 100%);
}

.schedule-day-body.has-drop-preview.drop-preview-blocked .schedule-admin-drop-zone {
  background:
    linear-gradient(180deg, rgba(224, 116, 116, 0.16) 0%, rgba(224, 116, 116, 0.08) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(186, 78, 78, 0.26),
    0 0 0 1px rgba(186, 78, 78, 0.08);
}

.schedule-day-body.has-drop-preview.drop-preview-current .schedule-admin-drop-zone,
.schedule-day-body.has-drop-preview.drop-preview-pending .schedule-admin-drop-zone {
  background:
    linear-gradient(180deg, rgba(165, 184, 201, 0.12) 0%, rgba(165, 184, 201, 0.04) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(128, 150, 169, 0.14),
    0 0 0 1px rgba(128, 150, 169, 0.04);
}

.schedule-week {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(173, 197, 219, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.schedule-week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-week-title {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.schedule-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 4px;
  width: 100%;
}

.schedule-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.schedule-week-picker {
  min-width: 260px;
}

.schedule-toolbar label > span,
.schedule-week-picker > span {
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.schedule-toolbar input[type="search"],
.schedule-toolbar input[type="date"],
.schedule-toolbar select {
  padding: 8px 11px;
  min-height: 40px;
}

.schedule-toolbar button {
  padding: 10px 14px;
}

.combo-shell {
  position: relative;
  display: grid;
}

.combo-shell.open {
  z-index: 80;
}

.combo-shell input {
  padding-right: 44px;
}

#schedule-admin-adjustment-entity,
#schedule-class,
#schedule-teacher,
#schedule-student {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 10px;
}

#schedule-admin-adjustment-entity-shell .combo-toggle {
  display: none;
}

#schedule-admin-adjustment-entity-shell input {
  padding-right: 12px;
}

.combo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 280px;
  min-height: 88px;
  z-index: 30;
  padding: 8px;
  border: 1px solid rgba(173, 197, 219, 0.88);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 252, 255, 0.98) 100%);
  box-shadow: 0 20px 40px rgba(27, 52, 87, 0.14);
}

.combo-options {
  display: grid;
  gap: 6px;
  min-height: 72px;
  max-height: 280px;
  overflow-y: auto;
}

.combo-option {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  border: 1px solid rgba(173, 197, 219, 0.68);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(239, 246, 252, 0.9) 100%);
  box-shadow: none;
}

.combo-option span {
  color: var(--muted);
  font-size: 13px;
}

.combo-option.active,
.combo-option:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(221, 236, 248, 0.96) 100%);
}

.combo-option.empty {
  cursor: default;
  opacity: 0.8;
}

.combo-option-empty {
  min-height: 72px;
  align-content: center;
}

.schedule-weekday-head {
  display: grid;
  gap: 4px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(178, 197, 215, 0.72);
  background: linear-gradient(180deg, rgba(222, 236, 249, 0.72) 0%, rgba(239, 246, 252, 0.52) 100%);
  border-radius: 18px 18px 0 0;
}

.schedule-weekday-name {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.schedule-weekday-date {
  font-size: 18px;
  color: var(--ink);
}

.schedule-empty-day {
  padding: 16px 12px;
  border: 1px dashed rgba(174, 196, 217, 0.86);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

.schedule-lesson {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(173, 197, 219, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #f9fcff 0%, #edf5fc 100%);
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(34, 60, 96, 0.07);
}

.schedule-lesson-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.schedule-agenda {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.schedule-timeline {
  position: relative;
  height: var(--schedule-grid-height, 640px);
}

.schedule-time-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
}

.schedule-day-columns {
  display: grid;
  grid-template-columns: repeat(var(--schedule-day-count, 5), minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.schedule-day-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border: 1px solid rgba(174, 196, 217, 0.86);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #fafdff 0%, #eef5fc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.schedule-day-body {
  position: relative;
  padding: 8px;
}

.schedule-placement-cell {
  position: absolute;
  left: 8px;
  right: 8px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
}

.schedule-placement-cell.valid {
  background:
    linear-gradient(180deg, rgba(62, 168, 92, 0.18) 0%, rgba(62, 168, 92, 0.1) 100%);
  box-shadow: inset 0 0 0 1px rgba(32, 123, 59, 0.28);
}

.schedule-placement-cell.blocked {
  background:
    linear-gradient(180deg, rgba(255, 170, 82, 0.28) 0%, rgba(255, 140, 36, 0.18) 100%);
  box-shadow: inset 0 0 0 1px rgba(214, 90, 18, 0.34);
}

.schedule-hour-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  border-top: 1px dashed rgba(171, 193, 213, 0.55);
}

.schedule-hour-line.hour-marker {
  border-top-color: rgba(120, 156, 191, 0.72);
}

.schedule-hour-line.quarter-marker {
  border-top-color: rgba(171, 193, 213, 0.32);
  border-top-style: dotted;
}

.schedule-empty-day-floating {
  position: absolute;
  top: 24px;
  left: 8px;
  right: 8px;
  z-index: 2;
}

.schedule-lesson-block {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 2;
  overflow: hidden;
  align-content: start;
  cursor: pointer;
  padding: 8px 10px;
}

.schedule-lesson-block.active,
.schedule-lesson-block:hover {
  border-color: rgba(67, 124, 178, 0.66);
  box-shadow: 0 12px 24px rgba(34, 60, 96, 0.12);
}

.schedule-lesson.student-override-absence {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0.08) 48%),
    linear-gradient(180deg, #fff7d8 0%, #f7e9b2 100%);
  border-color: rgba(196, 161, 59, 0.55);
}

.schedule-lesson.student-override-removed {
  opacity: 0.62;
  filter: saturate(0.7);
  border-style: dashed;
}

.schedule-lesson.student-override-added {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0.08) 48%),
    linear-gradient(180deg, #e6f8ed 0%, #caecd7 100%);
  border-color: rgba(62, 145, 91, 0.46);
}

.schedule-lesson-block.compact {
  gap: 3px;
  padding: 7px 9px;
}

.schedule-lesson-block.compact .schedule-lesson-title {
  font-size: 13px;
  line-height: 1.25;
}

.schedule-lesson-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.schedule-lesson-subline {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-lesson-detail {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(173, 197, 219, 0.76);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  box-shadow: var(--shadow-soft);
}

.schedule-student-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(174, 196, 216, 0.7);
}

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

  .schedule-agenda {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .schedule-day-columns {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .schedule-toolbar {
    grid-template-columns: 1fr;
  }

  .schedule-controls {
    align-items: stretch;
  }

  .schedule-filter-grid,
  .schedule-date-grid {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .schedule-controls-inline {
    justify-self: stretch;
  }

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

  .schedule-timeline {
    display: none;
  }

  .schedule-day-columns {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .schedule-day-column {
    min-height: 0;
  }
}

.detail-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(173, 197, 219, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.detail-card-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-card-value {
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}

.enrollment-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  border: 1px solid rgba(173, 197, 219, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.enrollment-item.active,
.enrollment-item:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #f7fbff 0%, #dceaf7 100%);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(31, 79, 127, 0.12);
  color: var(--accent-strong);
  font-size: 13px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(31, 79, 127, 0.08);
}

pre,
code {
  font-family: "Courier New", monospace;
}

pre {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(173, 197, 219, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #f7fbff 0%, #edf5fc 100%);
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 640px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
  }

  .app-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 24px;
  }

  .hero,
  .card {
    padding: 20px;
  }

  .panel-header,
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid,
  .form-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .people-detail-grid {
    grid-template-columns: 1fr;
  }
}

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

  #dashboard-schedule-chart-panel {
    grid-column: auto;
  }

  .dashboard-kpi-row,
  .dashboard-line-labels {
    grid-template-columns: 1fr;
  }

  .workspace-grid.cluster-workspace-layout #cluster-panel,
  .workspace-grid.cluster-workspace-layout #cluster-proposals-panel,
  .workspace-grid.cluster-workspace-layout #cluster-analysis-panel,
  .workspace-grid.cluster-workspace-layout #cluster-analysis-detail-panel,
  .workspace-grid.cluster-workspace-layout #cluster-assignments-panel,
  .workspace-grid.cluster-workspace-layout #cluster-materialization-panel,
  .workspace-grid.cluster-workspace-layout #cluster-solver-analysis-panel,
  .workspace-grid.cluster-workspace-layout #cluster-solver-proposals-panel {
    grid-column: auto;
    grid-row: auto;
  }

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

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

  .schedule-admin-adjustment-toolbar,
  .schedule-admin-planning-grid,
  .schedule-admin-adjustment-grid {
    grid-template-columns: 1fr;
  }

  .schedule-admin-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: auto;
  }

  .schedule-admin-filter-date,
  .schedule-admin-filter-entity,
  .schedule-admin-filter-query {
    grid-column: 1 / -1;
  }

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

  .schedule-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: auto;
  }

  .schedule-filter-grid label:last-child,
  .schedule-actions,
  .schedule-controls-inline {
    grid-column: 1 / -1;
  }

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

  .schedule-controls-inline {
    justify-self: start;
  }
}
