/* Marketplace público ARQVIS */
:root {
  --mp-bg: #070b14;
  --mp-panel: rgba(12, 18, 32, 0.92);
  --mp-border: rgba(148, 163, 184, 0.18);
  --mp-text: #e2e8f0;
  --mp-muted: #94a3b8;
  --mp-cyan: #22d3ee;
  --mp-accent: #38bdf8;
}

.mp-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(900px 400px at 90% 0%, rgba(56, 189, 248, 0.08), transparent 50%),
    var(--mp-bg);
  color: var(--mp-text);
  font-family: "DM Sans", system-ui, sans-serif;
}

.mp-top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--mp-border);
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(10px);
}

.mp-top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
}

.mp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mp-brand-name {
  font-size: 1.05rem;
}

.mp-brand-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 68%);
}

.mp-brand-core-ring {
  position: absolute;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 50%;
  animation: mp-core-spin 7s linear infinite;
}

.mp-brand-core-ring-one {
  inset: 2px;
  border-left-color: transparent;
}

.mp-brand-core-ring-two {
  inset: 7px;
  border-color: rgba(129, 140, 248, 0.65);
  border-right-color: transparent;
  animation-duration: 4.5s;
  animation-direction: reverse;
}

.mp-brand-core-center {
  position: relative;
  z-index: 2;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mp-cyan);
  box-shadow: 0 0 11px var(--mp-cyan);
  animation: mp-core-breathe 2.4s ease-in-out infinite;
}

@keyframes mp-core-spin {
  to { transform: rotate(360deg); }
}

@keyframes mp-core-breathe {
  50% { transform: scale(1.35); opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-brand-core-ring,
  .mp-brand-core-center {
    animation: none;
  }
}

.mp-top-title {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mp-muted);
}

.mp-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-nav-link {
  color: var(--mp-cyan);
  text-decoration: none;
  font-size: 0.875rem;
}

.mp-user {
  font-size: 0.8rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.mp-hero {
  margin-bottom: 22px;
}

.mp-hero h1 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
}

.mp-hero p {
  margin: 0;
  color: var(--mp-muted);
  max-width: 42rem;
  line-height: 1.5;
}

.mp-filters {
  display: grid;
  grid-template-columns: minmax(110px, 0.6fr) minmax(240px, 2fr) minmax(110px, 0.7fr) minmax(140px, 0.9fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--mp-border);
  border-radius: 14px;
  background: var(--mp-panel);
}

.mp-filter-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.mp-filter-field[hidden] {
  display: none !important;
}

.mp-filter-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.75);
}

.mp-filter-field input,
.mp-filter-field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.9);
  color: var(--mp-text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.mp-filter-field select {
  appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.mp-filter-field input:focus,
.mp-filter-field select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.mp-status {
  min-height: 1.25rem;
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--mp-muted);
}

.mp-status.is-error {
  color: #fca5a5;
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mp-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--mp-border);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(18, 28, 48, 0.95), rgba(10, 16, 28, 0.9));
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.mp-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
}

.mp-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mp-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 11px;
  color: var(--mp-muted);
}

.mp-badge.is-on {
  color: var(--mp-cyan);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
}

.mp-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
}

.mp-card-desc {
  margin: 0;
  flex: 1;
  color: var(--mp-muted);
  font-size: 0.875rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-card code {
  font-size: 11px;
  color: #a5b4fc;
}

.mp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mp-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--mp-muted);
}

.mp-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.mp-star {
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.4);
  font-size: 16px;
  line-height: 1;
  padding: 0 1px;
  cursor: default;
}

button.mp-star {
  cursor: pointer;
}

.mp-star.is-on {
  color: #fbbf24;
}

.mp-stars-label {
  margin-left: 8px;
  font-size: 12px;
  color: var(--mp-muted);
}

.mp-empty {
  grid-column: 1 / -1;
  padding: 40px 16px;
  text-align: center;
  color: var(--mp-muted);
  border: 1px dashed var(--mp-border);
  border-radius: 14px;
}

/* Detail pages */
.mp-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.mp-detail-toolbar .btn {
  white-space: nowrap;
}

.mp-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}

.mp-skill-body {
  margin: 0;
  padding: 16px;
  max-height: none;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 12px;
  border: 1px solid var(--mp-border);
  background: rgba(8, 14, 26, 0.75);
}

.mp-diagram-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.mp-diagram-shell .public-content-panel {
  flex: 1;
  min-height: 0;
}

.mp-diagram-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.mp-diagram-page .mp-top {
  flex: 0 0 auto;
}

.mp-diagram-page .mp-top-inner {
  max-width: none;
}

.mp-diagram-page .mp-diagram-shell {
  flex: 1;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 12px 18px 18px;
  overflow: hidden;
}

.mp-diagram-page .mp-back {
  flex: 0 0 auto;
}

.mp-diagram-page .mp-detail-toolbar {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.mp-diagram-page .public-content-panel {
  width: 100%;
  border: 1px solid var(--mp-border);
  border-radius: 10px;
}

.mp-diagram-page .public-split {
  width: 100%;
  height: 100%;
}

.mp-back {
  color: var(--mp-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.mp-back:hover {
  color: var(--mp-cyan);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  color: #082f49;
}

.btn-ghost {
  background: transparent;
  border-color: var(--mp-border);
  color: var(--mp-text);
}

.muted {
  color: var(--mp-muted);
}

@media (max-width: 780px) {
  .mp-filters {
    grid-template-columns: 1fr 1fr;
  }

  .mp-filter-search {
    grid-column: 1 / -1;
  }

  .mp-grid {
    grid-template-columns: 1fr;
  }

  .mp-diagram-page .mp-diagram-shell {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .mp-filters {
    grid-template-columns: 1fr;
  }

  .mp-filter-search {
    grid-column: auto;
  }

  .mp-top-title {
    display: none;
  }
}
