:root {
  color-scheme: dark;
  --ink: #eef5ff;
  --muted: #a9b7c9;
  --paper: #090d14;
  --panel: #121824;
  --panel-strong: #182132;
  --line: #2b3547;
  --green: #d482ff;
  --blue: #ff9b63;
  --rose: #64e8d0;
  --amber: #6fa8ff;
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(212, 130, 255, 0.18), transparent 36%),
    linear-gradient(315deg, rgba(255, 155, 99, 0.16), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px;
  width: min(1120px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
}

.sidebar,
.workspace {
  background: rgba(18, 24, 36, 0.9);
  border: 1px solid rgba(67, 80, 105, 0.88);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--ink);
  color: #101621;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.08rem;
  line-height: 1.2;
}

h3 {
  margin: 0;
}

.brand p,
.meter-copy span,
.summary p,
.eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
}

.meter {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0d1320;
}

.meter canvas {
  display: block;
  width: 100%;
  height: 180px;
}

.meter-copy {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.meter-copy strong {
  font-size: 2.1rem;
}

.calendar-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    var(--panel-strong);
}

.calendar-head {
  display: grid;
  gap: 10px;
}

.calendar-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.calendar-nav {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101725;
  color: var(--ink);
}

.calendar-month {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calendar-weekdays span,
.calendar-day {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
}

.calendar-day {
  border: 1px solid transparent;
  background: #101725;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.calendar-day.is-outside {
  color: rgba(233, 240, 248, 0.38);
  background: rgba(16, 23, 37, 0.5);
}

.calendar-day.is-today {
  border-color: rgba(100, 232, 208, 0.65);
  background: rgba(100, 232, 208, 0.12);
  color: var(--rose);
  font-weight: 850;
}

.timer-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(111, 168, 255, 0.16), transparent 42%),
    var(--panel-strong);
}

.timer-head,
.timer-actions,
.timer-adjust {
  display: flex;
  align-items: center;
}

.timer-head,
.timer-actions {
  justify-content: space-between;
  gap: 10px;
}

