/* ELGATEC Partner · visual layer; print layouts belong to their documents. */
@media screen {
  #auth, #shell {
    --pv-night: #081722;
    --pv-surface: #102937;
    --pv-line: #294452;
    --pv-paper: #f5f8f8;
    --pv-muted: #adc1c8;
    --pv-mint: #77dfd0;
    --pv-gold: #ffd057;
  }
  .pv-network { color: var(--pv-mint); pointer-events: none; user-select: none; }
  .pv-network svg { display: block; width: 100%; height: 100%; }
  .pv-network .pv-route { stroke-width: 1.65; }
  .pv-network .pv-stations { color: var(--pv-gold); }
  .pv-network .pv-beacon { stroke: var(--pv-gold); }
  @media (prefers-reduced-motion: no-preference) {
    .pv-network .pv-route { stroke-dasharray: 540; animation: pv-connect 1.6s ease-out both; }
    .pv-network .pv-beacon { transform-box: fill-box; transform-origin: center; animation: pv-ripple 1.5s ease-out .65s 2 both; }
    @keyframes pv-connect { from { stroke-dashoffset: 540; } to { stroke-dashoffset: 0; } }
    @keyframes pv-ripple { 0% { transform: scale(.6); opacity: .75; } 100% { transform: scale(1.7); opacity: .23; } }
  }

  /* Public entry. Use the same fields, switch buttons and status messages. */
  #auth:not([hidden]) {
    background: var(--pv-night);
    display: grid;
    grid-template-columns: minmax(0,1.24fr) minmax(360px,.85fr);
    min-height: 100svh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  #auth .auth-brand {
    isolation: isolate;
    display: flex;
    min-width: 0;
    padding: clamp(36px,5.5vw,100px);
    background-color: #0b2231;
    background-image:
      radial-gradient(ellipse at 100% 70%,#13534f85,transparent 53%),
      linear-gradient(100deg,#0b2331,#0c2b39 76%,#102f3e);
    justify-content: space-between;
    gap: clamp(50px,10vh,110px);
  }
  #auth .auth-brand::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    width: auto; height: auto; border-radius: 0; filter: none; opacity: 1;
    background: linear-gradient(#81abaf0c 1px,transparent 1px),linear-gradient(90deg,#81abaf0c 1px,transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(120deg,transparent 4%,#000 90%);
  }
  #auth .auth-brand::after { display: none; }
  #auth .auth-brand .pv-network {
    position: absolute; inset: auto -3% 11% 38%; z-index: -1;
    opacity: .61; aspect-ratio: 500/170; max-height: 225px;
  }
  #auth .auth-brand > .logo, #auth .mobile-logo { width: fit-content; }
  #auth .auth-brand .logo .elgatec-partner-logo {
    width: clamp(88px,8vw,126px); height: auto; border-radius: 19%; object-fit: contain;
  }
  #auth .pv-entry-copy { position: relative; z-index: 1; }
  #auth .pv-entry-copy .eyebrow, #auth .auth-card .eyebrow {
    display: flex; align-items: center; gap: 10px; font-weight: 720;
    color: #a4ddd5; font-size: 11px; letter-spacing: .17em; line-height: 1.6;
  }
  #auth .pv-entry-copy .eyebrow::before, #auth .auth-card .eyebrow::before {
    content: ""; width: 23px; height: 2px; background: var(--pv-gold);
  }
  #auth .auth-brand h1 {
    font-size: clamp(45px,5.5vw,88px); line-height: 1.02; letter-spacing: -.065em;
    font-weight: 650; margin: 22px 0; color: #fff;
  }
  #auth .auth-brand h1 em { color: var(--pv-mint); font-style: normal; }
  #auth .auth-brand .lead {
    max-width: 39ch; color: #c3d7d9; font-size: clamp(15px,1.3vw,20px);
    line-height: 1.64; margin: 0;
  }
  #auth .auth-brand .trust {
    display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; row-gap: 8px;
    position: relative; padding-top: 22px; border-top: 1px solid #789b9d54;
  }
  #auth .auth-brand .trust span {
    background: transparent; border: 0; border-radius: 0; padding: 0;
    font-size: 12px; line-height: 1.7; color: #c9d9dc;
  }
  #auth .trust b { color: var(--pv-gold); font-size: 10px; font-weight: 650; margin-right: 5px; }
  #auth .auth-card {
    color: var(--pv-paper); min-width: 0; position: relative;
    padding: 54px clamp(36px,5vw,96px); background: #0a1925;
    border-left: 1px solid var(--pv-line); align-items: stretch;
  }
  #auth .auth-card > :is(#loginPane,#registerPane,#joinPane,#verifyPane,#partner-auth-status,#partner-auth-retry) {
    width: 100%; max-width: 440px; margin-inline: auto;
  }
  #auth .auth-card h2 { font-size: clamp(28px,3.1vw,44px); margin: 12px 0 13px; color: var(--pv-paper); letter-spacing: -.045em; line-height: 1.12; }
  #auth .auth-card .muted, #auth .auth-card .field-help { color: var(--pv-muted); line-height: 1.6; }
  #auth #loginPane .muted { font-size: 15px; margin: 5px 0; }
  #auth #loginPane .muted + .muted { font-size: 13px; color: #9ab4c1; }
  #auth .auth-card .form-stack { margin-top: 27px; gap: 17px; }
  #auth .auth-card label { color: #d8e6ea; font-size: 14px; line-height: 1.4; font-weight: 600; gap: 8px; }
  #auth .auth-card input {
    border-radius: 10px; font-size: 16px; font-weight: 450; min-height: 49px; width: 100%;
    padding: 12px 14px; color: #f2f7f8; border: 1px solid #3c5968; background-color: #0e2432; color-scheme: dark;
  }
  #auth .auth-card input::placeholder { color: #9bb2bb; opacity: 1; }
  #auth .auth-card input:focus-visible { outline: 2px solid #74d7c8; outline-offset: 1px; }
  #auth .auth-card [type=submit] {
    background: var(--pv-gold); border: 1px solid var(--pv-gold); color: #17222a; font-weight: 700;
    min-height: 49px; margin-top: 2px; border-radius: 10px; font-size: 15px;
  }
  #auth .auth-card [type=submit]:enabled:hover { background: #ffdf83; border-color: #ffdf83; }
  #auth .auth-card [type=submit]:disabled { opacity: .55; }
  #auth .auth-card .text-btn { color: var(--pv-mint); min-height: 42px; font-size: 14px; text-align: left; }
  #auth #partner-auth-status:not(:empty) { color: #ffdeb0; font-size: 14px; line-height: 1.5; }
  #auth .verify-box { color: #183447; }

  /* Private workspace. The active navigation, permissions and statistics remain live. */
  #shell .workspace {
    background: radial-gradient(ellipse 80% 760px at 90% -300px,#16475690,transparent),var(--pv-night);
  }
  #shell .sidebar { background: linear-gradient(165deg,#102735,#0b1c28 64%); border-right-color: #2b4654; }
  #shell .sidebar .pp-identity-mark { width: 122px; border-radius: 17px; background: #0a2536; }
  #shell .sidebar .pp-logo-window { width: 120px; height: 110px; }
  #shell .sidebar .logo .elgatec-partner-logo { width: 110px; height: 110px; margin: 0 auto; object-fit: contain; }
  #shell .sidebar .partner-registration-code { font-size: 13px; }
  #shell #nav .nav-label { font-size: 10px; color: #9ab7c0; letter-spacing: .115em; }
  #shell #nav button { font-size: 13px; min-height: 39px; border-radius: 9px; text-align: left; }
  #shell #nav button.active { border-color: #4f9b9959; color: #d8fcf8; box-shadow: inset 3px 0 var(--pv-mint); }
  #shell #nav button:disabled { color: #a4b7bf; opacity: .82; cursor: not-allowed; }
  #shell #nav button:disabled i { color: #8eabb7; }
  #shell #nav button:disabled small { color: #a5bbc3; }
  #shell .topbar { background-color: #0a1b28; border-color: #24424e; }
  #shell .content { padding: clamp(18px,2.35vw,38px); }
  #shell .page .heading p.muted { font-size: 14px; line-height: 1.6; color: var(--pv-muted); }
  #shell .page .heading h1, #shell .page > .pp-heading h1 { font-size: clamp(26px,2.65vw,42px); line-height: 1.1; letter-spacing: -.048em; }
  #shell :is(button, a, summary):focus-visible, #auth :is(button, a):focus-visible {
    outline: 2px solid var(--pv-gold); outline-offset: 3px;
  }
  #shell #page-dashboard .partner-overview-heading {
    padding: clamp(24px,2.8vw,44px); gap: 18px 26px; border-radius: 20px;
    border-color: #376068; background: linear-gradient(110deg,#11313f,#123b45 65%,#13434b);
    box-shadow: 0 10px 32px #03121a36; margin-bottom: 26px;
  }
  #shell #page-dashboard .partner-overview-heading::before {
    background: linear-gradient(#9accc610 1px,transparent 1px),linear-gradient(90deg,#9accc610 1px,transparent 1px);
    background-size: 32px 32px; mask-image: linear-gradient(90deg,transparent,#000);
  }
  #shell #page-dashboard .partner-overview-heading .pv-network {
    position: absolute; max-width: 430px; width: 47%; right: 0; bottom: 0;
    z-index: -1; opacity: .36;
  }
  #shell #page-dashboard .partner-overview-heading:has(#dashboard-weather:not([hidden])) .pv-network { opacity: .12; right: 18%; }
  #shell #page-dashboard .partner-overview-heading > div:first-child > .eyebrow { color: #b4e8df; font-size: 11px; letter-spacing: .16em; }
  #shell #page-dashboard .partner-overview-heading > div:first-child > .eyebrow::before {
    content: ""; display: inline-block; width: 20px; height: 2px; margin-right: 9px; vertical-align: middle; background: var(--pv-gold);
  }
  #shell #page-dashboard #welcome { font-size: clamp(32px,3.65vw,57px); font-weight: 620; line-height: 1.11; letter-spacing: -.06em; overflow-wrap: anywhere; }
  #shell #page-dashboard .partner-overview-heading .muted { max-width: 57ch; color: #c6d9dd; }
  #shell #page-dashboard .partner-overview-heading > .btn { margin: 1px 0 0; min-height: 42px; font-size: 14px; padding: 11px 18px; }
  #shell #page-dashboard .partner-overview-heading > .btn:enabled {
    background: var(--pv-gold); border-color: var(--pv-gold); color: #1d272c;
  }
  #shell #page-dashboard .partner-overview-heading > .btn:enabled:hover { background: #ffde7f; }
  #shell #dashboard-weather.pt-weather-mini { background: #0a2531ca; border-color: #3c676e; }
  #shell .pv-section-title { display: flex; gap: 18px; align-items: center; margin: 28px 0 15px; }
  #shell .pv-section-title h2 { color: var(--pv-paper); font-size: clamp(17px,1.45vw,24px); letter-spacing: -.035em; line-height: 1.3; font-weight: 620; margin: 0; }
  #shell .pv-section-title i { flex: 1; height: 1px; background: linear-gradient(90deg,#34505c,transparent); }
  #shell #page-dashboard .metrics { gap: 12px; margin-bottom: 16px; }
  #shell #page-dashboard .metrics article:nth-child(n) {
    min-width: 0; gap: 13px; padding: clamp(13px,1.45vw,22px); position: relative;
    background: linear-gradient(135deg,#14303e,#102533); border: 1px solid var(--pv-line); border-radius: 15px;
  }
  #shell #page-dashboard .metrics article small { color: #cae0e2; font-size: 13px; }
  #shell #page-dashboard .metrics article em { color: #abc2cb; font-size: 12px; }
  #shell #page-dashboard .metrics article strong { font-size: clamp(28px,2.65vw,42px); font-variant-numeric: tabular-nums; }
  #shell #page-dashboard .metrics article[data-pv-attention] { border-color: #75623c; background: linear-gradient(135deg,#2f322d,#182a31); }
  #shell #page-dashboard .grid-main { gap: 14px; }
  #shell #page-dashboard .grid-main .panel, #shell #page-dashboard .pp-card {
    background: #102735; border: 1px solid var(--pv-line); border-radius: 16px;
  }
  #shell #page-dashboard .panel-head h3, #shell #page-dashboard .pp-card-head h2 { font-size: 19px; line-height: 1.3; }
  #shell #page-dashboard .panel-head p { color: #adc2ca; font-size: 13px; line-height: 1.5; }
  #shell #page-dashboard .text-btn { font-size: 13px; }
  #shell #page-dashboard .pp-shortcut {
    background: #112a38; border: 1px solid #2d4d5a; padding: 14px; border-radius: 12px;
    min-width: 0; transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
  }
  #shell #page-dashboard .pp-shortcut strong { font-size: 13px; }
  #shell #page-dashboard .pp-shortcut small { color: #b3c9cf; font-size: 12px; }
  #shell #page-dashboard .pp-shortcut:enabled:hover { border-color: #65b4aa; background: #163941; transform: translateY(-2px); }
  #shell .toolbar :is(input,select) { min-height: 42px; font-size: 14px; }
  #shell .page button.btn { font-size: 13px; }

  @media (max-width: 960px) and (min-width: 761px) {
    #auth:not([hidden]) { grid-template-columns: minmax(0,1fr) minmax(340px,.95fr); }
    #auth .auth-brand { padding: 34px; }
    #auth .auth-card { padding-inline: 34px; }
    #shell #page-dashboard .partner-overview-heading { grid-template-columns: minmax(0,1fr) minmax(180px,240px); gap: 15px; }
  }
  @media (max-width: 760px) {
    #auth:not([hidden]) { grid-template-columns: minmax(0,1fr); align-content: start; }
    #auth .auth-brand { gap: 17px; padding: 20px clamp(20px,5vw,38px) 25px; }
    #auth .auth-brand > .logo .elgatec-partner-logo { width: 55px; border-radius: 12px; }
    #auth .pv-entry-copy .eyebrow { font-size: 10px; margin: 0; }
    #auth .auth-brand h1 { font-size: clamp(30px,7.8vw,44px); margin: 8px 0 10px; }
    #auth .auth-brand h1 br { display: none; }
    #auth .auth-brand h1 em::before { content: " "; }
    #auth .auth-brand .lead { font-size: 14px; line-height: 1.5; max-width: 40ch; }
    #auth .auth-brand .trust { display: none; }
    #auth .auth-brand .pv-network { inset: auto -15% -12% 45%; opacity: .33; }
    #auth .auth-card { min-height: 0; border: 0; border-top: 1px solid var(--pv-line); padding: 28px clamp(20px,5vw,38px) 36px; }
    #auth .auth-card > .mobile-logo { display: none; }
    #auth .auth-card h2 { font-size: clamp(28px,6vw,36px); }
    #auth .auth-card .form-stack { margin-top: 18px; }
    #shell .content { padding: 18px 14px 48px; }
    #shell #page-dashboard .partner-overview-heading { grid-template-columns: minmax(0,1fr); padding: 21px; border-radius: 17px; }
    #shell #dashboard-weather.pt-weather-mini { grid-column: 1; grid-row: 3; width: 100%; }
    #shell #page-dashboard .partner-overview-heading .pv-network { width: 56%; }
    #shell .pv-section-title { margin: 22px 0 12px; }
    #shell #page-dashboard .metrics { gap: 9px; grid-template-columns: repeat(2,minmax(0,1fr)); }
    #shell #page-dashboard .metrics article:nth-child(n) { padding: 12px; gap: 9px; flex-wrap: wrap; }
    #shell #page-dashboard .metrics article .metric-icon { width: 30px; height: 30px; }
    #shell #page-dashboard .metrics article small { font-size: 12px; }
    #shell #page-dashboard .pp-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #shell #page-dashboard .pp-shortcut { padding: 12px; }
    #shell #nav button { min-height: 44px; font-size: 14px; }
  }
  @media (prefers-reduced-motion: reduce) {
    #auth .pv-network *, #shell .pv-network *, #shell #page-dashboard .pp-shortcut { animation: none; transition: none; }
    #shell #page-dashboard .pp-shortcut:enabled:hover { transform: none; }
  }
}
