/* MetaNet Holdings — shared UI system v8.6
   Use on product surfaces for a consistent, non-generic BSV look. */
:root {
  --mh-bg: #050a12;
  --mh-bg-elev: #0a1220;
  --mh-panel: rgba(12, 22, 38, 0.92);
  --mh-panel-solid: #0c1626;
  --mh-line: rgba(56, 90, 130, 0.45);
  --mh-line-strong: rgba(45, 212, 191, 0.35);
  --mh-text: #eef5fc;
  --mh-muted: #8ba0b8;
  --mh-faint: #5f738c;
  --mh-teal: #2dd4bf;
  --mh-teal-2: #14b8a6;
  --mh-blue: #5b9dff;
  --mh-ok: #34d399;
  --mh-warn: #fbbf24;
  --mh-bad: #f87171;
  --mh-radius: 18px;
  --mh-radius-sm: 12px;
  --mh-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mh-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mh-glow: 0 0 60px rgba(45, 212, 191, 0.12);
  --mh-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mh {
  margin: 0;
  font-family: var(--mh-font);
  color: var(--mh-text);
  background:
    radial-gradient(ellipse 100% 70% at 50% -30%, rgba(45, 212, 191, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(91, 157, 255, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(20, 184, 166, 0.08), transparent 45%),
    linear-gradient(180deg, var(--mh-bg) 0%, #071018 50%, #050a12 100%);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
}

a { color: var(--mh-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.mh-bar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  background: rgba(5, 10, 18, 0.8);
  border-bottom: 1px solid var(--mh-line);
}
.mh-bar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.mh-brand {
  display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none;
}
.mh-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, var(--mh-teal), #0f766e);
  color: #042f2e; font-weight: 900; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--mh-glow);
}
.mh-brand strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.mh-brand em {
  display: block; font-style: normal; font-size: 11px; color: var(--mh-muted); margin-top: 1px;
}
.mh-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.mh-nav a {
  color: var(--mh-muted); padding: 8px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.mh-nav a:hover { color: var(--mh-text); background: rgba(255,255,255,0.04); }
.mh-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.mh-pill.warn { color: var(--mh-warn); border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.1); }
.mh-pill.ok { color: var(--mh-ok); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.1); }
.mh-pill.teal { color: var(--mh-teal); border-color: rgba(45,212,191,0.35); background: rgba(45,212,191,0.1); }

/* Layout */
.mh-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 18px 80px; }
.mh-hero { padding: 8px 0 20px; }
.mh-hero h1 {
  margin: 0 0 10px; font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.035em; line-height: 1.1; font-weight: 800;
}
.mh-hero h1 .grad {
  background: linear-gradient(120deg, #fff 20%, var(--mh-teal) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mh-lead {
  margin: 0; color: var(--mh-muted); font-size: 1.05rem; line-height: 1.6; max-width: 58ch;
}

/* Cards / panels */
.mh-card {
  background: linear-gradient(165deg, rgba(14, 26, 44, 0.95), rgba(10, 18, 32, 0.9));
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius);
  padding: 18px 18px;
  box-shadow: var(--mh-shadow);
}
.mh-card.hero-card {
  border-color: rgba(45, 212, 191, 0.28);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.1), transparent 42%),
    linear-gradient(165deg, rgba(14, 26, 44, 0.96), rgba(10, 18, 32, 0.92));
  box-shadow: var(--mh-glow), var(--mh-shadow);
}
.mh-card h2 {
  margin: 0 0 12px; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em;
}

.mh-grid { display: grid; gap: 14px; }
.mh-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mh-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mh-grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 720px) {
  .mh-grid-2, .mh-grid-3 { grid-template-columns: 1fr; }
}

/* KPI strip */
.mh-kpi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px;
}
.mh-kpi .cell {
  text-align: center; padding: 14px 10px; border-radius: 14px;
  background: rgba(7, 16, 28, 0.55);
  border: 1px solid var(--mh-line);
}
.mh-kpi .cell b {
  display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, #a5f3e8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mh-kpi .cell span {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mh-muted); font-weight: 700;
}

/* Forms */
.mh-label {
  display: block; font-size: 10px; color: var(--mh-muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-bottom: 6px;
}
.mh-input, .mh-select, .mh-textarea {
  width: 100%; border: 1px solid var(--mh-line); border-radius: var(--mh-radius-sm);
  background: #070f1a; color: var(--mh-text); padding: 12px 13px;
  font-size: 15px; font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mh-input:focus, .mh-select:focus, .mh-textarea:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}
.mh-textarea { min-height: 80px; resize: vertical; font-family: var(--mh-mono); font-size: 12px; }

/* Buttons */
.mh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; padding: 11px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--mh-line);
  background: rgba(12, 22, 38, 0.95); color: var(--mh-text);
  text-decoration: none; transition: transform 0.1s, border-color 0.15s, filter 0.15s;
}
.mh-btn:active { transform: scale(0.98); }
.mh-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--mh-teal-2), var(--mh-teal));
  color: #042f2e;
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}
.mh-btn.primary:hover { filter: brightness(1.06); text-decoration: none; }
.mh-btn.ghost { background: transparent; }
.mh-btn.ghost:hover { border-color: rgba(45, 212, 191, 0.4); text-decoration: none; }
.mh-btn.danger { border-color: rgba(248, 113, 113, 0.4); color: var(--mh-bad); background: transparent; }
.mh-btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.mh-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Tables */
.mh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mh-table th, .mh-table td {
  text-align: left; padding: 11px 8px;
  border-bottom: 1px solid var(--mh-line); vertical-align: top;
}
.mh-table th {
  color: var(--mh-muted); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 700;
}
.mh-mono { font-family: var(--mh-mono); font-size: 12px; word-break: break-all; color: var(--mh-muted); }
.mh-muted { color: var(--mh-muted); font-size: 13px; line-height: 1.5; }
.mh-ok { color: var(--mh-ok); }
.mh-warn { color: var(--mh-warn); }
.mh-bad { color: var(--mh-bad); }

/* Feature / rail tiles */
.mh-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px;
}
.mh-tile {
  border: 1px solid var(--mh-line); border-radius: 14px; padding: 14px;
  background: rgba(7, 16, 28, 0.5); text-decoration: none; color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.mh-tile:hover {
  border-color: rgba(45, 212, 191, 0.4); background: rgba(45, 212, 191, 0.06);
  text-decoration: none; transform: translateY(-1px);
}
.mh-tile .ico { font-size: 20px; margin-bottom: 6px; }
.mh-tile strong { display: block; font-size: 13px; }
.mh-tile span { font-size: 11px; color: var(--mh-muted); }

/* Toast */
.mh-toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 80;
  padding: 12px 16px; border-radius: 14px; max-width: 320px;
  background: var(--mh-panel-solid); border: 1px solid var(--mh-line);
  box-shadow: var(--mh-shadow); display: none; font-size: 13px; font-weight: 600;
}
.mh-toast.show { display: block; }
.mh-toast.ok { border-color: rgba(52, 211, 153, 0.4); color: var(--mh-ok); }
.mh-toast.bad { border-color: rgba(248, 113, 113, 0.4); color: var(--mh-bad); }

.mh-footer {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--mh-line);
  color: var(--mh-faint); font-size: 12px;
}
