.schedule-center {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 245, 212, 0.08), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(0, 245, 212, 0.05), transparent 24%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-void) 48%, #02060c 100%);
}

.bg-grid,
.bg-scan,
.bg-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(0, 245, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 212, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 94%);
  opacity: 0.5;
}

.bg-scan {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 245, 212, 0.08) 49%, transparent 51%, transparent 100%);
  transform: translateY(-100%);
  animation: scan 12s linear infinite;
  opacity: 0.4;
}

.bg-orbit {
  width: 44vw;
  height: 44vw;
  inset: -8vw 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border-dim);
  box-shadow: 0 0 40px rgba(0, 245, 212, 0.06);
  animation: spin 36s linear infinite;
}

.bg-orbit::before,
.bg-orbit::after {
  content: '';
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 1px solid var(--border-dim);
}

.bg-orbit::after {
  inset: 21%;
}

.schedule-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(780px, 1.25fr) 420px;
  gap: 22px;
  height: 100%;
  min-height: 0;
  padding: 28px;
  box-sizing: border-box;
}

.frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-mid);
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0.94) 0%, rgba(7, 13, 22, 0.82) 100%),
    radial-gradient(circle at top right, rgba(0, 245, 212, 0.08), transparent 38%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(14px);
}

.frame::before,
.frame::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.frame::before {
  inset: 14px;
  border: 1px solid rgba(0, 245, 212, 0.07);
  clip-path: polygon(0 14px, 14px 0, calc(100% - 62px) 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 62px 100%, 0 100%);
}

.frame::after {
  top: 18px;
  right: 20px;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 245, 212, 0.55), transparent);
}

.board {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
  min-height: 0;
}

.side {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 22px;
  padding: 28px 24px 24px;
  border-radius: 28px;
  min-height: 0;
}

.date-panel {
  min-height: 0;
}

.topbar,
.grid-head,
.panel-header,
.event-top,
.event-actions,
.create-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.topbar,
.grid-head,
.panel-header {
  align-items: flex-start;
}

.title-group,
.bars,
.timeline,
.create-stack,
.panel-content {
  display: grid;
  gap: 16px;
}

.small-label,
.micro,
.month,
.weekday div,
.day-top,
.state,
.bar,
.lock,
.event-time,
.event-type,
.create-head,
.panel-tab,
.mini-btn {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.small-label,
.micro {
  color: var(--text-dim);
  font-size: 9px;
}

.hero-label,
.panel-title-line {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-label {
  padding-top: 6px;
}

.panel-title-line {
  opacity: 0.92;
}

.month {
  font-size: 20px;
  font-family: var(--font-display);
  color: var(--text-primary);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 28px;
}

.subtitle {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.metrics,
.toolbar,
.weekday,
.days,
.ring-strip {
  display: grid;
  gap: 12px;
}

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

.toolbar {
  grid-auto-flow: column;
  justify-content: end;
  align-items: center;
}

.weekday,
.days {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
}

.days {
  align-content: stretch;
  overflow: hidden;
}

.ring-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric,
.ring-card,
.event,
.action,
.day,
.create-card {
  border: 1px solid var(--border-dim);
  background: linear-gradient(180deg, rgba(13, 21, 37, 0.94), rgba(10, 15, 26, 0.82));
}
.metric strong {
  display: block;
  margin-top: 5px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
}

.metric {
  position: relative;
  padding: 16px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.metric::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 11px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
  opacity: 0.35;
}

.metric.warn strong {
  color: var(--accent-amber);
}

.metric.alert strong {
  color: var(--accent-red);
}

.ghost-btn,
.mini-btn,
.create-row button {
  border: 1px solid var(--border-mid);
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.ghost-btn:hover,
.mini-btn:hover,
.create-row button:hover,
.day:hover:not(.muted) {
  border-color: var(--border-bright);
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.weekday div {
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
}

.days.loading {
  opacity: 0.72;
}

.day {
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 9px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  color: var(--text-primary);
  text-align: left;
  overflow: hidden;
}

.day.muted {
  opacity: 0.16;
  cursor: default;
}

.day.active {
  border-color: rgba(249, 168, 37, 0.72);
  box-shadow: 0 0 24px rgba(249, 168, 37, 0.16);
}

.day.today {
  border-color: rgba(249, 168, 37, 0.28);
}

.day-num {
  font-family: var(--font-display);
  font-size: 15px;
}

.risk {
  color: var(--accent-amber);
  font-size: 8px;
}

.state {
  color: var(--accent-cyan);
  font-size: 8px;
}

.bar {
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  gap: 4px;
  align-items: center;
  color: var(--text-dim);
  font-size: 7px;
}

.bar-track {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  background: linear-gradient(90deg, var(--accent-cyan), rgba(0, 245, 212, 0.14));
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.22);
}

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

.panel-tab {
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255,255,255,0.01));
  color: var(--text-secondary);
  padding: 12px 14px;
  font-size: 11px;
  transition: all var(--transition-fast);
}

.panel-tab:hover,
.panel-tab.active {
  border-color: var(--border-bright);
  color: var(--accent-cyan);
  background: linear-gradient(180deg, rgba(0, 245, 212, 0.12), rgba(0, 245, 212, 0.05));
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.14);
}

.ring-card {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px 12px;
  background: rgba(0, 245, 212, 0.03);
}

.ring {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  background:
    radial-gradient(circle at center, rgba(3, 10, 18, 0.95) 0 54%, transparent 55%),
    conic-gradient(var(--accent-cyan) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.06) 0);
  box-shadow: inset 0 0 18px rgba(0, 245, 212, 0.08), 0 0 24px rgba(0, 245, 212, 0.08);
}

