/* ==========================================================================
   Student portal — clean white theme with calm, low-saturation accents.
   Self-contained: it does not depend on app.css / admin.css.
   ========================================================================== */
:root {
  --pt-ink: #1B2530;
  --pt-navy: #1B2A41;
  --pt-accent: #2D4B73;         /* primary actions, active states */
  --pt-accent-hover: #223A5A;
  --pt-accent-soft: #EEF2F7;
  --pt-page: #F7F8FA;
  --pt-surface: #FFFFFF;
  --pt-line: #E3E7ED;
  --pt-line-strong: #CBD3DE;
  --pt-text: #2B3542;
  --pt-muted: #6B7684;
  --pt-subtle: #8A94A3;
  --pt-red: #9A3A28;            /* muted brick, used sparingly */
  --pt-red-soft: #F6ECE9;
  --pt-amber: #7A5212;
  --pt-amber-soft: #FBF3E4;
  --pt-green: #223A5A;          /* "done / passed": deep navy, no green in the UI */
  --pt-green-soft: #E6ECF4;
  --pt-radius: 12px;
  --pt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --pt-side-w: 272px;
  --pt-font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pt-display: "Manrope", "Inter", "Segoe UI", sans-serif;

  /* legacy names still referenced by a few inline styles */
  --pt-blue: var(--pt-accent); --pt-deep: var(--pt-navy); --pt-title: var(--pt-accent); --pt-coral: var(--pt-accent);

  /* let the shared toast / confirm dialogs pick up the portal colours */
  --safety: #2D4B73; --safety-2: #223A5A; --navy: #1B2A41; --danger: #9A3A28;
  --line: #E3E7ED; --muted: #6B7684; --ink: #1B2530;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.portal, body.portal-login {
  margin: 0; background: var(--pt-page); color: var(--pt-text);
  font: 14px/1.55 var(--pt-font);
}
a { color: var(--pt-accent); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }

.pt-shell { display: flex; min-height: 100vh; }

/* ---------------------------------------------------------------- sidebar */
.pt-side {
  width: var(--pt-side-w); flex: none; background: var(--pt-surface); color: var(--pt-text);
  border-right: 1px solid var(--pt-line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.pt-profile {
  text-align: center; flex: none; border-bottom: 1px solid var(--pt-line);
  padding: calc(22px + env(safe-area-inset-top, 0px)) 16px 18px;
}
.pt-avatar {
  width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; background: var(--pt-accent-soft);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--pt-line-strong);
  overflow: hidden; display: grid; place-items: center; color: var(--pt-accent); font: 700 32px/1 var(--pt-display);
  position: relative;
}
.pt-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pt-name { font-size: 14px; font-weight: 600; color: var(--pt-ink); word-break: break-word; }
.pt-no { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--pt-muted); background: var(--pt-page); border: 1px solid var(--pt-line); padding: 2px 8px; border-radius: 20px; word-break: break-all; }

.pt-nav { padding: 10px 10px calc(24px + env(safe-area-inset-bottom, 0px)); flex: 1; }
.pt-nav-group + .pt-nav-group { margin-top: 4px; }
.pt-nav-head {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 6px;
  font: 700 11px/1.2 var(--pt-font); letter-spacing: .08em; text-transform: uppercase; color: var(--pt-subtle); border-radius: 8px;
}
.pt-nav-head span { flex: 1; }
.pt-nav-head .ic { width: 16px; height: 16px; }
.pt-nav-head:hover, .pt-nav-group.is-active .pt-nav-head { color: var(--pt-ink); }
.pt-nav-head:focus-visible { outline: 2px solid var(--pt-accent); }
.pt-chev { transition: transform .18s ease; }
.pt-nav-group.collapsed .pt-chev { transform: rotate(-90deg); }
.pt-nav-group.collapsed .pt-nav-links { display: none; }
.pt-nav-links { display: flex; flex-direction: column; padding-bottom: 4px; }
.pt-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px 9px 12px; margin: 1px 0; color: #4A5565; text-decoration: none;
  font-size: 14px; font-weight: 500; border-radius: 8px; position: relative;
}
.pt-nav a .ic { width: 18px; height: 18px; color: var(--pt-subtle); }
.pt-nav a:hover { background: #F4F6F9; color: var(--pt-ink); }
.pt-nav a.active { background: var(--pt-accent-soft); color: var(--pt-navy); font-weight: 600; }
.pt-nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pt-accent); }
.pt-nav a.active .ic { color: var(--pt-accent); }
.pt-overlay { display: none; }

