/* Nedbank Parameter Portal */
:root {
  --ned-green: #006341; --ned-green-dark: #004d33; --ned-green-bright: #00a651; --ned-lime: #78be20;
  --bg: #f4f6f5; --panel: #ffffff; --ink: #1b2a24; --muted: #5d6b65; --line: #dbe2de;
  --brand: var(--ned-green); --brand-ink: #ffffff; --accent: var(--ned-green-bright);
  --warn: #8a5300; --warn-bg: #fff3dc; --bad: #a3231a; --bad-bg: #fdecea; --ok: #00613f; --ok-bg: #e3f4ea;
  --code: #eef2f0; --tab: #e7ece9;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101614; --panel: #18201d; --ink: #e5ece8; --muted: #9aaba3; --line: #2a3530;
          --brand: #00a651; --accent: #78be20; --warn: #f0b45a; --warn-bg: #3a2c12; --bad: #ff8a80; --bad-bg: #3b1b18;
          --ok: #7fd3a1; --ok-bg: #15301f; --code: #222c28; --tab: #1f2925; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); }
header.brand { background: var(--ned-green); color: #fff; padding: 0 20px; height: 56px; display: flex; gap: 24px; align-items: center;
  border-bottom: 4px solid var(--ned-lime); }
.wordmark { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.wordmark .ned { font-weight: 700; font-size: 22px; letter-spacing: -0.3px; }
.wordmark .sep { width: 1px; height: 22px; background: rgba(255,255,255,.45); }
.wordmark .app { font-size: 15px; opacity: .95; }
header nav { display: flex; gap: 16px; }
header nav a { color: #fff; text-decoration: none; font-size: 13px; opacity: .9; }
header nav a:hover { opacity: 1; text-decoration: underline; }
header nav a.on { opacity: 1; font-weight: 700; border-bottom: 2px solid var(--ned-lime); padding-bottom: 2px; }
tr.picked td { background: var(--ok-bg); }
.state { padding: 12px 14px; border-radius: 8px; margin: 8px 0 16px; font-weight: 600; border-left: 5px solid var(--line); background: var(--panel); }
.state.ok { background: var(--ok-bg); color: var(--ok); border-left-color: var(--ok); }
.state.wait, .state.busy { background: var(--warn-bg); color: var(--warn); border-left-color: var(--warn); }
.state.bad { background: var(--bad-bg); color: var(--bad); border-left-color: var(--bad); }
tr.pick { cursor: pointer; } tr.pick:hover td { background: var(--ok-bg); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.choice { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 8px; text-decoration: none;
  background: var(--panel); border: 2px solid var(--line); color: var(--ink); transition: border-color .2s, background-color .2s; }
.choice b { font-size: 17px; color: var(--brand); } .choice span { color: var(--muted); font-size: 13px; }
.choice:hover { border-color: var(--brand); }
.choice.primary { border-color: var(--brand); background: var(--ok-bg); }
header .env { margin-left: auto; font-size: 11px; background: rgba(0,0,0,.18); padding: 3px 8px; border-radius: 10px; }
main { max-width: 1240px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--ink); } h2 { font-size: 16px; margin: 22px 0 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--tab); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
a { color: var(--brand); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 16px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
input[type=text], input[type=number], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[readonly] { opacity: .7; }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; min-height: 160px; }
.hint { font-size: 11px; color: var(--muted); }
button, .btn { display: inline-block; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--brand); background: var(--brand);
  color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { filter: brightness(1.08); }
button.secondary, .btn.secondary { background: transparent; color: var(--brand); }
button.danger { background: var(--bad); border-color: var(--bad); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg { padding: 10px 12px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); margin-bottom: 16px; border-left: 4px solid var(--brand); }
.warn { padding: 10px 12px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); margin-bottom: 16px; }
.bad { padding: 10px 12px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); margin-bottom: 16px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--code); color: var(--muted); white-space: nowrap; }
.pill.ok, .pill.auto { background: var(--ok-bg); color: var(--ok); } .pill.failed, .pill.rejected { background: var(--bad-bg); color: var(--bad); }
.pill.installed { background: var(--ok-bg); color: var(--ok); }
.pill.manual, .pill.released { background: var(--warn-bg); color: var(--warn); }
.pill.no.download { background: var(--bad-bg); color: var(--bad); }
.meter { height: 10px; background: var(--code); border-radius: 5px; overflow: hidden; margin: 6px 0; }
.meter > div { height: 100%; background: var(--brand); } .meter.over > div { background: var(--bad); }
.stats { display: flex; gap: 24px; flex-wrap: wrap; } .stats div b { display: block; font-size: 18px; }
/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 16px 0; }
.tabs button { background: transparent; color: var(--muted); border: 0; border-radius: 0; padding: 10px 16px; font-weight: 600;
  border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab { display: none; } .tab.on { display: block; }
/* settings groups */
details.group { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
details.group > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
details.group > summary .hint { font-weight: 400; margin-left: auto; }
details.group[open] > summary { border-bottom: 1px solid var(--line); }
details.group > .body { padding: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.checks label { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: 13px; margin: 0; }
.headline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 700px) { main { padding: 12px; } header.brand { gap: 12px; } header nav, header .env { display: none; }
  table { font-size: 12px; } .hide-sm { display: none; } }

/* step flow: one straight line of chevrons; done = light green, current = dark green, to come = grey */
:root { --step-todo: #e7ece9; --step-todo-ink: #6b7973; --step-done: #cdeadb; --step-done-ink: #004d33;
        --step-on: #006341; --step-on-ink: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root { --step-todo: #1f2925; --step-todo-ink: #8d9c95; --step-done: #1d4630; --step-done-ink: #bfe8cf;
          --step-on: #00a651; --step-on-ink: #06140d; }
}
.steps { list-style: none; display: flex; padding: 0; margin: 8px 0 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.08)); }
.steps li { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px 0 30px; margin-left: -10px; font-size: 13px; white-space: nowrap;
  background: var(--step-todo); color: var(--step-todo-ink);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
  transition: background-color .35s ease, color .35s ease; }
.steps li:first-child { margin-left: 0; padding-left: 16px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.steps li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16px 50%); border-radius: 0 6px 6px 0; }
.steps li b { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; background: rgba(255,255,255,.55); color: inherit; }
.steps li a { color: inherit; text-decoration: none; display: flex; gap: 8px; align-items: center; overflow: hidden; text-overflow: ellipsis; }
.steps li a:hover { text-decoration: underline; }
.steps li.done { background: var(--step-done); color: var(--step-done-ink); }
.steps li.on { background: var(--step-on); color: var(--step-on-ink); font-weight: 600; }
.steps li.on b { background: var(--step-on-ink); color: var(--step-on); }
@media (max-width: 640px) {
  .steps li { padding: 0 14px 0 22px; gap: 0; font-size: 12px; }
  .steps li:not(.on) { flex: 0 0 auto; font-size: 0; }        /* narrow: numbers only, current step keeps its name */
  .steps li:not(.on) b { font-size: 12px; }
  .steps li.on { gap: 6px; }
}

/* EMV AIDs and overrides side by side */
.emv { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.emv .links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .emv .links a { text-decoration: none; }
.emv table input, .emv table select { min-width: 0; }
@media (max-width: 900px) { .emv { grid-template-columns: 1fr; } }
