/* MOI CHINA FULFILLMENT, styled to match moifin.com
   Palette, type and shapes follow the live site: rice-paper background,
   ink-green text, sage accent, pill buttons, 20px cards, Geist type.
   The site has no dark theme, so the portal stays light as well. */
@font-face {
  font-family: "Geist";
  src: url("Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f5f1ea; --panel: #fbf9f4; --text: #2b3531; --muted: #5f6b66; --line: rgba(43,53,49,.15);
  --line-strong: rgba(43,53,49,.35);
  --accent: #557674; --accent-hover: #46625f; --accent-ink: #fffdf9; --soft: #e8ece6;
  --rose: #c47b70; --blue: #7daeb2; --lime: #557674; --orange: #c47b70;
  --ok-bg: #e4ece3; --ok: #35584c; --err-bg: #f6e3de; --err: #9c4a3e;
  --warn-bg: #f4ead7; --warn: #7a5a1e; --chip: #ebe6dc; --sidebar: #f5f1ea; --sidebar-ink: #2b3531;
  --radius-card: 20px; --radius-tile: 16px; --radius-field: 10px;
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: var(--sidebar); color: var(--sidebar-ink); padding: 20px 12px 24px;
  flex-shrink: 0; border-right: 1px solid var(--line); }
.sidebar .brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.sidebar .brand img { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; }
.sidebar .brand small { display: block; font-weight: 400; opacity: .7; font-size: 11px; letter-spacing: .04em; }
.sidebar a { display: block; padding: 7px 12px; margin: 1px 0; border-radius: 999px; color: var(--sidebar-ink);
  text-decoration: none; font-size: 14px; }
.sidebar a:hover { background: var(--soft); color: var(--sidebar-ink); }
.sidebar a.on { background: var(--accent); color: var(--accent-ink); }
.sidebar .sect { display: flex; align-items: center; gap: 8px; padding: 16px 12px 5px; font-size: 10px;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sidebar .sect::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.sidebar .site-link { font-size: 12px; color: var(--muted); margin-top: 16px; border-top: 1px solid var(--line);
  border-radius: 0; padding-top: 14px; }
.sidebar .site-link:hover { background: transparent; color: var(--accent); }
main { flex: 1; min-width: 0; padding: 28px 36px 48px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
h1, .panel h2, .login h2 { font-weight: 610; letter-spacing: -.02em; color: var(--text); }
.top h1 { font-size: 30px; line-height: 1.15; margin: 0; }
.user { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.user > a:not(.bell) { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.user select { width: auto; border-radius: 999px; padding: 6px 30px 6px 14px; }
.bell { text-decoration: none; padding: 5px 12px; border-radius: 999px; background: var(--chip); color: var(--text); }
.bell b { color: var(--err); }

/* cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px; margin-bottom: 18px; overflow-x: auto; }
.panel h2 { font-size: 18px; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-tile); padding: 16px 18px; }
.tile .k { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-size: 28px; font-weight: 610; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.tile .s { font-size: 12px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover td { background: rgba(85,118,116,.05); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 650; border-top: 2px solid var(--line-strong); }

/* messages */
.flash { padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(53,88,76,.18); }
.flash.err { background: var(--err-bg); color: var(--err); border-color: rgba(156,74,62,.2); }
.note { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 12px; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; white-space: nowrap; }
.chip.on_hold, .chip.expired, .chip.rejected, .chip.failed { background: var(--err-bg); color: var(--err); }
.chip.completed, .chip.executed, .chip.paid { background: var(--ok-bg); color: var(--ok); }
.chip.submitted, .chip.pending, .chip.approved { background: var(--warn-bg); color: var(--warn); }

/* forms */
form.inline { display: inline; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; align-items: end; }
.form .wide { grid-column: 1 / -1; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-field);
  background: #fffdf9; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(85,118,116,.35); outline-offset: 1px; border-color: var(--accent); }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
textarea { min-height: 70px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px;
  border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
button.secondary, .btn.secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--soft); color: var(--text); border-color: var(--text); }
button.danger { background: var(--err); border-color: var(--err); color: #fff; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); text-decoration: none; font-size: 14px; }
.tabs a:hover { background: var(--soft); }
.tabs a.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
details > summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
.qtycell { width: 140px; }
.disclaimer { font-size: 12px; color: var(--muted); }

/* sign-in page */
.login { max-width: 400px; margin: 10vh auto; padding: 32px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-card); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; text-decoration: none; color: var(--text); }
.login-brand img { width: 44px; height: 44px; }
.login-brand span { font-size: 11px; letter-spacing: .2em; font-weight: 700; }
.login .eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.login .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.login button { width: 100%; padding: 11px 18px; margin-top: 6px; }

/* phones */
.menu-toggle { display: none; background: transparent; color: var(--text); border-color: var(--line-strong); }
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .sidebar .brand { padding: 0; margin: 0; border-bottom: 0; }
  .sidebar nav { display: none; width: 100%; padding-top: 10px; }
  .sidebar.open nav { display: block; }
  .menu-toggle { display: inline-flex; margin: 0; padding: 6px 16px; }
  main { padding: 18px 16px 32px; }
  .top h1 { font-size: 24px; }
  .tile .v { font-size: 22px; }
  .panel { padding: 16px; border-radius: 16px; }
  .login { margin: 6vh 16px; padding: 24px; }
}
@media print { .sidebar, .no-print, form { display: none !important; } main { padding: 0; } .panel { border: 0; } }
