/* ============================================================
   MLOP MATERIAL CONNECT — design tokens & shared components
   ============================================================ */

:root {
  --ink: #1c1b19;
  --paper: #fafaf8;
  --paper-dim: #f0eee7;
  --orange: #d9581f;
  --orange-dark: #b8480f;
  --steel: #1f4e5f;
  --steel-dark: #163944;
  --stone: #8a8478;
  --stone-light: #d8d3c8;
  --green: #2f7a4d;
  --green-bg: #e7f2ea;
  --amber: #b8860b;
  --amber-bg: #faf1dd;
  --red: #a83232;
  --red-bg: #f7e8e6;
  --radius: 4px;
  --shadow: 0 1px 0 rgba(28,27,25,0.06);
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Barlow', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, .display {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.05;
}

a { color: var(--steel); text-decoration: none; }
a:hover { color: var(--steel-dark); }

.container-app { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---- Top bar ---- */
.topbar {
  background: var(--ink);
  border-bottom: 3px solid var(--orange);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
}
.brand-mark {
  width: 34px; height: 34px;
  background: var(--orange);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  border-radius: 3px;
  font-size: 1.1rem;
}
.brand small { display: block; font-family:'Barlow'; font-weight: 500; font-size: 0.65rem; color: var(--stone-light); letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #d8d3c8; font-weight: 600; font-size: 0.92rem; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active { border-bottom: 2px solid var(--orange); padding-bottom: 4px; }
.btn-nav-register {
  background: var(--orange); color: #fff !important; padding: 9px 18px;
  border-radius: var(--radius); font-weight: 700 !important;
}
.btn-nav-register:hover { background: var(--orange-dark); }

@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ---- Buttons ---- */
.btn-app {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 0.95rem;
  padding: 12px 22px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color:#fff; }
.btn-secondary { background: var(--steel); color: #fff; }
.btn-secondary:hover { background: var(--steel-dark); color:#fff; }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-whatsapp { background: #2f7a4d; color: #fff; }
.btn-whatsapp:hover { background: #24603b; color:#fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-ghost-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-ghost-danger:hover { background: var(--red); color: #fff; }

/* ---- Status chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; }
.chip-available { background: var(--green-bg); color: var(--green); }
.chip-available .chip-dot { background: var(--green); }
.chip-busy { background: var(--amber-bg); color: var(--amber); }
.chip-busy .chip-dot { background: var(--amber); }
.chip-offline { background: #ece9e2; color: var(--stone); }
.chip-offline .chip-dot { background: var(--stone); }
.chip-verified { background: var(--steel); color: #fff; }

/* ---- Cards ---- */
.card-app {
  background: #fff;
  border: 1px solid var(--stone-light);
  border-radius: var(--radius);
  padding: 20px;
}
.result-card {
  background: #fff;
  border: 1px solid var(--stone-light);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: border-color .15s ease;
}
.result-card.is-busy { border-left-color: var(--amber); }
.result-card.is-offline { border-left-color: var(--stone); }
.result-card:hover { border-color: var(--ink); }

/* ---- Hero search ---- */
.hero {
  background: var(--ink);
  background-image: radial-gradient(circle at 85% 20%, rgba(217,88,31,0.25), transparent 55%);
  color: #fff;
  padding: 64px 0 84px;
}
.hero h1 { color: #fff; font-size: 2.6rem; max-width: 720px; }
.hero .lede { color: var(--stone-light); font-size: 1.1rem; max-width: 560px; margin-top: 10px; }

.search-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  margin-top: -46px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
.search-panel label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--stone); display:block; margin-bottom: 6px; }
.form-control-app, select.form-control-app {
  width: 100%; border: 2px solid var(--stone-light); border-radius: var(--radius);
  padding: 11px 12px; font-family: 'Barlow', sans-serif; font-size: 1rem; color: var(--ink);
  background: #fff;
}
.form-control-app:focus, select.form-control-app:focus {
  outline: none; border-color: var(--steel);
}

/* ---- Material pill picker ---- */
.pill-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 2px solid var(--stone-light); border-radius: 999px; padding: 8px 16px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; background: #fff; color: var(--ink);
}
.pill:hover { border-color: var(--steel); }
.pill.selected { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Stat tile ---- */
.stat-tile {
  border: 1px solid var(--stone-light); border-radius: var(--radius);
  padding: 18px; background: #fff;
}
.stat-tile .num { font-family: 'Archivo'; font-weight: 800; font-size: 2rem; line-height: 1; }
.stat-tile .label { color: var(--stone); font-size: 0.85rem; margin-top: 6px; font-weight: 600; }

/* ---- Section heading with rule ---- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 18px;
}
.section-head h2 { font-size: 1.3rem; margin: 0; }

/* ---- Step wizard ---- */
.step-track { display: flex; gap: 6px; margin-bottom: 30px; }
.step-track .seg { flex: 1; height: 5px; background: var(--stone-light); border-radius: 3px; }
.step-track .seg.done { background: var(--orange); }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem;
  margin-right: 10px;
}

/* ---- Sidebar nav (dashboards) ---- */
.dash-shell { display: grid; grid-template-columns: 220px 1fr; gap: 0; min-height: calc(100vh - 64px); }
.dash-side {
  background: #fff; border-right: 1px solid var(--stone-light); padding: 24px 0;
}
.dash-side a {
  display: flex; align-items: center; gap: 10px; padding: 11px 22px; color: var(--ink);
  font-weight: 600; font-size: 0.92rem; border-left: 3px solid transparent;
}
.dash-side a:hover { background: var(--paper-dim); }
.dash-side a.active { border-left-color: var(--orange); background: var(--paper-dim); color: var(--orange-dark); }
.dash-main { padding: 28px 32px; }

@media (max-width: 800px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--stone-light); padding: 10px; }
  .dash-side a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .dash-side a.active { border-left-color: transparent; border-bottom-color: var(--orange); }
}

/* ---- Table ---- */
.table-app { width: 100%; border-collapse: collapse; background: #fff; }
.table-app th {
  text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--stone); padding: 10px 14px; border-bottom: 2px solid var(--ink);
}
.table-app td { padding: 13px 14px; border-bottom: 1px solid var(--stone-light); font-size: 0.94rem; }
.table-app tr:hover td { background: var(--paper-dim); }

/* ---- Footer ---- */
.footer { background: var(--ink); color: var(--stone-light); padding: 36px 0; margin-top: 60px; }
.footer a { color: #fff; }
.footer .fine { color: var(--stone); font-size: 0.82rem; margin-top: 14px; }

/* ---- misc ---- */
.muted { color: var(--stone); }
.divider { border: none; border-top: 1px solid var(--stone-light); margin: 24px 0; }
.badge-verified { display:inline-flex; align-items:center; gap:5px; color: var(--steel); font-weight:700; font-size:0.85rem; }
.rating-star { color: #b8860b; }

.toast-app {
  position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: #fff;
  padding: 14px 20px; border-radius: var(--radius); border-left: 4px solid var(--green);
  display: none; max-width: 320px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); z-index: 999;
}

.mp-row { padding:10px 0; border-bottom:1px solid #eee; }
.mp-check { display:flex; align-items:center; gap:8px; font-weight:600; margin:0; cursor:pointer; }
.mp-units { display:flex; flex-wrap:wrap; gap:6px 16px; margin:6px 0 0 26px; }
.mp-unit-opt { display:flex; align-items:center; gap:4px; font-size:0.9rem; margin:0; cursor:pointer; }
