/* =====================================================================
   S/4HANA Extractor - iB6 theme (light and dark)
   Theme: <html data-theme="light|dark">; without it, the device setting decides.
   ===================================================================== */

@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("../fonts/manrope/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("../fonts/manrope/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("../fonts/manrope/manrope-latin-800-normal.woff2") format("woff2"); }

/* ---------------------------------------------------------------- tokens: light */
:root {
  color-scheme: light;
  --pink: #ec4899;           /* brand: decoration, rings, active bars */
  --pink-fill: #db2777;      /* buttons and badges with white text (4.6:1) */
  --pink-fill-hover: #be185d;
  --pink-text: #be185d;      /* pink text on the page */
  --pink-soft: #fce7f3;      /* tinted backgrounds */
  --pink-line: #f9a8d4;

  --bg: #f6f5f9;
  --shell: #ffffff;          /* sidebar and top bar */
  --surface: #ffffff;        /* cards */
  --surface-2: #f3f1f7;      /* inputs, table headers, insets */
  --line: #e6e3ec;
  --line-strong: #d6d2de;
  --ink: #1e1c24;
  --ink-2: #3c3945;
  --muted: #6b6875;
  --nav-active: #fce7f3;
  --shadow: 0 1px 2px rgba(30, 28, 36, .04), 0 6px 24px -12px rgba(30, 28, 36, .18);

  --ok: #15803d;   --ok-soft: #dcfce7;
  --warn: #b45309; --warn-soft: #fef3c7;
  --err: #b91c1c;  --err-soft: #fee2e2;
  --info: #1d4ed8; --info-soft: #e0e7ff;

  --blue: #4fb3e8; --amber: #f2c94c; --green: #34c27a; --red: #ef5a5a; --indigo: #5b5bd6;

  --auth-bg: linear-gradient(-45deg, rgb(245, 163, 204), rgb(241, 242, 248), rgb(245, 163, 204), rgb(241, 242, 248));
  --auth-card: #57525e;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --radius: 10px;
  --radius-sm: 7px;
  --sidebar-w: 260px;
}

