/* Mise Hive look for Velmoré's working apps (Quoting, Inventory, Ledger).
   Tokens are copied value for value from the Mise Hive portal: misehive-dev/mise-hive-portal @ d1ade45,
   web/src/styles/mise-tokens.css. Change a value in the portal first, never only here.
   Kit source: ~/Kitchen/mise-hive-look/kit (16 Nov 2026). Each app holds an identical copy; its own CSS
   uses these tokens and never redefines them. */

@font-face {
  font-family: "Geist";
  src: url("geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand */
  --mh-carbon: #111111;
  --mh-soft-white: #fafaf7;
  --mh-volt: #c6ff00;
  --mh-volt-600: #b9f200;
  --mh-volt-700: #a3d600;
  --mh-volt-border: #b3e600;
  --mh-volt-ink: #3e5200;
  --mh-volt-tint: #f3ffd4;
  --mh-volt-tint-line: #e2f5ae;
  --mh-volt-ring: rgba(198, 255, 0, 0.55);
  --mh-soft-volt: linear-gradient(110deg, #e5ffb0 0%, #f3ffd9 27%, #fafaf7 57%, #e9f5f1 100%);
  --mh-soft-volt-line: #dcefb0;

  /* warm neutrals, derived from Soft White */
  --mh-bg: #fafaf7;
  --mh-surface: #ffffff;
  --mh-surface-2: #f5f5f1;
  --mh-surface-3: #eeeee8;
  --mh-line: #ecece6;
  --mh-line-2: #e4e4dd;
  --mh-line-strong: #d7d7cf;
  --mh-line-hover: #c9c9c0;
  --mh-ink: #111111;
  --mh-ink-2: #34342f;
  --mh-muted: #66665e;
  --mh-faint: #8e8e85;

  /* status: restrained, never Volt */
  --mh-pos: #127a45;
  --mh-pos-bg: #ebf6ef;
  --mh-neg: #bf3a30;
  --mh-neg-bg: #fceeec;
  --mh-warn: #98600a;
  --mh-warn-bg: #fcf3e2;
  --mh-info: #2d58c8;
  --mh-info-bg: #eef2fc;
  --mh-neutral-bg: #f1f1ec;

  /* charts */
  --mh-chart-1: #111111;
  --mh-chart-2: #d9d9d1;
  --mh-chart-2-hover: #c6c6bd;

  /* shape and depth */
  --mh-r-xs: 6px;
  --mh-r-sm: 8px;
  --mh-r: 10px;
  --mh-r-lg: 14px;
  --mh-r-xl: 18px;
  --mh-sh-1: 0 1px 2px rgba(17, 17, 17, 0.04);
  --mh-sh-2: 0 1px 2px rgba(17, 17, 17, 0.04), 0 6px 16px -8px rgba(17, 17, 17, 0.1);
  --mh-sh-pop: 0 24px 56px -18px rgba(17, 17, 17, 0.24), 0 2px 8px rgba(17, 17, 17, 0.06);
  --mh-focus: 0 0 0 3px var(--mh-volt-ring);

  /* type: Geist, self-hosted next to this file */
  --mh-font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* layout */
  --mh-sidebar-w: 248px;
  --mh-topbar-h: 60px;
  --mh-tabbar-h: 64px;
  --mh-content-max: 1280px;
  --mh-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* kit only: the edge of anything you type into (the portal's faint grey, 3.4:1 on white) */
  --mh-field: var(--mh-faint);
}

/* ---------- shared top bar: Mise Hive mark, the workspace, the four systems ---------- */
.mh-bar {
  display: flex; align-items: center; gap: 16px; min-height: 56px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  background: var(--mh-surface); border-bottom: 1px solid var(--mh-line);
  font-family: var(--mh-font); color: var(--mh-ink); -webkit-font-smoothing: antialiased;
}
.mh-bar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mh-bar-brand img { display: block; width: 26px; height: 26px; flex: none; }
.mh-bar-brand > span { display: grid; min-width: 0; line-height: 1.2; }
.mh-bar-brand b { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.mh-bar-brand > span > span { margin-top: 1px; font-size: 12px; color: var(--mh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-bar-nav { display: flex; gap: 2px; margin-left: auto; }
.mh-bar-nav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 12px;
  border-radius: var(--mh-r-sm); color: var(--mh-muted); font-size: 14px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; transition: background-color 0.13s, color 0.13s;
}
.mh-bar-nav a:hover { background: var(--mh-surface-2); color: var(--mh-ink); }
.mh-bar-nav a[aria-current="page"] { background: var(--mh-volt-tint); color: var(--mh-carbon); font-weight: 600; }
.mh-bar-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -10px; height: 2px; border-radius: 2px; background: var(--mh-volt-700);
}
.mh-bar a:focus-visible { outline: 2px solid var(--mh-carbon); outline-offset: 2px; }

@media (max-width: 760px) {
  .mh-bar { flex-wrap: wrap; gap: 0; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
  .mh-bar-brand { flex: 1 1 100%; min-height: 52px; }
  .mh-bar-brand b { display: none; }
  .mh-bar-brand > span > span { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--mh-ink); }
  .mh-bar-nav { flex: 1 1 100%; margin: 0 -4px; overflow-x: auto; scrollbar-width: none; }
  .mh-bar-nav::-webkit-scrollbar { display: none; }
  .mh-bar-nav a { flex: 1 0 auto; height: 44px; border-radius: var(--mh-r-sm) var(--mh-r-sm) 0 0; }
  .mh-bar-nav a[aria-current="page"]::after { bottom: 0; }
  /* the nav scrolls sideways here, which would clip an outside ring */
  .mh-bar-nav a:focus-visible { outline-offset: -2px; }
}

/* ---------- buttons (the portal's Button: default = volt, dark, outline, ghost, destructive) ---------- */
.mh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px;
  border: 1px solid var(--mh-line-strong); border-radius: var(--mh-r); background: var(--mh-surface); color: var(--mh-ink);
  font-family: var(--mh-font); font-size: 13.5px; font-weight: 540; line-height: 1.2; white-space: nowrap; text-decoration: none;
  box-shadow: var(--mh-sh-1); cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.mh-btn:hover { border-color: var(--mh-line-hover); }
/* Edge: volt-ink (3:1 on white) instead of the portal's volt-border (1.5:1), so the button's outline passes
   the Quote Desk's non-text contrast checks. The only place the kit departs from the portal's look. */
.mh-btn-primary {
  background: var(--mh-volt); border-color: var(--mh-volt-ink); color: var(--mh-carbon); font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mh-btn-primary:hover { background: var(--mh-volt-600); border-color: var(--mh-volt-ink); }
.mh-btn-dark { background: var(--mh-ink); border-color: var(--mh-ink); color: var(--mh-surface); }
.mh-btn-dark:hover { background: var(--mh-ink-2); border-color: var(--mh-ink-2); }
.mh-btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--mh-ink-2); }
.mh-btn-ghost:hover { background: var(--mh-surface-2); border-color: transparent; color: var(--mh-ink); }
.mh-btn-danger { background: var(--mh-neg-bg); border-color: var(--mh-neg-bg); box-shadow: none; color: var(--mh-neg); }
.mh-btn-danger:hover { border-color: color-mix(in srgb, var(--mh-neg) 40%, transparent); }
.mh-btn:focus-visible { outline: 2px solid var(--mh-carbon); outline-offset: 2px; }
.mh-btn:disabled, .mh-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---------- inputs ---------- */
.mh-input {
  min-height: 36px; padding: 0 12px; border: 1px solid var(--mh-field); border-radius: var(--mh-r);
  background: var(--mh-surface); color: var(--mh-ink); font-family: var(--mh-font); font-size: 14px; line-height: 1.4;
}
textarea.mh-input { padding: 8px 12px; }
.mh-input::placeholder { color: var(--mh-muted); }
.mh-input:focus { outline: none; border-color: var(--mh-ink); box-shadow: var(--mh-focus); }
.mh-input[aria-invalid="true"] { border-color: var(--mh-neg); }

/* ---------- cards and chips ---------- */
.mh-card { background: var(--mh-surface); border: 1px solid var(--mh-line); border-radius: var(--mh-r-lg); box-shadow: var(--mh-sh-1); }
.mh-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--mh-neutral-bg); color: var(--mh-ink-2); font-size: 12px; font-weight: 560; white-space: nowrap;
}
.mh-chip[data-tone="pos"] { background: var(--mh-pos-bg); color: var(--mh-pos); }
.mh-chip[data-tone="neg"] { background: var(--mh-neg-bg); color: var(--mh-neg); }
.mh-chip[data-tone="warn"] { background: var(--mh-warn-bg); color: var(--mh-warn); }
.mh-chip[data-tone="info"] { background: var(--mh-info-bg); color: var(--mh-info); }
.mh-num { font-variant-numeric: tabular-nums; }

/* ---------- sign-in: the soft volt page behind one white card ---------- */
.mh-login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: var(--mh-soft-volt); font-family: var(--mh-font); color: var(--mh-ink);
}
.mh-login-card {
  width: min(100%, 400px); padding: 28px 24px 24px; background: var(--mh-surface);
  border: 1px solid var(--mh-line); border-radius: var(--mh-r-xl); box-shadow: var(--mh-sh-pop);
}
.mh-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 13px; color: var(--mh-muted); }
.mh-login-brand img { display: block; width: 28px; height: 28px; }
.mh-login-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }

@media (prefers-reduced-motion: reduce) {
  .mh-bar-nav a, .mh-btn { transition: none; }
}
@media print {
  .mh-bar { display: none; }
}
