:root {
  --ink: #10202a;
  --ink-soft: #263944;
  --muted: #657985;
  --line: rgba(255, 255, 255, 0.44);
  --line-dark: rgba(37, 57, 68, 0.12);
  --glass: rgba(255, 255, 255, 0.48);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --glass-faint: rgba(255, 255, 255, 0.26);
  --aqua: #43c7c5;
  --aqua-deep: #148d91;
  --leaf: #6ecf93;
  --coral: #ff6b76;
  --amber: #ffc95c;
  --blue: #4f8dff;
  --shadow: 0 1.4rem 4rem rgba(36, 54, 66, 0.18);
  --inner-shine: inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.24);
  --blur: blur(1.35rem) saturate(1.35);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 14%, rgba(67, 199, 197, 0.34), transparent 21rem),
    radial-gradient(circle at 88% 8%, rgba(255, 201, 92, 0.28), transparent 19rem),
    radial-gradient(circle at 78% 86%, rgba(110, 207, 147, 0.32), transparent 23rem),
    linear-gradient(135deg, #eef8fa 0%, #f8fbfb 42%, #edf5f7 100%);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.5), transparent 28%, rgba(255, 255, 255, 0.24) 54%, transparent 78%),
    repeating-linear-gradient(90deg, rgba(16, 32, 42, 0.028) 0 1px, transparent 1px 6px);
  mix-blend-mode: soft-light;
  opacity: 0.9;
}

body::after {
  content: "";
  position: fixed;
  inset: auto -12rem -18rem auto;
  width: min(52vw, 42rem);
  height: min(52vw, 42rem);
  pointer-events: none;
  background: radial-gradient(circle, rgba(79, 141, 255, 0.18), transparent 66%);
  filter: blur(0.4rem);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--inner-shine);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: var(--inner-shine);
}

.brand-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(135deg, var(--aqua), var(--blue));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 1rem;
  box-shadow: 0 0.85rem 1.8rem rgba(20, 141, 145, 0.26), var(--inner-shine);
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.nav-item,
.ghost-button,
.primary-button,
.icon-button {
  min-height: 2.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
}

.nav-item {
  position: relative;
  overflow: hidden;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.38);
  padding: 0 0.9rem;
  text-align: left;
  box-shadow: var(--inner-shine);
  backdrop-filter: blur(1rem) saturate(1.2);
  -webkit-backdrop-filter: blur(1rem) saturate(1.2);
}

.nav-item::before,
.primary-button::before,
.ghost-button::before {
  content: "";
  position: absolute;
  inset: 0.05rem auto auto 12%;
  width: 62%;
  height: 1px;
  background: rgba(255, 255, 255, 0.75);
}

.nav-item:hover,
.ghost-button:hover,
.small-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.55);
}

.nav-item.active {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 48%),
    linear-gradient(135deg, rgba(20, 141, 145, 0.94), rgba(79, 141, 255, 0.92));
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1rem 2.6rem rgba(20, 141, 145, 0.26), var(--inner-shine);
}

.sidebar-note {
  display: none;
}

.main {
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 1rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 0.15rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--aqua-deep);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.top-actions,
.toolbar,
.panel-head,
.detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

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

.primary-button,
.ghost-button,
.small-button,
.icon-button {
  position: relative;
  overflow: hidden;
}

.primary-button {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(135deg, var(--aqua-deep), var(--blue));
  padding: 0 1.05rem;
  border-color: rgba(255, 255, 255, 0.56);
  box-shadow: 0 0.9rem 2rem rgba(20, 141, 145, 0.24), var(--inner-shine);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 1.15rem 2.5rem rgba(20, 141, 145, 0.3), var(--inner-shine);
}

.ghost-button {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.38);
  padding: 0 1rem;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: var(--inner-shine);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

.icon-button {
  width: 2.4rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  border-color: rgba(255, 255, 255, 0.55);
  font-size: 1.35rem;
  box-shadow: var(--inner-shine);
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: glassRise 240ms ease-out;
}

