:root {
  --bg-1: #eef4e6;
  --bg-2: #cfe0bf;
  --bg-3: #9db784;
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: #ffffff;
  --ink: #1f2a1f;
  --muted: #5b665b;
  --line: #d6dfcf;
  --accent: #245a35;
  --accent-dark: #193e25;
  --accent-soft: #edf5ed;
  --warn: #8b5e00;
  --danger: #9b2226;
  --shadow: 0 16px 36px rgba(25, 46, 25, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(150deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
  min-height: 100vh;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(36, 90, 53, 0.18), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.3), transparent 30%);
}

.shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 1rem;
  position: relative;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 0.95;
  max-width: 12ch;
}

.hero-copy {
  margin: 0.65rem 0 0;
  color: var(--muted);
  max-width: 48ch;
}

.hero-status {
  min-width: 220px;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.layout {
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
}

.tabbar {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  margin-bottom: 1rem;
}

.tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  background: var(--card-strong);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(25, 46, 25, 0.1);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card h2 {
  margin-top: 0;
}

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

.stack {
  display: grid;
  gap: 0.75rem;
}

.muted {
  color: var(--muted);
  margin-top: 0;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

input,
select,
button,
textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: background 120ms ease, transform 120ms ease;
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

button.ghost {
  background: var(--accent-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

button.danger {
  background: var(--danger);
}

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

.summary {
  min-height: 1.2rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.notice {
  border: 1px dashed rgba(36, 90, 53, 0.28);
  background: rgba(237, 245, 237, 0.85);
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.55rem 0.45rem;
  white-space: nowrap;
}

th {
  background: rgba(237, 245, 237, 0.95);
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.pill {
  border: 1px solid #d7e8dc;
  background: #edf6ef;
}

.badge.neutral {
  background: #ecf0ec;
  color: #2f3a30;
}

.badge.dashboard {
  background: #dbeee0;
  color: #1d5630;
}

.badge.admin {
  background: #f3e6cb;
  color: #7a5100;
}

.workspace-lock {
  border: 1px dashed rgba(139, 94, 0, 0.35);
  background: rgba(255, 248, 229, 0.85);
  border-radius: 18px;
  padding: 1rem;
}

.subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 800px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-status {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .shell {
    padding: 0.8rem;
  }

  .card {
    padding: 0.85rem;
    border-radius: 18px;
  }

  .tabbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
