:root {
  color-scheme: light;
  --bg: #f3f7fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --panel-soft: rgba(248, 251, 255, 0.86);
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.15);
  --text: #102038;
  --text-soft: #516276;
  --text-faint: #718398;
  --accent: #0b7be8;
  --accent-hover: #0869c7;
  --accent-soft: rgba(11, 123, 232, 0.11);
  --green: #0f9d79;
  --green-soft: rgba(15, 157, 121, 0.12);
  --amber: #d68b18;
  --amber-soft: rgba(214, 139, 24, 0.13);
  --danger: #dc4c3d;
  --danger-soft: rgba(220, 76, 61, 0.11);
  --purple: #7c5ce7;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.09);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body.schedule-page {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(11, 123, 232, 0.12), transparent 65%),
    radial-gradient(860px 560px at 100% 100%, rgba(15, 157, 121, 0.11), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #edf4fb 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.ambient-glow {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(20px);
  opacity: 0.9;
}

.ambient-glow-left {
  width: 20rem;
  height: 20rem;
  top: -8rem;
  left: -7rem;
  background: rgba(11, 123, 232, 0.08);
}

.ambient-glow-right {
  width: 18rem;
  height: 18rem;
  right: -7rem;
  bottom: -5rem;
  background: rgba(15, 157, 121, 0.08);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 95vw;
  max-width: 1880px;
  margin: 0 auto;
  padding: 18px 0 30px;
}

.hero-card,
.panel-card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-xl);
}

.hero-copy {
  min-width: 0;
}

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

h1,
h2,
p {
  margin-top: 0;
}

.hero-copy h1 {
  margin-bottom: 0;
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-text {
  max-width: 850px;
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.hero-side {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex: 0 0 auto;
}

.sync-card,
.date-pill {
  display: flex;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.sync-card {
  gap: 10px;
  min-width: 250px;
  padding: 9px 14px;
}

.sync-card div {
  display: grid;
  gap: 2px;
}

.sync-card strong {
  font-size: 13px;
}

.sync-card small {
  color: var(--text-faint);
  font-size: 11px;
}

.sync-dot,
.risk-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px var(--green-soft);
  flex: 0 0 auto;
}

.sync-checking .sync-dot,
.sync-saving .sync-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  animation: pulse 1.2s ease-in-out infinite;
}

.sync-local .sync-dot,
.sync-offline .sync-dot {
  background: var(--amber);
  box-shadow: 0 0 0 5px var(--amber-soft);
}

.sync-error .sync-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-soft);
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

.date-pill {
  padding: 0 15px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.panel-card {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.toolbar-row,
.toolbar-main,
.card-head,
.section-heading,
.planner-header,
.planner-actions,
.panel-actions,
.task-main,
.task-meta,
.task-risk,
.task-actions,
.execution-actions,
.heat-heading,
.completed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-row,
.card-head,
.planner-header,
.heat-heading {
  align-items: center;
  justify-content: space-between;
}

.toolbar-main,
.planner-actions,
.panel-actions,
.execution-actions,
.completed-actions {
  align-items: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.small-button,
.schedule-button,
.done-toggle,
.task-action-button,
.delete-button,
.warning-action {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 720;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2495f0);
  box-shadow: 0 9px 18px rgba(11, 123, 232, 0.2);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.schedule-button:hover,
.done-toggle:hover,
.task-action-button:hover,
.delete-button:hover,
.warning-action:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

.secondary-button,
.ghost-button,
.task-action-button {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-soft);
}

.ghost-button {
  background: rgba(248, 250, 252, 0.72);
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.toolbar-hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
}

kbd {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--text-soft);
  font-size: 11px;
}

.hidden-file-input,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stat-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.stat-card span {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 7px;
  font-size: 19px;
}

.card-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.card-head h2,
.section-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.card-head p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
}

.task-entry-panel {
  position: relative;
  z-index: 20;
  overflow: visible;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.55fr) minmax(130px, 0.55fr) minmax(200px, 0.78fr) minmax(125px, 0.5fr) minmax(220px, 1fr) auto;
  gap: 11px;
  align-items: end;
}

