/* ==========================================================================
   NALQIVO ERP — Customer portal (2026-10)
   Two surfaces, one design language:
   1. .appx-portal  — internal administration inside the ERP shell
   2. .portal-body  — standalone, mobile-first customer read-only portal
   ========================================================================== */

.appx-portal { --appx-accent: var(--brand); --appx-accent-soft: var(--brand-50); }
.appx-portal [hidden],
.portal-body [hidden] { display: none !important; }

/* ==========================================================================
   1. ERP — access administration
   ========================================================================== */
.appx-portal .stat-grid { margin-top: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.appx-portal .card-title { display: flex; align-items: center; gap: 6px; }
.appx-portal .card-title svg { color: var(--brand); flex: 0 0 auto; }

.ptl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.ptl-span { grid-column: 1 / -1; }

/* Readiness / warning strip */
.ptl-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); font-size: 11.5px; line-height: 1.55;
}
.ptl-strip > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.ptl-strip strong { font-size: 12.5px; }
.ptl-strip span { opacity: 0.88; }
.ptl-strip > svg { flex: 0 0 auto; }
.ptl-strip .btn { flex: 0 0 auto; margin-inline-start: auto; }
.ptl-strip.warn { background: linear-gradient(180deg, #fffaf0, #fffdf8); border-color: #f3ddb5; color: #7a4b06; }
.ptl-strip.warn strong { color: #6b3e00; }
.ptl-strip.warn > svg { color: #b26a05; }
.ptl-strip.ok { background: var(--green-soft); border-color: #bfe9de; color: #086b58; }
.ptl-strip.ok > svg { color: var(--green); }

/* Toolbar */
.ptl-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 12px;
}
.ptl-search {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 250px; min-width: 0; height: 36px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted);
  transition: border-color 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.ptl-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.12); }
.ptl-search > svg { flex: 0 0 auto; }
.ptl-search .input {
  flex: 1; min-width: 0; height: 34px; padding: 0;
  border: 0; background: transparent; box-shadow: none;
}
.ptl-toolbar .select { width: auto; min-width: 138px; flex: 0 0 auto; }
.ptl-toolbar .input[type="date"] { width: auto; min-width: 140px; flex: 0 0 auto; }
.ptl-date { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ptl-date .input { height: 34px; font-size: 11.5px; }
.ptl-count { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }

/* Table cells */
.ptl-customer { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ptl-customer > svg { color: var(--brand); flex: 0 0 auto; }
.ptl-clip {
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.ptl-sub { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.45; color: var(--muted-2); }
.ptl-sub .badge { margin-top: 2px; }
.ptl-contact strong { display: block; font-weight: 600; }
.ptl-contact small { display: block; font-size: 10.5px; color: var(--muted-2); }
.ptl-muted { color: var(--muted-2); }
.ptl-desc { display: block; max-width: 430px; line-height: 1.55; }
.ptl-agent { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptl-scope { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); }
.ptl-scope.all { font-size: 10.5px; color: var(--green); font-weight: 600; }
.ptl-chip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 6px; background: var(--brand-50);
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: var(--brand-3);
  letter-spacing: 0.2px; white-space: nowrap;
}
.ptl-chip.more { background: var(--surface-3); color: var(--muted); font-family: inherit; }

/* Row actions */
.ptl-actions { justify-content: flex-end; }
.ptl-act {
  display: inline-flex; align-items: center; gap: 4px;
  height: 27px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; color: var(--ink-2);
  font-family: inherit; font-size: 10.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s var(--easing), color 0.15s var(--easing), background 0.15s var(--easing);
}
.ptl-act:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.ptl-act.danger { color: #a5202f; }
.ptl-act.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.ptl-linkbtn {
  border: 0; background: none; padding: 2px 4px;
  color: var(--brand); font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
}
.ptl-linkbtn:hover { text-decoration: underline; }

/* One-time token panel */
.ptl-token-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.ptl-token-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.ptl-token-head svg { color: var(--brand); }
.ptl-token-input {
  width: 100%; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1px;
  direction: ltr; text-align: left; background: #fff;
}
.ptl-warning {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 9px 0 0; padding: 8px 10px;
  border: 1px solid #f3ddb5; border-radius: 9px;
  background: #fffaf0; color: #7a4b06;
  font-size: 10.5px; line-height: 1.6;
}
.ptl-warning svg { flex: 0 0 auto; margin-top: 1px; color: #b26a05; }
.ptl-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.ptl-facts span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }

/* Forms inside modals */
.ptl-section-label {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; font-size: 10.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.35px;
}
.ptl-section-label svg { color: var(--brand); }
.ptl-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ptl-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.ptl-check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--brand); }

/* Password management (v2): mode tabs, manual entry with reveal, shared-phone list */
.ptl-pw-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ptl-mode-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ptl-mode-tab { position: relative; display: block; cursor: pointer; }
.ptl-mode-tab input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.ptl-mode-tab span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-2);
  transition: border-color 0.15s var(--easing), background 0.15s var(--easing), color 0.15s var(--easing);
}
.ptl-mode-tab input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.ptl-mode-tab input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ptl-password-field { position: relative; display: block; }
.ptl-password-field .input { width: 100%; padding-inline-end: 40px; }
.ptl-eye {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.ptl-eye:hover { background: var(--surface-2); color: var(--ink-2); }
.ptl-shared-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.ptl-shared-list small { color: var(--muted); font-size: 10.5px; }
.ptl-scope-picker { display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ptl-gen-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 230px; overflow: auto; }
.ptl-gen {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 11px; cursor: pointer; min-width: 0;
}
.ptl-gen input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--brand); }
.ptl-gen > span { min-width: 0; }
.ptl-gen strong { display: block; font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptl-gen small { display: block; font-size: 10px; color: var(--muted-2); overflow-wrap: anywhere; }
.ptl-gen:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.ptl-gen:has(input:disabled) { opacity: 0.72; }
.ptl-new-contact { margin-top: 10px; padding: 11px; border: 1px dashed var(--line-strong); border-radius: 11px; background: #fff; }
.ptl-inline-note { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.ptl-inline-note svg { flex: 0 0 auto; color: var(--brand); }
.ptl-empty {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 16px 12px; border: 1px dashed var(--line-strong); border-radius: 10px;
  color: var(--muted); font-size: 11.5px; text-align: center;
}
.ptl-empty.small { padding: 10px; font-size: 11px; }
.ptl-review {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 11px; border: 1px solid #f3ddb5; border-radius: 10px;
  background: #fffaf0; color: #7a4b06; font-size: 11px; line-height: 1.6;
}
.ptl-review svg { flex: 0 0 auto; margin-top: 1px; }
.ptl-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }

/* Work-order publish picker (ERP service view) */
.portal-pick {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  max-height: 270px; overflow: auto; padding: 2px;
}
.portal-pick-item {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 11px; cursor: pointer;
}
.portal-pick-item:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.portal-pick-item input { width: 15px; height: 15px; flex: 0 0 auto; accent-color: var(--brand); }
.portal-pick-icon { flex: 0 0 auto; color: var(--muted); }
.portal-pick-copy { min-width: 0; }
.portal-pick-copy strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-pick-copy small { display: block; color: var(--muted-2); font-size: 9.5px; }
@media (max-width: 620px) {
  .portal-pick { grid-template-columns: minmax(0, 1fr); max-height: 230px; }
}

/* Settings */
.ptl-settings { display: flex; flex-direction: column; gap: 14px; }
.ptl-settings .form-grid { margin-top: 0; }

/* Admin responsive */
@media (max-width: 980px) {
  .appx-portal .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptl-grid { grid-template-columns: minmax(0, 1fr); }
  .ptl-span { grid-column: auto; }
}
@media (max-width: 620px) {
  .appx-portal .stat-grid { margin-top: 10px; }
  .ptl-toolbar { gap: 7px; }
  .ptl-search { flex: 1 1 100%; }
  .ptl-toolbar .select,
  .ptl-toolbar .input[type="date"] { flex: 1 1 calc(50% - 4px); min-width: 0; width: auto; }
  .ptl-count { margin-inline-start: auto; }
  .ptl-date { flex: 1 1 calc(50% - 4px); }
  .ptl-date .input { flex: 1; min-width: 0; }
  .ptl-form-grid { grid-template-columns: minmax(0, 1fr); }
  .ptl-gen-list { grid-template-columns: minmax(0, 1fr); max-height: 260px; }
  .ptl-actions { justify-content: flex-start; flex-wrap: wrap; }
  .ptl-facts { gap: 5px 10px; }
  .ptl-strip { align-items: flex-start; }
  .ptl-strip .btn { margin-inline-start: 0; }
}

/* ==========================================================================
   2. Standalone customer portal
   ========================================================================== */
.portal-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 100% -12%, #e7f0ff 0%, rgba(231, 240, 255, 0) 62%),
    radial-gradient(900px 480px at -10% 4%, #eef7f4 0%, rgba(238, 247, 244, 0) 55%),
    linear-gradient(180deg, #f7faff 0%, #eef3fa 100%);
  background-attachment: fixed;
  color: var(--ink);
}

.portal-skip {
  position: absolute; inset-inline-start: -9999px; top: 8px;
  padding: 8px 14px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  text-decoration: none; z-index: 100;
}
.portal-skip:focus { inset-inline-start: 12px; }

.portal-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.portal-topbar-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 9px 18px;
  display: flex; align-items: center; gap: 12px;
  min-height: 60px;
}
.portal-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); }
.portal-brand img { display: block; flex: 0 0 auto; }
.portal-brand-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.portal-brand-copy strong { font-size: 13.5px; letter-spacing: 0.7px; }
.portal-brand-copy small { font-size: 10px; color: var(--muted); }
.portal-topbar-actions { display: flex; align-items: center; gap: 7px; margin-inline-start: auto; flex: 0 0 auto; }
.portal-lang,
.portal-logout {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 99px;
  background: #fff; color: var(--ink-2);
  font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
  transition: border-color 0.15s var(--easing), color 0.15s var(--easing), background 0.15s var(--easing);
}
.portal-lang:hover { border-color: var(--brand); color: var(--brand); }
.portal-logout { color: #a5202f; border-color: #f0ccd2; }
.portal-logout:hover { background: var(--red-soft); }
.portal-logout span[data-icon] { display: inline-flex; }

.portal-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 18px 48px; }
.portal-main:focus { outline: none; }