.ring.warn {
  background:
    radial-gradient(circle at center, rgba(3, 10, 18, 0.95) 0 54%, transparent 55%),
    conic-gradient(var(--accent-amber) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.06) 0);
}

.ring.alert {
  background:
    radial-gradient(circle at center, rgba(3, 10, 18, 0.95) 0 54%, transparent 55%),
    conic-gradient(var(--accent-red) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.06) 0);
}

.panel-loading {
  padding: 24px 0;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
}

.panel-content {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(0, 245, 212, 0.36), rgba(0, 245, 212, 0.06));
}

.event {
  position: relative;
  padding: 14px 14px 14px 16px;
}

.event::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.5);
}

.event.warn::before {
  background: var(--accent-amber);
  box-shadow: 0 0 14px rgba(249, 168, 37, 0.42);
}

.event.alert::before {
  background: var(--accent-red);
  box-shadow: 0 0 14px rgba(255, 71, 87, 0.42);
}

.event-time {
  color: var(--accent-cyan);
  font-size: 10px;
}

.event-type {
  color: var(--text-dim);
  font-size: 10px;
}

.event-title {
  margin: 8px 0 4px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.45;
}

.event-meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.event-actions {
  margin-top: 12px;
}

.mini-btn {
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 10px;
}

.mini-btn.danger {
  border-color: rgba(255, 71, 87, 0.35);
  background: rgba(255, 71, 87, 0.08);
  color: var(--accent-red);
}

.create-stack {
  align-content: start;
}

.create-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
}

.create-head {
  color: var(--text-secondary);
  font-size: 10px;
}

.create-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.create-row.split select,
.create-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.create-row.split > * {
  min-width: 0;
}

.create-row.split select {
  flex: 0 0 112px;
}

.create-row.split input[type='time'] {
  flex: 1;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.time-field {
  flex: 0 0 148px;
  min-width: 148px;
  max-width: 148px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.94), rgba(8, 14, 23, 0.88)),
    radial-gradient(circle at top left, rgba(0, 245, 212, 0.07), transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.time-field:focus-within {
  border-color: var(--border-bright);
  box-shadow: var(--glow-cyan);
}

.time-field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  opacity: 0.9;
  flex: none;
}

.time-field input::-webkit-calendar-picker-indicator {
  filter: invert(84%) sepia(78%) saturate(613%) hue-rotate(112deg) brightness(101%) contrast(101%);
  cursor: pointer;
  opacity: 0.9;
}

.create-row button {
  flex: 0 0 40px;
  width: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
}

@keyframes scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1360px) {
  .schedule-center {
    overflow: auto;
  }

  .schedule-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

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

@media (max-width: 820px) {
  .schedule-shell {
    padding: 16px;
  }

  .board,
  .side {
    padding: 20px;
  }

  .metrics,
  .ring-strip {
    grid-template-columns: 1fr;
  }

  .days {
    gap: 8px;
  }

  .day {
    min-height: 72px;
  }

  .create-row.split {
    flex-wrap: wrap;
  }

  .create-row.split input:first-child {
    flex-basis: 100%;
  }

  .create-row.split select,
  .create-row.split input[type='time'],
  .time-field {
    flex: 1 1 0;
    max-width: none;
  }
}
