/* Crop IQ Agents — light brand theme (matches cropiq.org) */
:root {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --line: #e0e7e3;
  --ink: #263B46;
  --ink-2: #5c6b64;
  --ink-3: #8b9a90;
  --green: #44D368;
  --green-soft: #33be55;
  --green-dark: #2a9645;
  --green-dim: rgba(68, 211, 104, 0.12);
  --amber: #b7791f;
  --red: #dc4c3e;
  --blue: #2b7bb0;
  --purple: #8250b0;
  --teal: #1f8a7a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(38, 59, 70, 0.07);
}
* { box-sizing: border-box; margin: 0; }
html { color-scheme: light; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 420px at 85% -10%, rgba(68, 211, 104, 0.06), transparent 65%),
    radial-gradient(600px 400px at -10% 30%, rgba(68, 211, 104, 0.04), transparent 60%);
}
.page { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 28px 22px 60px; }

/* ---------- nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(38, 59, 70, 0.04);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.logo {
  display: inline-flex; align-items: baseline; line-height: 1;
  font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}
.logo-t { font-weight: 600; }
.logo-o { position: relative; display: inline-flex; align-items: baseline; justify-content: center; font-weight: 600; }
.logo-leaves {
  position: absolute; top: -1.02em; left: 50%; transform: translateX(-48%);
  width: 1.45em; height: 1.15em; pointer-events: none;
}
.logo-leaves svg { width: 100%; height: 100%; display: block; overflow: visible; }
.logo-iq { font-weight: 700; margin-left: 1px; }
.brand-tag {
  align-self: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--green-dark); background: var(--green-dim);
  border: 1px solid var(--green); padding: 2px 9px; border-radius: 99px;
}
.nav-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--green-dark); }
.nav-user { color: var(--ink); font-weight: 600; font-size: 0.92rem; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.nav-out { font-size: 0.85rem !important; }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-2); font-size: 0.9rem; font-weight: 600;
  padding: 4px 11px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); transition: color 0.15s, border-color 0.15s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { color: var(--green-dark); border-color: var(--green); }
.lang-switch[open] summary { color: var(--green-dark); border-color: var(--green); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 148px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; padding: 4px;
}
.lang-menu .lang-opt {
  padding: 8px 12px; border-radius: 8px; font-size: 0.9rem !important;
  color: var(--ink-2); text-decoration: none;
}
.lang-menu .lang-opt:hover { background: var(--surface-2); color: var(--green-dark); }
.lang-menu .lang-opt.active { background: var(--green-dim); color: var(--green-dark); font-weight: 700; }

/* ---------- mobile nav ---------- */
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 8px; color: var(--ink); cursor: pointer; align-items: center; }
@media (max-width: 820px) {
  .topnav { flex-wrap: wrap; padding: 12px 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .topnav.nav-open .nav-links { display: flex; }
  .nav-links > a, .nav-links > .nav-user { width: 100%; padding: 10px 12px; border-radius: 10px; }
  .nav-links > a:hover { background: var(--surface-2); }
  .nav-user { border: none; background: transparent; justify-content: flex-start; }
  .lang-switch, .lang-switch > summary { width: 100%; }
  .lang-switch > summary { justify-content: flex-start; }
  .lang-menu { position: static; box-shadow: none; margin-top: 6px; width: 100%; }
  .page { padding: 20px 16px 50px; }
}

/* ---------- hero / landing ---------- */
.hero { text-align: center; padding: 64px 0 30px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; font-weight: 800; }
.grad {
  background: linear-gradient(92deg, var(--green-soft) 15%, var(--green-dark) 55%, var(--green-soft) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 640px; margin: 18px auto 0; color: var(--ink-2); font-size: 1.08rem; }

.stat-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.stat-row.compact { margin-top: 0; justify-content: flex-end; }
.stat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 24px; min-width: 138px; text-align: center; box-shadow: var(--shadow);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.stat-tile:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 14px 30px rgba(68, 211, 104, 0.14); }
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.stat-num .unit { font-size: 0.85rem; color: var(--ink-3); margin-left: 3px; font-weight: 500; }
.stat-label { color: var(--ink-2); font-size: 0.82rem; margin-top: 2px; }

/* ---------- pipeline strip ---------- */
.pipeline-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 44px auto 10px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pipe-step {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 0.92rem; color: var(--ink-2); cursor: default;
  transition: all 0.18s;
}
.pipe-step:hover { color: var(--ink); border-color: var(--green); background: var(--green-dim); transform: translateY(-2px); }
.pipe-ico { font-size: 1.05rem; }
.pipe-arrow { color: var(--ink-3); }

/* ---------- role cards ---------- */
.roles { margin-top: 54px; }
.roles h2 { text-align: center; font-size: 1.5rem; margin-bottom: 22px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.role-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.role-card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(68, 211, 104, 0.13); }
.role-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 6px; }
.role-card p { color: var(--ink-2); font-size: 0.92rem; margin-bottom: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); text-decoration: none;
  font-size: 0.94rem; cursor: pointer; font-family: inherit;
  transition: all 0.16s;
}
.btn:hover { border-color: var(--green); background: var(--green-dim); transform: translateY(-1px); }
.btn-role { width: 100%; margin-bottom: 9px; }
.btn-role small { color: var(--ink-3); font-size: 0.78rem; }
.btn-primary {
  background: linear-gradient(120deg, var(--green-soft), var(--green));
  border-color: transparent; color: #ffffff; font-weight: 700;
  box-shadow: 0 6px 16px rgba(68, 211, 104, 0.28);
}
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(120deg, var(--green-soft), var(--green)); }
.btn-ghost { border-style: dashed; color: var(--ink-2); margin-top: 6px; width: 100%; }
.btn-mini { padding: 5px 11px; font-size: 0.82rem; border-radius: 8px; }