/* ---------------------------------------------------------------- main column */
.pt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-top {
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--pt-line); min-height: 64px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 24px 10px;
  display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.2) blur(6px);
}
.pt-burger { display: none; border: 1px solid var(--pt-line); border-radius: 9px; background: #fff; color: var(--pt-ink); padding: 6px; cursor: pointer; }
.pt-burger .ic { width: 22px; height: 22px; }
.pt-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.pt-brand img { height: 30px; width: auto; flex: none; }
.pt-title { margin: 0; color: var(--pt-ink); font: 700 17px/1.25 var(--pt-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 14px; border-left: 1px solid var(--pt-line); }
.pt-top-right { display: flex; align-items: center; gap: 8px; }
.pt-btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--pt-line-strong); background: #fff; color: var(--pt-ink); font: 600 13px/1 var(--pt-font);
  padding: 9px 12px; border-radius: 9px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.pt-btn-outline .ic { width: 16px; height: 16px; color: var(--pt-muted); }
.pt-btn-outline:hover { background: #F4F6F9; border-color: #AEB8C6; }
.pt-icon-btn { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--pt-line-strong); background: #fff; color: var(--pt-muted); display: grid; place-items: center; text-decoration: none; }
.pt-icon-btn .ic { width: 18px; height: 18px; }
.pt-icon-btn:hover { color: var(--pt-ink); background: #F4F6F9; }

.pt-account { position: relative; }
.pt-account summary {
  list-style: none; cursor: pointer; background: #fff; color: var(--pt-ink); padding: 4px 10px 4px 4px; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; user-select: none; border: 1px solid var(--pt-line-strong); border-radius: 22px; min-height: 38px;
}
.pt-account summary::-webkit-details-marker { display: none; }
.pt-account summary::after { content: ""; border: 4px solid transparent; border-top-color: var(--pt-muted); margin-top: 4px; }
.pt-account[open] summary { background: #F4F6F9; }
.pt-mini-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--pt-accent-soft); color: var(--pt-accent); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.pt-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: #fff; border: 1px solid var(--pt-line);
  border-radius: 10px; padding: 6px; box-shadow: 0 16px 32px -12px rgba(16, 24, 40, .25); z-index: 60;
}
.pt-menu a, .pt-menu button {
  display: block; width: 100%; padding: 9px 12px; color: var(--pt-text); text-decoration: none; border-radius: 7px;
  border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer;
}
.pt-menu a:hover, .pt-menu button:hover { background: #F4F6F9; color: var(--pt-ink); }

.pt-power {
  width: 38px; height: 38px; border: 1px solid var(--pt-line-strong); border-radius: 9px; background: #fff; color: var(--pt-muted);
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.pt-power .ic { width: 18px; height: 18px; }
.pt-power:hover { color: var(--pt-red); border-color: #D9B5AD; background: var(--pt-red-soft); }

/* intake / balance strip */
.pt-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--pt-line); font-size: 13.5px; }
.pt-strip-k { color: var(--pt-muted); font-size: 12px; margin-right: 4px; }
.pt-strip-left { color: var(--pt-ink); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-status { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: var(--pt-amber-soft); color: var(--pt-amber); }
.pt-status.ok { background: var(--pt-green-soft); color: var(--pt-green); }
.pt-strip-right strong { font-weight: 700; color: var(--pt-ink); }
.pt-strip-right.due strong { color: var(--pt-red); }

.pt-print-head { display: none; }

/* payment reference dialog */
.pt-ref-box {
  display: flex; align-items: center; gap: 10px; background: var(--pt-page); border: 1px dashed var(--pt-line-strong); border-radius: 10px;
  padding: 10px 14px; margin: 12px 0; flex-wrap: wrap;
}
.pt-ref-box code { font-size: 17px; font-weight: 700; color: var(--pt-navy); letter-spacing: .02em; }

.pt-content { padding: 22px 24px 48px; flex: 1; max-width: 1280px; width: 100%; }
.pt-flash { padding: 11px 14px; margin-bottom: 16px; border: 1px solid #D5DEEA; border-left: 3px solid var(--pt-accent); background: var(--pt-accent-soft); color: var(--pt-navy); font-weight: 500; border-radius: 10px; }
.pt-flash.notice { border-color: #EAD9B6; border-left-color: #B7862C; background: var(--pt-amber-soft); color: var(--pt-amber); }
.pt-flash.error { border-color: #E8CBC4; border-left-color: #B3261E; background: var(--pt-red-soft); color: #8E2B1E; }
.pt-flash ul { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }

/* ---------------------------------------------------------------- cards / panels */
.pt-card { margin-bottom: 20px; }
.pt-panel { border: 1px solid var(--pt-line); background: var(--pt-surface); border-radius: var(--pt-radius); box-shadow: var(--pt-shadow); overflow: hidden; }
.pt-panel-head { padding: 16px 20px; font: 700 16px/1.3 var(--pt-display); color: var(--pt-ink); border-bottom: 1px solid var(--pt-line); }
.pt-panel-head small { font: 500 12.5px/1 var(--pt-font); color: var(--pt-muted); margin-left: 8px; }
.pt-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--pt-line); background: #FBFBFC; }
.pt-toolbar-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--pt-accent); background: var(--pt-accent); color: #fff;
  padding: 8px 14px; font: 600 13px/1.2 var(--pt-font); cursor: pointer; text-decoration: none; border-radius: 8px;
}
.pt-btn:hover { background: var(--pt-accent-hover); border-color: var(--pt-accent-hover); }
.pt-btn .ic { width: 15px; height: 15px; }
.pt-btn.grey { background: #fff; color: var(--pt-ink); border-color: var(--pt-line-strong); }
.pt-btn.grey:hover { background: #F4F6F9; }
.pt-btn.small { padding: 5px 10px; font-size: 12.5px; }
.pt-empty { padding: 56px 20px; text-align: center; color: var(--pt-muted); }
.pt-empty strong { display: block; color: var(--pt-ink); font-size: 15px; margin-bottom: 4px; }

.pt-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt-table th { color: var(--pt-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--pt-line); white-space: nowrap; background: #FBFBFC; }
.pt-table td { padding: 12px 14px; border-bottom: 1px solid #EEF1F4; vertical-align: middle; }
.pt-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-table th.num { text-align: right; }
.pt-table .ctr { text-align: center; }
.pt-table tr.pt-group td { color: var(--pt-ink); font-weight: 700; background: #F7F8FA; border-bottom: 1px solid var(--pt-line); }
.pt-group .minus { display: inline-block; width: 14px; height: 14px; background: var(--pt-subtle); border-radius: 3px; margin-right: 10px; position: relative; vertical-align: -2px; }
.pt-group .minus::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 2px; background: #fff; }
.pt-table tr.pt-total td { font-weight: 700; border-bottom: 0; }
.pt-total .lbl { color: var(--pt-muted); text-align: right; }
.pt-ok { color: var(--pt-green); }
.pt-bad { color: var(--pt-red); }
.pt-muted { color: var(--pt-muted); }

.pt-bar { position: relative; height: 24px; background: #EEF1F4; min-width: 150px; overflow: hidden; border-radius: 6px; }
.pt-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #C9D5E4; }
.pt-bar.dark i { background: var(--pt-accent); }
.pt-bar span { position: relative; display: block; text-align: center; line-height: 24px; font-size: 12.5px; color: var(--pt-ink); font-weight: 600; }
.pt-bar.dark span { color: #fff; }

.pt-detail { border-top: 1px solid var(--pt-line); padding: 16px 20px; background: #FBFBFC; }
.pt-detail h4 { margin: 0 0 10px; color: var(--pt-ink); font-size: 15px; }
.pt-detail[hidden] { display: none; }
.pt-profile-form { display: flex; gap: 22px; padding: 20px; align-items: flex-start; flex-wrap: wrap; }
.pt-profile-photo { width: 130px; height: 160px; object-fit: cover; border: 1px solid var(--pt-line); border-radius: 10px; flex: none; background: #F4F6F7; }
.pt-profile-form .pt-dl { flex: 1; min-width: 260px; }
.pt-dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 16px; margin: 0; }
.pt-dl dt { color: var(--pt-muted); }
.pt-dl dd { margin: 0; font-weight: 600; color: var(--pt-ink); word-break: break-word; }
.pt-note { padding: 14px 20px; color: var(--pt-muted); font-size: 13px; border-top: 1px solid var(--pt-line); background: #FBFBFC; }

/* stat tiles */
.pt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 16px; }
.pt-tile { border: 1px solid var(--pt-line); padding: 14px 16px; background: #fff; border-radius: 10px; }
.pt-tile .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-muted); font-weight: 700; }
.pt-tile .v { font: 700 22px/1.25 var(--pt-display); color: var(--pt-ink); margin-top: 4px; }
.pt-tile .s { font-size: 12.5px; color: var(--pt-muted); margin-top: 2px; }
.pt-tile.coral .v { color: var(--pt-red); }
.pt-tile.green .v { color: var(--pt-green); }

/* big progress */
.pt-progress { padding: 20px; }
.pt-progress .track { height: 28px; background: #EEF1F4; position: relative; overflow: hidden; border-radius: 8px; }
.pt-progress .track i { position: absolute; inset: 0 auto 0 0; background: #C9D5E4; }
.pt-progress .track.dark i { background: var(--pt-accent); }
.pt-progress .track b { position: relative; display: block; text-align: center; line-height: 28px; color: var(--pt-ink); font-size: 13.5px; }
.pt-progress .track.dark b { color: #fff; }

.pt-chip { display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: 600; border-radius: 20px; }
.pt-chip.pass { background: var(--pt-green-soft); color: var(--pt-green); }
.pt-chip.fail { background: var(--pt-red-soft); color: var(--pt-red); }
.pt-chip.wait { background: #EEF1F4; color: #5B6771; }

.pt-steps { list-style: none; margin: 0; padding: 8px 20px 20px; }
.pt-steps li { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.pt-steps li + li::before { content: ""; position: absolute; left: 13px; top: -10px; height: 20px; width: 2px; background: var(--pt-line); }
.pt-steps .dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #EEF1F4; color: var(--pt-muted); font-weight: 700; font-size: 13px; border: 1px solid var(--pt-line); }
.pt-steps li.done .dot { background: var(--pt-accent); border-color: var(--pt-accent); color: #fff; }
.pt-steps .t { font-weight: 600; color: var(--pt-ink); }
.pt-steps .n { font-size: 12.5px; color: var(--pt-muted); }

/* certificates */
.pt-certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 16px; }
.pt-cert { border: 1px solid var(--pt-line); border-radius: 10px; padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.pt-cert .title { font-weight: 700; color: var(--pt-ink); font-size: 15px; }
.pt-cert .meta { font-size: 12.5px; color: var(--pt-muted); }
.pt-cert .pt-btn { margin-top: 10px; align-self: flex-start; }

/* forms */
.pt-form { padding: 20px; max-width: 480px; }
.pt-form.wide { max-width: 680px; }
.pt-field { margin-bottom: 16px; }
.pt-field label { display: block; font-weight: 600; color: var(--pt-ink); margin-bottom: 6px; font-size: 13.5px; }
.pt-field input[type="text"], .pt-field input[type="password"], .pt-field input[type="email"], .pt-field select, .pt-field textarea, .pt-field input[type="file"] {
  width: 100%; border: 1px solid var(--pt-line-strong); border-radius: 9px; padding: 11px 12px; font: inherit; font-size: 15px; background: #fff; color: var(--pt-ink);
}
.pt-field input[type="file"] { padding: 9px 10px; font-size: 13.5px; }
.pt-field textarea { resize: vertical; min-height: 110px; }
.pt-field input:focus, .pt-field select:focus, .pt-field textarea:focus { outline: none; border-color: var(--pt-accent); box-shadow: 0 0 0 3px rgba(45, 75, 115, .15); }
.pt-field .err { color: #B3261E; font-size: 12.5px; margin-top: 4px; }
.pt-field .help { color: var(--pt-muted); font-size: 12.5px; margin-top: 4px; }
.pt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Services: quick-action tiles + past requests */
.pt-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 16px; }
.pt-service-tile {
  border: 1px solid var(--pt-line); background: #fff; text-align: left; padding: 16px; color: var(--pt-ink); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px; min-height: 104px; border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease;
}
.pt-service-tile .ic { width: 20px; height: 20px; }
.pt-service-tile .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.pt-service-tile span.lbl { font-weight: 600; font-size: 14px; line-height: 1.35; }
.pt-service-tile:hover { border-color: #AEB8C6; box-shadow: 0 6px 16px -10px rgba(16, 24, 40, .3); }
.pt-service-tile.is-picked { border-color: var(--pt-accent); box-shadow: inset 0 0 0 1px var(--pt-accent); }
.pt-service-tile.c0 .ico { background: #F5F0E4; color: #7A6320; }
.pt-service-tile.c1 .ico { background: var(--pt-accent-soft); color: var(--pt-accent); }
.pt-service-tile.c2 .ico { background: #EEF1F5; color: #3B4B62; }
.pt-service-tile.c3 .ico { background: #F4EEEC; color: #7F4A3E; }
.pt-service-tile.c4 .ico { background: #F0F1F4; color: #545E6C; }
.pt-req { border: 1px solid var(--pt-line); border-left: 3px solid var(--pt-accent); border-radius: 10px; background: #fff; padding: 12px 16px; margin: 0 16px 12px; }
.pt-req.resolved { border-left-color: #AEB8C6; }
.pt-req .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-req .type { font-weight: 600; color: var(--pt-ink); }
.pt-req .when { font-size: 12px; color: var(--pt-muted); }
.pt-req .msg { margin: 8px 0 0; font-size: 13.5px; }
.pt-req .reply { margin: 10px 0 0; padding: 9px 12px; background: var(--pt-page); border-radius: 8px; font-size: 13px; }
.pt-req .reply b { color: var(--pt-ink); }
.pt-badge { display: inline-block; padding: 2px 9px; font-size: 11px; font-weight: 700; border-radius: 10px; }
.pt-badge.blue { background: var(--pt-accent-soft); color: var(--pt-accent); }
.pt-badge.amber { background: var(--pt-amber-soft); color: var(--pt-amber); }
.pt-badge.green { background: var(--pt-green-soft); color: var(--pt-green); }
.pt-badge.slate { background: #EEF1F4; color: #545E6C; }

/* ---------------------------------------------------------------- Help & Support */
.hp-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; }
.hp-hero-main { padding: 26px 24px; }
.hp-hero-main h2 { margin: 0 0 6px; font: 800 22px/1.25 var(--pt-display); color: var(--pt-ink); }
.hp-hero-main p { margin: 0 0 16px; color: var(--pt-muted); max-width: 520px; }
.hp-contacts { border-left: 1px solid var(--pt-line); background: #FBFBFC; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.hp-contact { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; }
.hp-contact .ico { width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid var(--pt-line); display: grid; place-items: center; color: var(--pt-muted); flex: none; }
.hp-contact .ico .ic { width: 16px; height: 16px; }
.hp-contact .k { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-subtle); font-weight: 700; }
.hp-contact .v { color: var(--pt-ink); font-weight: 600; word-break: break-word; }
.hp-contact a.v { text-decoration: none; }
.hp-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.hp-faq details { border-top: 1px solid var(--pt-line); }
.hp-faq details:first-of-type { border-top: 0; }
.hp-faq summary { list-style: none; cursor: pointer; padding: 14px 20px; font-weight: 600; color: var(--pt-ink); display: flex; justify-content: space-between; gap: 12px; }
.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary::after { content: "+"; color: var(--pt-subtle); font-size: 18px; line-height: 1; }
.hp-faq details[open] summary::after { content: "\2212"; }
.hp-faq .a { padding: 0 20px 16px; color: var(--pt-muted); font-size: 13.5px; }
.hp-tickets { display: flex; flex-direction: column; }
.hp-ticket { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--pt-line); text-decoration: none; color: inherit; }
.hp-ticket:first-child { border-top: 0; }
.hp-ticket:hover { background: #FBFBFC; }
.hp-ticket .no { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--pt-muted); background: var(--pt-page); border: 1px solid var(--pt-line); padding: 5px 7px; border-radius: 6px; }
.hp-ticket .t { font-weight: 600; color: var(--pt-ink); display: block; }
.hp-ticket .m { font-size: 12px; color: var(--pt-muted); }
.hp-ticket .r { text-align: right; font-size: 12px; color: var(--pt-muted); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hp-thread { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.hp-msg { max-width: 720px; border: 1px solid var(--pt-line); border-radius: 12px; padding: 12px 16px; background: #fff; }
.hp-msg.staff { align-self: flex-start; background: var(--pt-accent-soft); border-color: #D5DEEA; }
.hp-msg.mine { align-self: flex-end; }
.hp-msg .who { font-size: 12px; color: var(--pt-muted); margin-bottom: 6px; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.hp-msg .who strong { color: var(--pt-ink); }
.hp-msg .body { white-space: pre-line; font-size: 14px; }
.hp-attach { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--pt-accent); text-decoration: none; border: 1px solid var(--pt-line-strong); padding: 5px 10px; border-radius: 8px; background: #fff; }
.hp-attach .ic { width: 14px; height: 14px; }
.hp-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--pt-line); font-size: 12.5px; color: var(--pt-muted); background: #FBFBFC; }
.hp-meta b { color: var(--pt-ink); font-weight: 600; }
.hp-prio { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #EEF1F4; color: #4A5565; }
.hp-prio.high { background: var(--pt-amber-soft); color: var(--pt-amber); }
.hp-prio.urgent { background: var(--pt-red-soft); color: var(--pt-red); }
.pt-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--pt-muted); text-decoration: none; margin-bottom: 12px; }
.pt-back .ic { width: 16px; height: 16px; }
.pt-back:hover { color: var(--pt-ink); }

/* ---------------------------------------------------------------- login page */
body.portal-login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; margin: 0; background: #F4F6F9;
  background-image: radial-gradient(circle at 12% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 45%), radial-gradient(circle at 100% 100%, #E9EEF5 0%, rgba(233, 238, 245, 0) 40%);
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.lg-card { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--pt-line); border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(16, 24, 40, .25); overflow: hidden; }
.lg-aside { background: #FBFBFC; border-right: 1px solid var(--pt-line); padding: 40px 38px; display: flex; flex-direction: column; }
.lg-logo { height: 58px; width: auto; max-width: 80%; object-fit: contain; align-self: flex-start; margin-bottom: 34px; }
.lg-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-subtle); margin: 0 0 8px; }
.lg-aside h1 { margin: 0 0 10px; font: 800 28px/1.2 var(--pt-display); color: var(--pt-ink); letter-spacing: -.01em; }
.lg-aside p.lead { margin: 0 0 26px; color: var(--pt-muted); font-size: 14.5px; }
.lg-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.lg-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--pt-text); }
.lg-points .ico { width: 32px; height: 32px; border-radius: 9px; background: #fff; border: 1px solid var(--pt-line); display: grid; place-items: center; color: var(--pt-accent); flex: none; }
.lg-points .ico .ic { width: 16px; height: 16px; }
.lg-points strong { display: block; color: var(--pt-ink); font-size: 13.5px; }
.lg-aside .lg-foot { margin-top: auto; padding-top: 28px; font-size: 12px; color: var(--pt-subtle); }
.lg-main { padding: 44px 42px 36px; display: flex; flex-direction: column; justify-content: center; }
.lg-main h2 { margin: 0 0 4px; font: 700 21px/1.3 var(--pt-display); color: var(--pt-ink); }
.lg-main .sub { margin: 0 0 24px; color: var(--pt-muted); font-size: 13.5px; }
.lg-input { position: relative; }
.lg-input > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--pt-subtle); pointer-events: none; }
.lg-main .pt-field input[type="text"], .lg-main .pt-field input[type="password"], .lg-main .pt-field input[type="email"] { padding: 12px 44px 12px 40px; background: #fff; }
.lg-reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--pt-muted); cursor: pointer; padding: 6px 8px; border-radius: 7px; font: 600 12px/1 var(--pt-font); }
.lg-reveal:hover { background: #F4F6F9; color: var(--pt-ink); }
.lg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.pt-check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--pt-muted); cursor: pointer; }
.pt-check input { width: 16px; height: 16px; accent-color: var(--pt-accent); }
.lg-help-link { font-size: 13px; font-weight: 600; color: var(--pt-accent); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }
.lg-help-link:hover { text-decoration: underline; }
.lg-submit { width: 100%; justify-content: center; padding: 12px 14px; font-size: 14.5px; border-radius: 10px; }
.lg-help { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--pt-line); border-radius: 10px; background: #FBFBFC; font-size: 12.5px; color: var(--pt-muted); }
.lg-help[hidden] { display: none; }
.lg-help strong { color: var(--pt-ink); }
.lg-alt { margin-top: 22px; text-align: center; font-size: 13px; color: var(--pt-muted); }
.lg-alt a { font-weight: 600; text-decoration: none; }
.lg-alt a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .pt-btn-outline span { display: none; }
  .hp-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pt-side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1200; transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 8px 0 28px rgba(0, 0, 0, .18);
    width: min(var(--pt-side-w), 86vw);
  }
  .pt-side.open { transform: none; }
  .pt-overlay.open { display: block; position: fixed; inset: 0; background: rgba(15, 23, 35, .4); z-index: 1100; }
  .pt-burger { display: grid; place-items: center; min-width: 42px; min-height: 42px; }
  .pt-top { padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; gap: 10px; }
  .pt-brand img { display: none; }
  .pt-title { border-left: 0; padding-left: 0; font-size: 16px; }
  .pt-content { padding: 16px 12px 36px; }
  .pt-strip { padding: 10px 14px; }
  .pt-nav a { padding: 12px 12px; }
  .pt-account-label { display: none; }
  .pt-account summary { padding: 4px 8px 4px 4px; }
  .hp-hero { grid-template-columns: 1fr; }
  .hp-contacts { border-left: 0; border-top: 1px solid var(--pt-line); }
  .lg-card { grid-template-columns: 1fr; max-width: 460px; }
  .lg-aside { border-right: 0; border-bottom: 1px solid var(--pt-line); padding: 28px 26px 24px; }
  .lg-aside .lg-points, .lg-aside .lg-foot { display: none; }
  .lg-logo { margin-bottom: 18px; height: 48px; }
  .lg-aside h1 { font-size: 23px; }
  .lg-aside p.lead { margin: 0; }
  .lg-main { padding: 26px 26px 28px; }
}
@media (max-width: 640px) {
  .pt-icon-btn { display: none; }
  .pt-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .pt-dl dd { margin-bottom: 10px; }
  .pt-row { grid-template-columns: 1fr; gap: 0; }
  .hp-ticket { grid-template-columns: 1fr; gap: 6px; }
  .hp-ticket .r { flex-direction: row; align-items: center; justify-content: flex-start; }

  /* tables turn into stacked cards */
  .pt-table.stack thead { display: none; }
  .pt-table.stack, .pt-table.stack tbody { display: block; }
  .pt-table.stack tr.pt-group { display: block; }
  .pt-table.stack tr.pt-group td { display: block; }
  .pt-table.stack tr.row { display: block; border: 1px solid var(--pt-line); border-radius: 10px; margin: 8px 8px; padding: 4px 12px; background: #fff; }
  .pt-table.stack tr.row td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #E3E9EC; text-align: right; }
  .pt-table.stack tr.row td:last-child { border-bottom: 0; }
  .pt-table.stack tr.row td::before { content: attr(data-label); color: var(--pt-muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  .pt-table.stack tr.row td.bar-cell { display: block; }
  .pt-table.stack tr.row td.bar-cell::before { display: block; margin-bottom: 4px; }
  .pt-table.stack tr.pt-total { display: flex; justify-content: flex-end; gap: 14px; padding: 6px 12px; }
  .pt-table.stack tr.pt-total td { display: block; border: 0; padding: 0; }
  .pt-table.stack tr.pt-total td.empty { display: none; }
  .pt-empty { padding: 36px 14px; }
}
@media print {
  .pt-side, .pt-top, .pt-strip, .pt-toolbar, .pt-overlay, .no-print { display: none !important; }
  body.portal { background: #fff; }
  .pt-content { padding: 0; }
  .pt-panel { box-shadow: none; border-radius: 0; }
  .pt-print-head { display: flex !important; align-items: center; gap: 16px; padding: 0 0 12px; margin: 0 0 16px; border-bottom: 2px solid #1B2A41; }
  .pt-print-head img { height: 48px; }
  .pt-print-head strong { display: block; font-size: 15px; color: #1B2A41; }
  .pt-print-head span { font-size: 11.5px; color: #5B6673; }
}

/* login-success message: bottom-right so it never covers the Account / logout buttons or the balance */
body.portal .ncx-toast { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); right: 18px; }

/* ---------------------------------------------------------------- forgot / reset password */
.lg-card.lg-single { max-width: 460px; grid-template-columns: 1fr; }
.lg-single .lg-main { padding: 34px 34px 30px; }
.lg-logo-sm { height: 42px; width: auto; max-width: 70%; object-fit: contain; align-self: flex-start; display: block; margin: 0 0 22px; }
.lg-single .lg-eyebrow { margin-bottom: 6px; }
.lg-choice { border: 0; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lg-choice legend { font-weight: 600; color: var(--pt-ink); font-size: 13.5px; margin-bottom: 8px; padding: 0; }
.lg-opt { position: relative; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--pt-line-strong); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; }
.lg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lg-opt .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--pt-page); border: 1px solid var(--pt-line); display: grid; place-items: center; color: var(--pt-muted); flex: none; }
.lg-opt .ico .ic { width: 16px; height: 16px; }
.lg-opt strong { display: block; font-size: 14px; color: var(--pt-ink); }
.lg-opt small { display: block; font-size: 11.5px; color: var(--pt-muted); line-height: 1.35; margin-top: 2px; }
.lg-opt:has(input:checked) { border-color: var(--pt-accent); box-shadow: inset 0 0 0 1px var(--pt-accent); background: #FBFCFE; }
.lg-opt:has(input:checked) .ico { background: var(--pt-accent-soft); color: var(--pt-accent); border-color: #D5DEEA; }
.lg-opt:has(input:focus-visible) { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-field input.lg-code { text-align: center; font: 700 26px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 10px; padding: 14px 12px; }
.lg-resend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 18px; font-size: 13px; color: var(--pt-muted); }
.lg-resend form { margin: 0; }
.lg-help-link:disabled { color: var(--pt-subtle); cursor: default; text-decoration: none; }
@media (max-width: 480px) {
  .lg-single .lg-main { padding: 26px 22px 24px; }
  .lg-choice { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- phone tab bar */
.pt-tabbar { display: none; }
@media (max-width: 900px) {
  .pt-tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.2) blur(10px); border-top: 1px solid var(--pt-line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .pt-tabbar a, .pt-tabbar button {
    all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 50px; border-radius: 10px; color: var(--pt-subtle); font: 600 11px/1 var(--pt-font); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .pt-tabbar .ic { width: 22px; height: 22px; }
  .pt-tabbar a.active { color: var(--pt-accent); }
  .pt-tabbar a.active .ic { stroke-width: 2.2; }
  .pt-tabbar a:active, .pt-tabbar button:active { background: #F4F6F9; }
  .pt-burger { display: grid !important; place-items: center; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; margin-right: -2px; border-radius: 10px; }
  .pt-burger .ic { width: 22px; height: 22px; }
  .pt-brand { gap: 10px; }
  .pt-content { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  body.portal .ncx-toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
  /* the sidebar drawer slides over the tab bar */
  .pt-side { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 640px) {
  .pt-strip { font-size: 12.5px; padding: 8px 12px; }
  .pt-strip-right { width: 100%; display: flex; justify-content: space-between; }
  .pt-panel-head { padding: 14px 16px; font-size: 15px; }
  .pt-tiles { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .pt-tile { padding: 10px 12px; }
  .pt-tile .v { font-size: 18px; }
  .pt-services { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .pt-service-tile { min-height: 96px; padding: 12px; }
  .pt-form, .pt-form.wide { padding: 16px; }
  .pt-toolbar { padding: 8px 10px; }
  .pt-toolbar-group { width: 100%; }
  .pt-toolbar-group .pt-btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
  .pt-btn { min-height: 40px; }
  .pt-certs { grid-template-columns: 1fr; padding: 12px; }
  .hp-hero-main { padding: 20px 16px; }
  .hp-hero-main h2 { font-size: 19px; }
  .hp-thread { padding: 14px 12px; }
  .hp-msg { max-width: 92%; }
  .pt-req { margin: 0 10px 10px; }
  .pt-profile-form { padding: 16px; }
  .pt-profile-photo { width: 96px; height: 118px; }
}
.pt-mini-avatar { position: relative; overflow: hidden; }
.pt-mini-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   v4 — refreshed look: page intros, KPI cards, calmer badges, popup forms.
   White surfaces, navy accents; no green and no bright colours anywhere.
   ========================================================================== */
:root { --pt-radius: 14px; --pt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px -2px rgba(16, 24, 40, .06); }
body.portal { background: #F6F7F9; }

/* page intro under the balance strip */
.pt-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin: 2px 0 18px; }
.pt-intro h1 { margin: 0 0 4px; font: 800 22px/1.25 var(--pt-display); color: var(--pt-ink); letter-spacing: -.01em; }
.pt-intro p { margin: 0; color: var(--pt-muted); font-size: 13.5px; max-width: 680px; }
.pt-intro-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* KPI cards */
.pt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pt-kpi { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); padding: 16px 18px; box-shadow: var(--pt-shadow); min-width: 0; }
.pt-kpi .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--pt-accent-soft); color: var(--pt-accent); display: grid; place-items: center; flex: none; }
.pt-kpi .ico .ic { width: 20px; height: 20px; }
.pt-kpi .k { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--pt-subtle); }
.pt-kpi .v { display: block; font: 800 20px/1.25 var(--pt-display); color: var(--pt-ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-kpi .v small { font: 600 11.5px/1 var(--pt-font); color: var(--pt-muted); margin-right: 4px; }
.pt-kpi .s { display: block; font-size: 12px; color: var(--pt-muted); margin-top: 1px; }
.pt-kpi.due .ico { background: var(--pt-red-soft); color: var(--pt-red); }
.pt-kpi.due .v { color: var(--pt-red); }
.pt-kpi.warm .ico { background: var(--pt-amber-soft); color: var(--pt-amber); }
.pt-kpi.dark .ico { background: var(--pt-accent); color: #fff; }
.pt-kpi-bar { display: block; height: 6px; border-radius: 6px; background: #EEF1F4; overflow: hidden; margin-top: 8px; }
.pt-kpi-bar i { display: block; height: 100%; background: var(--pt-accent); border-radius: 6px; }

/* panels */
.pt-panel { border-color: #E6E9EE; }
.pt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 20px; font-size: 15.5px; }
.pt-panel-head > span:first-child { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pt-panel-head small { margin-left: 0; }
.pt-panel-head .pt-head-actions { display: flex; gap: 8px; flex-wrap: wrap; font: 500 13px/1 var(--pt-font); }
.pt-toolbar { background: #fff; }
.pt-table tbody tr.row:hover td { background: #FAFBFC; }
.pt-table td strong { color: var(--pt-ink); }
.pt-note { position: relative; padding-left: 46px; }
.pt-note::before { content: ""; position: absolute; left: 20px; top: 16px; width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid var(--pt-subtle); background:
  linear-gradient(var(--pt-subtle), var(--pt-subtle)) center 4px / 1.6px 2px no-repeat,
  linear-gradient(var(--pt-subtle), var(--pt-subtle)) center 7px / 1.6px 5px no-repeat; }
.pt-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* buttons */
.pt-btn { border-radius: 9px; min-height: 38px; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.pt-btn.small { min-height: 32px; }
.pt-btn.grey { box-shadow: none; }
.pt-btn.danger { background: var(--pt-red); border-color: var(--pt-red); }
.pt-btn.danger:hover { background: #7E2E20; border-color: #7E2E20; }
.pt-btn.block { width: 100%; justify-content: center; }
.pt-btn:disabled { opacity: .6; cursor: default; }

/* status colours: navy for "done", slate for "resolved", no green */
.pt-status.ok { background: var(--pt-accent); color: #fff; }
.pt-status { display: inline-flex; align-items: center; gap: 6px; }
.pt-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pt-chip.pass { background: var(--pt-accent); color: #fff; }
.pt-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 11.5px; }
.pt-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pt-badge.green { background: #EEF1F4; color: #4A5565; }
.pt-ok { color: var(--pt-accent); font-weight: 700; }

/* tiles */
.pt-tile { border-radius: 12px; }
.pt-tile.green .v { color: var(--pt-accent); }

/* service tiles open a popup */
.pt-service-tile { box-shadow: var(--pt-shadow); }
.pt-service-tile .sub { font-size: 12.5px; color: var(--pt-muted); line-height: 1.4; margin-top: -6px; }
.pt-service-tile:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }

/* help desk */
.hp-hero-main .pt-btn { margin-right: 4px; }
.hp-count { display: inline-flex; gap: 6px; align-items: center; margin-left: 10px; font-size: 13px; color: var(--pt-muted); }
.hp-msg { border-radius: 14px; box-shadow: var(--pt-shadow); }
.hp-msg.mine { background: #fff; border-color: #DDE3EA; border-bottom-right-radius: 4px; }
.hp-msg.staff { border-bottom-left-radius: 4px; }
.hp-reply { border-top: 1px solid var(--pt-line); background: #FBFBFC; padding: 18px 20px; }
.hp-reply .pt-form { padding: 0; max-width: none; }

/* profile */
.pt-profile-form { gap: 26px; }
.pt-profile-photo { border-radius: 14px; box-shadow: var(--pt-shadow); }
.pt-dl dt { font-size: 13px; }
.pt-form.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; max-width: 760px; }
.pt-form.grid .pt-span { grid-column: 1 / -1; }
.pt-form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.pt-form-actions .pt-muted { font-size: 12.5px; }

/* certificates */
.pt-cert { position: relative; padding: 18px 18px 16px; gap: 6px; border-radius: 14px; box-shadow: var(--pt-shadow); border-top: 3px solid var(--pt-accent); }
.pt-cert .badge-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--pt-accent-soft); color: var(--pt-accent); display: grid; place-items: center; margin-bottom: 6px; }

/* invoice details popup */
.pt-pop-dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; margin: 0; font-size: 13.5px; }
.pt-pop-dl dt { color: var(--pt-muted); }
.pt-pop-dl dd { margin: 0; font-weight: 600; color: var(--pt-ink); }
.ncx-box .pt-form { padding: 0; max-width: none; }
.ncx-box .pt-field:last-of-type { margin-bottom: 0; }

@media (max-width: 640px) {
  .pt-intro h1 { font-size: 19px; }
  .pt-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pt-kpi { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .pt-kpi .ico { width: 34px; height: 34px; border-radius: 10px; }
  .pt-kpi .v { font-size: 16.5px; }
  .pt-form.grid { grid-template-columns: 1fr; }
  .pt-pop-dl { grid-template-columns: 1fr; gap: 2px; }
  .pt-pop-dl dd { margin-bottom: 8px; }
  .hp-reply { padding: 14px 12px; }
}
@media print { .pt-intro-actions, .pt-head-actions { display: none !important; } }
@media (max-width: 640px) {
  .pt-kpi > span:last-child { width: 100%; min-width: 0; }
  .pt-kpis > .pt-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ==========================================================================
   v5 — button colours: green for actions, red for delete / cancel / log out.
   ========================================================================== */
:root { --btn-green: #0E7A3F; --btn-green-h: #0A5F31; --btn-green-soft: #EAF5EE; --btn-red: #C62828; --btn-red-h: #A11F1F; --btn-red-soft: #FCEDED; }
.pt-btn, a.pt-btn, button.pt-btn { background: var(--btn-green); border-color: var(--btn-green); color: #fff; }
.pt-btn:hover, a.pt-btn:hover, button.pt-btn:hover { background: var(--btn-green-h); border-color: var(--btn-green-h); color: #fff; }
.pt-btn.grey, a.pt-btn.grey, button.pt-btn.grey { background: #fff; color: var(--btn-green); border-color: var(--btn-green); }
.pt-btn.grey:hover, a.pt-btn.grey:hover, button.pt-btn.grey:hover { background: var(--btn-green-soft); color: var(--btn-green-h); border-color: var(--btn-green-h); }
.pt-btn.danger, button.pt-btn.danger { background: var(--btn-red); border-color: var(--btn-red); color: #fff; }
.pt-btn.danger:hover, button.pt-btn.danger:hover { background: var(--btn-red-h); border-color: var(--btn-red-h); }
.pt-btn-outline { color: var(--btn-green); border-color: var(--btn-green); }
.pt-btn-outline .ic { color: var(--btn-green); }
.pt-btn-outline:hover { background: var(--btn-green-soft); border-color: var(--btn-green-h); }
.pt-icon-btn { color: var(--btn-green); border-color: var(--btn-green); }
.pt-icon-btn:hover { color: var(--btn-green-h); background: var(--btn-green-soft); }
.pt-power { color: var(--btn-red); border-color: var(--btn-red); }
.pt-power:hover { color: #fff; background: var(--btn-red); border-color: var(--btn-red); }
.pt-ref-box .pt-btn { background: var(--btn-green); }
.lg-help-link { color: var(--btn-green); }
.lg-reveal { color: var(--btn-green); }
