/* /labs/marketing — dark, utilitarian, icon-stacked top nav */

:root {
  --bg-0:     #0a0c10;
  --bg-1:     #131822;
  --bg-2:     #181d28;
  --bg-card:  #1a1f2b;
  --ink:      #e6e8ef;
  --ink-dim:  #8a93a6;
  --ink-faint:#545b6a;
  --line:     rgba(255, 255, 255, 0.08);
  --line-2:   rgba(255, 255, 255, 0.14);
  --accent:   #7c80d6;
  --accent-2: #a9aef0;
  --green:    #34d399;
  --red:      #f87171;
  --amber:    #fbbf24;
  --radius:   10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(124, 128, 214, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 80%);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }

code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
code {
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c9d4e2;
  border: 1px solid var(--line);
}

/* ---------- top bar ---------- */
.m-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.6);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 50;
}
.m-brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--ink); font-weight: 600;
}
.m-brand:hover { color: var(--accent); }
.m-brand-mark { color: var(--accent); }
.m-brand-text { letter-spacing: 0.01em; }
.m-sep { color: var(--ink-faint); }
.m-section {
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink-dim); letter-spacing: 0.02em;
}
.m-logout {
  margin-left: auto;
  color: var(--ink-dim);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
}
.m-logout:hover { color: #fff; border-color: var(--line-2); }

/* ---------- icon-stacked tool nav ---------- */
.m-tools {
  display: flex;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.012), transparent);
  flex-wrap: wrap;
}
.m-tool {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 92px;
  padding: 0.85rem 0.4rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--ink-dim);
  text-align: center;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.m-tool:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
  color: var(--ink);
}
.m-tool.is-active {
  background: rgba(124,128,214,0.10);
  border-color: rgba(124,128,214,0.35);
  color: #fff;
}
.m-tool-icon {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  color: inherit;
}
.m-tool-icon svg { width: 28px; height: 28px; }
.m-tool-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* ---------- main + cards ---------- */
.m-main { max-width: 1100px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }

.m-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1rem;
}
.m-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.005em;
}
.m-card p { color: var(--ink-dim); margin: 0 0 0.65rem; }
.m-card p:last-child { margin-bottom: 0; }

.m-h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.5rem; letter-spacing: -0.015em; }
.m-h2 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.6rem; }
.m-sub { color: var(--ink-dim); font-size: 0.95rem; margin: 0 0 1.25rem; max-width: 680px; }

/* ---------- buttons ---------- */
.m-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.m-btn:hover { background: rgba(255,255,255,0.04); color: #fff; }
.m-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.m-btn-primary:hover { background: var(--accent-2); color: #0a0c10; }
.m-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- inputs ---------- */
.m-field { display: block; margin: 0 0 0.85rem; }
.m-field > span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.m-input, .m-textarea, .m-select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
}
.m-input:focus, .m-textarea:focus, .m-select:focus {
  outline: none;
  border-color: var(--accent);
}
.m-textarea { min-height: 200px; resize: vertical; line-height: 1.5; }

/* ---------- alerts ---------- */
.m-alert {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  background: rgba(248, 113, 113, 0.10);
  border-left: 3px solid var(--red);
  color: var(--ink);
}
.m-alert.is-ok {
  background: rgba(52, 211, 153, 0.10);
  border-color: var(--green);
}
.m-alert.is-info {
  background: rgba(124, 128, 214, 0.10);
  border-color: var(--accent);
}

/* ---------- tabs (within a tool) ---------- */
.m-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 0 0 1.25rem;
}
.m-tab {
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  color: var(--ink-dim);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  border: 0; background: transparent; font: inherit;
}
.m-tab:hover { color: var(--ink); }
.m-tab.is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}

/* ---------- glyph grid ---------- */
.m-glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.6rem;
}
.m-glyph {
  background: #f8f8f8;
  border-radius: 6px;
  padding: 0.4rem;
  text-align: center;
  position: relative;
  aspect-ratio: 1.4 / 1;
  display: flex; align-items: center; justify-content: center;
}
.m-glyph img { max-width: 100%; max-height: 100%; }
.m-glyph-label {
  position: absolute; left: 4px; top: 3px;
  font-size: 9px;
  color: rgba(0, 0, 0, 0.55);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
}

/* ---------- file dropzone ---------- */
.m-dropzone {
  display: block;
  padding: 2rem 1.5rem;
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ink-dim);
  background: rgba(255,255,255,0.015);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.m-dropzone:hover, .m-dropzone.is-drag {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(124,128,214,0.05);
}
.m-dropzone strong { color: var(--ink); }

/* ---------- upload progress ---------- */
.m-upload-progress {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.m-upload-progress.is-active { display: block; }
.m-upload-stage {
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.m-upload-detail { font-size: 0.85rem; color: var(--ink); margin-bottom: 0.55rem; }
.m-progress-track {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.m-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 4px;
  transition: width 0.18s ease;
}
.m-progress-track.is-indeterminate .m-progress-bar {
  width: 35% !important;
  position: absolute;
  animation: m-indet 1.2s ease-in-out infinite;
}
@keyframes m-indet {
  0%   { left: -35%; }
  100% { left: 100%; }
}

/* ---------- footer ---------- */
.m-foot {
  border-top: 1px solid var(--line);
  padding: 1rem 1.5rem;
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.01em;
}
.m-foot a { color: var(--ink-dim); }
.m-foot-sep { color: var(--ink-faint); margin: 0 0.4rem; }

/* ---------- auth (login) ---------- */
.m-auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.m-auth-shell { width: 100%; max-width: 380px; }
.m-auth-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}
.m-auth-brand {
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: -0.01em;
}
.m-auth-brand span { color: var(--accent); }
.m-auth-sub { color: var(--ink-dim); font-size: 0.92rem; margin: 0.5rem 0 1.5rem; }

/* ---------- table ---------- */
.m-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.m-table th, .m-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; }
.m-table th {
  font-size: 0.74rem; color: var(--ink-dim); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 500;
}
.m-table td { color: #d6dde6; }
.m-table tr:hover td { background: rgba(255,255,255,0.02); }

.m-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.m-row > .m-grow { flex: 1; min-width: 0; }
.m-muted { color: var(--ink-dim); font-size: 0.88rem; }

@media (max-width: 600px) {
  .m-tools { padding: 0.85rem 0.75rem; }
  .m-tool { width: 76px; padding: 0.65rem 0.3rem 0.55rem; }
  .m-main { padding: 1.25rem 1rem 3rem; }
}
