@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #0f1411;
  --bg-soft: rgba(20, 28, 23, 0.82);
  --panel: rgba(30, 39, 33, 0.9);
  --panel-strong: rgba(44, 56, 46, 0.95);
  --text: #f4ecd8;
  --muted: #b9b09b;
  --gold: #d6a94c;
  --mint: #92c49c;
  --danger: #df6d52;
  --line: rgba(214, 169, 76, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(214, 169, 76, 0.14), transparent 36%),
    radial-gradient(circle at bottom right, rgba(146, 196, 156, 0.14), transparent 32%),
    linear-gradient(135deg, #0c110d 0%, #121913 50%, #1a211b 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 22, 18, 0.94), rgba(12, 17, 13, 0.8));
  backdrop-filter: blur(16px);
}

.brand h1,
.hero h2,
.panel-head h3 {
  font-family: "Space Grotesk", sans-serif;
}

.brand h1 {
  margin: 0;
  font-size: 2rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.subtitle {
  color: var(--muted);
  line-height: 1.6;
}

.nav {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.nav-link,
button {
  font: inherit;
}

.nav-link {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(214, 169, 76, 0.08);
  border-color: rgba(214, 169, 76, 0.22);
  transform: translateX(4px);
}

.content {
  padding: 28px;
}

.hero,
.panel,
.detail-box,
dialog {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 28px;
}

.hero h2 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(1.5rem, 2vw, 2.4rem);
}

.panel {
  display: none;
  margin-top: 22px;
  padding: 22px;
  border-radius: 24px;
  animation: rise 220ms ease;
}

.panel.active {
  display: block;
}

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

.card,
.form-grid label,
.detail-box {
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card {
  padding: 18px;
}

.card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.3rem;
}

.panel-head,
.row-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 20, 16, 0.82);
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 160ms ease;
}

button.primary {
  background: linear-gradient(135deg, #e1b05b, #b77921);
  color: #120d04;
}

button.secondary {
  background: rgba(146, 196, 156, 0.14);
  border-color: rgba(146, 196, 156, 0.26);
  color: var(--text);
}

button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

button:hover {
  transform: translateY(-1px);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

tbody tr {
  cursor: pointer;
  transition: 120ms ease;
}

tbody tr:hover {
  background: rgba(214, 169, 76, 0.06);
}

.detail-box {
  margin-top: 16px;
  padding: 18px;
  overflow: auto;
  color: #e9dec2;
  white-space: pre-wrap;
}

dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 0;
  border-radius: 24px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

dialog form {
  padding: 22px;
}

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

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

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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