.field {
  position: relative;
  display: grid;
  gap: 7px;
}

.field > span:first-child {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

input,
select,
.fake-select,
.deadline-trigger {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input,
select {
  padding: 0 13px;
}

input::placeholder {
  color: #97a6b6;
}

input:focus,
select:focus,
.fake-select:focus-visible,
.deadline-trigger:focus-visible {
  border-color: rgba(11, 123, 232, 0.45);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: #fff;
}

.stepper {
  display: grid;
  grid-template-columns: 40px minmax(50px, 1fr) 40px;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.stepper input {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  text-align: center;
}

.icon-button {
  border: 0;
  background: rgba(241, 246, 251, 0.95);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 18px;
}

.fake-select,
.deadline-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  cursor: pointer;
}

.chevron {
  color: var(--text-faint);
}

.deadline-trigger {
  gap: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  text-align: left;
}

.deadline-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.deadline-copy strong,
.deadline-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-copy strong {
  font-size: 14px;
}

.deadline-copy small {
  color: var(--text-faint);
  font-size: 10px;
}

.deadline-field {
  z-index: 25;
}

.priority-field {
  z-index: 24;
}

.deadline-popover,
.picker-popover {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  left: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  max-width: calc(100vw - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.field.drop-up .deadline-popover,
.field.drop-up .picker-popover {
  top: auto;
  bottom: calc(100% + 8px);
}

.deadline-popover {
  width: min(430px, calc(100vw - 34px));
}

.picker-popover {
  width: 100%;
  min-width: 130px;
  display: grid;
  gap: 5px;
}

.deadline-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.deadline-options button,
.deadline-time-options button,
.picker-popover button,
.deadline-adjust-row button,
.deadline-time-adjust button {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(248, 251, 255, 0.92);
  color: var(--text-soft);
  cursor: pointer;
}

.deadline-options button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 7px;
  text-align: left;
}

.deadline-options strong {
  font-size: 12px;
}

.deadline-options span {
  color: var(--text-faint);
  font-size: 10px;
}

.deadline-time-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.deadline-time-options button {
  min-height: 34px;
  font-size: 11px;
}

.deadline-options button.active,
.deadline-time-options button.active,
.picker-popover button.active {
  border-color: rgba(11, 123, 232, 0.24);
  background: var(--accent-soft);
  color: var(--accent);
}

.picker-popover button {
  min-height: 36px;
  padding: 0 10px;
  text-align: left;
  font-size: 12px;
}

.deadline-custom {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.deadline-adjust-group {
  display: grid;
  gap: 5px;
}

.deadline-adjust-group > span {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
}

.deadline-adjust-row,
.deadline-time-adjust {
  display: grid;
  align-items: center;
  gap: 4px;
}

.deadline-adjust-row {
  grid-template-columns: 32px 1fr 32px;
}

.deadline-time-adjust {
  grid-template-columns: repeat(2, 44px) 1fr repeat(2, 44px);
}

.deadline-adjust-row button,
.deadline-time-adjust button {
  min-height: 32px;
  padding: 0 4px;
  font-size: 10px;
}

.deadline-adjust-row strong,
.deadline-time-adjust strong {
  text-align: center;
  font-size: 12px;
}

.form-submit {
  min-height: 46px;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: start;
}

.sidebar-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.workspace .panel-card {
  margin-bottom: 0;
}

.section-heading {
  align-items: flex-start;
  justify-content: space-between;
}

.list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px;
  gap: 8px;
  margin-top: 14px;
}

.search-box input,
.custom-select-trigger {
  min-height: 40px;
  font-size: 12px;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.custom-select-trigger:hover,
.custom-select-trigger:focus-visible,
.custom-select-trigger[aria-expanded="true"] {
  border-color: rgba(11, 123, 232, 0.4);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}

.custom-select-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.custom-select-trigger[aria-expanded="true"] .custom-select-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.custom-select-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 7px);
  right: 0;
  width: max(100%, 150px);
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.custom-select.drop-up .custom-select-menu {
  top: auto;
  bottom: calc(100% + 7px);
}

.custom-select-item {
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 680;
}

.custom-select-item:hover,
.custom-select-item:focus-visible {
  background: rgba(241, 246, 251, 0.92);
  outline: none;
}

.custom-select-item.active {
  border-color: rgba(11, 123, 232, 0.18);
  background: var(--accent-soft);
  color: var(--accent);
}

.task-tabs,
.view-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(241, 246, 251, 0.82);
}

.task-tabs {
  width: 100%;
  margin: 10px 0 12px;
}

.task-tabs button,
.view-switch button {
  min-height: 33px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.task-tabs button {
  flex: 1;
}

.task-tabs button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  min-height: 21px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(112, 131, 152, 0.12);
  font-size: 10px;
}

.task-tabs button.active,
.view-switch button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.view-switch button {
  padding: 0 12px;
}

.task-list,
.completed-list,
.warning-list {
  display: grid;
  gap: 9px;
}

.task-card,
.completed-card,
.warning-item,
.execution-empty,
.continuation-chip {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.task-card {
  --task-color: var(--accent);
  padding: 13px 13px 12px 16px;
  overflow: hidden;
  cursor: grab;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.task-card::before,
.completed-card::before,
.execution-main::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--task-color);
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

.task-card.dragging-source {
  opacity: 0.35;
}

.task-card.done {
  opacity: 0.72;
}

.task-card.overdue {
  border-color: rgba(220, 76, 61, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), var(--danger-soft));
}

.task-main {
  align-items: flex-start;
  justify-content: space-between;
}

.task-title {
  min-width: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.task-meta,
.task-risk {
  margin-top: 8px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.88);
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 720;
}

button.chip {
  cursor: pointer;
}

.chip.danger {
  border-color: rgba(220, 76, 61, 0.18);
  background: var(--danger-soft);
  color: var(--danger);
}

.chip.good {
  border-color: rgba(15, 157, 121, 0.18);
  background: var(--green-soft);
  color: var(--green);
}

.priority-critical { background: var(--danger-soft); color: var(--danger); }
.priority-high { background: var(--amber-soft); color: #a96608; }
.priority-medium { background: var(--accent-soft); color: var(--accent); }
.priority-low { background: var(--green-soft); color: var(--green); }

.task-consequence,
.task-recommendation {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.5;
}

.task-consequence {
  background: var(--danger-soft);
  color: #9c4439;
}

.task-recommendation {
  background: var(--accent-soft);
  color: #1769ae;
  font-weight: 700;
}

.task-actions {
  align-items: center;
  margin-top: 10px;
  gap: 6px;
}

.schedule-button,
.done-toggle,
.task-action-button,
.delete-button {
  min-height: 31px;
  padding: 0 9px;
  font-size: 10px;
}

.schedule-button {
  background: var(--accent-soft);
  color: var(--accent);
}

.done-toggle {
  background: var(--green-soft);
  color: var(--green);
}

.done-toggle.active {
  border-color: rgba(15, 157, 121, 0.2);
}

.delete-button {
  border-color: rgba(220, 76, 61, 0.16);
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  display: none;
  padding: 26px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-faint);
  text-align: center;
  font-size: 12px;
}

.empty-state.visible {
  display: block;
}

.completed-group {
  display: grid;
  gap: 8px;
}

.completed-date {
  padding: 6px 2px 0;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
}

.completed-card {
  --task-color: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 11px 11px 15px;
  overflow: hidden;
}

.completed-card > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.completed-card strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.completed-card span {
  color: var(--text-faint);
  font-size: 10px;
}

.planner-panel {
  min-width: 0;
}

.planner-header {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.planner-actions {
  justify-content: flex-end;
}

.risk-meter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 41px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 750;
}

.risk-meter.warning .risk-dot {
  background: var(--amber);
  box-shadow: 0 0 0 5px var(--amber-soft);
}

.risk-meter.danger .risk-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-soft);
}

