/* easyMeraki — styling that echoes the Meraki dashboard: light gray canvas,
   white cards, the Meraki green as the action color, a dark top nav. */

:root {
  --mk-green: #6cb33f;
  --mk-green-dark: #4e8a2c;
  --mk-green-soft: #eaf5e1;
  --mk-blue: #1795d3;
  --nav: #20303c;
  --nav-2: #2a3e4c;
  --bg: #eef1f3;
  --card: #ffffff;
  --border: #dce1e5;
  --text: #21313d;
  --muted: #6a7a86;
  --danger: #d6336c;
  --warn: #b5711a;
  --warn-bg: #fdf3e3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(33, 49, 61, 0.06), 0 2px 8px rgba(33, 49, 61, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--mk-blue); }

/* ---- top nav ---- */
.nav {
  background: var(--nav);
  background: linear-gradient(180deg, var(--nav-2), var(--nav));
  color: #fff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  box-shadow: var(--shadow);
}
.nav .brand { display: flex; align-items: center; gap: 12px; }
.nav .brand h1 { font-size: 18px; margin: 0; font-weight: 650; letter-spacing: 0.2px; }
.nav .brand h1 .lo { color: var(--mk-green); }
.nav .tag { color: #9db1bf; font-size: 12.5px; margin-left: 2px; }
.nav .spacer { flex: 1; }
.nav .env {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: #9db1bf; border: 1px solid #3c4f5c; border-radius: 20px; padding: 3px 10px;
}

/* Interactive Ineapple logo (source: ineapple-logo/). Sized to the nav bar and
   placed in normal flow — the asset defaults to position:fixed, so we override.
   `overflow: visible` is required: the intro's fly-in lines start outside the
   SVG box and would otherwise be clipped. Colors (#C6C8CC / #F2642B) are tuned
   for this dark nav. */
.brandlogo {
  position: static;
  height: 46px;
  width: auto;
  overflow: visible;
  display: block;
  flex: none;
}

/* ---- layout ---- */
.wrap { max-width: 1000px; margin: 26px auto 60px; padding: 0 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card .sub { color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }
.step { display: flex; align-items: center; gap: 8px; }
.step .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--mk-green);
  color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

.hero h2 { font-size: 22px; }
.hero .lead { font-size: 15px; color: var(--muted); max-width: 66ch; }
.pill {
  display: inline-block; background: var(--mk-green-soft); color: var(--mk-green-dark);
  border-radius: 20px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; margin-bottom: 10px;
}

/* ---- form controls ---- */
label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 5px; }
textarea, input, select {
  font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%;
}
textarea {
  min-height: 190px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.5; white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
textarea:focus, input:focus, select:focus { outline: 2px solid var(--mk-green); border-color: var(--mk-green); }

.controls { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-top: 16px; }
.controls .field { flex: 0 0 auto; min-width: 150px; }
.controls .field.grow { flex: 1 1 200px; }
.row-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

button {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; border: 1px solid transparent;
  padding: 10px 18px;
}
.btn-primary { background: var(--mk-green); color: #fff; }
.btn-primary:hover { background: var(--mk-green-dark); }
.btn-primary:disabled { background: #b6c2ca; cursor: not-allowed; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.link-btn { background: none; border: none; color: var(--mk-blue); padding: 0; font-weight: 600; }

/* ---- chip editor ---- */
.paste { min-height: 120px; }
.tier-controls { display: contents; } /* let tier fields sit in the .controls flex row */
.warn-text { color: var(--warn); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px 4px 6px;
  font-size: 13px;
  background: #fff;
  max-width: 100%;
}
.chip-ok {
  background: var(--mk-green-soft);
  border-color: #bfe0a6;
  color: var(--mk-green-dark);
}
.chip-warn {
  background: var(--warn-bg);
  border-color: #eccf9a;
  color: var(--warn);
}
.chip-review {
  background: #e8f2fb;
  border-color: #b8d8ef;
  color: #1a6aa8;
}
.chip-sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.chip-tier { opacity: 0.75; font-size: 11.5px; }
.chip-label { font-weight: 600; }
.chip-qty {
  width: 46px;
  padding: 2px 5px;
  font-size: 12px;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
}
.chip-pick {
  width: auto;
  max-width: 220px;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 5px;
}
.chip-x {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  color: inherit;
  opacity: 0.6;
}
.chip-x:hover { opacity: 1; }

/* ---- results ---- */
.hidden { display: none; }
.detected {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  margin-bottom: 14px;
}
.detected b { color: var(--text); }

.bom { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bom th, .bom td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.bom th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.bom td.num, .bom th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bom tr:last-child td { border-bottom: none; }
.bom .sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.bom .desc { color: var(--muted); font-size: 12.5px; }
.bom tr.unmatched { background: var(--warn-bg); }
.tag-eos, .tag-tier, .tag-review {
  display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
}
.tag-eos { background: #fbe4ec; color: var(--danger); }
.tag-tier { background: #e5f2fa; color: var(--mk-blue); }
.tag-review { background: var(--warn-bg); color: var(--warn); }

.totals { display: flex; justify-content: flex-end; gap: 26px; margin-top: 14px; align-items: baseline; }
.totals .amt { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals .lbl { color: var(--muted); font-size: 13px; }
.bom .list, .totals .list { color: var(--muted); text-decoration: line-through; opacity: 0.8; }
.bom .net, .totals .net { color: var(--mk-green-dark); font-weight: 700; }
.savings { text-align: right; color: var(--mk-green-dark); font-weight: 600; margin: 4px 0 0; }

.flags { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.flags ul { margin: 8px 0 0; padding-left: 20px; }
.flags li { color: var(--warn); font-size: 13px; margin-bottom: 4px; }
.note { color: var(--muted); font-size: 12.5px; }

.banner {
  border-radius: 8px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px;
}
.banner.info { background: var(--mk-green-soft); color: var(--mk-green-dark); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.err { background: #fbe4ec; color: var(--danger); }

/* ---- contact + checkout ---- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
@media (max-width: 620px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .controls .field { flex: 1 1 100%; }
}
.req { color: var(--danger); }

.checkout-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
.checkout-opts.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .checkout-opts, .checkout-opts.two { grid-template-columns: 1fr; } }
.opt {
  border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex;
  flex-direction: column; gap: 8px;
}
.opt h3 { margin: 0; font-size: 14.5px; }
.opt p { margin: 0; color: var(--muted); font-size: 12.5px; flex: 1; }
.mock-badge {
  align-self: flex-start; background: #eef1f3; color: var(--muted); font-size: 10.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 7px; border-radius: 4px;
}

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 0 30px; }
footer code { font-family: ui-monospace, Menlo, monospace; }
