/* Dashboard Kit — shared layout and components for MQ consoles */

body.mq-shell-body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(160deg, rgba(4, 11, 22, 1) 0%, rgba(6, 17, 32, 1) 60%, rgba(4, 11, 22, 1) 100%);
  color: var(--color-fg, #eaf6ff);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.mq-shell-body[data-mq-reduced-motion="true"] * {
  animation: none !important;
  transition: none !important;
}

.mq-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.mq-shell video[data-mq-background] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  pointer-events: none;
  z-index: -2;
}

.mq-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 12, 22, 0.9) 0%, rgba(6, 12, 22, 0.92) 40%, rgba(6, 12, 22, 0.98) 100%);
  z-index: -1;
}

.mq-shell__masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 5vw, 36px);
  background: rgba(8, 18, 32, 0.92);
  border-bottom: 1px solid rgba(78, 162, 236, 0.2);
  backdrop-filter: blur(14px);
}

.mq-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.mq-shell__brand-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 246, 255, 0.16), rgba(123, 63, 228, 0.18));
  border: 1px solid rgba(82, 162, 238, 0.25);
  box-shadow: 0 10px 22px rgba(24, 94, 180, 0.38);
}

.mq-shell__brand-label {
  display: grid;
  gap: 2px;
}

.mq-shell__brand-label strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.mq-shell__brand-label span {
  font-size: 0.78rem;
  color: rgba(206, 226, 255, 0.72);
}

.mq-shell__nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mq-shell__nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: rgba(214, 232, 255, 0.78);
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  position: relative;
}

.mq-shell__nav a[data-active="true"] {
  background: rgba(78, 162, 236, 0.18);
  border-color: rgba(94, 179, 255, 0.32);
  color: var(--color-fg, #eaf6ff);
  box-shadow: 0 0 0 1px rgba(94, 179, 255, 0.25);
}

.mq-shell__nav a:hover,
.mq-shell__nav a:focus-visible {
  border-color: rgba(94, 179, 255, 0.3);
  color: var(--color-fg, #eaf6ff);
  outline: none;
}

.mq-shell__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.mq-shell__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 246, 255, 0.12);
  border: 1px solid rgba(0, 246, 255, 0.28);
  color: rgba(211, 245, 255, 0.85);
}

.mq-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(118, 200, 255, 0.24);
  background: rgba(12, 28, 52, 0.92);
  color: rgba(214, 236, 255, 0.88);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mq-pill[data-variant="primary"] {
  background: linear-gradient(135deg, #47b9ff, #7defff);
  color: #04172e;
  border: none;
  box-shadow: 0 18px 40px rgba(53, 147, 255, 0.32);
}

.mq-pill:hover,
.mq-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(165, 226, 255, 0.45);
  outline: none;
}

.mq-shell__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 6vw, 56px);
  padding: clamp(22px, 5vw, 48px);
}

.mq-shell__container {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

.mq-page-hero {
  display: grid;
  gap: clamp(12px, 2.8vw, 24px);
  padding: clamp(22px, 4vw, 32px);
  border-radius: 22px;
  background: rgba(10, 22, 40, 0.92);
  border: 1px solid rgba(88, 166, 236, 0.28);
  box-shadow: 0 22px 42px rgba(4, 12, 24, 0.45);
  position: relative;
  overflow: hidden;
}

.mq-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(0, 246, 255, 0.16), transparent 55%);
  pointer-events: none;
}

.mq-page-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  letter-spacing: -0.01em;
}

.mq-page-hero p {
  margin: 0;
  font-size: 1rem;
  color: rgba(208, 230, 255, 0.82);
  max-width: 760px;
  line-height: 1.65;
}

.mq-page-hero__meta {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: start;
}

.mq-page-hero__meta .mq-meta-label {
  color: rgba(203, 226, 255, 0.7);
}

.mq-page-hero__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mq-section {
  display: grid;
  gap: clamp(16px, 3vw, 26px);
}

.mq-section__head {
  display: grid;
  gap: 8px;
}

.mq-section__head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.mq-section__head p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(203, 226, 255, 0.78);
}

.mq-card-grid {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mq-card {
  background: rgba(12, 24, 42, 0.9);
  border-radius: 18px;
  border: 1px solid rgba(94, 179, 255, 0.18);
  padding: clamp(18px, 3vw, 26px);
  display: grid;
  gap: 12px;
  position: relative;
}

.mq-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.mq-card p {
  margin: 0;
  font-size: 0.94rem;
  color: rgba(205, 226, 255, 0.82);
}

.mq-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: rgba(190, 218, 255, 0.78);
}

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

.mq-metric {
  background: rgba(11, 26, 46, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(88, 160, 236, 0.22);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.mq-metric .label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(182, 214, 255, 0.68);
}

.mq-metric .value {
  font-size: 1.1rem;
  font-weight: 600;
}

.mq-table-wrapper {
  background: rgba(12, 24, 42, 0.9);
  border-radius: 18px;
  border: 1px solid rgba(94, 179, 255, 0.18);
  overflow: hidden;
}

.mq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.mq-table thead {
  background: rgba(16, 32, 52, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: rgba(190, 220, 255, 0.8);
}

.mq-table th,
.mq-table td {
  padding: 14px clamp(14px, 2.6vw, 20px);
  border-bottom: 1px solid rgba(88, 160, 236, 0.12);
  text-align: left;
}

.mq-table tbody tr:hover {
  background: rgba(21, 48, 82, 0.3);
}

.mq-empty {
  padding: 18px;
  font-size: 0.9rem;
  color: rgba(204, 226, 255, 0.72);
}

.mq-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 28px);
  background: rgba(4, 12, 24, 0.86);
  backdrop-filter: blur(12px);
  z-index: 90;
  transition: opacity 0.2s ease;
}

.mq-overlay[data-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.mq-modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(10, 22, 40, 0.97);
  border-radius: 22px;
  border: 1px solid rgba(88, 166, 236, 0.32);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
  padding: clamp(20px, 4vw, 30px);
  display: grid;
  gap: 16px;
}

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

.mq-meta-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(188, 218, 255, 0.62);
}

.mq-meta-value {
  font-size: 0.95rem;
  word-break: break-word;
  color: rgba(210, 232, 255, 0.9);
}

.mq-meta-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mq-meta-code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(52, 104, 170, 0.22);
  color: rgba(212, 230, 255, 0.92);
}

.mq-copy-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 160, 236, 0.24);
  background: rgba(15, 32, 54, 0.85);
  color: rgba(203, 226, 255, 0.88);
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mq-copy-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(118, 192, 255, 0.45);
}

.mq-shell__footer {
  padding: 18px clamp(18px, 5vw, 36px);
  font-size: 0.85rem;
  color: rgba(186, 210, 240, 0.76);
  border-top: 1px solid rgba(78, 162, 236, 0.18);
  background: rgba(8, 18, 32, 0.9);
  text-align: center;
}

@media (max-width: 720px) {
  .mq-shell__masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .mq-shell__actions {
    width: 100%;
    justify-content: space-between;
  }

  .mq-shell__nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mq-shell__main {
    padding: clamp(18px, 8vw, 28px);
  }

  .mq-shell__container {
    gap: clamp(22px, 8vw, 32px);
  }
}

@media (max-width: 540px) {
  .mq-page-hero {
    padding: clamp(18px, 6vw, 26px);
  }

  .mq-table th,
  .mq-table td {
    padding: 12px 14px;
  }
}
