/* PEXTH visual identity from the customer, partner and platform PDF decks.
   Shared by all four UIs. Authored source: _shared/ui; sync with sync-shared.php. */
:root {
  --brand-900: #041522;
  --brand-800: #083041;
  --brand-700: #08798a;
  --brand-600: #0793a5;
  --brand-500: #16a9b7;
  --brand-100: #d2f0f0;
  --brand-50: #edf9f8;
  --primary: #08798a;
  --primary-hover: #065d6c;
  --primary-soft: #e4f4f3;
  --bg: #f3f7f7;
  --surface-2: #eef4f5;
  --surface-3: #e2ebed;
  --border: #d8e4e7;
  --border-strong: #b9cdd2;
  --text: #102b39;
  --text-2: #4b6572;
  --text-3: #627c87;
  --badge-success-ink: #17683d;
  --badge-warning-ink: #855300;
  --badge-danger-ink: #b62332;
  /* ink for text/icons on a solid var(--primary) fill: white on the light-theme teal, dark ink on the
     light dark-theme teal (#63ddd9 — white there is ~1.6:1) */
  --on-primary: #fff;
  --focus: 0 0 0 3px rgba(17,167,180,.4);
  --nav-h: 78px;
  --r: 9px;
  --r-lg: 12px;
  --r-xl: 18px;
  --shadow-2: 0 8px 24px -12px rgba(7,35,47,.2);
  --shadow-3: 0 18px 48px -20px rgba(0,16,28,.34);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #03131f; --surface: #091f2e; --surface-2: #0d2838; --surface-3: #163647;
    --border: #203c4c; --border-strong: #365663;
    --text: #ecf6f8; --text-2: #b3c9d2; --text-3: #8faab8;
    --primary: #63ddd9; --primary-hover: #9aeeea; --primary-soft: #0a383f; --on-primary: #04212a;
    --info-soft: #0d303e; --focus: 0 0 0 3px rgba(99,221,217,.42);
    --badge-success-ink: #88e3b0; --badge-warning-ink: #f3cd79; --badge-danger-ink: #ffacb4;
  }
}
:root[data-theme="dark"] {
  --bg: #03131f; --surface: #091f2e; --surface-2: #0d2838; --surface-3: #163647;
  --border: #203c4c; --border-strong: #365663;
  --text: #ecf6f8; --text-2: #b3c9d2; --text-3: #8faab8;
  --primary: #63ddd9; --primary-hover: #9aeeea; --primary-soft: #0a383f; --on-primary: #04212a;
  --info-soft: #0d303e; --focus: 0 0 0 3px rgba(99,221,217,.42);
  --badge-success-ink: #88e3b0; --badge-warning-ink: #f3cd79; --badge-danger-ink: #ffacb4;
}
.badge-success,.badge-verified { color: var(--badge-success-ink); }
.badge-warning { color: var(--badge-warning-ink); }
.badge-danger { color: var(--badge-danger-ink); }
/* Status TEXT uses the per-theme inks too: the dark blocks only darken the *-soft backgrounds, so the light-theme
   --danger/--warning/--grow-600 inks fall to ~3:1 there. Those three stay as-is for FILLS behind white text
   (.btn-danger, .toast.err, .toast.ok). */
