:root {
  --bg: #0f141a;
  --bg-alt: #151c24;
  --panel: #1b2430;
  --panel-light: #222f3d;
  --accent: #f4b860;
  --accent-2: #5cc8a1;
  --text: #f4f1ea;
  --muted: #b9c1cc;
  --shadow: 0 20px 60px rgba(5, 10, 20, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #233044 0%, #0f141a 55%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 7vw 10px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #151c24;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.view-toggle {
  display: inline-flex;
  background: var(--panel);
  border-radius: 999px;
  padding: 4px;
  gap: 6px;
}

.tab-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.tab-button[aria-selected="true"] {
  background: var(--accent);
  color: #1c1f24;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding: 16px 7vw 32px;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 12px;
}

.hero-content p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.solid-button,
.ghost-button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.solid-button {
  background: var(--accent);
  color: #1c1f24;
  box-shadow: 0 10px 20px rgba(244, 184, 96, 0.3);
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--panel-light);
  color: var(--text);
}

.solid-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-stat {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  padding: 0 7vw 60px;
  display: grid;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.tag-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  border: 1px solid transparent;
  background: var(--panel-light);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tag.active {
  background: var(--accent-2);
  color: #0e1a13;
}

.selected-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.selected-tags .tag {
  background: transparent;
  border: 1px solid var(--accent-2);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.tool-card {
  background: #202c3a;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.tool-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.tool-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tool-actions button,
.tool-actions .link-button {
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.add-button {
  background: var(--accent);
  color: #151c24;
}

.link-button {
  background: transparent;
  border: 1px solid var(--panel-light);
  color: var(--text);
}

.workflow-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.workflow-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-light);
  padding: 12px 16px;
  border-radius: 14px;
}

.workflow-item button {
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.empty-state {
  margin-top: 20px;
  padding: 28px;
  border-radius: 14px;
  background: #16202b;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.footer {
  padding: 24px 7vw 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions button {
    flex: 1 1 auto;
  }
}
