
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1220 0, #020617 45%, #000 100%);
  color: #e5e7eb;
}

.app-root {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 290px;
  background: rgba(15, 23, 42, 0.98);
  border-right: 1px solid rgba(30, 64, 175, 0.4);
  padding: 0.75rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem 0.75rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.4);
  margin-bottom: 0.5rem;
}

.menu-toggle {
  display: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.sidebar-titles h1 {
  font-size: 1rem;
  margin: 0;
}

.subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.nav-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item-btn {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(30, 64, 175, 0.55);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.4), rgba(15, 23, 42, 1));
  color: #e5e7eb;
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  gap: 0.5rem;
  text-align: left;
}

.nav-item-btn .label-main {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item-btn .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.pill-right {
  font-size: 0.68rem;
  opacity: 0.8;
}

.nav-item-btn.active {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.main {
  flex: 1;
  padding: 1.2rem 1.2rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  border-radius: 1rem;
  border: 1px solid rgba(30, 64, 175, 0.5);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.35), rgba(15, 23, 42, 0.98));
  padding: 1rem 1.2rem 1.3rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
}

.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.hidden {
  display: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.9rem;
}

.tag {
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.block-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.block-column {
  border-radius: 0.85rem;
  border: 1px solid rgba(30, 64, 175, 0.5);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.98));
  padding: 0.75rem 0.8rem 0.85rem;
}

.block-column h3 {
  margin: 0.25rem 0 0.3rem;
  font-size: 0.95rem;
}

.block-column p {
  font-size: 0.86rem;
  line-height: 1.6;
}

.subtle-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0;
  color: #a5b4fc;
}

.module-strip {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.module-card {
  min-width: 180px;
  max-width: 260px;
  border-radius: 0.9rem;
  border: 1px solid rgba(30, 64, 175, 0.65);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.3), rgba(15, 23, 42, 0.98));
  padding: 0.7rem 0.75rem 0.8rem;
  font-size: 0.82rem;
  cursor: grab;
}

.module-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
}

.module-card p {
  font-size: 0.8rem;
  line-height: 1.5;
}

.module-card .status {
  display: inline-flex;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  border: 1px solid rgba(129, 140, 248, 0.8);
  color: #c7d2fe;
}

.module-card.dragging {
  opacity: 0.7;
  cursor: grabbing;
}

.synchression-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.synch-column h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.synch-select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
}

.synch-result {
  border-radius: 0.75rem;
  border: 1px dashed rgba(148,163,184,0.6);
  padding: 1rem;
  margin-top: 0.5rem;
  background: radial-gradient(circle at top left, rgba(148,163,184,0.12), rgba(15,23,42,0.95));
}

.synch-poso details {
  margin-bottom: 0.5rem;
}

.synch-poso summary {
  cursor: pointer;
  font-weight: 600;
}

.synch-placeholder {
  opacity: 0.85;
  font-size: 0.9rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .app-root {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(30,64,175,0.4);
  }
  .menu-toggle {
    display: inline-flex;
  }
  .nav-list {
    display: none;
  }
  .sidebar.open .nav-list {
    display: flex;
  }
}

.nav-item-btn:hover {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35);
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.8);
}

.main {
  max-width: 1100px;
}

.sidebar-blocks-title {
  margin: 0.4rem 0 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.nav-list {
  margin-top: 0.25rem;
}

.nav-item-btn {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.95), rgba(15,23,42,0.98));
  border: 1px solid rgba(51,65,85,0.9);
}

.nav-item-btn .label-main {
  flex-direction: row;
}

.nav-item-btn .pill {
  background: rgba(15,23,42,1);
  border-color: rgba(148,163,184,0.8);
  font-weight: 500;
}

.nav-item-btn .pill-right {
  background: rgba(15,23,42,0.9);
  border-radius: 999px;
  border: 1px solid rgba(51,65,85,0.95);
  padding: 0.05rem 0.55rem;
}

.nav-item-btn.active {
  border-color: rgba(250,204,21,0.95);
  box-shadow: 0 0 0 1px rgba(250,204,21,0.45), 0 8px 22px rgba(15,23,42,0.9);
  background: radial-gradient(circle at top left, rgba(252,211,77,0.28), rgba(15,23,42,0.98));
}

.nav-item-btn.active .pill {
  border-color: rgba(250,204,21,0.9);
  color: #facc15;
}

.nav-item-btn.active .pill-right {
  border-color: rgba(250,204,21,0.9);
  color: #eab308;
}

.nav-item-btn:hover:not(.active) {
  border-color: rgba(148,163,184,1);
  box-shadow: 0 0 0 1px rgba(148,163,184,0.40);
}

.external-link-block {
  margin-top: 1.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.04), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.external-link-text {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5f5;
}

.external-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.9);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 10px 22px rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at top left, rgba(252, 211, 77, 0.18), rgba(15, 23, 42, 1));
}

.external-link-btn:hover {
  box-shadow: 0 0 0 1px rgba(250, 250, 250, 0.18), 0 12px 26px rgba(15, 23, 42, 1);
  transform: translateY(-1px);
}
