:root {
  color-scheme: light;
  --ink: #1d2528;
  --muted: #617073;
  --line: rgba(29, 37, 40, 0.14);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --mint: #8fbfaf;
  --coral: #eb806e;
  --gold: #d8a84e;
  --charcoal: #253033;
  --shadow: 0 22px 70px rgba(37, 48, 51, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edf2ef url("./assets/dashboard-bg.png") center / cover fixed no-repeat;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 32px;
  background: linear-gradient(90deg, rgba(242, 247, 243, 0.94) 0%, rgba(242, 247, 243, 0.76) 48%, rgba(242, 247, 243, 0.22) 100%);
}

.dashboard {
  width: min(1160px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 18px;
}

.topbar,
.panel-heading,
.weather-main,
.weather-actions,
.summary-stats,
.input-row,
.task-item,
.task-meta,
.segmented {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
}

.date-chip {
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--charcoal);
  text-align: center;
  font-weight: 800;
  box-shadow: 0 8px 30px rgba(37, 48, 51, 0.08);
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.utility-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.weather-panel,
.summary-panel,
.forecast-panel,
.calendar-panel,
.task-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.weather-panel,
.summary-panel {
  min-height: 304px;
  padding: 22px;
}

.task-panel {
  padding: 22px;
}

.forecast-panel {
  padding: 22px;
}

.calendar-panel {
  min-width: 0;
  padding: 22px;
}

.boy-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.boy-card {
  min-width: 0;
  border-radius: 8px;
  background: rgba(143, 191, 175, 0.18);
  padding: 10px;
}

.boy-card strong,
.boy-card span {
  display: block;
}

.boy-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.boy-progress-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 48, 51, 0.12);
}

.boy-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
}

.calendar-frame {
  min-height: 700px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.calendar-frame iframe {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--charcoal);
  color: white;
  font-size: 1.25rem;
}

.weather-main {
  gap: 18px;
  margin: 28px 0 18px;
}

.weather-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #f8d891;
  color: var(--charcoal);
  font-size: 2.8rem;
  box-shadow: inset 0 -12px 24px rgba(216, 168, 78, 0.24);
}

.temperature {
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 900;
  line-height: 0.9;
}

#condition,
#weatherPlace {
  color: var(--muted);
}

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

label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.input-row {
  gap: 8px;
}

input,
select {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(143, 191, 175, 0.25);
}

input {
  flex: 1;
}

.input-row button,
.weather-actions button,
.segmented button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--charcoal);
  color: white;
  font-weight: 800;
}

.weather-actions {
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 18px;
}

.weather-actions button {
  background: var(--mint);
  color: #10201b;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.weather-metrics div {
  min-height: 70px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 12px;
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-size: 1.1rem;
  font-weight: 900;
}

h3 {
  margin: 0;
  font-size: 1rem;
}

.today-forecast {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.forecast-heading {
  margin-bottom: 12px;
}

.time-forecast,
.daily-forecast {
  display: grid;
  gap: 10px;
}

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

.daily-forecast {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 18px;
}

.forecast-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  text-align: center;
}

.forecast-card .forecast-icon {
  margin: 6px 0;
  font-size: 1.7rem;
}

.forecast-card strong,
.forecast-card span {
  display: block;
}

.forecast-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.clothing-card {
  margin-top: 12px;
  border-radius: 8px;
  background: rgba(143, 191, 175, 0.2);
  padding: 14px;
}

.clothing-card p:last-child {
  margin: 8px 0 0;
  line-height: 1.5;
}

.summary-panel {
  display: grid;
  align-content: space-between;
  justify-items: center;
  text-align: center;
}

.progress-ring {
  display: grid;
  place-items: center;
  position: relative;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--coral) calc(var(--progress) * 1%), rgba(37, 48, 51, 0.12) 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-strong);
}

.progress-ring span {
  position: relative;
  font-size: 1.6rem;
  font-weight: 900;
}

.summary-stats {
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.summary-stats span {
  min-width: 88px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.segmented {
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(37, 48, 51, 0.08);
}

.segmented button {
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: white;
  color: var(--charcoal);
  box-shadow: 0 4px 14px rgba(37, 48, 51, 0.1);
}

.task-form {
  margin: 18px 0;
}

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

.task-item {
  min-height: 64px;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px 12px;
}

.task-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-main input {
  width: 22px;
  height: 22px;
  accent-color: var(--mint);
}

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

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

.task-meta {
  flex: 0 0 auto;
  gap: 8px;
}

.task-assignee {
  width: 104px;
  height: 36px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.priority {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(143, 191, 175, 0.22);
  color: #1d5143;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.priority.high {
  background: rgba(235, 128, 110, 0.24);
  color: #8e2f22;
}

.priority.low {
  background: rgba(216, 168, 78, 0.22);
  color: #765414;
}

.delete-task {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(37, 48, 51, 0.08);
  color: var(--charcoal);
  font-size: 1.2rem;
}

.empty-state {
  margin: 10px 0 0;
  color: var(--muted);
}

@media (max-width: 780px) {
  .app-shell {
    padding: 18px;
    background: rgba(242, 247, 243, 0.9);
  }

  .topbar,
  .panel-heading,
  .weather-actions,
  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .date-chip {
    width: 100%;
  }

  .status-grid,
  .utility-grid,
  .weather-metrics,
  .time-forecast {
    grid-template-columns: 1fr;
  }

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


  .weather-main {
    align-items: flex-start;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

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

  .boy-progress {
    grid-template-columns: 1fr;
  }
}
