/* VMB Client Portal - responsive tablet + desktop layer (owner-approved 12 Nov 2026).
   Phones (up to 640px) keep the existing mobile layout exactly: every rule below sits inside a min-width media query,
   except hiding the extra desktop menu links (new elements only).
   Matches the main site (site.css): breakpoints 640 / 860 / 1024, content max 1200px (--max), 24px gutters,
   Poppins headings, Inter text, --grad blue gradient page hero with the same radial glow, uppercase 14px nav labels,
   white cards with --line border, --radius and --shadow. Loading icon (preloader) untouched. */
.tabbar .tb-x{display:none}

/* ---------- Tablet: 641-1024px - wider single column, bottom tab bar kept ---------- */
@media (min-width:641px){
  .shell{max-width:820px}
  .tabbar{max-width:820px}
  .p-head{padding:24px 28px 28px}
  .p-head img{height:34px}
  .p-head h1{font-size:30px}
  .p-head .who{font-size:13px}
  .p-main{padding:22px 24px}
  .card{padding:20px}
  .switch button{flex:1 1 0;min-width:180px}
  .tile{padding:16px 14px}
  .tile .val{font-size:clamp(17px,2.2vw,22px)}
  .menu a{padding:16px 20px}
  .chips{grid-template-columns:repeat(3,1fr)}.chip.wide{grid-column:auto}
  .chips.months{grid-template-columns:repeat(4,1fr)}
  .contact-btns{grid-template-columns:1fr 1fr}.contact-btns .cbtn:nth-child(odd):last-child{grid-column:1/-1}
  .login-wrap{max-width:560px;margin:0 auto;padding:48px 24px}
  .idle-warn{bottom:92px}
}
@media (min-width:861px) and (max-width:1024px){
  /* two-column cards where the site switches to two columns */
  .p-main:has(> .pkg-cat){display:grid;grid-template-columns:1fr 1fr;gap:0 16px;align-items:start}
  .p-main:has(> .pkg-cat) > :not(.pkg-cat){grid-column:1/-1}
}