.planner-body {
  padding-top: 14px;
}

.date-selectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 8px;
  margin-bottom: 12px;
}

.date-picker .fake-select {
  min-height: 40px;
  font-size: 12px;
}

.date-popover {
  max-height: 260px;
  overflow-y: auto;
}

.execution-card {
  margin-bottom: 12px;
}

.execution-main {
  --task-color: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 102px;
  padding: 16px 16px 16px 20px;
  overflow: hidden;
  border: 1px solid rgba(11, 123, 232, 0.15);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(231, 243, 255, 0.88));
  box-shadow: var(--shadow-soft);
}

.execution-main h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.execution-main span,
.execution-main small {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
}

.execution-main small {
  margin-top: 4px;
  color: #9c4439;
}

.execution-next {
  padding: 8px 12px 0;
  color: var(--text-faint);
  font-size: 11px;
}

.execution-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.execution-empty strong {
  font-size: 13px;
}

.execution-empty span {
  color: var(--text-faint);
  font-size: 11px;
}

.timeline-board,
.hours-board,
.gantt-board {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
}

.timeline-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 54px;
  border-bottom: 1px solid var(--border);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-row.occupied {
  background: rgba(248, 251, 255, 0.72);
}

.timeline-time {
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.timeline-content {
  display: grid;
  gap: 8px;
  padding: 7px;
}

.timeline-empty {
  align-self: center;
  padding: 6px;
  color: rgba(112, 131, 152, 0.58);
  font-size: 10px;
}

.timeline-content .task-card,
.slot-tasks .task-card {
  cursor: grab;
}

.hour-slot {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  min-height: 70px;
  border-bottom: 1px solid var(--border);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.hour-slot:last-child {
  border-bottom: 0;
}

.hour-slot.occupied {
  background: rgba(248, 251, 255, 0.72);
}

.hour-slot.drop-ready {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px rgba(11, 123, 232, 0.42);
}

.hour-label {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border-right: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.hour-load {
  color: var(--text-faint);
  font-size: 9px;
}

.slot-tasks {
  display: grid;
  gap: 8px;
  padding: 7px;
}

.continuation-chip {
  --task-color: var(--accent);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-left: 4px solid var(--task-color);
}

.continuation-chip span,
.continuation-chip small {
  color: var(--text-faint);
  font-size: 9px;
}

.continuation-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.gantt-board {
  overflow-x: auto;
  padding: 12px;
}

.gantt-axis,
.gantt-row {
  display: grid;
  grid-template-columns: 150px minmax(520px, 1fr);
}

.gantt-axis {
  min-height: 28px;
}

.gantt-ticks,
.gantt-track {
  position: relative;
}

.gantt-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 9px;
}

.gantt-row {
  min-height: 52px;
  border-top: 1px solid var(--border);
}

.gantt-name {
  display: grid;
  align-content: center;
  gap: 2px;
  padding-right: 12px;
}

.gantt-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.gantt-name span {
  color: var(--text-faint);
  font-size: 9px;
}

.gantt-track {
  min-height: 51px;
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}

.gantt-bar {
  --task-color: var(--accent);
  position: absolute;
  top: 10px;
  min-height: 30px;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: var(--task-color);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 7px 15px color-mix(in srgb, var(--task-color) 28%, transparent);
}

.gantt-bar span {
  display: block;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.gantt-bar.danger {
  background: var(--danger);
}

.gantt-empty {
  padding: 28px;
  color: var(--text-faint);
  text-align: center;
  font-size: 12px;
}

.warning-panel {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 250, 241, 0.88));
}

.warning-list {
  margin-top: 13px;
}

.warning-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
}

