/*
 * StoreLeap OMS: one look for every web console (brand panel, store back office, distributor page, StoreLeap team).
 * Loaded AFTER each console's own styles, so it only sets the shared design tokens and the common components. The
 * consoles keep their own layout rules; nothing here changes what a screen does.
 *
 * Same palette as the phone app: green means "go", amber "look", red "stop", slate blue for information.
 */
:root, :root[data-theme="light"] {
  --bg: #F4F6F5; --panel: #FFFFFF; --panel2: #EEF2F0; --line: #DDE4E0;
  --ink: #12201A; --ink2: #475A52; --ink3: #7A8B84;
  --go: #06715A; --go-bg: #E2F0EB;
  --warn: #A9640A; --warn-bg: #FBEEDA;
  --crit: #AE2A1C; --crit-bg: #FAE3DF;
  --accent: #06715A; --accent-bg: #E2F0EB; --info: #26536B; --info-bg: #E2ECF1;
  --mute: #7A8B84; --mute-bg: #EEF2F0;
  --shadow: 0 1px 2px rgba(18, 32, 26, .06), 0 4px 14px rgba(18, 32, 26, .05);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1512; --panel: #151F1B; --panel2: #1B2723; --line: #2A3933;
    --ink: #E6EEEA; --ink2: #A4B5AD; --ink3: #74867E;
    --go: #3FC4A0; --go-bg: #12332B; --warn: #E3A93A; --warn-bg: #352A10;
    --crit: #EE6A57; --crit-bg: #3A1F1A; --accent: #3FC4A0; --accent-bg: #12332B; --info: #7FB4D0; --info-bg: #15293A;
    --mute: #74867E; --mute-bg: #1B2723;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1512; --panel: #151F1B; --panel2: #1B2723; --line: #2A3933;
  --ink: #E6EEEA; --ink2: #A4B5AD; --ink3: #74867E;
  --go: #3FC4A0; --go-bg: #12332B; --warn: #E3A93A; --warn-bg: #352A10;
  --crit: #EE6A57; --crit-bg: #3A1F1A; --accent: #3FC4A0; --accent-bg: #12332B; --info: #7FB4D0; --info-bg: #15293A;
  --mute: #74867E; --mute-bg: #1B2723;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.55 Inter, "Segoe UI", -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }

/* the bar above every console: where you are, and a way to the others */
#oms-bar { display: flex; align-items: center; gap: 10px; padding: 6px 20px; background: #12201A; color: #E6EEEA; font-size: 12.5px; position: relative; z-index: 6; }
#oms-bar a { color: inherit; text-decoration: none; opacity: .8; padding: 3px 8px; border-radius: 6px; }
#oms-bar a:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
#oms-bar a.here { opacity: 1; background: rgba(255, 255, 255, .16); font-weight: 650; }
#oms-bar .mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; letter-spacing: .01em; opacity: 1; }
#oms-bar .mark i { width: 20px; height: 20px; border-radius: 6px; background: var(--go); color: #fff; font-style: normal; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
#oms-bar .sp { flex: 1; }
#oms-bar button { background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: inherit; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
@media (max-width: 760px) { #oms-bar { padding: 6px 12px; overflow-x: auto; white-space: nowrap; } }

header { background: var(--panel) !important; border-bottom: 1px solid var(--line) !important; box-shadow: none; }
header h1 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
nav { background: var(--panel) !important; border-bottom: 1px solid var(--line) !important; }
nav button { color: var(--ink2) !important; font-weight: 550; font-size: 13.5px; }
nav button:hover { color: var(--ink) !important; border-color: transparent !important; background: var(--panel2) !important; }
nav button.on { color: var(--accent) !important; border-bottom-color: var(--accent) !important; font-weight: 700 !important; }
nav.sub { background: var(--panel2) !important; }

main { max-width: 1280px; }
h2 { color: var(--ink2); font-size: 12px; letter-spacing: .07em; font-weight: 750; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
th { background: var(--panel2) !important; color: var(--ink2) !important; }
tbody tr:hover td { background: var(--panel2); }
tr.click:hover { background: var(--panel2); }

button { border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 550; transition: border-color .12s, background .12s, box-shadow .12s; }
button:hover { border-color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
button.primary:hover { filter: brightness(1.06); }
button.danger { background: transparent; border-color: var(--crit); color: var(--crit); }
button.danger:hover { background: var(--crit-bg); }
input, select, textarea { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label { color: var(--ink2); font-weight: 550; }

.badge { font-weight: 700; }
.ok { background: var(--go-bg); color: var(--go); }
.warn { background: var(--warn-bg); color: var(--warn); }
.bad { background: var(--crit-bg); color: var(--crit); }
.info { background: var(--info-bg); color: var(--info); }
.muted { color: var(--ink3); }
.empty { color: var(--ink3); }
.toast { border-radius: 10px; box-shadow: var(--shadow); }
code { background: var(--panel2); border-radius: 5px; }

.seg button.on { background: var(--accent); color: #fff; }

@media (max-width: 760px) {
  main { padding: 14px 12px 70px !important; }
  header { padding: 8px 12px !important; }
  nav { padding: 0 8px !important; }
  .grid, .grid2 { grid-template-columns: 1fr !important; }
}
@media print { #oms-bar, header, nav, .toast { display: none !important; } body { background: #fff; color: #000; } }