/* ---------- Desktop: 1025px and up - site-style hero, left side menu, multi-column pages ---------- */
@media (min-width:1025px){
  html,body{background:var(--bg)}
  body.portal{font-size:16px}
  .shell{max-width:none;box-shadow:none;background:var(--bg);padding-bottom:64px}
  /* app pages: hero across the top, then a 240px side menu + content, centred in the site's 1200px width */
  .shell:has(> .p-head){display:grid;grid-template-columns:minmax(24px,1fr) 240px minmax(0,904px) minmax(24px,1fr);grid-template-rows:auto 1fr;column-gap:32px;align-content:start}
  .shell > .p-head{grid-column:1/-1;grid-row:1;border-radius:0;background:var(--grad);position:relative;overflow:hidden;
    padding:30px max(24px,calc(50% - 576px)) 44px}
  .shell > .p-head::after{content:"";position:absolute;width:620px;height:620px;right:-200px;top:-260px;background:radial-gradient(circle,rgba(255,255,255,.16),transparent 65%);pointer-events:none}
  .p-head > *{position:relative;z-index:1}
  .p-head img{height:42px}
  .p-head .eyebrow{color:#CFE3FF;font-size:13px;letter-spacing:.14em;margin:22px 0 8px}
  .p-head h1{font-size:clamp(32px,3.4vw,46px);font-weight:700}
  .p-head .who{color:#DCE8FF;font-size:15px;margin-top:8px}
  .signout{font-size:13px;padding:11px 18px;border-color:rgba(255,255,255,.7)}
  .signout:hover{background:rgba(255,255,255,.18)}

  /* side menu (the phone tab bar, re-laid out) */
  .tabbar{position:sticky;top:24px;left:auto;bottom:auto;transform:none;grid-column:2;grid-row:2;align-self:start;margin-top:32px;
    width:auto;max-width:none;display:flex;flex-direction:column;gap:2px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
  .tabbar[hidden]{display:none}
  .tabbar a,.tabbar .tb-x{display:flex;flex-direction:row;align-items:center;gap:12px;padding:13px 14px;border-radius:10px;
    font:600 13px/1.2 Inter,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--text)}
  .tabbar a:hover{background:#EEF1FF;color:var(--blue)}
  .tabbar a[aria-current="page"]{background:var(--grad);color:#fff;box-shadow:0 8px 24px rgba(28,41,234,.28)}
  .tabbar svg{width:20px;height:20px;flex:none}
  .tabbar .tb-sep{height:1px;background:var(--line);margin:6px 8px}

  .shell > .p-main{grid-column:3;grid-row:2;padding:32px 0 0;min-width:0}
  .shell:not(:has(> .tabbar)) > .p-main,.shell:has(> .tabbar[hidden]) > .p-main{grid-column:2/4;width:100%;max-width:880px;justify-self:center}
  .back{display:none}
  .card{border-radius:var(--radius);padding:24px;margin-bottom:20px;border:1px solid var(--line)}
  .switch-label{font-size:12px;margin:0 2px 10px}
  .switch{gap:12px;margin-bottom:22px}
  .switch button{flex:1 1 0;padding:14px 16px;font-size:14px}
  .switch button small{font-size:12px}

  /* Home: business card + badge on the left, figures / upload / menu on the right */
  .p-main:has(> .profile){display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:24px;align-items:start}
  .p-main:has(> .profile) > *{grid-column:2}
  .p-main:has(> .profile) > div:has(> .switch){grid-column:1/-1}
  .p-main:has(> .profile){grid-template-rows:auto auto auto auto 1fr}
  .p-main:has(> .profile):has(> div > .switch){grid-template-rows:auto auto auto auto auto 1fr}
  .p-main:has(> .profile) > .profile{grid-column:1;grid-row:span 5}
  .profile h2{font-size:21px}.profile .trade{font-size:15px}
  .kv{font-size:14.5px;gap:10px 16px}
  .tiles{gap:16px;margin-bottom:10px}
  .tile{padding:20px 18px;border:1px solid var(--line);border-radius:var(--radius)}
  .tile .lbl{font-size:12px}
  .tile .val{font-size:clamp(18px,1.7vw,24px);margin-top:10px}
  .tile .yr{font-size:12px}
  .asof-wrap{margin:4px 2px 18px}
  .upload-btn{padding:20px 22px;margin-bottom:20px}
  .menu{border:1px solid var(--line);border-radius:var(--radius)}
  .menu a{padding:17px 20px;font-size:15px}
  .menu a:hover{background:#F7F9FF}

  /* Tax Calendar: wider table-style rows */
  .sum{gap:16px;margin-bottom:22px}
  .sum div{padding:16px 10px;border:1px solid var(--line)}
  .sum b{font-size:28px}.sum span{font-size:12px}
  .month{font-size:13px;margin:26px 4px 10px}
  .ev{padding:14px 20px;gap:20px;margin-bottom:8px;border:1px solid var(--line)}
  .ev .d{width:56px;padding:8px 0}
  .ev .t{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2.4fr) minmax(0,1.3fr);gap:2px 24px;align-items:center}
  .ev .f{font-size:15px}.ev .ds{font-size:13.5px}.ev .pr{font-size:13px;margin:0}
  .pill{min-width:112px;max-width:none;font-size:11px;padding:8px 10px}

  /* Inbox / Documents */
  .msg{padding:20px 24px;border:1px solid var(--line)}
  .msg h3{font-size:17px}.msg p{font-size:15px}

  /* Upload: form left, history alongside */
  .p-main:has(> .hist){display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);column-gap:24px;align-items:start;grid-auto-flow:dense}
  .p-main:has(> .hist) > *{grid-column:1}
  .p-main:has(> .hist) > div:has(> .switch){grid-column:1/-1}
  .p-main:has(> .hist) > .hist{grid-column:2;position:sticky;top:24px}
  .chips.months{grid-template-columns:repeat(4,1fr)}

  /* Need Help + Service Packages: two columns */
  .p-main:has(> .help-sec){display:grid;grid-template-columns:1fr 1fr;column-gap:20px;align-items:start}
  .p-main:has(> .help-sec) > div:has(> .switch),.p-main:has(> .help-sec) > .foot,.p-main:has(> .pkg-cat) > .help-sec,.p-main:has(> .help-sec) > .pv-note{grid-column:1/-1}
  .help-sec h2{font-size:19px}
  .pkg-cat summary{padding:18px 44px 18px 20px}
  .contact-btns{grid-template-columns:1fr 1fr}.contact-btns .cbtn:nth-child(odd):last-child{grid-column:1/-1}

  /* v2: Approvals card sits above the figures on the right; Approvals in two columns; Upload checklist in three columns */
  .card ul.upcl-l{grid-template-columns:repeat(3,1fr)}
  .upcl-m button{flex:1 1 0}
  .p-main:has(> .profile) > .hc{margin-bottom:16px}
  .p-main:has(> .profile):has(> .hc) > .profile{grid-row:span 7}
  .hc{padding:18px 20px}.hc-t b{font-size:15.5px}
  .p-main:has(> .apr-intro) .apr-list{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;align-items:start}
  .p-main:has(> .apr-intro) .apr-list:has(> .apr:only-child){grid-template-columns:minmax(0,640px)}
  .pg-intro h2{font-size:21px}.pg-intro .sub{font-size:14px}
  .card .apr-t{font-size:19px}.card .apr-d{font-size:14.5px}
  /* first-login privacy consent */
  .pconsent{max-width:760px;padding:32px}

  /* Sign-in page: hero panel + form side by side, like the site's split sections */
  .shell:has(> .login-wrap){display:block;min-height:calc(100vh - 32px)}
  .login-wrap{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:32px;align-items:stretch;max-width:1200px;margin:0 auto;padding:72px 24px 40px}
  .login-wrap .p-head{margin:0;border-radius:24px;padding:48px;background:var(--grad);position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center}
  .login-wrap .p-head::after{content:"";position:absolute;width:520px;height:520px;right:-180px;top:-220px;background:radial-gradient(circle,rgba(255,255,255,.16),transparent 65%);pointer-events:none}
  .login-wrap .p-head h1{font-size:clamp(36px,4vw,52px)}
  .login-wrap .p-head .who{font-size:17px;max-width:460px}
  .login-wrap .form{margin:0;padding:36px;align-self:center}
  .login-wrap .home-link{grid-column:1/-1;margin-top:0}

  /* sign-out warning: bottom-right toast */
  .idle-warn{left:auto;right:32px;bottom:32px;max-width:440px;margin:0}
}
@media (min-width:1025px) and (prefers-reduced-motion:no-preference){
  .tabbar a,.menu a,.switch button{transition:background .15s,color .15s,box-shadow .15s}
}

/* Figures stay on one line from tablet up (owner request 12 Nov 2026); portal.js shrinks the font if needed */
@media (min-width:561px){.tile .val:not(.upd){white-space:nowrap;overflow-wrap:normal}}

/* Header photo on desktop (owner choice 12 Nov 2026): subject on the right, title over the blue side */
@media (min-width:1025px){
  .shell > .p-head{background-color:#001C50;background-image:linear-gradient(90deg,rgba(0,28,80,.55) 0%,rgba(0,28,80,.2) 45%,rgba(0,28,80,0) 65%),url(img/header-desktop.jpg);background-image:linear-gradient(90deg,rgba(0,28,80,.55) 0%,rgba(0,28,80,.2) 45%,rgba(0,28,80,0) 65%),image-set(url(img/header-desktop.webp) type("image/webp"),url(img/header-desktop.jpg) type("image/jpeg"));background-repeat:no-repeat;background-size:100% 100%,cover;background-position:0 0,center 20%;min-height:300px;display:flex;flex-direction:column;justify-content:center}
  .shell > .p-head::after{display:none}
  .shell > .p-head .signout{background:rgba(0,28,80,.55);border-color:rgba(255,255,255,.7)}
  @media (min-width:1600px){.shell > .p-head{background-position:0 0,center 16%}}
  .login-wrap .p-head{background-color:#001C50;background-image:linear-gradient(0deg,rgba(0,28,80,.92) 0%,rgba(0,28,80,.70) 38%,rgba(0,28,80,0) 70%),url(img/header-desktop.jpg);background-image:linear-gradient(0deg,rgba(0,28,80,.92) 0%,rgba(0,28,80,.70) 38%,rgba(0,28,80,0) 70%),image-set(url(img/header-desktop.webp) type("image/webp"),url(img/header-desktop.jpg) type("image/jpeg"));background-repeat:no-repeat;background-size:100% 100%,cover;background-position:0 0,62% 20%;justify-content:flex-end}
  .login-wrap .p-head::after{display:none}
}