@keyframes glassRise {
  from {
    opacity: 0;
    transform: translateY(0.55rem) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.metric-card,
.panel,
.table-wrap,
.overall-card,
.modal {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 1.25rem;
  box-shadow: var(--shadow), var(--inner-shine);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.metric-card {
  position: relative;
  min-height: 7.2rem;
  overflow: hidden;
  padding: 1.05rem;
}

.metric-card::before,
.panel::before,
.table-wrap::before,
.overall-card::before {
  content: "";
  position: absolute;
  inset: 0.06rem 12% auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.78);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -1.7rem;
  bottom: -2.1rem;
  width: 7.2rem;
  height: 7.2rem;
  background: radial-gradient(circle, rgba(67, 199, 197, 0.2), transparent 66%);
  border-radius: 50%;
}

.metric-card span,
.overall-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.75rem;
  color: var(--ink);
  font-size: 2.15rem;
  letter-spacing: -0.04em;
}

.dashboard-grid,
.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.panel {
  position: relative;
  padding: 1rem;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.65rem;
  color: #0f777b;
  background: rgba(222, 252, 250, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  box-shadow: var(--inner-shine);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(0.8rem);
  -webkit-backdrop-filter: blur(0.8rem);
}

.status-chip.warn {
  color: #8a5b00;
  background: rgba(255, 244, 199, 0.66);
}

.status-chip.hot {
  color: #a02a34;
  background: rgba(255, 228, 232, 0.68);
}

.stack-list,
.card-list {
  display: grid;
  gap: 0.75rem;
}

.list-item,
.prep-card {
  position: relative;
  overflow: hidden;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 1rem;
  box-shadow: var(--inner-shine);
}

.list-item::after,
.prep-card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 12%;
  width: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.68);
}

.list-item strong,
.prep-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.toolbar {
  position: sticky;
  top: 0.5rem;
  z-index: 4;
  margin-bottom: 0.85rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1.2rem;
  box-shadow: var(--inner-shine);
  backdrop-filter: blur(1.25rem) saturate(1.25);
  -webkit-backdrop-filter: blur(1.25rem) saturate(1.25);
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 0.85rem;
  padding: 0 0.8rem;
  box-shadow: var(--inner-shine);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(67, 199, 197, 0.78);
  box-shadow: 0 0 0 0.25rem rgba(67, 199, 197, 0.14), var(--inner-shine);
}

textarea {
  min-height: 5.5rem;
  padding-top: 0.75rem;
  resize: vertical;
}

.toolbar input,
.toolbar select {
  flex: 1 1 12rem;
}

.table-wrap {
  position: relative;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.95rem 0.9rem;
  border-bottom: 1px solid rgba(37, 57, 68, 0.09);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.24);
}

tr.due-row {
  background: rgba(255, 247, 211, 0.48);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.small-button {
  min-height: 2rem;
  padding: 0 0.6rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  box-shadow: var(--inner-shine);
}

.danger-button {
  color: var(--coral);
}

.progress-cell {
  min-width: 8rem;
}

.bar {
  height: 0.55rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(16, 32, 42, 0.08);
}

.bar i {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--aqua), var(--blue));
  border-radius: inherit;
  box-shadow: 0 0 1rem rgba(67, 199, 197, 0.36);
}

.detail-header {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.detail-header > div:first-child {
  flex: 1 1 20rem;
}

.detail-header label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-weight: 700;
}

.overall-card {
  position: relative;
  flex: 1 1 16rem;
  padding: 0.95rem;
}

.overall-card strong {
  display: block;
  margin: 0.25rem 0 0.55rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.prep-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(67, 199, 197, 0.24), transparent 22rem),
    rgba(16, 32, 42, 0.28);
  backdrop-filter: blur(1.2rem) saturate(1.2);
  -webkit-backdrop-filter: blur(1.2rem) saturate(1.2);
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom: 0;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.field.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
}

.field.check input {
  width: auto;
  min-height: auto;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  padding: 0.8rem 1rem;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent),
    rgba(16, 32, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: var(--shadow), var(--inner-shine);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

@media (min-width: 768px) {
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

@media (min-width: 1024px) {
  .app-shell {
    grid-template-columns: 17.5rem minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

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

  .sidebar-note {
    display: grid;
    gap: 0.35rem;
    margin-top: auto;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 1.1rem;
    box-shadow: var(--inner-shine);
  }

  .sidebar-note span {
    color: var(--aqua-deep);
    font-size: 0.76rem;
    font-weight: 900;
  }

  .main {
    padding: 1.45rem;
  }

  .metric-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