/* ---------- layout & cards ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 1.7rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.35fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card h2 { font-size: 1.12rem; margin-bottom: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 13px; margin-top: 14px; }
.form-grid label { display: grid; gap: 5px; font-size: 0.88rem; color: var(--ink-2); }
input, select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); padding: 10px 12px; font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.price-hints { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 16px; }

/* ---------- chips & statuses ---------- */
.chip {
  display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: 0.79rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
  cursor: default; transition: all 0.15s;
}
.chip:hover { border-color: var(--green); color: var(--ink); }
.chip-ok { border-color: var(--green); color: var(--green-dark); background: var(--green-dim); }
.status-placed { color: var(--amber); border-color: rgba(183, 121, 31, 0.4); background: rgba(183, 121, 31, 0.08); }
.status-matched { color: var(--blue); border-color: rgba(43, 123, 176, 0.35); background: rgba(43, 123, 176, 0.08); }
.status-pickup_scheduled { color: var(--purple); border-color: rgba(130, 80, 176, 0.35); background: rgba(130, 80, 176, 0.08); }
.status-in_transit { color: var(--green-dark); border-color: var(--green); background: var(--green-dim); }
.status-delivered { color: #ffffff; background: var(--green); border-color: var(--green); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: 0.78rem;
     text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: rgba(68, 211, 104, 0.05); }

/* ---------- chart ---------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-btn {
  border: 0; background: transparent; color: var(--ink-2); padding: 6px 14px;
  font-size: 0.85rem; border-radius: 8px; cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--green-dim); color: var(--green-dark); font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 220px; margin-top: 16px; padding-bottom: 26px; position: relative; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; min-width: 6px; position: relative; }
.bar {
  width: 100%; max-width: 34px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-soft) 100%);
  transition: filter 0.12s, transform 0.12s; cursor: default;
}
.bar:hover { filter: brightness(1.08) saturate(1.1); }
.bar-label {
  position: absolute; bottom: -24px; font-size: 0.66rem; color: var(--ink-3);
  white-space: nowrap; transform: rotate(-38deg); transform-origin: top left; left: 45%;
}
.chart-note { margin-top: 18px; }
.chart-empty { color: var(--ink-3); align-self: center; margin: auto; }

/* ---------- insights ---------- */
.insights { margin-top: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px;
            min-height: 60px; white-space: pre-wrap; font-size: 0.95rem; background: var(--surface-2); }
.insights.loading { color: var(--green-dark); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- marketplace listings ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 12px; }
.listing-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  transition: all 0.18s; cursor: default;
}
.listing-card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(68, 211, 104, 0.13); }
.listing-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.listing-crop { font-weight: 700; font-size: 1.05rem; }
.listing-price { color: var(--green-dark); font-weight: 700; }
.listing-price small { color: var(--ink-3); font-weight: 400; }
.listing-meta { display: grid; gap: 4px; font-size: 0.82rem; color: var(--ink-2); }

