/* Partner web app (provider dashboards, network monitor): white, purple
   accent, left sidebar -- the "Bana Pele Journey Partner" webview style from
   the UC3 demo video. */
:root {
  --bg: #f7f6fb; --surface: #ffffff; --soft: #f3f0f9; --line: #ebe7f2; --line-2: #ddd6ea;
  --text: #1c1530; --muted: #6f6886; --primary: #6c4ccf; --primary-2: #5a3cbb; --on-primary: #ffffff;
  --sel: #efe7fb; --sel-ink: #4b2fa1;
  --green: #e4f2e6; --green-ink: #2f7a45; --bar: #4f8a58; --amber: #fff1d6; --amber-ink: #9a5b05;
  --peach: #fde9df; --peach-ink: #a4482a; --red: #fbe4e1; --red-ink: #a8382a; --blue: #e6eef8; --blue-ink: #34597d;
  --radius: 14px; --font: "Plus Jakarta Sans", "Outfit", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14121b; --surface: #1d1a27; --soft: #252132; --line: #2f2a3e; --line-2: #3b3550;
    --text: #ece8f6; --muted: #a59fbb; --primary: #9b82f2; --primary-2: #ae98f7; --on-primary: #160f2a;
    --sel: #2d2545; --sel-ink: #cfc1fb;
    --green: #1d3324; --green-ink: #8fd3a0; --bar: #6fbf7e; --amber: #3a2d14; --amber-ink: #f0b860;
    --peach: #3b2519; --peach-ink: #f2ae8e; --red: #3d201c; --red-ink: #f19f92; --blue: #1d2a39; --blue-ink: #a8c6e6;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* Sidebar */
aside.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.brand img.logo { height: auto; max-width: 100%; background: none; border-radius: 0; flex: none; }
.brand b { display: block; font-size: 14.5px; line-height: 1.2; }
.brand small { color: var(--muted); font-size: 12px; }
.brand-col { flex-direction: column; align-items: flex-start; gap: 12px; padding: 8px 8px 20px; }
.brand-col img.logo { width: 100%; max-width: 180px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; width: 100%; }
.nav:hover { background: var(--soft); }
.nav[aria-current="page"] { background: var(--sel); color: var(--sel-ink); font-weight: 700; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side .foot { margin-top: auto; padding: 10px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); overflow-wrap: anywhere; }

/* Top bar and content */
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.topbar h1 { font-size: 19px; margin: 0; flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--peach); color: var(--peach-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; }
.avatar.violet { background: var(--sel); color: var(--sel-ink); }
.content { padding: 22px 28px 40px; max-width: 1180px; }
.subhead { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.subhead h2 { margin: 0; font-size: 16.5px; }
.back { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }

/* Cards, tiles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; }
.card h3 { margin: 0 0 4px; font-size: 15.5px; }
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1.4fr 1fr; align-items: start; }
.stat { display: flex; gap: 14px; align-items: center; }
.stat .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--sel); color: var(--sel-ink); display: grid; place-items: center; }
.stat b { font-size: 24px; display: block; line-height: 1.1; }
.row { display: flex; gap: 14px; align-items: center; }
.grow { flex: 1; min-width: 0; }

/* Profile header */
.profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile h2 { margin: 0; font-size: 21px; }
.profile .meta { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions input { width: 220px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.green { background: var(--green); color: var(--green-ink); }
.chip.amber { background: var(--amber); color: var(--amber-ink); }
.chip.peach { background: var(--peach); color: var(--peach-ink); }
.chip.red { background: var(--red); color: var(--red-ink); }
.chip.violet { background: var(--sel); color: var(--sel-ink); }
.chip.blue { background: var(--blue); color: var(--blue-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--red-ink); }
.btn:disabled { opacity: .55; cursor: default; }
input.in { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
input.in:focus, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Tabs */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; }
.tabs button { border: 0; background: none; padding: 10px 2px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--sel-ink); border-bottom-color: var(--primary); }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stepper .s { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; background: var(--soft); color: var(--muted); }
.stepper .s.done { background: var(--green); color: var(--green-ink); }
.stepper .s.now { background: var(--sel); color: var(--sel-ink); }
.stepper .s.bad { background: var(--red); color: var(--red-ink); }
.stepper .sep { color: var(--muted); }

/* Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
button.item { width: 100%; text-align: left; cursor: pointer; }
button.item:hover { border-color: var(--line-2); background: var(--soft); }
.num { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--green-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.scroll { overflow-x: auto; }
code { font-size: 12px; background: var(--soft); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* Activity log */
ul.log { list-style: none; margin: 0; padding: 0; }
ul.log li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.log li:last-child { border-bottom: 0; }
ul.log .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--sel); color: var(--sel-ink); display: grid; place-items: center; flex: none; }
ul.log .t { flex: 1; min-width: 0; }
ul.log time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.banner { display: flex; align-items: center; gap: 10px; background: var(--green); color: var(--green-ink); border-radius: 12px; padding: 12px 14px; font-weight: 600; margin-bottom: 16px; }
.banner.amber { background: var(--amber); color: var(--amber-ink); }
.notice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: 13.5px; background: var(--surface); }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.error { color: var(--red-ink); font-size: 13.5px; margin-top: 8px; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  aside.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-content: flex-start; align-items: center; padding: 10px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { width: 100%; padding-bottom: 8px; }
  .nav { width: auto; padding: 8px 10px; }
  .side .foot { display: none; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
  .actions input { width: 100%; }
}
.card > .list, .card > .notice, .card > .scroll { margin-top: 12px; }
.card > .kicker + h3 { margin-top: 6px; }
button.chip { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
a.nav { text-decoration: none; }
