:root {
  --bg: #f1f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #1b2432;
  --muted: #6c7787;
  --line: #e3e9ec;
  --teal: #2f8fc0;
  --teal-dark: #176a9b;
  --teal-soft: #e3f3fb;
  --amber: #e99a2c;
  --amber-soft: #fdf1dc;
  --danger: #d64b45;
  --danger-soft: #fdecea;
  --blue: #3d7fb5;
  --shadow: 0 14px 34px rgba(23, 32, 46, 0.08);
  --shadow-sm: 0 4px 14px rgba(23, 32, 46, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.icon {
  flex: none;
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: #10405f;
  color: #eaf5fc;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 18px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 10px 24px;
  color: #ffffff;
  border: 0;
  background: none;
  text-align: left;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  color: #2f8fc0;
  display: grid;
  place-items: center;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
}

.brand-sub {
  font-size: 11px;
  color: #a8cfe8;
  margin-top: 2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.nav-label {
  font-size: 11px;
  color: #9cc6e2;
  padding: 10px 12px 6px;
  text-transform: uppercase;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #d5eaf7;
  font-size: 14px;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-btn.active {
  background: #ffffff;
  color: #176a9b;
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 12px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: #a8cfe8;
}

.sidebar-foot-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #62cdf5;
  box-shadow: 0 0 0 3px rgba(98, 205, 245, 0.2);
}

.main {
  margin-left: 236px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
}

.topbar-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-btn:hover {
  border-color: #b8d6e6;
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  flex: none;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 60;
}

.user-dropdown-meta {
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.dropdown-username {
  font-size: 14px;
  font-weight: 700;
}

.dropdown-username svg {
  color: var(--amber);
  margin-left: 5px;
  vertical-align: -2px;
}

.dropdown-role {
  font-size: 12px;
  color: var(--teal);
  margin-top: 3px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--surface-soft);
}

.dropdown-item.danger {
  color: var(--danger);
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 60px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 22px;
  align-items: stretch;
}

.hero-main {
  background: linear-gradient(120deg, #2f8fc0 0%, #176a9b 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 26px 30px;
  position: relative;
  overflow: hidden;
  min-height: 176px;
}

.greeting {
  font-size: 20px;
  font-weight: 700;
}

.hero-date {
  font-size: 13px;
  opacity: 0.86;
  margin-top: 7px;
}

.clock-line {
  margin-top: 18px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  margin-top: 9px;
  font-size: 13px;
  opacity: 0.9;
}

.weather-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  min-height: 176px;
}

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

.weather-location {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.weather-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.demo {
  background: var(--amber-soft);
  color: #9a6613;
}

.badge.live {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.badge.offline {
  background: #eef1f4;
  color: #6b7787;
}

.badge.admin {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.badge.user {
  background: #edf1f4;
  color: #5b6876;
}

.weather-body {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.weather-icon {
  width: 58px;
  height: 58px;
  color: var(--amber);
  display: grid;
  place-items: center;
  background: #fff8ec;
  border-radius: 12px;
}

.weather-temp {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.weather-condition {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}

.weather-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.weather-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}

.weather-meta-item svg {
  color: var(--teal);
}

.progress-band {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.progress-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ring {
  width: 92px;
  height: 92px;
  flex: none;
}

.ring-track {
  fill: none;
  stroke: #e4f0f8;
  stroke-width: 9;
}

.ring-value {
  fill: none;
  stroke: var(--teal);
  stroke-width: 9;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.5s ease;
}

.ring-text {
  font-size: 20px;
  font-weight: 700;
  fill: var(--ink);
}

.progress-title {
  font-size: 15px;
  font-weight: 700;
}

.progress-count {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.progress-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 5px 10px;
  border-radius: 999px;
}

.mini-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 160px;
}

.mini-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #e4eef5;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
  transition: width 0.3s ease;
}

.mini-progress span {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
  min-width: 34px;
  text-align: right;
}

.task-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.phase-count {
  font-size: 11px;
  color: var(--muted);
}

.progress-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 104px;
}

.stat-chip span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.stat-chip strong {
  display: block;
  font-size: 17px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--teal);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--teal-dark);
}

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn.secondary:hover {
  border-color: #a9cfe4;
  background: var(--surface-soft);
}

.btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn.danger:hover {
  background: #fbdcd9;
}

.btn.success {
  background: #1f9d72;
  color: #ffffff;
}

.btn.success:hover {
  background: #17855f;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.section {
  margin-top: 30px;
}

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

.section-title {
  font-size: 17px;
  font-weight: 700;
}

.section-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #c3dcec;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.task-card:hover {
  box-shadow: var(--shadow-sm);
}

.task-card.done {
  border-left-color: var(--teal);
  background: #f8fbfe;
}

.task-card.priority-high {
  border-left-color: var(--danger);
}

.task-card.priority-medium {
  border-left-color: var(--amber);
}

.task-card.priority-low {
  border-left-color: var(--blue);
}

.check-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #b9d7e8;
  color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.check-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.check-btn.checked {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-title {
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.chip.category {
  background: #edf2f4;
  color: #4f5d69;
}

.chip.priority-high {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip.priority-medium {
  background: var(--amber-soft);
  color: #9a6613;
}

.chip.priority-low {
  background: #e9f1f8;
  color: var(--blue);
}

.chip.repeat {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.task-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.task-desc {
  font-size: 13px;
  color: #445061;
  line-height: 1.6;
  margin-top: 8px;
  word-break: break-word;
  white-space: pre-wrap;
}

.task-note {
  font-size: 12px;
  color: #5c6a79;
  background: var(--surface-soft);
  border-left: 3px solid var(--amber);
  padding: 7px 10px;
  border-radius: 0 6px 6px 0;
  margin-top: 9px;
  word-break: break-word;
}

.task-photo {
  width: 112px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.done-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--teal-dark);
  font-weight: 600;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}

.icon-btn.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state {
  background: var(--surface);
  border: 1px dashed #bcd8ea;
  border-radius: var(--radius);
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state .empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 6px;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-nav input[type="date"] {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  min-width: 150px;
}

.history-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-band {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  align-items: end;
}

.chart-col {
  text-align: center;
}

.chart-bar-wrap {
  height: 108px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(to top, #eef6fb 0%, #ffffff 18%);
  border-radius: 6px;
  overflow: hidden;
}

.chart-bar {
  width: 100%;
  max-width: 34px;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--teal);
  transition: height 0.4s ease;
}

.chart-bar.empty {
  background: #dcebf4;
}

.chart-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

.chart-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 3px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 34, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn 0.16s ease;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(10, 20, 28, 0.28);
  animation: popIn 0.18s ease;
  display: flex;
  flex-direction: column;
}

.modal.wide {
  max-width: 720px;
}

.modal-photo {
  max-width: 720px;
  background: #10181f;
}

.modal-photo img {
  max-height: 82vh;
  width: 100%;
  object-fit: contain;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-body {
  padding: 20px 22px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.modal > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal > form .modal-body {
  flex: 1 1 auto;
  min-height: 0;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  flex: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #465361;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 143, 192, 0.16);
}

.date-field {
  position: relative;
}

.date-display {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.date-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.date-nav .date-field {
  width: 150px;
}

.form-textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.6;
}

.progress-checkin {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 14px;
}

.progress-checkin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.progress-checkin-head strong {
  color: var(--teal-dark);
  font-size: 15px;
}

.progress-range {
  width: 100%;
  accent-color: var(--teal);
  margin: 10px 0;
}

.progress-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.preset-btn {
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.preset-btn:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.weekday-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.weekday-chip input {
  display: none;
}

.weekday-chip:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.phase-overview {
  margin-bottom: 14px;
}

.phase-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.phase-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.phase-item.done {
  background: #f3f9fd;
}

.phase-check {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.phase-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
  flex: none;
}

.phase-check span {
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.phase-item.done .phase-check span {
  color: var(--muted);
  text-decoration: line-through;
}

.phase-add {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.phase-add .form-input {
  flex: 1;
}

.holiday-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #465361;
}

.holiday-status.loading {
  color: var(--muted);
}

.holiday-status.ok {
  background: var(--teal-soft);
  border-color: #bfe1f2;
  color: var(--teal-dark);
}

.holiday-status.warn {
  background: var(--amber-soft);
  border-color: #f0d9a8;
  color: #8a5d12;
}

.holiday-status svg {
  flex: none;
  margin-top: 2px;
}

.approval-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.approval-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.pending-row {
  border-color: #f0d9a8;
  background: #fffaf0;
}

.pending-row .btn {
  flex: none;
  padding: 8px 10px;
  font-size: 12px;
}

.share-link-box {
  display: flex;
  gap: 8px;
}

.share-link-box .form-input {
  flex: 1;
  min-width: 0;
}

.share-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.share-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.share-meta svg {
  color: var(--teal);
}

.share-comments {
  margin-top: 14px;
}

.share-comment {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 12px;
  margin-top: 6px;
}

.share-comment span {
  word-break: break-word;
}

.share-comment small {
  color: var(--muted);
  white-space: nowrap;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.segmented input {
  display: none;
}

.segmented label {
  text-align: center;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.segmented input:checked + label {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.checkin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.checkin-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.checkin-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.capture-box {
  position: relative;
  background: #10181f;
  border-radius: var(--radius);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.capture-box video, .capture-box img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.capture-hint {
  color: #93a5b3;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.capture-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.upload-box {
  border: 2px dashed #b3d5e8;
  border-radius: var(--radius);
  padding: 34px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  text-align: center;
}

.upload-box:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.upload-box svg {
  color: var(--teal);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.user-row-info {
  flex: 1;
  min-width: 0;
}

.user-row-name {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.user-row-progress {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.hint-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.hint-text strong {
  color: var(--teal-dark);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(160deg, #2f8fc0 0%, #176a9b 46%, #10405f 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(8, 32, 28, 0.32);
  padding: 30px 32px 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal-soft);
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
}

.auth-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 20px;
}

.auth-tab {
  padding: 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.toast-root {
  position: fixed;
  top: 78px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(10, 20, 28, 0.24);
  animation: slideIn 0.2s ease;
  max-width: 340px;
}

.toast.success svg {
  color: #4fe0b0;
}

.toast.error svg {
  color: #ff8f87;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 58px;
    flex-direction: row;
    align-items: center;
    padding: 0 14px;
    z-index: 40;
  }

  .brand {
    padding: 0;
    margin-right: 14px;
    cursor: pointer;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-sub, .sidebar-foot, .nav-label {
    display: none;
  }

  .nav {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    gap: 2px;
    padding: 8px 12px 14px;
    background: #10405f;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .main {
    margin-left: 0;
    padding-top: 58px;
  }

  .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .topbar-date {
    display: none;
  }

  .content {
    padding: 18px 16px 48px;
  }

  .hero-band {
    grid-template-columns: 1fr;
  }

  .clock-line {
    font-size: 36px;
  }

  .progress-band {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .user-name {
    display: none;
  }

  .hero-main {
    padding: 20px;
    min-height: 150px;
  }

  .weather-card {
    min-height: 0;
  }

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

  .progress-main {
    width: 100%;
  }

  .progress-extra {
    width: 100%;
  }

  .stat-chip {
    flex: 1;
  }

  .chart {
    gap: 6px;
  }

  .task-card {
    padding: 14px;
  }

  .modal-overlay {
    padding: 14px 6px;
    overflow-y: auto;
  }

  .modal, .modal.wide {
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
  }

  .modal-head, .modal-foot {
    padding: 11px 12px;
  }

  .modal-body {
    padding: 13px 12px;
  }

  .form-grid {
    gap: 10px;
  }

  .form-input, .form-select, .form-textarea {
    font-size: 12px;
    padding: 9px 10px;
  }

  .segmented label {
    padding: 8px 4px;
    font-size: 11px;
  }

  .weekday-chip {
    padding: 6px 7px;
    font-size: 11px;
  }

  .modal-title {
    font-size: 15px;
  }

  .modal-sub {
    font-size: 11px;
  }
}