/* ---------- dispatch board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.lane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.lane h3 { font-size: 0.98rem; margin-bottom: 12px; color: var(--ink-2); }
.lane-empty { padding: 12px 4px; }
.ship-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
             padding: 14px; margin-bottom: 11px; transition: border-color 0.15s; }
.ship-card:hover { border-color: var(--green); }
.ship-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.ship-route { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--ink-2); margin-bottom: 8px; }
.route-line { flex: 1; height: 2px; border-radius: 2px;
              background: linear-gradient(90deg, var(--green-soft), var(--green)); position: relative; }
.route-line::after { content: '➤'; position: absolute; right: -2px; top: -9px; color: var(--green-dark); font-size: 0.7rem; }
.ship-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--ink-2); margin-bottom: 10px; }
.ship-actions { display: flex; gap: 8px; }

/* ---------- agent console ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.agent-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center; transition: all 0.18s; cursor: default; box-shadow: var(--shadow);
}
.agent-card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(68, 211, 104, 0.13); }
.agent-ico { font-size: 1.9rem; margin-bottom: 6px; color: var(--green-dark); }
.agent-card h3 { font-size: 0.98rem; margin-bottom: 6px; }
.agent-card p { min-height: 58px; }
.agent-count { margin-top: 10px; font-size: 1.3rem; font-weight: 800; color: var(--green-dark); }
.agent-count small { font-size: 0.72rem; color: var(--ink-3); font-weight: 400; }

.feed { list-style: none; margin-top: 10px; }
.feed-item { display: grid; grid-template-columns: 155px 1fr auto; gap: 12px; align-items: baseline;
             padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 0.89rem; }
@media (max-width: 720px) { .feed-item { grid-template-columns: 1fr; gap: 3px; } }
.feed-agent { font-weight: 700; font-size: 0.8rem; padding: 2px 9px; border-radius: 99px;
              background: var(--green-dim); color: var(--green-dark); white-space: nowrap; text-align: center; }
.agent-pricing { background: rgba(183, 121, 31, 0.12); color: var(--amber); }
.agent-logistics { background: rgba(130, 80, 176, 0.12); color: var(--purple); }
.agent-market { background: rgba(43, 123, 176, 0.12); color: var(--blue); }
.agent-insight { background: rgba(220, 76, 62, 0.12); color: var(--red); }
.agent-diagnosis { background: rgba(31, 138, 122, 0.12); color: var(--teal); }
.feed-time { font-size: 0.76rem; white-space: nowrap; color: var(--ink-3); }
.feed-link { color: var(--green-dark); font-size: 0.8rem; margin-left: 6px; }

/* ---------- journey ---------- */
.journey-track { display: flex; align-items: center; padding: 14px 4px; overflow-x: auto; }
.j-step { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 96px; cursor: default; }
.j-dot {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.35rem; background: var(--surface-2); border: 2px solid var(--line);
  transition: all 0.2s;
}
.j-step.done .j-dot { border-color: var(--green); background: var(--green-dim); color: var(--green-dark); }
.j-step.active .j-dot {
  border-color: var(--green); background: var(--green-dim); color: var(--green-dark);
  box-shadow: 0 0 0 6px rgba(68, 211, 104, 0.12), 0 0 22px rgba(68, 211, 104, 0.3);
  animation: breathe 2.2s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 0 0 10px rgba(68, 211, 104, 0.07), 0 0 26px rgba(68, 211, 104, 0.4); } }
.j-label { font-size: 0.76rem; color: var(--ink-2); text-align: center; max-width: 110px; }
.j-step.active .j-label { color: var(--green-dark); font-weight: 700; }
.j-line { flex: 1; height: 3px; min-width: 26px; background: var(--line); border-radius: 3px; margin: 0 4px 26px; }
.j-line.done { background: linear-gradient(90deg, var(--green-soft), var(--green)); }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0;
      border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.kv span { color: var(--ink-2); }

/* ---------- flash ---------- */
.flash-wrap { max-width: 1180px; margin: 14px auto 0; padding: 0 22px; position: relative; z-index: 2; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 0.92rem;
         border: 1px solid var(--green); background: var(--green-dim); color: var(--ink); }
.flash-error { border-color: rgba(220, 76, 62, 0.5); background: rgba(220, 76, 62, 0.1); }

/* ---------- tooltip bubble ---------- */
.tooltip {
  position: fixed; z-index: 100; max-width: 280px; padding: 9px 13px;
  background: var(--ink); border: 1px solid var(--green-soft); border-radius: 11px;
  color: #ffffff; font-size: 0.82rem; line-height: 1.4; pointer-events: none;
  opacity: 0; transform: translateY(6px) scale(0.97); transition: opacity 0.14s, transform 0.14s;
  box-shadow: 0 12px 30px rgba(38, 59, 70, 0.25);
}
.tooltip.show { opacity: 1; transform: translateY(0) scale(1); }
.tooltip::after {
  content: ''; position: absolute; top: 100%; left: 22px;
  border: 6px solid transparent; border-top-color: var(--ink);
}

