/* Bebas Neue (SIL Open Font License, public/brand/bebas-neue-OFL.txt) — close to the logo's lettering */
@font-face { font-family: "Bebas Neue"; src: url("/brand/bebas-neue.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* Dropship Buddy Global brand: lime #A6CE38 and charcoal #231F20 (from the logo) */
  --brand: #a6ce38;
  --brand-hover: #95bd2a;
  --brand-ink: #231f20;
  --charcoal: #231f20;
  --bg: #f6f7f2;
  --panel: #ffffff;
  --text: #231f20;
  --muted: #6b6866;
  --line: #e4e5dc;
  --accent: #4e6b0e; /* lime is too light for text on white: links use this deep green */
  --accent-ink: #231f20;
  --accent-soft: #eef6d6;
  --good: #3f7a0e;
  --good-bg: #eef6d6;
  --bad: #c62828;
  --bad-bg: #fdecec;
  --warn: #8a6100;
  --warn-bg: #fff4d6;
  --row-hover: #f6f9ec;
  --shadow: 0 1px 2px rgba(35, 31, 32, 0.06);
  --display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --panel: #1d1b1a;
    --text: #f2f1ec;
    --muted: #a3a09a;
    --line: #34312e;
    --accent: #b8dc56;
    --accent-soft: #2b3418;
    --good: #b8dc56;
    --good-bg: #26301a;
    --bad: #ff7b72;
    --bad-bg: #3a1a18;
    --warn: #e3b341;
    --warn-bg: #352a0c;
    --row-hover: #24221f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; }
h1 { font-size: 20px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }

/* top bar — charcoal with the lime logo mark, in both themes */
.top { display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 50px; background: var(--charcoal); color: #f2f1ec; position: sticky; top: 0; z-index: 5; border-bottom: 3px solid var(--brand); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: #f2f1ec; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand .name { font-family: var(--display); font-size: 19px; letter-spacing: 0.04em; line-height: 0.95; }
.brand .name small { display: block; font-family: inherit; font-size: 11px; letter-spacing: 0.12em; color: var(--brand); }
nav { display: flex; gap: 0; overflow-x: auto; flex: 1; min-width: 0; height: 100%; align-items: stretch; scrollbar-width: none; -ms-overflow-style: none; }
nav::-webkit-scrollbar { display: none; }
nav a { display: flex; align-items: center; padding: 0 10px; font-size: 13.5px; color: #bdbab3; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px; font-weight: 500; }
nav a.active { color: #ffffff; border-bottom-color: var(--brand); font-weight: 600; }
nav a:hover { text-decoration: none; color: #ffffff; }
.me { white-space: nowrap; font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.me a { color: #d9d6cf; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }

/* cards, forms, buttons */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
label { display: block; margin-bottom: 10px; font-weight: 500; }
label .note { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input, select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; width: 100%; margin-top: 4px; }
textarea { min-height: 80px; resize: vertical; }
input[type="checkbox"] { width: auto; margin: 0; }
button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 6px; padding: 7px 12px; white-space: nowrap; display: inline-block; }
button:hover, .btn:hover { border-color: var(--muted); text-decoration: none; }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.danger { color: var(--bad); }
button:disabled { opacity: 0.5; cursor: default; }
button.small { padding: 3px 8px; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > * { margin-top: 0; }
.spacer { flex: 1; }

/* login */
.auth { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; border-top: 4px solid var(--brand); }
.auth-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 4px auto 18px; }
.auth-card h1 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 0.04em; text-align: center; margin: 0; }
.auth-card #auth-intro { text-align: center; }
.auth-card button { width: 100%; margin-top: 6px; }

/* job actions */
.action h3 { margin-top: 0; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.03em; }
.grid > .card { margin-bottom: 0; }
.grid { margin-bottom: 16px; }
.action p { color: var(--muted); font-size: 13px; min-height: 36px; margin: 0 0 10px; }
.status-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; overflow-wrap: anywhere; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--row-hover); }
.badge.running, .badge.queued { background: var(--warn-bg); color: var(--warn); }
.badge.done { background: var(--good-bg); color: var(--good); }
.card h2 { font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: 0.03em; }
.badge.failed, .badge.blocked, .badge.interrupted { background: var(--bad-bg); color: var(--bad); }
.badge.yes { background: var(--good-bg); color: var(--good); }

pre.log { background: #0d1117; color: #c9d1d9; padding: 12px; border-radius: 8px; max-height: 420px; overflow: auto; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; margin: 0; }

/* tables */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); max-height: calc(100vh - 260px); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--panel); z-index: 1; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; }
th.sorted::after { content: " ▲"; font-size: 10px; }
th[draggable="true"] { cursor: grab; }
th.dragging { opacity: 0.4; }
th.drop-before { box-shadow: inset 3px 0 0 var(--brand); }
th.drop-after { box-shadow: inset -3px 0 0 var(--brand); }
th.sorted.desc::after { content: " ▼"; }
tbody tr:hover { background: var(--row-hover); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.wrap { min-width: 220px; max-width: 380px; }
/* long text: one line with "…", full text on click / hover */
td.clip { max-width: 280px; min-width: 160px; cursor: zoom-in; }
td.clip > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.clip.open { max-width: 420px; cursor: zoom-out; }
td.clip.open > div { white-space: normal; overflow: visible; }
tbody td { vertical-align: middle; }
td.nowrap { white-space: nowrap; }
td .good { color: var(--good); font-weight: 600; }
td .bad { color: var(--bad); }
.simple th { cursor: default; }

/* quick filters under the search bar */
.quick { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 10px; }
.quick label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: 13px; }
.quick input { width: 96px; margin: 0; }

/* store links shown as small labelled buttons */
a.store { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--text); background: var(--panel); }
a.store:hover { text-decoration: none; border-color: var(--muted); }
a.store span { font-weight: 400; color: var(--muted); }
a.store.amazon { border-color: #ff9900; }
a.store.walmart { border-color: #0071ce; }
a.store.homedepot { border-color: #f96302; }
a.store.samsclub { border-color: #0067a0; }
a.store.ebay { border-color: #86b817; }

/* segmented switch (MultiSellerPro: Amazon / Walmart) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: 7px 16px; color: var(--text); font-weight: 600; }
.seg a span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.seg a.active { background: var(--brand); color: var(--brand-ink); }
.seg a.active span { color: var(--brand-ink); }
.seg a:hover { text-decoration: none; }

/* data page */
.data-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
.data-layout > * { min-width: 0; }
.tablist { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.tablist h4 { margin: 10px 8px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.tablist a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text); font-size: 13px; }
.tablist a span { color: var(--muted); font-size: 12px; }
.tablist a.active { background: var(--accent-soft); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.tablist a:hover { text-decoration: none; background: var(--row-hover); }
.filters { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.filters .row select { width: 220px; }
.filters .row input { width: 110px; }
.filters .row input[type="checkbox"] { width: auto; }
.filters .chk { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.colpick { columns: 3 180px; font-size: 13px; }
.colpick label { font-weight: 400; display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }

.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 28px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--brand); background: var(--accent-soft); color: var(--text); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 20; max-width: 90vw; }

@media (max-width: 760px) {
  .data-layout { grid-template-columns: 1fr; }
  .tablist { max-height: 220px; }
  main { padding: 12px; }
  .top { padding: 0 12px; gap: 10px; }
  .brand .name { display: none; }
  .me { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .data-layout { grid-template-columns: minmax(0, 1fr); }
}
