/* Vidrio Rep Hub 0.8.14.39: iPad / tablet layout (black and white, layout only).
 * Port of 0.8.14.37 onto 0.8.14.38 (Ask lives inside Training; 6 rep tabs, 7 for admins).
 * Phones (< 700px wide) are untouched. 700-1199px = left icon rail; >= 1200px = the existing 220px sidebar.
 * Every rule is prefixed with html.vrh-fs so it wins over knock.css / customers.css / ask.css, which load later.
 * No data, tally, payroll, Knock Map or Customers behavior is changed here.
 */

/* ---------- Shell: left icon rail on iPad portrait and mid-width landscape (700-1199px) ---------- */
@media (min-width:700px) and (max-width:1199px){
	html.vrh-fs,html.vrh-fs .vrh-app{--vrh-tabbar-height:0px;--vrh-safe-bottom:0px}
	html.vrh-fs .vrh-app{grid-template-columns:96px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"chrome stage" "tabs stage";padding-left:env(safe-area-inset-left,0px);padding-right:0}
	html.vrh-fs .vrh-app .vrh-chrome,
	html.vrh-fs .vrh-app--map .vrh-chrome{grid-area:chrome;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px;padding:16px 6px 10px;border-bottom:0;border-right:2px solid #000;min-height:0}
	html.vrh-fs .vrh-app .vrh-logo{height:44px}
	html.vrh-fs .vrh-app .vrh-title{display:none}
	html.vrh-fs .vrh-app .vrh-userbar{margin:0;flex:0 0 auto}
	html.vrh-fs .vrh-app .vrh-tabs{grid-area:tabs;display:flex;flex-direction:column;align-items:stretch;gap:4px;border-top:0;border-right:2px solid #000;padding:6px 6px calc(10px + env(safe-area-inset-bottom,0px));overflow-x:hidden;overflow-y:auto}
	html.vrh-fs .vrh-app .vrh-tab{flex:0 0 auto;flex-direction:column;justify-content:center;gap:5px;width:100%;min-height:72px;padding:10px 2px 8px;border-radius:12px;font-size:12px;line-height:1.1;overflow:visible}
	html.vrh-fs .vrh-app .vrh-tab.is-active,
	html.vrh-fs .vrh-app .vrh-tab:focus-visible{background:#000;color:#fff!important}
	html.vrh-fs .vrh-app .vrh-tab.is-active::before,
	html.vrh-fs .vrh-app .vrh-tab:focus-visible::before{display:none}
	html.vrh-fs .vrh-app .vrh-tabs .vrh-tab-icon svg{width:26px;height:26px}
	html.vrh-fs .vrh-app .vrh-tabs .vrh-tab-label{display:block;font-size:12px;letter-spacing:0;overflow:visible;max-width:none;padding:0}
	html.vrh-fs .vrh-app .vrh-lab-full{display:none}
	html.vrh-fs .vrh-app .vrh-lab-short{display:inline}
	html.vrh-fs .vrh-app .vrh-tab-badge{top:6px;right:14px}
	html.vrh-fs .vrh-app .vrh-stage{grid-area:stage;padding-right:env(safe-area-inset-right,0px)}
	html.vrh-fs .vrh-app--map .vrh-stage,html.vrh-fs .vrh-app--map .vrh-stage-inner{height:100%;min-height:0}
}

/* ---------- Page width and the Stats / Training switches (>= 700px) ---------- */
@media (min-width:700px){
	html.vrh-fs .vrh-app.vrh-app--page:not(.vrh-app--ask) .vrh-stage-inner{max-width:1240px;padding:18px 28px 36px}
	html.vrh-fs .vrh-app .vrh-stats-switch,
	html.vrh-fs .vrh-app .vrh-train-switch{justify-content:center;padding:10px 16px}
	html.vrh-fs .vrh-app .vrh-stats-seg,
	html.vrh-fs .vrh-app .vrh-train-seg{flex:0 1 220px}
	html.vrh-fs .vrh-app .vt{max-width:640px}
	html.vrh-fs .vrh-app .vt .vt-row{padding:16px 20px}
	html.vrh-fs .vrh-app .vt .vt-num{font-size:52px}
	html.vrh-fs .vrh-app .vrh-tiers{column-count:2;column-gap:32px}
	html.vrh-fs .vrh-app .vrh-tiers li{break-inside:avoid}
	html.vrh-fs .vrh-app .vrh-profile{max-width:760px}
	html.vrh-fs .vrh-app .vrh-pay{max-width:900px}
}

/* ---------- Two-column pages (content area >= ~880px: iPad 13" portrait, all landscape) ---------- */
@media (min-width:980px){
	/* Stats > Tally: controls left, team table right */
	html.vrh-fs .vrh-app .vt{max-width:1080px}
	html.vrh-fs .vrh-app .vt #vt-main:not(.vt-hidden){display:grid;grid-template-columns:minmax(360px,460px) minmax(0,1fr);grid-template-rows:repeat(5,auto) 1fr;column-gap:36px;align-items:start}
	html.vrh-fs .vrh-app .vt #vt-main>*{grid-column:1}
	html.vrh-fs .vrh-app .vt #vt-main>.vt-team-title{grid-column:2;grid-row:1;margin-top:10px}
	html.vrh-fs .vrh-app .vt #vt-main>.vt-team-wrap{grid-column:2;grid-row:2 / 7}
	/* Customers: Today | Coming up side by side, two-column list */
	html.vrh-fs .vrh-app #vrh-c-section-customers:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;align-content:start}
	html.vrh-fs .vrh-app #vrh-c-section-customers>*{grid-column:1 / -1}
	html.vrh-fs .vrh-app #vrh-c-section-customers>.vrh-cust-today,
	html.vrh-fs .vrh-app #vrh-c-section-customers>.vrh-cust-up{grid-column:auto;align-self:stretch;margin:10px 0}
	html.vrh-fs .vrh-app .vrh-c-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
	/* Incentives: the big Christmas card across, the rest in two columns */
	html.vrh-fs .vrh-app .vrh-incentives{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}
	html.vrh-fs .vrh-app .vrh-incentives>*{grid-column:auto}
	html.vrh-fs .vrh-app .vrh-incentives>.vrh-inc-christmas,
	html.vrh-fs .vrh-app .vrh-incentives>.vrh-inc-graphic{grid-column:1 / -1}
	/* Profile: photo + approvals side by side, metrics across */
	html.vrh-fs .vrh-app .vrh-profile{max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
	html.vrh-fs .vrh-app .vrh-profile>*{margin:0}
	html.vrh-fs .vrh-app .vrh-profile>.vrh-metrics,
	html.vrh-fs .vrh-app .vrh-profile>h1,
	html.vrh-fs .vrh-app .vrh-profile>h2,
	html.vrh-fs .vrh-app .vrh-profile>h3{grid-column:1 / -1}
	/* Payroll: wider, statements in two columns (cards stay collapsed until tapped) */
	html.vrh-fs .vrh-app .vrh-pay{max-width:1100px}
	html.vrh-fs .vrh-app .vrh-pay-totals{max-width:640px}
	html.vrh-fs .vrh-app .vrh-pay-weeks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
}

/* ---------- Ask (inside Training): entry card on courses/Goals, centered chat at ?tab=training&sub=ask ---------- */
@media (min-width:700px){
	html.vrh-fs .vrh-app--training:not(.vrh-app--ask) .vrh-ask-entry{max-width:760px;width:calc(100% - 40px);margin:14px auto 10px;padding:14px 18px;gap:16px;box-sizing:border-box}
	html.vrh-fs .vrh-app--training:not(.vrh-app--ask) .vrh-ask-entry-icon{width:48px;height:48px}
	html.vrh-fs .vrh-app--training:not(.vrh-app--ask) .vrh-ask-entry-txt strong{font-size:17px}
	html.vrh-fs .vrh-app--training:not(.vrh-app--ask) .vrh-ask-entry-go{min-height:40px;padding:8px 16px;font-size:15px}
	/* Chat still uses .vrh-app--ask (plus .vrh-app--training) when sub=ask. The Training|Goals switch stays above it. */
	html.vrh-fs .vrh-app--ask .vrh-stage-inner{max-width:900px;padding:0;width:100%;margin:0 auto}
	html.vrh-fs .vrh-app--ask .vrh-ask-head{padding:16px 28px 12px}
	html.vrh-fs .vrh-app--ask .vrh-ask-log{padding:18px 28px 10px}
	html.vrh-fs .vrh-app--ask .vrh-ask-form{padding:12px 24px calc(14px + env(safe-area-inset-bottom,0px))}
	html.vrh-fs .vrh-app--ask .vrh-ask-banner,html.vrh-fs .vrh-app--ask .vrh-ask-consent{margin-left:28px;margin-right:28px}
	html.vrh-fs .vrh-app--ask .vrh-ask-msg{max-width:78%;font-size:16px}
	html.vrh-fs .vrh-app--ask .vrh-ask-chips{display:grid;grid-template-columns:1fr 1fr;gap:10px}
}
@media (min-width:1000px){
	html.vrh-fs .vrh-app--ask .vrh-stage-inner{border-left:2px solid #000;border-right:2px solid #000}
}

/* ---------- Knock Map: stays full screen; keep the floating controls compact instead of edge to edge ---------- */
@media (min-width:700px){
	html.vrh-fs .vrh-knock.is-fs .vrh-knock-tools{left:12px;right:auto;width:min(560px,calc(100% - 24px))}
	html.vrh-fs .vrh-knock.is-fs .vrh-knock-banner{left:12px;right:auto;width:min(560px,calc(100% - 24px))}
	html.vrh-fs .vrh-knock.is-fs .vrh-knock-arm{left:50%;right:auto;width:min(640px,calc(100% - 24px));transform:translateX(-50%)}
	html.vrh-fs .vrh-knock.is-fs .vrh-arm-btn{min-height:68px}
}