.footer { position: relative; z-index: 1; text-align: center; color: var(--ink-3);
          font-size: 0.82rem; padding: 26px 20px 34px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2);
             font-size: 0.9rem; font-weight: 600; text-decoration: none; margin-bottom: 16px; transition: color 0.15s; }
.back-link:hover { color: var(--green-dark); }

/* ---------- icons ---------- */
.ic { vertical-align: -3px; flex-shrink: 0; }
.head-ic { color: var(--green-dark); margin-right: 4px; }
.role-ic { color: var(--green-dark); }
.brand-mark { color: var(--green-dark); display: inline-flex; vertical-align: -4px;
              filter: drop-shadow(0 2px 4px rgba(68, 211, 104, 0.35)); }
.nav-links a { display: inline-flex; align-items: center; gap: 5px; }
.nav-user { display: inline-flex; align-items: center; gap: 6px; }
.btn-nav { padding: 7px 14px; font-size: 0.88rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- portal subnav ---------- */
.subnav {
  position: sticky; top: 57px; z-index: 15;
  display: flex; gap: 6px; padding: 8px 26px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subnav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 9px; text-decoration: none;
  color: var(--ink-2); font-size: 0.9rem; transition: all 0.15s;
}
.subnav a:hover { color: var(--ink); background: var(--surface-2); }
.subnav a.active { color: var(--green-dark); background: var(--green-dim); font-weight: 600; }
.pill {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 99px; font-size: 0.7rem; font-weight: 700;
  background: var(--green); color: #ffffff;
}

/* ---------- auth ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
             max-width: 900px; margin: 30px auto 0; }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-alt { margin-top: 16px; }
.auth-alt a { color: var(--green-dark); }
.demo-card code {
  display: inline-block; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; font-size: 0.8rem; margin: 2px 0; color: var(--ink);
}
.demo-list { display: grid; gap: 14px; margin-top: 12px; }
.demo-group h4 { display: flex; align-items: center; gap: 6px; font-size: 0.85rem;
                 color: var(--ink-2); margin-bottom: 5px; }

/* "Coming soon" animated badge */
.demo-group.soon { opacity: 0.92; }
.soon-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: #fff; padding: 3px 9px; border-radius: 99px; white-space: nowrap;
  background: linear-gradient(100deg, var(--green-soft) 0%, var(--green) 38%, #b9f0cd 50%, var(--green) 62%, var(--green-soft) 100%);
  background-size: 220% 100%;
  animation: soon-shimmer 2.4s linear infinite;
  box-shadow: 0 2px 8px rgba(68, 211, 104, 0.3);
}
.soon-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: soon-pulse 1.4s ease-in-out infinite; }
@keyframes soon-shimmer { 0% { background-position: 220% 0; } 100% { background-position: -220% 0; } }
@keyframes soon-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.55); } }
@media (prefers-reduced-motion: reduce) { .soon-badge, .soon-dot { animation: none; } }

/* ---------- inventory ---------- */
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
              gap: 14px; margin-top: 12px; }
.stock-card { background: var(--surface); border: 1px solid var(--line);
              border-radius: 12px; padding: 16px; transition: all 0.18s; cursor: default; box-shadow: var(--shadow); }
.stock-card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(68, 211, 104, 0.12); }
.stock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stock-num { font-size: 1.45rem; font-weight: 800; }
.stock-num .unit { font-size: 0.78rem; color: var(--ink-3); font-weight: 400; margin-left: 5px; }
.stock-bar { height: 6px; border-radius: 6px; background: var(--line); margin: 10px 0 8px; overflow: hidden; }
.stock-bar span { display: block; height: 100%; border-radius: 6px;
                  background: linear-gradient(90deg, var(--green-soft), var(--green)); }
.stock-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip-warn { border-color: rgba(183, 121, 31, 0.45); color: var(--amber);
             background: rgba(183, 121, 31, 0.08); }
.pos { color: var(--green-dark); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

/* ---------- orders & negotiation ---------- */
.order-card { padding: 18px 22px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start;
              gap: 14px; flex-wrap: wrap; }
.order-head h2 { font-size: 1.02rem; }
.order-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-costs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.nego-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px;
            padding-top: 14px; border-top: 1px dashed var(--line); }
.nego-form { display: flex; gap: 8px; align-items: center; }
.nego-form input { width: 170px; padding: 7px 11px; font-size: 0.88rem; }
.nego-card { background: var(--surface-2); border: 1px solid var(--line);
             border-radius: 11px; padding: 15px; margin-bottom: 12px; }
.nego-card:hover { border-color: var(--green); }

button:disabled { opacity: 0.4; cursor: not-allowed; }
button:disabled:hover { transform: none; border-color: var(--line); background: var(--surface-2); }