.warning-item strong {
  color: var(--text);
}

.warning-item.safe {
  border-color: rgba(15, 157, 121, 0.16);
  background: var(--green-soft);
  color: #237a65;
}

.warning-action {
  min-height: 31px;
  padding: 0 9px;
  flex: 0 0 auto;
  border-color: rgba(214, 139, 24, 0.18);
  background: var(--amber-soft);
  color: #a96608;
  font-size: 10px;
}

.heat-panel {
  margin-top: 16px;
}

.week-heat {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.heat-day {
  display: grid;
  gap: 5px;
  min-height: 100px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.heat-day:hover {
  transform: translateY(-2px);
}

.heat-day span,
.heat-day small {
  color: var(--text-faint);
  font-size: 10px;
}

.heat-day strong {
  font-size: 17px;
}

.heat-day.active {
  border-color: rgba(11, 123, 232, 0.35);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-soft);
}

.heat-low { background: linear-gradient(145deg, #fff, rgba(15, 157, 121, 0.08)); }
.heat-medium { background: linear-gradient(145deg, #fff, rgba(11, 123, 232, 0.1)); }
.heat-high { background: linear-gradient(145deg, #fff, rgba(214, 139, 24, 0.13)); }
.heat-critical { background: linear-gradient(145deg, #fff, rgba(220, 76, 61, 0.14)); }

.task-color-blue { --task-color: #0b7be8; }
.task-color-green { --task-color: #0f9d79; }
.task-color-orange { --task-color: #e38b25; }
.task-color-pink { --task-color: #df5f9a; }
.task-color-purple { --task-color: #7c5ce7; }
.task-color-teal { --task-color: #1998a6; }

.drag-layer {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: min(360px, 80vw);
  pointer-events: none;
  filter: drop-shadow(0 22px 35px rgba(15, 23, 42, 0.2));
}

.drag-layer .task-card {
  cursor: grabbing;
}

.toast {
  position: fixed;
  z-index: 10000;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  background: rgba(16, 32, 56, 0.94);
  color: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast span {
  font-size: 12px;
}

.toast button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 1280px) {
  .task-form {
    grid-template-columns: minmax(250px, 1.4fr) 140px minmax(190px, 0.8fr) 125px;
  }

  .consequence-field {
    grid-column: span 3;
  }

  .workspace {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.45fr);
  }
}

@media (max-width: 980px) {
  .hero-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-side {
    width: 100%;
  }

  .sync-card {
    flex: 1;
  }

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

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

  .planner-panel {
    order: -1;
  }

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

@media (max-width: 720px) {
  .app-shell {
    width: calc(100vw - 20px);
    padding-top: 10px;
  }

  .hero-card,
  .panel-card {
    padding: 14px;
    border-radius: 20px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-text {
    font-size: 13px;
  }

  .hero-side {
    display: grid;
  }

  .sync-card,
  .date-pill {
    width: 100%;
  }

  .toolbar-main {
    width: 100%;
  }

  .toolbar-main > button {
    flex: 1 1 135px;
  }

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

  .task-form {
    grid-template-columns: 1fr 1fr;
  }

  .wide-field,
  .deadline-field,
  .consequence-field {
    grid-column: 1 / -1;
  }

  .form-submit {
    grid-column: 1 / -1;
  }

  .planner-header,
  .planner-actions {
    width: 100%;
  }

  .planner-actions {
    justify-content: space-between;
  }

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

  .execution-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .execution-actions {
    width: 100%;
  }

  .execution-actions button {
    flex: 1;
  }

  .timeline-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .hour-slot {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .task-actions {
    gap: 5px;
  }

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

  .warning-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .warning-action {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .stats-grid,
  .list-tools {
    grid-template-columns: 1fr;
  }

  .task-form {
    grid-template-columns: 1fr;
  }

  .wide-field,
  .compact-field,
  .deadline-field,
  .priority-field,
  .consequence-field,
  .form-submit {
    grid-column: 1;
  }

  .deadline-popover {
    left: -14px;
  }

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

  .deadline-custom {
    grid-template-columns: 1fr;
  }

  .planner-actions,
  .view-switch {
    display: grid;
    width: 100%;
  }

  .view-switch {
    grid-template-columns: repeat(3, 1fr);
  }

  .risk-meter {
    width: 100%;
  }

  .date-selectors {
    grid-template-columns: 1fr;
  }

  .continuation-chip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .continuation-chip small {
    grid-column: 2;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