/* ---------------------------------------------------------------- tokens: dark */
:root[data-theme="dark"] {
  color-scheme: dark;
  --pink-text: #f472b6;
  --pink-soft: rgba(236, 72, 153, .14);
  --pink-line: rgba(236, 72, 153, .45);
  --bg: #1c1b21;
  --shell: #1c1b21;
  --surface: #25242b;
  --surface-2: #2d2c34;
  --line: #34323b;
  --line-strong: #45424e;
  --ink: #eceaf1;
  --ink-2: #c9c6d1;
  --muted: #8f8c99;
  --nav-active: rgba(236, 72, 153, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --ok: #4ade80;   --ok-soft: rgba(74, 222, 128, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --err: #f87171;  --err-soft: rgba(248, 113, 113, .12);
  --info: #a5b4fc; --info-soft: rgba(129, 140, 248, .14);
  --auth-bg: linear-gradient(-45deg, #3a1a2e, #16151b, #3a1a2e, #16151b);
  --auth-card: #2b2930;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --pink-text: #f472b6;
    --pink-soft: rgba(236, 72, 153, .14);
    --pink-line: rgba(236, 72, 153, .45);
    --bg: #1c1b21;
    --shell: #1c1b21;
    --surface: #25242b;
    --surface-2: #2d2c34;
    --line: #34323b;
    --line-strong: #45424e;
    --ink: #eceaf1;
    --ink-2: #c9c6d1;
    --muted: #8f8c99;
    --nav-active: rgba(236, 72, 153, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --ok: #4ade80;   --ok-soft: rgba(74, 222, 128, .12);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
    --err: #f87171;  --err-soft: rgba(248, 113, 113, .12);
    --info: #a5b4fc; --info-soft: rgba(129, 140, 248, .14);
    --auth-bg: linear-gradient(-45deg, #3a1a2e, #16151b, #3a1a2e, #16151b);
    --auth-card: #2b2930;
  }
}

/* logos: the right one for the current theme */
.logo-dark-bg { display: none; }
:root[data-theme="dark"] .logo-light-bg { display: none; }
:root[data-theme="dark"] .logo-dark-bg { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light-bg { display: none; }
  :root:not([data-theme="light"]) .logo-dark-bg { display: inline-block; }
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 14px/1.5 var(--font); }
a { color: var(--pink-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 12px; }
h1 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.h { font-size: 15px; font-weight: 700; margin: 0; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--pink-soft); }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.hidden { display: none !important; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--shell); border-right: 1px solid var(--line); overflow-y: auto; z-index: 30;
}
.sidebar .logo { display: flex; align-items: center; gap: 10px; height: 70px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.sidebar .logo img { height: 22px; width: auto; }
.sidebar .product { padding: 14px 22px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.side-nav { padding: 6px 12px 12px; flex: 1; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0;
  border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; position: relative;
}
.side-link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side-link.active { background: var(--nav-active); color: var(--pink-text); font-weight: 700; }
.side-link.active svg { opacity: 1; }
.side-group { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.side-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::after { content: ""; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.side-group:not([open]) > summary::after { transform: rotate(-45deg); }
.side-foot { border-top: 1px solid var(--line); padding: 8px 12px; }
.side-foot button.side-link { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.switch { margin-left: auto; width: 32px; height: 18px; border-radius: 999px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
[aria-pressed="true"] .switch { background: var(--pink); }
[aria-pressed="true"] .switch::after { transform: translateX(14px); }
.user-card { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-fill); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.user-card .who { min-width: 0; flex: 1; line-height: 1.3; }
.user-card .who b { display: block; font-size: 13px; }
.user-card .who span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 70px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: var(--shell); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.tenant-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--pink-line); color: var(--pink-text); font-size: 12px; font-weight: 700; }
.tenant-chip a { font-weight: 600; color: var(--muted); }
.tenant-chip { white-space: nowrap; }
.tenant-chip svg { width: 15px; height: 15px; flex: none; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.crumbs { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.crumbs svg { width: 14px; height: 14px; }
.page { padding: 24px 28px 40px; max-width: 1600px; width: 100%; }
.foot { margin-top: auto; padding: 18px 28px; font-size: 12px; color: var(--muted); }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: min(86vw, var(--sidebar-w)); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 25; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar, .page-head, .page, .foot { padding-left: 16px; padding-right: 16px; }
  .crumbs { display: none; }
}

/* in-page heading row (actions next to the page) */
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.pagehead:empty { display: none; }
.narrow { max-width: 680px; }
.cols { display: grid; grid-template-columns: minmax(340px, 520px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols > section { min-width: 0; }
@media (max-width: 1100px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; box-shadow: var(--shadow); }
.panel > h2 { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.panel > h2 .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pink-soft); color: var(--pink-text); font-size: 11px; font-weight: 800; }
.panel > h2 .right { margin-left: auto; font-weight: 500; }
.body { padding: 16px 18px; }
.steps p { margin: 6px 0; }
.steps p.done { color: var(--muted); text-decoration: line-through; }

/* KPI tiles, iB6 style: coloured top edge, ring, big figure */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { --c: var(--pink); position: relative; display: flex; align-items: center; gap: 18px; padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi.blue { --c: var(--blue); } .kpi.amber { --c: var(--amber); } .kpi.green { --c: var(--green); } .kpi.red { --c: var(--red); } .kpi.indigo { --c: var(--indigo); }
.ring { --p: 0; width: 76px; height: 76px; flex: none; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; }
.ring::after { content: ""; width: 58px; height: 58px; border-radius: 50%; background: var(--surface); }
.kpi .fig { margin-left: auto; text-align: right; min-width: 0; }
.kpi .fig .label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi .fig .value { font-size: 30px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .fig .sub { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
.body > label:first-child { margin-top: 0; }
input[type=text], input:not([type]), input[type=url], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink); font: 500 14px/1.4 var(--font);
}
textarea { font-family: var(--mono); font-size: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); margin: 12px 0 0; }
.checks { padding-top: 16px; }
.checks .check { margin-top: 4px; }
input[type=checkbox], input[type=radio] { accent-color: var(--pink-fill); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

button, .button {
  font: 600 14px/1.2 var(--font); border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); padding: 9px 16px; cursor: pointer; display: inline-block;
}
button:hover, .button:hover { border-color: var(--pink); text-decoration: none; }
button.primary, .button.primary { background: var(--pink-fill); border-color: var(--pink-fill); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--pink-fill-hover); border-color: var(--pink-fill-hover); }
button.danger { color: var(--err); }
button.small, .button.small { padding: 5px 11px; font-size: 12px; }
button.link { border: 0; background: none; color: var(--pink-text); padding: 0; font-weight: 600; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.btns select { width: auto; }
.btns.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin: 0 0 20px; border-top: 1px solid var(--line); z-index: 5; }

.seg { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.seg label { flex: 1; margin: 0; padding: 8px 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; display: flex; gap: 6px; align-items: center; justify-content: center; }
.seg label:has(input:checked) { background: var(--pink-soft); color: var(--pink-text); }
.seg input { margin: 0; }
.cards { display: grid; gap: 8px; }
.card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--ink); font-size: 14px; font-weight: 500; }
.card.sel { border-color: var(--pink); background: var(--pink-soft); }
.card input { margin-top: 3px; }
.card b { display: block; font-weight: 700; }
.card code { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- messages */
.msg { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; white-space: pre-wrap; word-break: break-word; border: 1px solid transparent; }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.err { background: var(--err-soft); color: var(--err); }
.msg.info { background: var(--info-soft); color: var(--info); }
.msg ul { margin: 0; padding-left: 18px; }
.body .msg { margin: 10px 0; }
.empty-hide.validation-summary-valid { display: none; }
.errtext { color: var(--err); }

/* ---------------------------------------------------------------- schedule editor bits */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; background: var(--surface-2); }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.fields label { display: flex; gap: 6px; align-items: center; margin: 0; font: 500 12px/1.9 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fieldhead { display: flex; align-items: center; gap: 8px; margin: 14px 0 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.fieldhead:first-child { margin-top: 0; }
pre.url { margin: 0; white-space: pre-wrap; word-break: break-all; color: var(--ink-2); }
.stats { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.conds { display: grid; gap: 8px; margin-bottom: 8px; }
.cond { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.cond select, .cond input { width: auto; flex: 1 1 120px; min-width: 0; background: var(--surface); }
.cond select[data-k=scope] { flex: 0 0 auto; }
.cond .vals { display: flex; gap: 6px; flex: 2 1 160px; min-width: 0; }
.cond .vals input { flex: 1 1 0; }
.cond .ctype { flex-basis: 100%; font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- tables */
.tablewrap { overflow: auto; }
.panel > .tablewrap { border-radius: var(--radius); }
.body .tablewrap { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tablewrap.tall { max-height: 520px; }
table { border-collapse: collapse; font-size: 13px; width: 100%; }
.body table { font-size: 12px; width: max-content; min-width: 100%; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--surface); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.body th { background: var(--surface-2); font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.body td { white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tr.disabled td { opacity: .55; }
td.empty, div.empty { padding: 28px; text-align: center; color: var(--muted); }
td.actions, td.nowrap { white-space: nowrap; }
td.file { max-width: 340px; }
td.file code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.file .errtext { display: block; min-width: 220px; }
td.actions form + form { margin-left: 4px; }
td select { width: auto; padding: 5px 8px; }

/* reference pills (run numbers), like iB6 order refs */
.ref { display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--pink-fill); color: #fff; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.ref:hover { background: var(--pink-fill-hover); text-decoration: none; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--muted); margin-left: 4px; }
.badge.succeeded { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.failed { color: var(--err); background: var(--err-soft); border-color: transparent; }
.badge.running { color: var(--pink-text); background: var(--pink-soft); border-color: var(--pink-line); }
.badge.skipped { color: var(--warn); background: var(--warn-soft); border-color: transparent; }

dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 13px; font-weight: 600; }
dl.facts dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: 6px; } }

/* ---------------------------------------------------------------- users and invitations */
.invite-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.invite-form input { flex: 2 1 220px; width: auto; }
.invite-form select { flex: 1 1 200px; width: auto; }
.copyline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copyline code { word-break: break-all; flex: 1 1 260px; }

/* ---------------------------------------------------------------- sign-in pages (iB6 login) */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 64px 16px 28px;
  background: var(--auth-bg) 0% 0% / 400% 400%;
  animation: gradient 15s ease 0s infinite normal none running;
  transition: background 0.3s;
}
@keyframes gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.auth-logo { margin-bottom: 30px; }
.auth-logo img { height: 38px; width: auto; }
.auth-card { width: 100%; max-width: 420px; background: var(--auth-card); color: #fff; border-radius: 14px; padding: 36px 36px 30px; box-shadow: 0 30px 60px -30px rgba(40, 20, 40, .55), 0 2px 6px rgba(0, 0, 0, .08); }
.auth-card.wide { max-width: 520px; }
.auth-card h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 18px; color: #fff; }
.auth-card p, .auth-card .lead { color: #e7e4ec; font-size: 13px; margin: 0 0 14px; line-height: 1.55; }
.auth-card label { color: #d9d6de; }
.auth-card a { color: #fbcfe8; text-decoration: underline; text-underline-offset: 2px; }
.auth-card .hint { color: #d9d6de; }
.auth-card .msg.err { background: rgba(254, 202, 202, .16); color: #fecaca; }
.auth-card .msg.info { background: rgba(255, 255, 255, .1); color: #f3f0f6; }
.auth-card .msg.ok { background: rgba(187, 247, 208, .14); color: #bbf7d0; }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-card input:not([type]) {
  background: #f4f5fb; color: #1e1c24; border-color: transparent; padding: 12px 12px 12px 40px; font-size: 14px;
}
.auth-card input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(236, 72, 153, .35); }
.auth-card .plain input, .auth-card input.plain { padding-left: 12px; }
.with-icon { position: relative; margin-bottom: 14px; }
.with-icon svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9a97a4; pointer-events: none; }
.auth-card button.primary { width: 100%; padding: 12px; font-size: 14px; margin-top: 6px; }
.auth-card .check { color: #fff; font-size: 13px; font-weight: 600; }
.auth-card .rule { border: 0; border-top: 1px solid rgba(255, 255, 255, .14); margin: 22px 0 18px; }
.auth-card .help { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.6; }
.auth-card .code-input { font-family: var(--mono); font-size: 22px !important; letter-spacing: 6px; text-align: center; padding-left: 12px !important; }
.ms-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; font-weight: 700; background: #fff; color: #1e1c24; border: 1px solid transparent; }
.ms-button:hover { border-color: var(--pink); background: #fff; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: #d9d6de; font-size: 12px; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid rgba(255, 255, 255, .16); }
.qr { width: 200px; height: 200px; margin: 12px 0 8px; padding: 8px; background: #fff; border-radius: 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.key { font-size: 13px; letter-spacing: 1px; word-break: break-all; color: #fff; }
.steps-list { padding-left: 20px; margin: 0; color: #fff; }
.steps-list li { margin-bottom: 16px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; list-style: none; padding: 14px; margin: 14px 0; background: rgba(0, 0, 0, .18); border-radius: 8px; }
.codes code { font-size: 14px; color: #fff; }
.auth-card .button:not(.primary), .auth-card button:not(.primary):not(.ms-button):not(.link) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.auth-card .button.primary { display: block; text-align: center; padding: 12px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2); line-height: 2.2; }
.auth-foot a { color: var(--ink-2); }
.auth-theme { position: fixed; top: 16px; right: 16px; }
.auth-card form input + button.primary, .auth-card form .with-icon + button.primary { margin-top: 14px; }

/* ---- SAP connection guide */
.guide > summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary::after { content: ""; margin-left: auto; margin-top: 6px; width: 7px; height: 7px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.guide[open] > summary::after { transform: rotate(-135deg); }
.guide > summary:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; border-radius: var(--radius); }
.guide-icon { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--pink-soft); color: var(--pink-text); }
.guide-icon svg { width: 18px; height: 18px; }
.guide summary b { display: block; font-size: 15px; color: var(--ink); }
.guide-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.guide-body { border-top: 1px solid var(--line); padding: 18px 18px 6px; }
.guide-pick { max-width: 560px; margin-bottom: 16px; }
.guide-pane { display: none; max-width: 860px; }
.guide-body:has(input[value=public]:checked) .guide-pane[data-edition=public],
.guide-body:has(input[value=private]:checked) .guide-pane[data-edition=private] { display: block; }
.guide-intro { color: var(--ink-2); margin: 0 0 14px; }
.guide-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.guide-steps > li { counter-increment: step; position: relative; padding: 0 0 18px 44px; }
.guide-steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-fill); color: #fff; font-size: 13px; font-weight: 800; }
.guide-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 4px; width: 1px; background: var(--line-strong); }
.guide-steps > li > b { color: var(--ink); font-size: 14px; }
.guide-steps p { margin: 4px 0 8px; color: var(--ink-2); line-height: 1.6; }
.guide-steps code, .guide-trouble code { overflow-wrap: anywhere; }
.guide-body { min-width: 0; }
.guide-steps ul { margin: 4px 0 8px; padding-left: 18px; color: var(--ink-2); line-height: 1.6; }
.guide-table { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 8px 0 10px; }
.guide-table table { font-size: 13px; }
.guide-trouble { max-width: 860px; margin: 4px 0 16px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.guide-trouble > b { color: var(--ink); }
.guide-trouble dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; font-size: 13px; }
.guide-trouble dt { font-weight: 700; color: var(--ink); }
.guide-trouble dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) {
  .guide-trouble dl { grid-template-columns: 1fr; }
  .guide-trouble dd { margin-bottom: 6px; }
  .guide-pick { flex-direction: column; }
}
.guide-table code { overflow-wrap: normal; white-space: nowrap; }
