:root {
  --ink: #112018;
  --muted: #6f7c73;
  --line: rgba(255, 255, 255, 0.66);
  --glass: rgba(255, 255, 255, 0.68);
  --green: #b9ff31;
  --deep: #052318;
  --shadow: 0 24px 80px rgba(23, 43, 31, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(185, 255, 49, 0.38), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(123, 209, 255, 0.28), transparent 25%),
    linear-gradient(135deg, #f8fbf4 0%, #eff5ec 45%, #f7faf2 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.glass {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.28);
}

.sidebar {
  display: flex;
  position: sticky;
  top: 22px;
  flex-direction: column;
  height: calc(100vh - 44px);
  padding: 18px;
  border-radius: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 20px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: var(--deep);
  font-weight: 800;
}

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

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

.nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-button,
.primary-button {
  min-height: 42px;
  border-radius: 16px;
}

.nav-item {
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav-item.active {
  color: #f6ffe7;
  background: var(--deep);
}

.ghost-button {
  padding: 0 16px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.58);
}

.primary-button {
  padding: 0 18px;
  color: #0c210f;
  background: var(--green);
  font-weight: 700;
}

.sidebar .ghost-button {
  margin-top: auto;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-radius: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #70a021;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.top-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.status-pill.online {
  color: var(--deep);
  background: rgba(185, 255, 49, 0.5);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  min-height: 132px;
  padding: 20px;
  border-radius: 24px;
}

.stat-card span {
  color: var(--muted);
}

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

.panel {
  padding: 20px;
  border-radius: 28px;
}

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

.panel-head span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div,
.row-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(11, 43, 25, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

.timeline b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
}

.timeline p,
.row-card p {
  margin: 0;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 12px;
}

.row-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

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

.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(185, 255, 49, 0.35);
}

.row-actions {
  display: flex;
  gap: 8px;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.7);
}

.small-button.good {
  background: var(--green);
}

.small-button.danger {
  color: #8d221b;
  background: rgba(255, 103, 88, 0.16);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(238, 244, 234, 0.42);
}

.modal.hidden,
.toast.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 28px;
}

.modal-card.wide {
  width: min(760px, 100%);
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  font-size: 22px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(15, 44, 23, 0.1);
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
}

input {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

#passwordInput {
  margin: 18px 0 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

label.full {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #f7ffe7;
  background: var(--deep);
  box-shadow: var(--shadow);
}

.toast.error {
  background: #7d221c;
}

button:disabled {
  cursor: wait;
  opacity: 0.56;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .row-card {
    grid-template-columns: 1fr;
  }
}