.timer-state {
  min-width: 72px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.timer-rate {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.timer-display {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: clamp(2.1rem, 10vw, 3rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.timer-adjust {
  gap: 8px;
}

.timer-step,
.timer-primary,
.timer-reset {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101725;
  color: var(--ink);
  font-weight: 800;
}

.timer-step {
  min-width: 54px;
  height: 34px;
}

.timer-primary,
.timer-reset {
  min-height: 38px;
  padding: 0 14px;
}

.timer-primary {
  flex: 1;
  border-color: rgba(100, 232, 208, 0.5);
  background: rgba(100, 232, 208, 0.12);
}

.timer-reset {
  color: var(--muted);
}

.timer-step:disabled,
.timer-reset:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filter,
.primary-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101725;
  color: var(--ink);
}

.filter {
  min-height: 40px;
}

.filter.active {
  background: var(--green);
  border-color: var(--green);
  color: #101621;
  font-weight: 800;
}

.workspace {
  padding: 24px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.toolbar h2 {
  margin-top: 4px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.icon-button,
.primary-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  font-size: 1.35rem;
  line-height: 1;
}

.primary-button {
  background: var(--ink);
  border-color: var(--ink);
  color: #101621;
}

.task-form {
  display: grid;
  gap: 8px;
}

.task-form label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.task-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 42px;
  gap: 10px;
}

.task-entry input,
.task-entry select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1320;
  color: var(--ink);
}

.task-entry input {
  min-width: 0;
  padding: 0 14px;
}

.task-entry select {
  padding: 0 10px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.summary article {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.summary span {
  display: block;
  margin-bottom: 5px;
  font-size: 1.8rem;
  font-weight: 800;
}

.live-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

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

.panel-head h3 {
  margin-top: 4px;
  font-size: 1.12rem;
  line-height: 1.2;
}

.text-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101725;
  color: var(--ink);
  font-weight: 750;
}

.text-button:hover {
  border-color: rgba(238, 245, 255, 0.46);
}

.panel-status {
  color: var(--muted);
  font-size: 0.84rem;
}

.live-panel.is-refreshing {
  animation: panelPulse 900ms ease-out;
}

.market-grid,
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.market-card,
.weather-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.market-card {
  display: grid;
  gap: 12px;
}

.market-card header,
.weather-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-name,
.city-name {
  font-weight: 850;
  line-height: 1.2;
}

.asset-symbol {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.market-price {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 850;
  line-height: 1.1;
}

.market-change {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(169, 183, 201, 0.1);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.market-change.up {
  background: rgba(100, 232, 208, 0.12);
  color: var(--rose);
}

.market-change.down {
  background: rgba(255, 155, 99, 0.13);
  color: var(--blue);
}

.updated-at {
  color: var(--muted);
  font-size: 0.78rem;
}

.weather-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.weather-card header,
.weather-details {
  grid-column: 2;
}

.weather-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(238, 245, 255, 0.14);
  border-radius: 8px;
  background: #0d1320;
  overflow: hidden;
}

.weather-icon svg {
  display: block;
  width: 46px;
  height: 46px;
}

.weather-temp {
  font-size: 1.7rem;
  font-weight: 850;
  line-height: 1;
}

.weather-details {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.weather-description {
  color: var(--ink);
  font-weight: 750;
}

.sun-glow {
  animation: sunGlow 2.8s ease-in-out infinite;
}

.cloud-drift {
  animation: cloudDrift 4s ease-in-out infinite;
}

.rain-drop {
  animation: rainFall 900ms linear infinite;
}

.rain-drop:nth-child(2) {
  animation-delay: 180ms;
}

.rain-drop:nth-child(3) {
  animation-delay: 360ms;
}

.snow-dot {
  animation: snowFloat 1.8s ease-in-out infinite;
}

.storm-bolt {
  animation: stormFlash 1.6s ease-in-out infinite;
}

.world-clocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.clock-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(212, 130, 255, 0.16), transparent 44%),
    var(--panel-strong);
}

.clock-face {
  display: block;
  width: min(100%, 230px);
  height: auto;
}

.clock-dial {
  fill: #f7f9fc;
  stroke: #d8dee8;
  stroke-width: 2;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
}

.clock-mark {
  stroke: #283244;
  stroke-linecap: round;
  stroke-width: 1.2;
}

.clock-mark.major {
  stroke-width: 2;
}

.clock-numbers text {
  fill: #111827;
  font-size: 8px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.clock-hand {
  stroke-linecap: round;
}

.hour-hand {
  stroke: #101621;
  stroke-width: 4;
}

.minute-hand {
  stroke: #26364f;
  stroke-width: 2.6;
}

.second-hand {
  stroke: var(--blue);
  stroke-width: 1.3;
}

.clock-pin {
  fill: var(--blue);
  stroke: #101621;
  stroke-width: 1.4;
}

.clock-city {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

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

.task-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.check-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.check-wrap input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check-wrap span {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-radius: 7px;
}

.check-wrap input:checked + span {
  background: var(--green);
  border-color: var(--green);
  box-shadow: inset 0 0 0 5px #101621;
}

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

.task-title {
  overflow-wrap: anywhere;
  font-weight: 750;
}

.task-card.done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.priority-badge {
  display: inline-flex;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.priority-badge.high {
  color: var(--rose);
}

.priority-badge.medium {
  color: var(--blue);
}

.priority-badge.low {
  color: var(--amber);
}

.delete-button {
  color: var(--muted);
}

@keyframes panelPulse {
  0% {
    border-color: rgba(255, 155, 99, 0.8);
    box-shadow: 0 0 0 0 rgba(255, 155, 99, 0.22);
  }

  100% {
    border-color: var(--line);
    box-shadow: 0 0 0 12px rgba(255, 155, 99, 0);
  }
}

@keyframes sunGlow {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes cloudDrift {
  0%,
  100% {
    transform: translateX(-1px);
  }

  50% {
    transform: translateX(2px);
  }
}

@keyframes rainFall {
  0% {
    transform: translateY(-4px);
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    transform: translateY(7px);
    opacity: 0;
  }
}

@keyframes snowFloat {
  0%,
  100% {
    transform: translateY(-2px);
  }

  50% {
    transform: translateY(3px);
  }
}

@keyframes stormFlash {
  0%,
  100% {
    opacity: 0.72;
  }

  45% {
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-weekdays span,
  .calendar-day {
    min-height: 32px;
  }
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
    width: min(100vw - 20px, 620px);
    margin: 10px auto;
  }

  .sidebar,
  .workspace {
    padding: 16px;
  }

  .meter {
    min-height: 150px;
  }

  .meter canvas {
    height: 150px;
  }

  .task-entry {
    grid-template-columns: 1fr 42px;
  }

  .task-entry select {
    grid-column: 1 / -1;
    order: 3;
  }

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

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .text-button {
    width: 100%;
  }

  .market-grid,
  .weather-grid,
  .world-clocks {
    grid-template-columns: 1fr;
  }

  .clock-face {
    width: min(100%, 170px);
  }
}