.portal-boot {
  min-height: 52vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); font-size: 12px;
}
/* Once the dashboard or a job detail is rendered the same element becomes a
   normal content column; the loading centring must not leak into it. */
.portal-boot.portal-ready {
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  color: inherit;
  font-size: inherit;
}
.portal-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--brand-100); border-top-color: var(--brand);
  animation: pt-spin 0.8s linear infinite;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }

.portal-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px 18px; flex-wrap: wrap;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted-2); font-size: 10.5px; text-align: center;
}
.portal-footer-note { color: var(--muted); }

/* Shared primitives ------------------------------------------------------- */
.pt-eyebrow {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--brand);
}
.pt-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 99px;
  font-size: 9.5px; font-weight: 800; line-height: 1;
  white-space: nowrap;
}
.pt-chip.blue { background: var(--brand-50); color: #1550c4; border-color: #d6e4ff; }
.pt-chip.green { background: var(--green-soft); color: #087a63; border-color: #bfe9de; }
.pt-chip.amber { background: #fff5e0; color: #8a5205; border-color: #f3ddb5; }
.pt-chip.red { background: var(--red-soft); color: #a5202f; border-color: #f4cdd4; }
.pt-chip.slate { background: var(--surface-3); color: var(--muted); border-color: var(--line); }

.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 11px;
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: transform 0.12s var(--easing), box-shadow 0.15s var(--easing), background 0.15s var(--easing);
}
.pt-btn.primary {
  background: linear-gradient(180deg, #2a74f2, #155ad8);
  color: #fff; box-shadow: 0 8px 18px rgba(108, 76, 241, 0.24);
}
.pt-btn.primary:hover { background: linear-gradient(180deg, #1f68e6, #0e50c9); }
.pt-btn.primary:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(108, 76, 241, 0.22); }
.pt-btn.wide { width: 100%; }
.pt-btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.pt-text-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px; border: 0; background: none;
  color: var(--brand); font-family: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.pt-text-btn:hover { text-decoration: underline; }
.pt-text-btn:disabled { color: var(--muted-2); cursor: default; text-decoration: none; }

.pt-input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: #fff; color: var(--ink);
  font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.pt-input::placeholder { color: var(--muted-2); }
.pt-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.13); }

.pt-panel {
  margin-top: 16px; padding: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-xs);
}
.pt-panel.no-pad { padding: 18px 0 6px; }
.pt-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pt-panel.no-pad .pt-panel-head { padding: 0 18px; margin-bottom: 10px; }
.pt-panel-head h2 { display: flex; align-items: center; gap: 6px; font-size: 14px; letter-spacing: -0.1px; }
.pt-panel-head h2 svg { color: var(--brand); flex: 0 0 auto; }
.pt-panel-head p { margin: 2px 0 0; color: var(--muted-2); font-size: 10.5px; line-height: 1.55; }

.pt-empty {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 22px 14px; border: 1px dashed var(--line-strong); border-radius: 12px;
  background: var(--surface-2); color: var(--muted); text-align: center;
}
.pt-empty svg { color: var(--muted-2); }
.pt-empty strong { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pt-empty span { font-size: 10.5px; line-height: 1.5; }
.pt-empty.small { padding: 14px 10px; gap: 3px; }
.pt-empty.small strong { font-size: 11px; }
.pt-empty.small svg { width: 20px; height: 20px; }

.pt-form-error,
.pt-form-info {
  display: flex; align-items: flex-start; gap: 7px;
  margin-bottom: 12px; padding: 9px 11px;
  border-radius: 9px; font-size: 11.5px; line-height: 1.6;
}
.pt-form-error { background: var(--red-soft); border: 1px solid #f4cdd4; color: #9c2233; }
.pt-form-info { background: var(--green-soft); border: 1px solid #bfe9de; color: #086b58; }
.pt-form-error svg,
.pt-form-info svg { flex: 0 0 auto; margin-top: 1px; }

.pt-readonly-note {
  display: flex; align-items: flex-start; justify-content: center; gap: 6px;
  max-width: 720px; margin: 16px auto 0; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center;
}
.pt-readonly-note svg { flex: 0 0 auto; margin-top: 1px; color: var(--muted-2); }

.pt-floating {
  position: fixed; inset-inline: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90; max-width: 430px; margin: 0 auto; padding: 11px 14px;
  border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 12px; line-height: 1.5; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pt-float-in 0.18s ease;
}
.pt-floating.error { background: #a5202f; }
.pt-floating.info { background: #1550c4; }
@keyframes pt-float-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Sign-in ---------------------------------------------------------------- */
.pt-auth { display: grid; place-items: center; min-height: calc(100vh - 230px); padding: 10px 0; }
.pt-auth-card {
  width: 100%; max-width: 430px; padding: 28px 26px;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 22px 60px rgba(23, 45, 80, 0.1);
}
.pt-auth-brand {
  width: 52px; height: 52px; margin-bottom: 16px;
  display: grid; place-items: center;
  border-radius: 15px; color: #fff;
  background: linear-gradient(160deg, #2a74f2, #1550c4);
  box-shadow: 0 10px 22px rgba(108, 76, 241, 0.28);
}
.pt-auth-card h1 { margin: 4px 0 6px; font-size: clamp(20px, 4.6vw, 25px); letter-spacing: -0.25px; }
.pt-auth-lead { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.pt-auth-form { display: flex; flex-direction: column; gap: 10px; }
.pt-label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.pt-field-hint { margin: 0; color: var(--muted-2); font-size: 10px; line-height: 1.6; }

.pt-phone-field {
  display: flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: #fff; overflow: hidden;
  transition: border-color 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.pt-phone-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.13); }
.pt-phone-prefix {
  display: inline-flex; align-items: center; height: 44px; padding: 0 12px;
  background: var(--surface-3); border-inline-end: 1px solid var(--line);
  color: var(--muted); font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  flex: 0 0 auto;
}
.pt-phone-field .pt-input {
  height: 44px; border: 0; border-radius: 0;
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.5px;
}
.pt-phone-field .pt-input:focus { box-shadow: none; }

.pt-masked {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 4px; padding: 7px 11px;
  border-radius: 99px; background: var(--brand-50); color: var(--brand-3);
  font-size: 12px; font-weight: 700; direction: ltr;
}
.pt-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; direction: ltr; }
.pt-otp-box {
  width: 100%; height: 52px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-family: var(--mono); font-size: 20px; font-weight: 700; text-align: center;
  outline: none;
  transition: border-color 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.pt-otp-box:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.13); }
.pt-check { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.pt-check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--brand); }
.pt-auth-links { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pt-dev-code {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0; padding: 8px 10px;
  border: 1px dashed #c8d8f2; border-radius: 9px;
  background: var(--surface-2); color: var(--muted); font-size: 10.5px;
}
.pt-dev-code strong { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--brand-3); }
.pt-auth-foot {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 10px; line-height: 1.55;
}
.pt-auth-foot svg { flex: 0 0 auto; margin-top: 1px; }
.pt-auth-hint { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.pt-auth-hint svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }
.pt-auth-message { padding: 8px 10px; border-radius: 8px; background: var(--red-soft); color: #9c2233; font-size: 11.5px; }
.pt-auth-icon {
  width: 56px; height: 56px; margin-bottom: 14px;
  display: grid; place-items: center; border-radius: 16px;
  background: var(--brand-50); color: var(--brand);
}
.pt-auth-card > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.pt-auth-card .pt-btn { margin-top: 16px; }

/* Dashboard -------------------------------------------------------------- */
.pt-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px 24px; border-radius: 22px;
  background: linear-gradient(135deg, #0c3a8c 0%, #155ad8 55%, #2a74f2 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(16, 56, 130, 0.24);
}
.pt-hero::after {
  content: ""; position: absolute; inset-inline-end: -70px; top: -90px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.pt-hero-copy { position: relative; z-index: 1; min-width: 0; }
.pt-hero .pt-eyebrow { color: #bfd7ff; }
.pt-hero h1 { margin: 5px 0 2px; color: #fff; font-size: clamp(21px, 4.2vw, 29px); letter-spacing: -0.3px; }
.pt-hero p { margin: 0; color: #cfe0ff; font-size: 12.5px; }
.pt-hero-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-hero .pt-chip {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #eaf2ff;
  height: 24px; padding: 0 9px;
}

.pt-switch {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px; padding: 0 18px 14px;
}
.pt-gen {
  display: flex; align-items: center; gap: 9px;
  min-width: 0; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-family: inherit; text-align: start; cursor: pointer;
  transition: border-color 0.15s var(--easing), background 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.pt-gen:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pt-gen.active {
  border-color: var(--brand); background: linear-gradient(180deg, var(--surface-2), var(--brand-50));
  box-shadow: inset 0 0 0 1px var(--brand);
}
.pt-gen-icon {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--brand-50); color: var(--brand);
}
.pt-gen.active .pt-gen-icon { background: var(--brand); color: #fff; }
.pt-gen-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.pt-gen-copy strong { font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-gen-copy small { font-size: 9.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-gen-state {
  flex: 0 0 auto; padding: 2px 6px; border-radius: 99px;
  font-size: 9px; font-weight: 800;
}
.pt-gen-state.green { background: var(--green-soft); color: #087a63; }
.pt-gen-state.amber { background: #fff5e0; color: #8a5205; }
.pt-gen-state.red { background: var(--red-soft); color: #a5202f; }
.pt-gen-state.slate { background: var(--surface-3); color: var(--muted); }

.pt-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.pt-kpi {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.pt-kpi-icon {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
}
.pt-kpi-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pt-kpi strong { font-size: 21px; line-height: 1.1; letter-spacing: -0.3px; }
.pt-kpi-copy > span { margin-top: 1px; font-size: 10px; color: var(--muted); line-height: 1.35; }

/* Generator workspace ---------------------------------------------------- */
.pt-workspace { padding: 0; overflow: hidden; }
.pt-gen-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 18px 18px 12px; }
.pt-gen-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pt-gen-badge {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(160deg, #2a74f2, #1550c4); color: #fff;
  box-shadow: 0 6px 14px rgba(108, 76, 241, 0.24);
}
.pt-gen-title h2 { font-size: 15px; letter-spacing: 0.15px; }
.pt-gen-title p { margin: 1px 0 0; color: var(--muted-2); font-size: 10.5px; }
.pt-gen-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

.pt-tabs {
  display: flex; gap: 4px; padding: 0 14px 12px;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tabs button {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  height: 32px; padding: 0 11px;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 10.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s var(--easing), color 0.15s var(--easing);
}
.pt-tabs button:hover { background: var(--surface-3); color: var(--ink-2); }
.pt-tabs button.active { background: var(--brand-50); border-color: #d6e4ff; color: var(--brand-3); }
.pt-tab-body { padding: 16px 18px 18px; }

.pt-overview { display: flex; flex-direction: column; gap: 14px; }
.pt-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.pt-mini { display: flex; gap: 9px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.pt-mini-icon {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); color: var(--brand);
}
.pt-mini > div { min-width: 0; }
.pt-mini small {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.3px;
  text-transform: uppercase; color: var(--muted-2);
}
.pt-mini strong { display: block; margin-top: 1px; font-size: 14px; line-height: 1.35; }
.pt-mini span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.pt-mini .pt-mini-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; }
.pt-mini .pt-mini-meta > span { display: inline; }

.pt-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.pt-tech { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pt-tech .pt-subhead { margin-bottom: 7px; }
.pt-subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pt-subhead h3 { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.pt-subhead h3 svg { color: var(--brand); }

/* Lists and rows --------------------------------------------------------- */
.pt-list { display: flex; flex-direction: column; }
.pt-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 2px; border: 0; border-top: 1px solid var(--line);
  background: none; font-family: inherit; text-align: start; cursor: pointer;
}
.pt-list > .pt-row:first-child { border-top: 0; }
.pt-row.static { cursor: default; }
.pt-row:hover .pt-row-main strong { color: var(--brand); }
.pt-row.static:hover .pt-row-main strong { color: var(--ink); }
.pt-row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.4; }
.pt-row-main strong { display: block; font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.pt-row-main small { font-size: 10px; color: var(--muted-2); }
.pt-row-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  flex: 0 0 auto; text-align: end; color: var(--muted-2); font-size: 10px;
}
.pt-row-meta small { font-size: 9.5px; }
.pt-row-go { flex: 0 0 auto; color: var(--muted-2); display: grid; place-items: center; }
[dir="ltr"] .pt-row-go svg,
[dir="ltr"] .pt-job-go svg { transform: scaleX(-1); }

.pt-filterbar {
  display: flex; align-items: center; gap: 7px; height: 36px;
  margin-bottom: 10px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted);
}
.pt-filterbar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.1); }
.pt-filterbar svg { flex: 0 0 auto; }
.pt-filterbar .pt-input { height: 34px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; }
.pt-filterbar .pt-input:focus { box-shadow: none; }

/* Job cards -------------------------------------------------------------- */
.pt-job-list { display: flex; flex-direction: column; gap: 8px; }
.pt-job-card {
  position: relative; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "top go" "title go" "meta go";
  gap: 2px 8px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-family: inherit; text-align: start; cursor: pointer;
  transition: border-color 0.15s var(--easing), background 0.15s var(--easing), transform 0.15s var(--easing);
}
.pt-job-card:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.pt-job-top { grid-area: top; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pt-job-top strong { font-size: 11.5px; letter-spacing: 0.2px; }
.pt-job-title { grid-area: title; font-size: 12.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pt-job-meta { grid-area: meta; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.pt-job-meta span { display: inline-flex; align-items: center; gap: 3px; }
.pt-job-go { grid-area: go; display: grid; place-items: center; color: var(--muted-2); }

/* Tables ----------------------------------------------------------------- */
.pt-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.pt-table { width: 100%; min-width: 430px; border-collapse: collapse; font-size: 11.5px; }
.pt-table.compact { min-width: 360px; }
.pt-table th {
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted-2);
  font-size: 9px; font-weight: 800; letter-spacing: 0.4px;
  text-align: start; text-transform: uppercase; white-space: nowrap;
}
.pt-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table strong { display: block; font-size: 11.5px; color: var(--ink); }
.pt-table small { display: block; color: var(--muted-2); font-size: 9.5px; }

/* Warranty --------------------------------------------------------------- */
.pt-warranty {
  padding: 14px; border: 1px solid #d7e5ff; border-radius: 14px;
  background: linear-gradient(180deg, #f7faff, #ffffff);
}
.pt-warranty.empty { border-color: var(--line); background: var(--surface-2); }
.pt-warranty-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pt-warranty-head h3 { margin-top: 1px; font-size: 15px; }
.pt-warranty-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.pt-warranty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pt-w-fact { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.pt-w-fact small {
  display: block; font-size: 8.5px; font-weight: 700; letter-spacing: 0.3px;
  text-transform: uppercase; color: var(--muted-2);
}
.pt-w-fact strong { display: block; margin-top: 1px; font-size: 12px; overflow-wrap: anywhere; }
.pt-w-fact span { display: block; color: var(--muted-2); font-size: 9.5px; }
.pt-progress { height: 8px; margin-top: 11px; border-radius: 99px; background: var(--brand-100); overflow: hidden; }
.pt-progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2a74f2, #1550c4); }
.pt-progress-caption { margin: 5px 0 0; color: var(--muted-2); font-size: 10px; }
.pt-warn {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 9px 0 0; padding: 7px 9px;
  border: 1px solid #f3ddb5; border-radius: 8px;
  background: #fffaf0; color: #7a4b06;
  font-size: 10px; line-height: 1.6;
}
.pt-warn svg { flex: 0 0 auto; margin-top: 1px; }
.pt-w-dates { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 0; font-size: 10.5px; }
.pt-w-dates dt { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.pt-w-dates dd { margin: 1px 0 0; font-weight: 600; }
.pt-terms { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pt-terms h4 { margin-bottom: 4px; font-size: 11px; }
.pt-terms p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.pt-warranty .pt-text-btn { margin-top: 10px; }

/* Notices ---------------------------------------------------------------- */
.pt-notice-list { display: flex; flex-direction: column; gap: 8px; }
.pt-notice { padding: 11px 12px; border: 1px solid #f3ddb5; border-radius: 12px; background: #fffdf8; }
.pt-notice.compact { padding: 9px 10px; }
.pt-notice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pt-notice-head > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.pt-notice-type {
  display: inline-flex; align-items: center; gap: 4px;
  color: #8a5205; font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.pt-notice-head strong { font-size: 11.5px; }
.pt-notice > p { margin: 6px 0 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.65; overflow-wrap: anywhere; }
.pt-notice-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 7px 0 0; font-size: 10px; }
.pt-notice-facts div { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.pt-notice-facts dt { color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.pt-notice-facts dd { margin: 0; color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.pt-notice-effect {
  display: flex; align-items: flex-start; gap: 5px;
  margin: 8px 0 0 !important; padding-top: 7px;
  border-top: 1px dashed #f0dcb8;
  color: #8a6a35 !important; font-size: 9.5px !important; line-height: 1.55;
}
.pt-notice-effect svg { flex: 0 0 auto; margin-top: 1px; }

/* Job detail ------------------------------------------------------------- */
.pt-job-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pt-back {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 99px;
  background: #fff; color: var(--ink-2);
  font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.pt-back:hover { border-color: var(--brand); color: var(--brand); }
.pt-job-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 22px; border-radius: 20px;
  background: linear-gradient(135deg, #0c3a8c, #155ad8 60%, #2a74f2);
  color: #fff; box-shadow: 0 16px 36px rgba(16, 56, 130, 0.22);
}
.pt-job-hero .pt-eyebrow { color: #bfd7ff; }
.pt-job-hero h1 { margin: 3px 0; color: #fff; font-size: clamp(20px, 4vw, 26px); }
.pt-job-hero p { margin: 0; color: #cfe0ff; font-size: 12.5px; }
.pt-job-facts { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pt-job-hero .pt-chip { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); color: #eaf2ff; }
.pt-job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.pt-job-grid .pt-panel { margin-top: 14px; }
.pt-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pt-facts div { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.pt-facts dt { color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.pt-facts dd { margin: 1px 0 0; font-size: 11.5px; font-weight: 600; overflow-wrap: anywhere; }
.pt-note-block { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pt-note-block h3 { margin-bottom: 3px; color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.pt-note-block p { margin: 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.7; overflow-wrap: anywhere; }

.pt-checklist { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pt-checklist li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0; border-top: 1px solid var(--line); font-size: 11.5px;
}
.pt-checklist li:first-child { border-top: 0; }
.pt-check-state { flex: 0 0 auto; margin-top: 1px; color: var(--green); }
.pt-check-state.needs_attention,
.pt-check-state.fail { color: var(--red); }
.pt-check-state.not_applicable,
.pt-check-state.na { color: var(--muted-2); }
.pt-checklist strong { display: block; font-weight: 600; }
.pt-checklist small { display: block; color: var(--muted); font-size: 10px; }
.pt-check-result { flex: 0 0 auto; margin-inline-start: auto; color: var(--muted-2); font-size: 9.5px; white-space: nowrap; }

.pt-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 7px; }
.pt-photo { display: block; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.pt-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pt-files { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pt-file {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: var(--ink-2); text-decoration: none;
}
.pt-file:hover { border-color: var(--brand); background: var(--brand-50); }
.pt-file > span { flex: 1; min-width: 0; }
.pt-file strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-file small { display: block; color: var(--muted-2); font-size: 9.5px; }
.pt-file > svg:first-child { flex: 0 0 auto; color: var(--brand); }
.pt-file > svg:last-child { flex: 0 0 auto; color: var(--muted-2); }

/* Ownership, fuel and visit summary ------------------------------------- */
.pt-green { color: #087a63; }
.pt-amber { color: #a25300; }
.pt-red { color: #a5202f; }
.pt-muted-small { color: var(--muted-2); font-size: 10px; line-height: 1.5; }

.pt-asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pt-asset {
  display: flex; flex-direction: column;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.pt-asset.pt-buy { background: linear-gradient(180deg, var(--surface-2), #ffffff); }
.pt-asset.empty { background: var(--surface-2); }
.pt-asset-head { display: flex; align-items: flex-start; gap: 9px; flex-wrap: wrap; }
.pt-asset-head > div { flex: 1 1 130px; min-width: 0; }
.pt-asset-head h3 { margin-top: 1px; font-size: 13px; line-height: 1.4; }
.pt-asset-head .pt-chip { flex: 0 0 auto; margin-inline-start: auto; }
.pt-asset-icon {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
}
.pt-asset-head .pt-eyebrow { display: inline-flex; margin-bottom: 1px; font-size: 8.5px; }
.pt-buy-date { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 13px 0 11px; }
.pt-buy-date strong { font-size: 19px; line-height: 1.2; letter-spacing: -0.2px; }
.pt-buy-date span { color: var(--muted); font-size: 10.5px; }
.pt-asset-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.pt-asset-facts div { min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.pt-asset-facts dt {
  color: var(--muted-2); font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.pt-asset-facts dd { margin: 1px 0 0; font-size: 11px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.pt-asset-note {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 9px 0 0; padding: 8px 9px;
  border: 1px solid #d7e5ff; border-radius: 8px;
  background: #f7faff; color: #1550c4;
  font-size: 10px; line-height: 1.6;
}
.pt-asset-note svg { flex: 0 0 auto; margin-top: 1px; }
.pt-asset .pt-text-btn { margin-top: auto; padding-top: 9px; align-self: flex-start; }

/* Fuel at a glance */
.pt-fuel-main { display: flex; flex-direction: column; margin: 12px 0 10px; }
.pt-fuel-value { display: flex; align-items: baseline; gap: 2px; }
[dir="rtl"] .pt-fuel-value, [dir="rtl"] .pt-fuel-hero-value { justify-content: flex-end; }
.pt-fuel-value strong { font-size: 30px; line-height: 1.1; letter-spacing: -0.6px; }
.pt-fuel-value span { color: var(--muted); font-size: 15px; font-weight: 700; }
.pt-fuel-track { height: 9px; margin-top: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pt-fuel-track span { display: block; height: 100%; border-radius: 99px; transition: width 0.3s var(--easing); }
.pt-fuel-track span.green, .pt-fuel-bar-track .fill.green { background: linear-gradient(90deg, #16a34a, #22a06b); }
.pt-fuel-track span.amber, .pt-fuel-bar-track .fill.amber { background: linear-gradient(90deg, #d97706, #f59e0b); }
.pt-fuel-track span.red, .pt-fuel-bar-track .fill.red { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.pt-fuel-bar-track .fill.slate, .pt-fuel-track span.slate { background: var(--muted-2); }
.pt-fuel-main p { display: flex; align-items: center; gap: 4px; margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.pt-spark {
  display: block; height: 46px;
  margin: 10px 0 6px; padding: 5px 6px;
  border-radius: 8px; background: var(--surface-2);
}
.pt-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pt-spark-area { opacity: 0.13; }
.pt-spark-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pt-spark.green .pt-spark-area { fill: #16a34a; }
.pt-spark.green .pt-spark-line { stroke: #128a52; }
.pt-spark.amber .pt-spark-area { fill: #d97706; }
.pt-spark.amber .pt-spark-line { stroke: #b45309; }
.pt-spark.red .pt-spark-area { fill: #b91c1c; }
.pt-spark.red .pt-spark-line { stroke: #b91c1c; }
.pt-spark.slate .pt-spark-area { fill: var(--muted-2); }
.pt-spark.slate .pt-spark-line { stroke: var(--muted-2); }
/* Arabic reads right to left, so the sparkline's oldest point belongs on the right. */
[dir="rtl"] .pt-spark svg { transform: scaleX(-1); }
.pt-time { font-variant-numeric: tabular-nums; white-space: nowrap; }

.pt-fuel-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 21px; padding: 0 8px; border-radius: 99px;
  font-size: 10px; font-weight: 800; white-space: nowrap;
}
.pt-fuel-pill.green { background: var(--green-soft); color: #087a63; }
.pt-fuel-pill.amber { background: #fff5e0; color: #8a5205; }
.pt-fuel-pill.red { background: var(--red-soft); color: #a5202f; }
.pt-fuel-pill.slate { background: var(--surface-3); color: var(--muted); }

/* Full fuel history */
.pt-fuel-page { display: flex; flex-direction: column; gap: 14px; }
.pt-fuel-hero {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px; padding: 16px; border: 1px solid #d7e5ff; border-radius: 16px;
  background: linear-gradient(150deg, #f2f8ff, #ffffff);
}
.pt-fuel-hero-main { min-width: 0; }
.pt-fuel-hero-value { display: flex; align-items: baseline; gap: 2px; margin-top: 2px; }
.pt-fuel-hero-value strong { font-size: 42px; line-height: 1.05; letter-spacing: -1px; }
.pt-fuel-hero-value span { color: var(--muted); font-size: 18px; font-weight: 700; }
.pt-fuel-hero-main p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.pt-fuel-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pt-fuel-hero-stats div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pt-fuel-hero-stats small {
  display: block; color: var(--muted-2); font-size: 8.5px;
  font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
}
.pt-fuel-hero-stats strong { display: block; margin-top: 1px; font-size: 14px; line-height: 1.3; }
.pt-fuel-gauge { height: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pt-fuel-gauge span { display: block; height: 100%; border-radius: 99px; }
.pt-fuel-gauge span.green { background: linear-gradient(90deg, #16a34a, #22a06b); }
.pt-fuel-gauge span.amber { background: linear-gradient(90deg, #d97706, #f59e0b); }
.pt-fuel-gauge span.red { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.pt-fuel-gauge span.slate { background: var(--muted-2); }
.pt-fuel-history { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }

.pt-fuel-chart { display: flex; align-items: stretch; gap: 8px; padding: 8px 2px 0; overflow-x: auto; }
.pt-fuel-scale {
  display: flex; flex-direction: column; justify-content: space-between;
  padding-bottom: 22px; color: var(--muted-2); font-size: 8.5px; text-align: end;
}
.pt-fuel-bars {
  display: grid; grid-template-columns: repeat(var(--bars, 6), minmax(28px, 72px));
  justify-content: center; gap: 6px 18px; align-items: end; flex: 1; min-width: 0;
}
.pt-fuel-bar {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 0; padding: 0; border: 0; background: none;
  font-family: inherit; cursor: pointer;
}
.pt-fuel-bar-value { color: var(--muted-2); font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.pt-fuel-bar-track {
  display: flex; align-items: flex-end; width: 100%; height: 120px;
  border-radius: 8px 8px 4px 4px; background: var(--surface-2); overflow: hidden;
}
.pt-fuel-bar-track .fill { display: block; width: 100%; border-radius: 5px 5px 0 0; }
.pt-fuel-bar-date { color: var(--muted-2); font-size: 8.5px; white-space: nowrap; }
.pt-fuel-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 9px; }

/* Job list summary */
.pt-job-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pt-job-summary div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.pt-job-summary small {
  display: block; color: var(--muted-2); font-size: 8.5px;
  font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
}
.pt-job-summary strong { display: block; margin-top: 1px; font-size: 15px; line-height: 1.3; }
.pt-job-summary strong.warn { color: var(--red); }
.pt-job-meta .fuel { color: #087a63; font-weight: 700; }
.pt-job-meta .warn { color: #a25300; font-weight: 700; }

/* Approved visit report */
.pt-visit-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.pt-vstat {
  display: flex; gap: 9px; min-width: 0; padding: 11px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: var(--shadow-xs);
}
.pt-vstat-icon {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--brand-50); color: var(--brand);
}
.pt-vstat > div { min-width: 0; }
.pt-vstat small {
  display: block; color: var(--muted-2); font-size: 8.5px;
  font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
}
.pt-vstat strong { display: block; margin-top: 1px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.pt-vstat span { display: block; color: var(--muted); font-size: 9.5px; line-height: 1.5; overflow-wrap: anywhere; }
.pt-vstat span.warn { color: #a25300; font-weight: 700; }

.pt-visit-grid { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr); gap: 0 14px; align-items: start; }
.pt-visit-grid .pt-panel { margin-top: 14px; }
.pt-side-note {
  display: flex; align-items: flex-start; gap: 5px;
  margin: 11px 0 0; padding-top: 9px; border-top: 1px dashed var(--line-strong);
  color: var(--muted-2); font-size: 9.5px; line-height: 1.55;
}
.pt-side-note svg { flex: 0 0 auto; margin-top: 1px; }
.pt-facts-tight { gap: 6px; }
.pt-facts-tight div { padding: 6px 8px; }
.pt-facts-tight dd { font-size: 11px; }
.pt-note-block.pt-note-strong {
  padding: 10px 11px; border: 1px solid #d7e5ff; border-radius: 10px;
  background: #f7faff;
}
.pt-note-block.pt-note-strong h3 { display: flex; align-items: center; gap: 4px; color: var(--brand-3); }
.pt-note-block.pt-note-strong p { color: var(--ink); }
.pt-check-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.pt-panel.pt-span-2,
.pt-job-grid > .pt-span-2 { grid-column: 1 / -1; }

/* Visit timeline */
.pt-timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 4px 0 14px; }
.pt-tl { position: relative; min-width: 0; padding: 24px 4px 0; text-align: center; }
.pt-tl::before {
  content: ''; position: absolute; top: 9px; inset-inline: 0;
  height: 2px; background: var(--line-strong);
}
.pt-tl:first-child::before { inset-inline-start: 50%; }
.pt-tl:last-child::before { inset-inline-end: 50%; }
.pt-tl.done::before { background: #b8d2ff; }
.pt-tl-dot {
  position: absolute; top: 1px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 18px; display: grid; place-items: center;
  border: 2px solid var(--line-strong); border-radius: 50%;
  background: #fff; color: var(--muted-2);
}
.pt-tl.done .pt-tl-dot { border-color: var(--brand); background: var(--brand); color: #fff; }
.pt-tl strong { display: block; font-size: 10px; line-height: 1.4; }
.pt-tl small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9px; line-height: 1.45; }

/* Portal responsive ------------------------------------------------------ */
@media (max-width: 940px) {
  /* Five equal summary cards fit a tablet in one row; three columns left a
     lopsided second row with two cards beside an empty cell. */
  .pt-kpis { gap: 7px; }
  .pt-kpi { padding: 10px; gap: 8px; }
  .pt-kpi-icon { width: 30px; height: 30px; }
  .pt-kpi strong { font-size: 19px; }
  .pt-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* One full-width asset card per row avoids the stretched, half-empty
     purchase card that two narrow tablet columns used to create. */
  .pt-asset-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-split { grid-template-columns: minmax(0, 1fr); }
  .pt-job-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-visit-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-warranty-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .portal-topbar-inner { padding: 8px 13px; min-height: 56px; }
  .portal-brand img { width: 30px; height: 30px; }
  .portal-brand-copy strong { font-size: 12.5px; }
  .portal-brand-copy small { font-size: 9px; }
  .portal-main { padding: 14px 13px 40px; }
  .portal-footer { padding: 14px 13px calc(16px + env(safe-area-inset-bottom)); font-size: 9.5px; }

  .pt-auth { min-height: calc(100vh - 200px); }
  .pt-auth-card { padding: 22px 18px; border-radius: 18px; }
  .pt-auth-brand { width: 46px; height: 46px; border-radius: 13px; margin-bottom: 13px; }
  .pt-otp { gap: 5px; }
  .pt-otp-box { height: 48px; font-size: 18px; border-radius: 9px; }

  .pt-hero { padding: 20px 18px; border-radius: 18px; }
  .pt-hero-meta { width: 100%; }
  .pt-switch { grid-template-columns: minmax(0, 1fr); padding: 0 14px 12px; }
  .pt-panel { padding: 14px; border-radius: 16px; margin-top: 13px; }
  .pt-panel.no-pad { padding: 14px 0 4px; }
  .pt-panel.no-pad .pt-panel-head { padding: 0 14px; }
  .pt-panel-head h2 { font-size: 13.5px; }
  .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
  .pt-kpi { padding: 10px; gap: 8px; border-radius: 12px; }
  .pt-kpi-icon { width: 30px; height: 30px; border-radius: 9px; }
  .pt-kpi strong { font-size: 19px; }
  .pt-kpi:last-child { grid-column: 1 / -1; }

  .pt-gen-head { padding: 14px 14px 10px; }
  .pt-gen-badge { width: 38px; height: 38px; border-radius: 11px; }
  .pt-gen-title h2 { font-size: 14px; }
  .pt-tabs { padding: 0 10px 10px; }
  .pt-tab-body { padding: 13px 14px 15px; }
  .pt-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .pt-mini { padding: 9px; gap: 7px; border-radius: 10px; }
  .pt-mini-icon { width: 26px; height: 26px; }
  .pt-mini strong { font-size: 12.5px; }

  .pt-warranty { padding: 12px; border-radius: 12px; }
  .pt-warranty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pt-w-fact { padding: 6px 8px; }
  .pt-w-fact strong { font-size: 11.5px; }

  .pt-job-hero { padding: 18px 16px; border-radius: 16px; }
  .pt-job-grid { gap: 0; }
  .pt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pt-asset-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pt-visit-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
  .pt-vstat { padding: 9px; gap: 7px; border-radius: 10px; }
  .pt-vstat-icon { width: 27px; height: 27px; }
  .pt-vstat strong { font-size: 12px; }
  .pt-fuel-hero { grid-template-columns: minmax(0, 1fr); padding: 14px; border-radius: 14px; }
  .pt-fuel-hero-value strong { font-size: 36px; }
  .pt-fuel-history { padding: 12px; border-radius: 12px; }
  .pt-fuel-bar-track { height: 100px; }
  .pt-job-summary div { padding: 8px 9px; }
  .pt-job-summary strong { font-size: 13px; }
  .pt-notice-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-photos { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }

  .pt-table { min-width: 380px; font-size: 11px; }
  .pt-table.compact { min-width: 330px; }
  .pt-table th, .pt-table td { padding: 7px 8px; }
  .pt-readonly-note { font-size: 9.5px; }
}

/* Phones cannot scroll a wide table comfortably and the date/job columns fall
   outside the screen. Below 560px every record row becomes its own card with
   the column name beside each value, so nothing is clipped. */
@media (max-width: 560px) {
  .pt-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .pt-table, .pt-table.compact { display: block; min-width: 0; width: 100%; font-size: 11.5px; }
  .pt-table thead { display: none; }
  .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: auto; }
  .pt-table tr {
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
    padding: 8px 12px; margin-bottom: 8px;
  }
  .pt-table tr:last-child { margin-bottom: 0; }
  .pt-table td {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline;
    gap: 10px; padding: 3px 0; border: 0; text-align: start;
  }
  .pt-table td::before { content: attr(data-label); color: var(--muted); font-size: 10.5px; font-weight: 600; }
  .pt-table td > * { grid-column: 2; justify-self: start; }
  .pt-table td > small { display: block; color: var(--muted); margin-top: 2px; }
  .pt-part-cell strong, .pt-part-cell small { display: block; }
  .pt-part-cell small { color: var(--muted); margin-top: 2px; }
  /* Codes keep dir="ltr"; inside the stacked card their alignment still has to
     follow the page side, not their own direction. */
  [dir="rtl"] .pt-table td [dir="ltr"] { text-align: right; }
  [dir="ltr"] .pt-table td [dir="ltr"] { text-align: left; }

  /* Three horizontal timeline steps leave each date a few pixels wide on a
     phone. Stack them into a readable vertical track instead. */
  .pt-timeline { grid-auto-flow: row; grid-auto-columns: auto; gap: 6px; }
  .pt-tl {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
    gap: 2px 9px; padding: 8px 10px; text-align: start;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  }
  .pt-tl::before { display: none; }
  .pt-tl-dot {
    position: static; grid-row: 1 / span 2; width: 22px; height: 22px;
    transform: none; inset-inline-start: auto; border-width: 0;
  }
  .pt-tl strong { font-size: 10.5px; }
  .pt-tl small { margin-top: 0; font-size: 9.5px; }
}
@media (max-width: 400px) {
  .portal-brand-copy small { display: none; }
  .pt-hero h1 { font-size: 19px; }
  .pt-otp { gap: 4px; }
  .pt-otp-box { height: 44px; font-size: 17px; }
  .pt-facts { grid-template-columns: minmax(0, 1fr); }
  .portal-lang, .portal-logout { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-body *, .portal-body *::before, .portal-body *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Portal v2 — password sign-in, dashboard cards, generator page, chrome
   ========================================================================== */

/* ---- topbar chrome: bell + account ------------------------------------- */
.portal-bell-wrap, .portal-account-wrap { position: relative; }
.portal-bell, .portal-account {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted); cursor: pointer;
  transition: border-color 0.15s var(--easing), color 0.15s var(--easing), background 0.15s var(--easing);
}
.portal-bell:hover, .portal-account:hover { border-color: var(--brand); color: var(--brand); }
.portal-bell { position: relative; }
.portal-bell-badge {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 99px; background: #d2323f; color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 1; border: 2px solid #fff;
}
.portal-bell.has-alerts { color: #a5202f; border-color: #f4cdd4; }
.portal-account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; }
.pt-dropdown {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  width: min(330px, calc(100vw - 28px)); z-index: 60;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 34, 74, 0.16);
  overflow: hidden;
}
.portal-account-menu { width: 220px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pt-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 9px; background: none;
  color: var(--ink, #1c2b45); font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: start;
}
.pt-menu-item:hover { background: var(--brand-50); color: var(--brand); }
.pt-menu-item svg { flex: 0 0 auto; color: var(--muted); }
.pt-menu-item:hover svg { color: var(--brand); }

/* bell panel content */
.pt-bell-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); font-size: 12px;
}
.pt-bell-head svg { color: var(--brand); }
.pt-bell-head .pt-chip { margin-inline-start: auto; }
.pt-bell-list { max-height: 320px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pt-bell-item {
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  width: 100%; padding: 9px 10px; border: 0; border-radius: 10px;
  background: none; cursor: pointer; text-align: start; font: inherit;
}
.pt-bell-item:hover { background: var(--surface-2); }
.pt-bell-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-bell-item-main strong { font-size: 12px; }
.pt-bell-item-main small { color: var(--muted); font-size: 10px; }
.pt-bell-item-meta { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.pt-bell-item-meta small { color: var(--muted-2); font-size: 9.5px; }
.pt-bell-empty {
  display: flex; align-items: center; gap: 9px; padding: 18px 14px;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.pt-bell-empty svg { color: var(--green); }
.pt-bell-foot {
  margin: 0; padding: 9px 13px; border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 10px; display: flex; align-items: center; gap: 6px;
}

/* ---- dashboard stat cards ----------------------------------------------- */
.pt-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.pt-stat {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.pt-stat-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pt-stat-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pt-stat-copy strong { font-size: 21px; letter-spacing: -0.3px; line-height: 1.1; }
.pt-stat-copy span { margin-top: 2px; font-size: 10px; color: var(--muted); line-height: 1.35; }
.pt-stat.blue .pt-stat-icon { background: var(--brand-50); color: var(--brand); }
.pt-stat.green .pt-stat-icon { background: var(--green-soft); color: var(--green); }
.pt-stat.amber .pt-stat-icon { background: var(--amber-soft); color: var(--amber); }
.pt-stat.slate .pt-stat-icon { background: var(--surface-3); color: var(--muted); }
.pt-stat.violet .pt-stat-icon { background: #f3efff; color: #6d28d9; }
.pt-stat.violet strong { color: #5527b8; }

/* ---- generator cards ----------------------------------------------------- */
.pt-panel-body { padding: 13px 14px 14px; }
.pt-gen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pt-gen-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; transition: box-shadow 0.18s var(--easing), border-color 0.18s var(--easing); }
.pt-gen-card:hover { border-color: var(--brand-100); box-shadow: 0 10px 26px rgba(15, 34, 74, 0.09); }
.pt-gen-card-open {
  display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0;
  border: 0; background: none; cursor: pointer; font: inherit; text-align: start;
  color: inherit;
}
.pt-gen-card-media { height: 118px; background: linear-gradient(160deg, var(--surface-3), #e8eefb); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pt-gen-card-media img { width: 100%; height: 100%; object-fit: cover; }
.pt-gen-card-ph { color: #9fb0cd; }
.pt-gen-card-ph svg { width: 44px; height: 44px; }
.pt-gen-card-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 13px 13px; }
.pt-gen-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pt-gen-card-head strong { font-size: 13.5px; letter-spacing: 0.2px; }
.pt-chip-row { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pt-gen-card-title { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pt-gen-card-facts { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.pt-gen-card-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pt-gen-card-facts dt { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 10px; font-weight: 600; white-space: nowrap; }
.pt-gen-card-facts dt svg { color: var(--brand); opacity: 0.75; }
.pt-gen-card-facts dd { margin: 0; font-size: 10.5px; color: var(--ink, #1c2b45); text-align: end; min-width: 0; }
.pt-gen-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; padding-top: 9px; border-top: 1px dashed var(--line); }
.pt-gen-card-go { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-size: 11px; font-weight: 700; }

/* ---- generator detail page head ----------------------------------------- */
.pt-genpage-head { display: flex; gap: 15px; align-items: flex-start; }
.pt-genpage-media {
  flex: 0 0 148px; width: 148px; height: 112px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(160deg, var(--surface-3), #e8eefb);
  display: flex; align-items: center; justify-content: center;
}
.pt-genpage-media img { width: 100%; height: 100%; object-fit: cover; }
.pt-genpage-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pt-genpage-copy h1 { margin: 0; font-size: 21px; letter-spacing: -0.3px; }
.pt-genpage-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.pt-genpage-copy .pt-chip-row { margin-top: 2px; }

/* ---- login: mode switch + password field --------------------------------- */
.pt-mode {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin: 12px 0 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
}
.pt-mode-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.pt-mode-tab.active { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(15, 34, 74, 0.1); }
.pt-password-field { position: relative; }
.pt-password-field .pt-input { padding-inline-end: 40px; }
.pt-eye {
  position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: none; color: var(--muted-2); cursor: pointer;
}
.pt-eye:hover { color: var(--brand); background: var(--brand-50); }

/* ---- hour-meter tab ------------------------------------------------------- */
.pt-hours-page { display: flex; flex-direction: column; gap: 14px; }
.pt-hours-hero {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  padding: 15px 16px; border: 1px solid var(--brand-100); border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-50), #fff);
}
.pt-hours-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pt-hours-value { display: flex; align-items: baseline; gap: 6px; margin: 3px 0 2px; }
.pt-hours-value strong { font-size: 34px; line-height: 1; letter-spacing: -1px; color: var(--brand); }
.pt-hours-value span { color: var(--muted); font-size: 12px; font-weight: 600; }
.pt-hours-main p { margin: 0; font-size: 11.5px; color: var(--muted); }
.pt-hours-note {
  flex: 0 1 230px; display: flex; gap: 7px; align-items: flex-start;
  color: var(--muted-2); font-size: 10.5px; line-height: 1.6;
}
.pt-hours-note svg { flex: 0 0 auto; margin-top: 2px; }
.pt-next-service {
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.pt-next-service.overdue { border-color: #f4cdd4; background: linear-gradient(180deg, #fff7f8, #fff); }
.pt-next-service.empty { background: var(--surface-2); }
.pt-next-service .pt-subhead { margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.pt-next-service .pt-subhead .pt-chip { margin-inline-start: auto; }
.pt-progress span.over { background: linear-gradient(90deg, #e0475a, #b92535); }
.pt-doc-actions { display: inline-flex; align-items: center; gap: 10px; }
.pt-doc-actions .pt-text-btn { text-decoration: none; }

.pt-hero-lead { margin: 6px 0 0; max-width: 620px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.pt-hero-sub { margin: 4px 0 0; color: var(--muted-2); font-size: 11px; font-weight: 600; }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 960px) {
  .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pt-gen-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-genpage-head { flex-direction: column; }
  .pt-genpage-media { width: 100%; flex-basis: auto; height: 150px; }
  .pt-hours-hero { flex-direction: column; }
  .pt-hours-note { flex-basis: auto; }
  .portal-account-name { display: none; }
  .portal-account { padding: 0 9px; }
  .pt-dropdown { position: fixed; top: 58px; inset-inline-start: 10px; inset-inline-end: 10px; width: auto; }
}
/* ==========================================================================
   3. Customer portal V2 — Blue Flag identity and hub pages (2026-11)
   Everything is scoped to .portal-body so the ERP administration keeps its
   own palette; the portal alone switches to the Blue Flag blue.
   ========================================================================== */
.portal-body {
  --brand: #2454c5;
  --brand-2: #1d47ad;
  --brand-3: #173e9f;
  --brand-50: #eef3ff;
  --brand-100: #dfe8fd;
  --brand-200: #c7d8fb;
  --brand-300: #a9c2f7;
  --ink: #16233b;
  --ink-2: #2c3c58;
  --muted: #6b7a95;
  --muted-2: #8c99b0;
  --line: #e6ebf5;
  --line-strong: #d3dcec;
  --surface-2: #f7f9fd;
  --surface-3: #eef2f9;
  --shadow-xs: 0 1px 2px rgba(20, 40, 80, 0.05);
}

.portal-topbar-inner { max-width: 1180px; }
.portal-main { max-width: 1180px; }

/* Brand ------------------------------------------------------------------ */
.portal-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(150deg, #1d47ad, #1b76cc);
  box-shadow: 0 4px 12px rgba(29, 71, 173, 0.28);
}
.portal-brand-mark img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.portal-brand-copy strong { font-size: 14.5px; letter-spacing: 1.1px; color: #2c4cb4; }
.portal-brand-copy small { font-size: 9.5px; color: var(--muted); }
.portal-brand:hover .portal-brand-copy strong { color: var(--brand-2); }

/* Desktop top navigation ------------------------------------------------- */
.portal-nav-wrap {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}
.portal-nav {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(8, max-content);
  justify-content: center; align-items: center; gap: 2px 1px;
  padding: 5px 16px;
}

.portal-nav::-webkit-scrollbar { display: none; }
.portal-nav button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 11px;
  border: 1px solid transparent; border-radius: 9px;
  background: none; color: var(--ink-2);
  font: inherit; font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer; flex: 0 0 auto;
  transition: background 0.15s var(--easing), color 0.15s var(--easing), border-color 0.15s var(--easing);
}
.portal-nav button svg { color: var(--muted); flex: 0 0 auto; transition: color 0.15s var(--easing); }
.portal-nav button:hover { background: var(--surface-2); color: var(--brand-2); }
.portal-nav button:hover svg { color: var(--brand); }
.portal-nav button.active {
  background: #ecf1ff; border-color: #d9e3fb; color: #3158c0;
}
.portal-nav button.active svg { color: #3158c0; }

/* Mobile bottom navigation ---------------------------------------------- */
.portal-bottom {
  display: none;
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.portal-bottom button {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: 52px;
  border: 0; border-radius: 10px;
  background: none; color: var(--muted);
  font: inherit; font-size: 9px; font-weight: 700;
  cursor: pointer;
}
.portal-bottom button svg { color: var(--muted); }
.portal-bottom button.active { color: var(--brand-3); background: var(--brand-50); }
.portal-bottom button.active svg { color: var(--brand); }
.portal-bottom button span {
  display: block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* "More" sheet ----------------------------------------------------------- */
.portal-more-sheet {
  display: none;
  position: fixed; inset-inline: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 55;
  max-height: 62vh; overflow-y: auto;
  padding: 12px 14px 16px;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -18px 40px rgba(15, 34, 74, 0.16);
}
.portal-more-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.portal-more-head strong { font-size: 12.5px; color: var(--ink-2); }
.portal-more-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--muted); cursor: pointer;
}
.portal-more-close:hover { color: var(--ink); border-color: var(--line-strong); }
.portal-more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.portal-more-grid button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; min-height: 66px; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2);
  font: inherit; font-size: 9.5px; font-weight: 700; text-align: center;
  cursor: pointer;
}
.portal-more-grid button svg { color: var(--muted); }
.portal-more-grid button span { max-width: 100%; line-height: 1.3; }
.portal-more-grid button.active { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-3); }
.portal-more-grid button.active svg { color: var(--brand); }

/* Page head -------------------------------------------------------------- */
.pt-page-head { margin: 2px 0 16px; }
.pt-page-head h1 {
  margin: 5px 0 4px; font-size: clamp(20px, 3.4vw, 24px);
  letter-spacing: -0.35px; color: var(--ink);
}
.pt-page-head p { margin: 0; max-width: 760px; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* Toolbar ---------------------------------------------------------------- */
.pt-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px;
}
.pt-searchbar {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 260px; min-width: 0; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted);
  transition: border-color 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.pt-searchbar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36, 84, 197, 0.12); }
.pt-searchbar > svg { flex: 0 0 auto; }
.pt-searchbar .pt-input {
  flex: 1; min-width: 0; height: 36px; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font-size: 12.5px;
}
.pt-searchbar .pt-input:focus { box-shadow: none; }
.pt-select {
  width: auto; min-width: 150px; flex: 0 0 auto;
  height: 38px; padding-block: 0; font-size: 12px;
}
.pt-count { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; }

.pt-segmented {
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  padding: 3px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2);
}
.pt-segmented button {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px;
  border: 0; border-radius: 7px; background: none;
  color: var(--muted); font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.pt-segmented button svg { color: currentColor; }
.pt-segmented button.active { background: #fff; color: var(--brand-3); box-shadow: 0 1px 4px rgba(15, 34, 74, 0.12); }

/* Quick access ----------------------------------------------------------- */
.pt-quick {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px; margin-top: 14px;
}
.pt-quick button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-height: 76px; padding: 12px 6px;
  border: 1px solid var(--line); border-radius: 13px;
  background: #fff; color: var(--ink-2);
  font: inherit; font-size: 10.5px; font-weight: 700; text-align: center;
  cursor: pointer;
  transition: border-color 0.15s var(--easing), background 0.15s var(--easing), transform 0.15s var(--easing);
}
.pt-quick button svg { color: var(--brand); }
.pt-quick button:hover {
  border-color: var(--brand-200); background: var(--brand-50);
  transform: translateY(-1px);
}

/* Generator cards: selection + compare ---------------------------------- */
.pt-gen-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-100); }
.pt-gen-card-actions { padding: 0 13px 12px; }
.pt-compare-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 32px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--ink-2);
  font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer;
  transition: border-color 0.15s var(--easing), color 0.15s var(--easing), background 0.15s var(--easing);
}
.pt-compare-toggle:hover { border-color: var(--brand); color: var(--brand); }
.pt-compare-toggle.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-3); }

.pt-compare-tray {
  position: fixed; inset-inline: 0; bottom: 18px; z-index: 45;
  width: fit-content; max-width: calc(100% - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #173e9f, #2454c5);
  color: #fff;
  box-shadow: 0 16px 34px rgba(16, 40, 100, 0.34);
}
.pt-compare-tray > span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; }
.pt-compare-tray .pt-btn { height: 32px; padding: 0 13px; font-size: 11px; }
.pt-compare-tray .pt-btn.primary {
  background: #fff; color: var(--brand-3); box-shadow: none;
}
.pt-compare-tray .pt-btn.primary:hover { background: #eaf1ff; }
.pt-compare-tray .pt-text-btn { color: #cfdcff; }
.pt-compare-tray .pt-text-btn:hover { color: #fff; }

/* Comparison table ------------------------------------------------------- */
.pt-compare-wrap {
  overflow-x: auto; margin-top: 4px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
}
.pt-compare { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 11.5px; }
.pt-compare thead th {
  padding: 12px 12px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); text-align: start; vertical-align: top;
}
.pt-compare thead th strong { display: block; font-size: 12.5px; color: var(--ink); }
.pt-compare thead th .pt-text-btn { margin-top: 4px; font-size: 10px; }
.pt-compare tbody th {
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 10.5px; font-weight: 600; text-align: start;
  white-space: nowrap; vertical-align: top;
}
.pt-compare td {
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: top;
}
.pt-compare tbody tr:last-child th,
.pt-compare tbody tr:last-child td { border-bottom: 0; }
.pt-compare td small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9.5px; }

/* Status page ------------------------------------------------------------ */
.pt-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pt-status-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-xs);
}
.pt-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pt-status-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-status-head strong { font-size: 14.5px; letter-spacing: 0.2px; color: var(--ink); }
.pt-status-head small { color: var(--muted-2); font-size: 10.5px; }
.pt-status-head .pt-chip { flex: 0 0 auto; }
.pt-status-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pt-status-facts > div {
  min-width: 0; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.pt-status-facts dt {
  display: flex; align-items: center; gap: 4px;
  color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: 0.2px;
}
.pt-status-facts dt svg { flex: 0 0 auto; color: var(--brand); opacity: 0.8; }
.pt-status-facts dd {
  margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--ink);
  line-height: 1.35; overflow-wrap: anywhere;
}
.pt-status-facts dd.warn { color: #a25300; }
.pt-status-facts dd small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
.pt-status-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.pt-status-foot .pt-text-btn { font-size: 10.5px; }

.pt-honesty {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 14px 0 0; padding: 11px 13px;
  border: 1px solid #d6e4ff; border-radius: 12px;
  background: #f2f6ff; color: #33456b;
  font-size: 10.5px; line-height: 1.65;
}
.pt-honesty svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }

/* Maintenance ------------------------------------------------------------ */
.pt-maint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pt-maint-card {
  display: flex; flex-direction: column; gap: 11px;
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-xs);
}
.pt-maint-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pt-maint-head > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pt-maint-head strong { font-size: 13.5px; color: var(--ink); }
.pt-maint-head small { color: var(--muted-2); font-size: 10px; }
.pt-maint-head .pt-chip { flex: 0 0 auto; }
.pt-maint-gauge { display: flex; flex-direction: column; gap: 9px; }
.pt-maint-gauge .pt-progress { margin-top: 0; }
.pt-maint-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pt-maint-figures > div {
  min-width: 0; padding: 7px 8px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2);
}
.pt-maint-figures small { display: block; color: var(--muted-2); font-size: 8.5px; font-weight: 700; }
.pt-maint-figures strong { display: block; margin-top: 1px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.pt-maint-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; margin: 0; }
.pt-maint-facts dt { color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: 0.2px; text-transform: uppercase; }
.pt-maint-facts dd { margin: 1px 0 0; font-size: 11px; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.pt-maint-note {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.55;
}
.pt-maint-note svg { flex: 0 0 auto; margin-top: 1px; }
.pt-maint-card .pt-text-btn { align-self: flex-start; }
.pt-progress.amber span { background: linear-gradient(90deg, #e9a23b, #c9820f); }
.pt-progress.red span { background: linear-gradient(90deg, #e0475a, #b92535); }

/* Inspections ------------------------------------------------------------ */
.pt-test-block { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.pt-test-block:first-child { padding-top: 2px; }
.pt-test-block:last-child { border-bottom: 0; padding-bottom: 0; }
.pt-test-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.pt-test-head > div:first-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pt-test-head strong { font-size: 12.5px; color: var(--ink); }
.pt-test-head small { color: var(--muted-2); font-size: 10px; }
.pt-test-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pt-test-list li {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-2);
}
.pt-test-list li:first-child { border-top: 0; }
.pt-test-list li > span { min-width: 0; line-height: 1.55; }
.pt-test-list small { display: block; color: var(--muted-2); font-size: 9.5px; }
.pt-test-list .pt-chip { flex: 0 0 auto; margin-top: 1px; }
.pt-test-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pt-test-section {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2);
  font-size: 10.5px; color: var(--ink-2); font-weight: 600;
}
.pt-test-section > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.pt-test-section > span svg { flex: 0 0 auto; color: var(--muted-2); }

/* 360° timeline ---------------------------------------------------------- */
.pt-tl-month { margin-top: 4px; }
.pt-tl-month + .pt-tl-month { margin-top: 18px; }
.pt-tl-month h3 {
  margin: 0 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.pt-tl-list { display: flex; flex-direction: column; gap: 6px; }
.pt-tl-item {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  direction: inherit;
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fff; color: var(--ink-2); font: inherit; text-align: start;
  cursor: pointer;
  transition: border-color 0.15s var(--easing), background 0.15s var(--easing);
}
.pt-tl-item:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pt-tl-dot {
  position: static; inset: auto; transform: none; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 9px;
  background: var(--brand-50); color: var(--brand);
}
.pt-tl-dot.green { background: var(--green-soft); color: #087a63; }
.pt-tl-dot.amber { background: #fff5e0; color: #8a5205; }
.pt-tl-dot.slate { background: var(--surface-3); color: var(--muted); }
.pt-tl-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.4; }
.pt-tl-main strong { font-size: 11.5px; color: var(--ink); }
.pt-tl-main small { color: var(--muted-2); font-size: 9.5px; }
.pt-tl-main > span { color: var(--muted); font-size: 10px; }
.pt-tl-date { flex: 0 0 auto; color: var(--muted-2); font-size: 10px; white-space: nowrap; }

/* Safety ----------------------------------------------------------------- */
.pt-safety-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pt-safety-layout > .pt-panel { margin: 0; }
.pt-safety-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pt-safety-list li {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.pt-safety-list li:first-child { border-top: 0; padding-top: 2px; }
.pt-safety-list li > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.pt-safety-list strong { font-size: 11.5px; color: var(--ink); }
.pt-safety-list small { color: var(--muted-2); font-size: 9.5px; }
.pt-safety-list li > span > span { color: var(--muted); font-size: 10.5px; }
.pt-safety-list .pt-chip { flex: 0 0 auto; margin-top: 1px; }

/* Warranty hub ----------------------------------------------------------- */
.pt-warranty-hub {
  margin-bottom: 12px; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  box-shadow: var(--shadow-xs);
}
.pt-warranty-hub-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.pt-warranty-hub-head > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pt-warranty-hub-head strong { font-size: 13.5px; color: var(--ink); }
.pt-warranty-hub-head small { color: var(--muted-2); font-size: 10px; }
.pt-warranty-hub .pt-warranty { border: 0; padding: 0; background: none; box-shadow: none; }
.pt-policy-list { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pt-policy-list li {
  position: relative; padding-inline-start: 17px;
  color: var(--ink-2); font-size: 11px; line-height: 1.65;
}
.pt-policy-list li::before {
  content: ""; position: absolute; inset-inline-start: 3px; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-300);
}

/* Documents -------------------------------------------------------------- */
.pt-doc-link {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 9px;
  border: 1px solid var(--brand-200); border-radius: 8px;
  background: var(--brand-50); color: var(--brand-3);
  font-size: 10.5px; font-weight: 700; text-decoration: none;
  white-space: nowrap;
}
.pt-doc-link:hover { background: #e3ecff; border-color: var(--brand-300); }
.pt-table.wide { min-width: 620px; }
.pt-part-cell { display: flex; flex-direction: column; min-width: 0; }
.pt-part-cell strong { display: block; color: var(--ink); font-size: 11.5px; }
.pt-part-cell small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9.5px; }
.pt-muted { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

/* Environment ------------------------------------------------------------ */
.pt-fuel-hub { display: flex; flex-direction: column; }
.pt-fuel-hub-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.pt-fuel-hub-row:first-child { border-top: 0; padding-top: 2px; }
.pt-fuel-hub-row > div:first-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pt-fuel-hub-row strong { font-size: 11.5px; color: var(--ink); }
.pt-fuel-hub-row small { color: var(--muted-2); font-size: 9.5px; }
.pt-fuel-hub-value { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; color: var(--brand); }
.pt-fuel-hub-value.green { color: #0f7a63; }
.pt-fuel-hub-value.amber { color: #a25300; }
.pt-fuel-hub-value.red { color: #a5202f; }
.pt-fuel-hub-value.slate { color: var(--muted-2); }

/* Sites ------------------------------------------------------------------ */
.pt-site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pt-site-card {
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-xs);
}
.pt-site-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pt-site-head > div { min-width: 0; }
.pt-site-head h2 { margin: 3px 0 0; font-size: 14.5px; letter-spacing: -0.2px; color: var(--ink); }
.pt-site-head .pt-chip { flex: 0 0 auto; }
.pt-site-address {
  display: flex; align-items: flex-start; gap: 5px;
  margin: 7px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.6;
}
.pt-site-address svg { flex: 0 0 auto; margin-top: 1px; color: var(--muted-2); }
.pt-site-gens { display: flex; flex-direction: column; margin: 9px 0 0; padding: 0; list-style: none; }
.pt-site-gens li { border-top: 1px solid var(--line); }
.pt-site-gens .pt-text-btn {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 8px 0; text-align: start;
}
.pt-site-gens .pt-text-btn > bdi { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.pt-site-gens .pt-text-btn > small { margin-inline-start: auto; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
.pt-site-gens .pt-text-btn > svg:last-child { flex: 0 0 auto; color: var(--muted-2); }

/* Account ---------------------------------------------------------------- */
.pt-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pt-account-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pt-account-facts > div {
  min-width: 0; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.pt-account-facts dt { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: 0.2px; }
.pt-account-facts dd { margin: 2px 0 0; font-size: 11.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pt-account-facts dd small { display: block; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
.pt-account-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.pt-account-actions .pt-btn { height: 36px; padding: 0 12px; font-size: 11px; }
.pt-btn.danger { border-color: #f0ccd2; background: #fff; color: #a5202f; }
.pt-btn.danger:hover { background: var(--red-soft); border-color: #e8b4be; }

/* Alerts ----------------------------------------------------------------- */
.pt-alarm-actions { display: flex; justify-content: flex-end; padding: 2px 4px 4px; }

/* Small shared helpers --------------------------------------------------- */
.pt-center { display: flex; justify-content: center; margin-top: 12px; }
.pt-stats.thin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px; margin-bottom: 12px;
}
.pt-panel.no-pad > .pt-filterbar { margin: 0 18px 10px; }
.pt-panel-body .pt-gen-grid { margin-top: 2px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1000px) {
  .pt-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-test-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .portal-nav-wrap { display: none; }
  .portal-bottom { display: flex; }
  .portal-more-sheet { display: block; }
  .portal-body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .portal-main { padding: 16px 14px 36px; }
  .portal-topbar-inner { padding: 8px 14px; min-height: 56px; }
  .pt-compare-tray { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .pt-account-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-status-grid,
  .pt-maint-grid,
  .pt-safety-layout,
  .pt-site-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .pt-page-head h1 { font-size: 20px; }
  .pt-toolbar { gap: 7px; }
  .pt-searchbar { flex-basis: 100%; }
  .pt-select { flex: 1 1 140px; min-width: 0; }
  .pt-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .pt-quick button { min-height: 68px; padding: 10px 5px; font-size: 10px; }
  .pt-status-facts { gap: 6px; }
  .pt-maint-figures { gap: 6px; }
  .pt-maint-facts { grid-template-columns: minmax(0, 1fr); }
  .pt-tl-item { grid-template-columns: auto minmax(0, 1fr); }
  .pt-tl-date { grid-column: 2; color: var(--muted-2); }
  .pt-account-facts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .portal-brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .portal-brand-copy strong { font-size: 13px; }
  .portal-topbar-actions { gap: 5px; }
  .portal-lang { height: 30px; padding: 0 10px; font-size: 10px; }
  .pt-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-test-sections { grid-template-columns: minmax(0, 1fr); }
  .portal-more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-compare-tray { inset-inline: 10px; width: auto; max-width: none; }
  .pt-stats.thin { max-width: none; }
  .pt-status-facts { grid-template-columns: minmax(0, 1fr); }
}
