/* ==========================================================================
   PROTOTYPE HUB — sitemap / screen directory (prototype-hub.css)
   ========================================================================== */

.page-prototype-hub {
  background: linear-gradient(180deg, #eef2fa 0%, #f4f7fc 38%, #f8fafc 100%);
  min-height: 100vh;
}

/* —— Top bar —— */
.proto-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

.proto-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.proto-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 17px;
}

.proto-topbar__brand strong {
  color: var(--navy-900);
}

.proto-topbar__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.proto-topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
}

.proto-topbar__link svg {
  width: 16px;
  height: 16px;
}

.proto-topbar__link:hover {
  color: var(--blue-700);
}

.proto-topbar__pill {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(230, 190, 92, 0.2);
  color: #92680a;
  border: 1px solid rgba(230, 190, 92, 0.45);
}

.proto-footer {
  margin-top: 40px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(10, 31, 68, 0.08);
  text-align: center;
}

.proto-footer p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .proto-topbar__inner {
    min-height: 52px;
  }

  .proto-topbar__link {
    font-size: 12px;
  }
}

.proto-hub {
  padding-bottom: 48px;
}

/* —— Hero —— */
.proto-hero {
  position: relative;
  padding: 36px 0 28px;
  overflow: hidden;
}

.proto-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(37, 99, 235, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 10%, rgba(230, 190, 92, 0.14) 0%, transparent 50%);
  pointer-events: none;
}

.proto-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.proto-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--blue-700);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.proto-hero__eyebrow svg {
  width: 14px;
  height: 14px;
}

.proto-hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin-bottom: 10px;
  line-height: 1.15;
}

.proto-hero__sub {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 22px;
}

.proto-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proto-hero__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.proto-hero__actions .btn svg {
  width: 16px;
  height: 16px;
}

.proto-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  gap: 10px;
  min-width: 220px;
}

.proto-stat {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(10, 31, 68, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 18px rgba(10, 31, 68, 0.05);
}

.proto-stat__val {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
}

.proto-stat__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proto-stat--total .proto-stat__val { color: var(--blue-600); }
.proto-stat--customer .proto-stat__val { color: #2563eb; }
.proto-stat--vendor .proto-stat__val { color: #7c3aed; }
.proto-stat--admin .proto-stat__val { color: #0f766e; }

/* —— Toolbar —— */
.proto-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 247, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 31, 68, 0.06);
  padding: 14px 0;
  margin-bottom: 20px;
}

.proto-toolbar__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proto-search {
  position: relative;
}

.proto-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.proto-search input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-900);
  box-shadow: 0 2px 10px rgba(10, 31, 68, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.proto-search input:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.proto-search input::placeholder {
  color: var(--text-muted);
}

.proto-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.proto-filters__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.proto-filter {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.proto-filter:hover {
  border-color: var(--blue-300);
  color: var(--blue-700);
}

.proto-filter.is-active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

.proto-filter--customer.is-active { background: #2563eb; border-color: #2563eb; }
.proto-filter--vendor.is-active { background: #7c3aed; border-color: #7c3aed; }
.proto-filter--admin.is-active { background: #0f766e; border-color: #0f766e; }

.proto-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.proto-meta__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.proto-meta__hint {
  font-size: 12px;
  color: var(--text-muted);
}

.proto-meta__hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  font-size: 11px;
  font-family: inherit;
}

/* —— Grid —— */
.proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.proto-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1px solid rgba(10, 31, 68, 0.08);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(10, 31, 68, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-width: 0;
}

.proto-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 31, 68, 0.1);
  border-color: rgba(37, 99, 235, 0.22);
}

.proto-card__ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-card__ic svg {
  width: 20px;
  height: 20px;
}

.proto-card--customer .proto-card__ic {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.proto-card--vendor .proto-card__ic {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.proto-card--admin .proto-card__ic {
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

.proto-card__body {
  flex: 1;
  min-width: 0;
}

.proto-card__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.proto-card__title {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 4px;
  line-height: 1.3;
}

.proto-card__desc {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.proto-card__path {
  display: block;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proto-card__arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-top: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.proto-card__arrow svg {
  width: 14px;
  height: 14px;
}

.proto-card:hover .proto-card__arrow {
  background: var(--blue-600);
  color: var(--white);
}

/* —— Empty state —— */
.proto-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--white);
  border-radius: 20px;
  border: 1px dashed var(--border-soft);
}

.proto-empty svg {
  width: 48px;
  height: 48px;
  color: var(--gray-400);
  margin-bottom: 14px;
}

.proto-empty h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--navy-900);
}

.proto-empty p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* —— Floating quick access (prototype only) —— */
@media (max-width: 768px) {
  body.page-prototype-hub {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  .proto-hero__inner {
    grid-template-columns: 1fr;
  }

  .proto-stats {
    grid-template-columns: repeat(4, 1fr);
    min-width: 0;
  }

  .proto-stat {
    padding: 10px 8px;
    text-align: center;
  }

  .proto-stat__val {
    font-size: 20px;
  }

  .proto-stat__label {
    font-size: 9px;
  }

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

  .proto-toolbar {
    top: 0;
  }
}

@media (max-width: 480px) {
  .proto-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .proto-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .proto-filter {
    flex-shrink: 0;
  }
}