.alert-success { color: var(--badge-success-ink); }
.alert-warning { color: var(--badge-warning-ink); }
.alert-danger,.field-error,.label .req { color: var(--badge-danger-ink); }
.stat-delta.up { color: var(--badge-success-ink); }
.stat-delta.down { color: var(--badge-danger-ink); }
.btn { font-weight: 600; transition: background .18s, border-color .18s, box-shadow .18s; }
.btn-primary { color: #fff; background: #08798a; border-color: #08798a; }
.btn-primary:hover { color: #fff; background: #066473; border-color: #066473; }
.btn-accent { color: #302206; background: linear-gradient(110deg,#efd889,#f2c34b); border-color: #e6b542; }
.btn-accent:hover { color: #241a04; background: #f6d575; border-color: #f6d575; }
.input,.select,.textarea { border-radius: 7px; }
.input:focus,.select:focus,.textarea:focus { border-color: var(--primary); }
.card { box-shadow: 0 3px 16px -12px rgba(0,22,34,.25); }

/* The transparent original logo is framed in CSS, never re-typeset. */
.brand .pexth-wordmark { display: block; flex: none; position: relative; width: 142px; height: 43px; overflow: hidden; }
.pexth-wordmark img { position: absolute; width: 142px; max-width: none; height: auto; top: -4px; left: 0; }
.brand:has(.pexth-wordmark) { gap: 0; }
.nav { color: #e9f5f7; background: #041522; border-bottom: 1px solid #214353; box-shadow: none; }
.nav .container { gap: 20px; }
.nav .nav-links { gap: 2px; }
.nav-links .nav-prefs { display: none; }
.nav-links .nav-mobile-login { display: none; }
.nav .nav-links a { color: #c2d6df; font-size: .82rem; border-radius: 0; padding: 14px 9px; border-bottom: 2px solid transparent; }
.nav .nav-links a:hover,.nav .nav-links a[aria-current="page"] { color: #72e2db; background: transparent; border-bottom-color: #57d5ce; text-decoration: none; }
.nav .btn-ghost { color: #d7e8ed; }
.nav .btn-ghost:hover { background: #12313e; }
.nav .nav-auth > .btn-primary { background: transparent; border-color: #4ac6c5; color: #8be3df; }
.nav .nav-auth > .btn-primary:hover { background: #123b45; }
.nav .prefs-select { background: #0d2836; color: #d9edef; border-color: #294955; max-width: 110px; }
.nav .prefs-theme { background: #0d2836; border-color: #294955; color: #a2eee5; }
.nav .prefs-theme:hover { background: #1d4550; border-color: #4ac6c5; }
.nav .menu-panel { color: var(--text); }
.nav-auth { min-width: 0; }
.footer { background: #02101a url('/assets/img/pexth-energy-horizon.webp') center bottom / cover; color: #d7e7ed; border-top: 1px solid #20404d; }
.footer-grid { gap: 48px; }
.footer .brand { min-height: 48px; }
.footer a, .footer .footer-preferences-link { color: #d7e7ed; }
.footer a:hover, .footer .footer-preferences-link:hover { color: #6ddcd4; }
.footer-lead,.footer-contact { color: #a7c0cb; }
.footer h4 { color: #fff; font-size: .93rem; }

/* Account forms follow the device layouts from customer p6 / partner p7. */
.auth-shell { grid-template-columns: minmax(0,1.06fr) minmax(0,1fr); background: var(--bg); }
.auth-aside { padding: clamp(32px,4vw,64px); background: linear-gradient(180deg,rgba(2,16,28,.08),rgba(2,16,28,.48)),url('/assets/img/pexth-earth.webp') center / cover; }
.auth-aside::after { display: none; }
.auth-aside .brand .pexth-wordmark { width: 200px; height: 62px; }
.auth-aside .pexth-wordmark img { width: 200px; }
.auth-aside-body { margin-block: 70px; padding: 30px; border-left: 2px solid #5bd5cc; border-radius: 0 16px 16px 0; background: rgba(3,20,34,.8); backdrop-filter: blur(8px); }
.auth-headline { font-size: clamp(1.75rem,2.8vw,2.7rem); font-weight: 600; }
.auth-tagline { font-size: .63rem; letter-spacing: .17em; }
.auth-props { gap: 18px; }
.auth-props strong { font-size: .94rem; }
.auth-props span { font-size: .83rem; }
.auth-prop-ico { border: 1px solid #315d6c; background: #0e3442; color: #69d9d1; }
.auth-aside-foot { max-width: 410px; color: #afc7d1; }
.auth-main { padding: 44px; }
.auth-card { width: 100%; max-width: 470px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-3); }
.auth-top { margin-bottom: 28px; }
.auth-title { font-weight: 600; }
.auth-form .btn-primary { background: linear-gradient(100deg,#126a80,#127d86); border-color: transparent; color: #fff; }
.auth-form .btn-primary:hover { background: #117b8d; }
.auth-mobile-brand { background: #041522; border-radius: 6px; padding: 6px 12px; }

/* Portal navigation stays dark like the phone and tablet views in the deck. */
.sidebar { background: #041826; border-color: #213f4e; }
.sidebar .brand { color: #fff; padding-block: 10px 25px; }
.sidebar .side-link { color: #adc7d2; border: 1px solid transparent; }
.sidebar .side-link:hover { color: #e6ffff; background: #0d2d3e; }
.sidebar .side-link[aria-current="page"],.sidebar .side-link.active { background: #0b3c49; border-color: #266470; color: #80e3df; }
.sidebar .side-group,.sidebar .side-help,.sidebar .side-foot { color: #8aa9b8; }
.sidebar .side-help a { color: #86d5d6; }
.sidebar .side-close { color: #d2e9ef; }
.sidebar .side-prefs { margin: 8px 0; }
.sidebar .side-prefs .prefs-select { color: #d7e8ed; background-color: #102c3b; border-color: #315464; }
.sidebar .side-prefs .prefs-theme { background: #102c3b; border-color: #315464; color: #a2eee5; }
.sidebar .side-prefs .prefs-theme:hover { background: #23606a; border-color: #4ac6c5; }
.app-top { border-bottom-color: var(--border); box-shadow: 0 2px 12px -9px #001925; }
.page-head h1 { font-weight: 600; }
.stat { border-color: var(--border); box-shadow: none; }
.stat-value { color: var(--text); }
.pager button[aria-current="page"] { background: #08798a; border-color: #08798a; color: #fff; }

@media (max-width: 1180px) {
  .nav-links.open { background: #061d2b; border-color: #294855; }
  .nav .nav-links a { padding: 12px 8px; }
  .nav-links .nav-prefs { display: flex; padding: 12px 8px; }
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-main { min-height: 100svh; background: linear-gradient(180deg,rgba(3,19,31,.06),rgba(3,19,31,.35)),url('/assets/img/pexth-solar-panels.webp') center / cover; padding: 32px 20px; }
  .auth-card { padding: 26px; }
  .auth-top { flex-wrap: wrap; justify-content: space-between; gap: 16px; }
  .auth-mobile-brand { display: flex; }
}
@media (max-width: 520px) {
  :root { --nav-h: 68px; }
  .nav .container { gap: 8px; }
  .brand .pexth-wordmark { width: 114px; height: 35px; }
  .pexth-wordmark img { width: 114px; top: -3px; }
  .nav .nav-actions { gap: 6px; }
  .nav-prefs-desktop { display: none; }
  .nav-links .nav-mobile-login { display: block; }
  .app-top .top-title { display: none; }
  .nav .btn-sm { padding-inline: 10px; }
  .auth-main { padding: 22px 14px; }
  .auth-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Supplied logos: theme follows a surface by default; fixed dark/light surfaces override it.
   Keep the original files intact and contain each complete wordmark in its existing slot. */
:root { --pexth-logo-light-display:block; --pexth-logo-dark-display:none; }
@media(prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) { --pexth-logo-light-display:none; --pexth-logo-dark-display:block; }
}
:root[data-theme="dark"] { --pexth-logo-light-display:none; --pexth-logo-dark-display:block; }
.pexth-logo[data-logo-surface="light"] { --pexth-logo-light-display:block; --pexth-logo-dark-display:none; }
.pexth-logo[data-logo-surface="dark"] { --pexth-logo-light-display:none; --pexth-logo-dark-display:block; }
.brand .pexth-wordmark.pexth-logo > img.pexth-logo-image,
#site-header .pexth-wordmark.pexth-logo > img.pexth-logo-image {
  position:absolute; inset:0; width:100%; height:100%; max-width:100%;
  object-fit:contain; object-position:center; transform:none; filter:none;
}
.brand .pexth-wordmark.pexth-logo > img.pexth-logo-light,
#site-header .pexth-wordmark.pexth-logo > img.pexth-logo-light { display:var(--pexth-logo-light-display,block); }
.brand .pexth-wordmark.pexth-logo > img.pexth-logo-dark,
#site-header .pexth-wordmark.pexth-logo > img.pexth-logo-dark { display:var(--pexth-logo-dark-display,none); }
.cd-mobile-brand .pexth-wordmark.pexth-logo { width:105px; height:30px; }

/* Keep every customer header action reachable on compact screens,including five-language labels. */
@media(max-width:480px){.customer-area .cd-topbar{gap:6px}.customer-area .cd-mobile-brand .pexth-wordmark.pexth-logo{width:88px;height:26px}}

/* Three-word motto: neutral spaced labels, colored ticks and quiet separators. */
.tagline.pexth-motto {
  --pexth-motto-ink: var(--text-2, #b8c8de);
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  max-width: 100%;
  font: 400 .75rem/1.35 Inter, system-ui, sans-serif;
  letter-spacing: .16em;
  direction: ltr;
}
.tagline.pexth-motto > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 16px;
  white-space: nowrap;
  /* Legacy hero/footer rules color entire words; this component keeps them neutral. */
  color: var(--pexth-motto-ink) !important;
}
.tagline.pexth-motto > span:first-child { padding-inline-start: 0; }
.tagline.pexth-motto > span:last-child { padding-inline-end: 0; }
.tagline.pexth-motto > span + span { border-inline-start: 1px solid rgba(135,156,186,.15); }
.tagline.pexth-motto > span::before {
  content: "";
  flex: 0 0 4px;
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: #00cbd4;
}
.tagline.pexth-motto > span:nth-child(2)::before { background: #27bd8a; }
.tagline.pexth-motto > span:nth-child(3)::before { background: #ffb43b; }
.footer .pexth-motto, .auth-aside .pexth-motto, .hero .pexth-motto,
.celebrate .pexth-motto { --pexth-motto-ink: #b8c8de; }
@media (max-width: 480px) {
  .tagline.pexth-motto { font-size: .6875rem; letter-spacing: .14em; }
  .tagline.pexth-motto > span { gap: 7px; padding-inline: 12px; }
  .tagline.pexth-motto > span:first-child { padding-inline-start: 0; }
  .tagline.pexth-motto > span:last-child { padding-inline-end: 0; }
}

/* Dashboard wordmarks share the public header's compact three-word signature. */
.brand.dashboard-brand { flex-direction:column; align-items:flex-start; gap:5px; }
.brand.dashboard-brand .pexth-wordmark.pexth-logo { width:100%; max-width:208px; height:auto; aspect-ratio:5 / 1; }
.brand.dashboard-brand .dashboard-motto {
  --pexth-motto-ink:#b8c8de;
  display:flex; justify-content:space-between; width:100%; max-width:208px;
  margin:0; font-size:9px; line-height:1.3; letter-spacing:.12em;
}
.brand.dashboard-brand .dashboard-motto > span { flex-direction:row; gap:4px; padding-inline:4px; line-height:1.3; }
.brand.dashboard-brand .dashboard-motto > span:first-child { padding-inline-start:0; }
.brand.dashboard-brand .dashboard-motto > span:last-child { padding-inline-end:0; }
.brand.dashboard-brand .dashboard-motto > span::before { flex-basis:2px; width:2px; height:6px; }
@media(max-width:960px) {
  .partner-workspace .side-head .dashboard-motto { font-size:8px; }
}
.customer-area .brand.cd-mobile-brand.dashboard-brand { width:105px; flex:none; }
.customer-area .brand.cd-mobile-brand.dashboard-brand .dashboard-motto { margin-top:3px; font-size:5.8px; letter-spacing:.1em; }
.customer-area .brand.cd-mobile-brand.dashboard-brand .dashboard-motto > span { gap:2px; padding-inline:2px; }
.customer-area .brand.cd-mobile-brand.dashboard-brand .dashboard-motto > span:first-child { padding-inline-start:0; }
.customer-area .brand.cd-mobile-brand.dashboard-brand .dashboard-motto > span:last-child { padding-inline-end:0; }
.customer-area .brand.cd-mobile-brand.dashboard-brand .dashboard-motto > span::before { flex-basis:1px; width:1px; height:4px; }
@media(max-width:480px) {
  .customer-area .brand.cd-mobile-brand.dashboard-brand { width:88px; gap:3px; }
  .customer-area .brand.cd-mobile-brand.dashboard-brand .dashboard-motto { font-size:5px; }
}
