/** VCARE RC22.0.2 — Dashboard, language, contrast, header and navigation hotfix. */
html,body{max-width:100%;overflow-x:hidden}
body.vcare-rc22 *,body.vcare-rc22 *::before,body.vcare-rc22 *::after{box-sizing:border-box}
body.vcare-rc22 :where(main,section,article,div,nav,header,footer,form,label,a,button,span,p,h1,h2,h3,h4,h5,h6,table,tbody,thead,tr,td,th){min-width:0}
body.vcare-rc22 :where(h1,h2,h3,h4,h5,h6,p,a,button,label,small,strong,span,td,th,option){overflow-wrap:anywhere;word-break:normal}
body.vcare-rc22 :where(.grid,.module-grid,.workspace-stats,.role-grid,.ecosystem,.status-grid,.safety-list,.vcare-rc22-sheet__grid){align-items:stretch}
body.vcare-rc22 :where(.nav,.links,.navlinks,.top-actions,.actions,.quick,.hero-actions,.vcare-actions,.vhome-actions-row,.vstore-actions){flex-wrap:wrap}
body.vcare-rc22 :where(.card,.module-card,.role-card,.eco-card,.vhome-panel,.vstore-panel){height:auto;max-width:100%}

/* Keep a single modern header. Legacy corner marks and superseded headers are hidden by JS. */
body.vcare-rc22 .vcare-corner-brand{display:none!important}
body.vcare-rc22 .vcare-rc22-legacy-header-hidden{display:none!important}
body.vcare-rc22 .vcare-rc22-global-back{
  width:42px;height:42px;min-width:42px;border:0;border-radius:14px;display:inline-grid;place-items:center;
  color:var(--v22-text);background:var(--v22-surface-solid);box-shadow:var(--v22-shadow-soft);cursor:pointer;
}
body.vcare-rc22 .vcare-rc22-global-back .vcare-rc22-icon{width:21px;height:21px}
body.vcare-rc22 .vcare-rc22-native-back-wrap{display:flex;align-items:center;justify-content:center;margin-inline:8px}
body.vcare-rc22 .vcare-rc22-appbar{padding-top:max(8px,var(--v22-safe-top));min-height:64px}
body.vcare-rc22[data-vcare-theme="light"] .vcare-rc22-appbar,
body.vcare-rc22[data-vcare-theme="system"] .vcare-rc22-appbar{background:rgba(248,250,252,.90)}

/* Stronger light-theme contrast. */
body.vcare-rc22[data-vcare-theme="light"],
body.vcare-rc22[data-vcare-theme="system"]{--v22-text:#111827;--v22-muted:#475569;--v22-faint:#64748b;--v22-line:rgba(15,23,42,.14);--v22-line-strong:rgba(15,23,42,.24)}
@media(prefers-color-scheme:light){
  body.vcare-rc22[data-vcare-theme="system"] :where(p,.muted,.soft,small,td,.lead,.section-head p,.module-copy small,.role-card p,.eco-card p){color:#475569!important}
  body.vcare-rc22[data-vcare-theme="system"] :where(h1,h2,h3,h4,h5,h6,strong,label,th,.brand,.brand-copy strong){color:#111827!important}
  body.vcare-rc22[data-vcare-theme="system"] :where(.role-link,.module-status,.nav-link){color:#0f5fc7!important}
}
body.vcare-rc22[data-vcare-theme="light"] :where(p,.muted,.soft,small,td,.lead,.section-head p,.module-copy small,.role-card p,.eco-card p){color:#475569!important}
body.vcare-rc22[data-vcare-theme="light"] :where(h1,h2,h3,h4,h5,h6,strong,label,th,.brand,.brand-copy strong){color:#111827!important}
body.vcare-rc22[data-vcare-theme="light"] :where(.role-link,.module-status,.nav-link){color:#0f5fc7!important}
body.vcare-rc22[data-vcare-theme="light"] :where(input,select,textarea){color:#111827!important;background:#fff!important;border-color:rgba(15,23,42,.18)!important}
body.vcare-rc22[data-vcare-theme="light"] :where(input,textarea)::placeholder{color:#64748b!important;opacity:1}

/* Multilingual sizing and RTL/LTR stability. */
html[lang="fa"] body,html[lang="ar"] body{letter-spacing:0!important}
html[lang="fa"] body{font-family:Vazirmatn,Inter,system-ui,sans-serif!important}
html[lang="ar"] body{font-family:"Noto Sans Arabic",Inter,system-ui,sans-serif!important}
html[lang="ru"] body,html[lang="tr"] body,html[lang="de"] body,html[lang="en"] body{font-family:Inter,"Noto Sans",system-ui,sans-serif!important}
html[dir="rtl"] body.vcare-rc22 :where(th,td,.section-heading,.module-copy,.vcare-rc22-appbar__title){text-align:right}
html[dir="rtl"] body.vcare-rc22 .vcare-rc22-icon[data-vcare-icon="back"]{transform:scaleX(-1)}
body.vcare-rc22 :where(.module-card,.role-card,.vcare-rc22-sheet__link,.vcare-rc22-dock__item){white-space:normal}
body.vcare-rc22 .module-copy{min-width:0;flex:1}
body.vcare-rc22 .module-copy strong{display:block;line-height:1.35}
body.vcare-rc22 .module-copy small{display:block;line-height:1.55}
body.vcare-rc22 .vcare-rc22-dock__item span:last-child{font-size:clamp(9px,2.5vw,12px);line-height:1.15;text-align:center;max-width:78px}
body.vcare-rc22 .workspace-topbar>div,body.vcare-rc22 .workspace-topbar .top-actions{min-width:0}
body.vcare-rc22 .workspace-topbar strong{max-width:100%;white-space:normal}

/* Friendly API-form feedback instead of raw JSON pages. */
.vcare-rc22-toast-stack{position:fixed;z-index:10050;inset-inline:14px;top:calc(14px + var(--v22-safe-top));display:grid;gap:9px;pointer-events:none}
.vcare-rc22-toast{width:min(520px,100%);margin-inline:auto;padding:14px 16px;border-radius:18px;background:var(--v22-surface-solid);color:var(--v22-text);border:1px solid var(--v22-line);box-shadow:var(--v22-shadow);display:flex;gap:11px;align-items:flex-start;pointer-events:auto}
.vcare-rc22-toast.success{border-color:rgba(48,209,88,.35)}
.vcare-rc22-toast.error{border-color:rgba(255,69,58,.35)}
.vcare-rc22-toast .vcare-rc22-icon{flex:0 0 auto;margin-top:1px}
.vcare-rc22-toast strong{display:block;margin-bottom:3px}
.vcare-rc22-toast p{margin:0;color:var(--v22-muted)!important;font-size:13px;line-height:1.5}

/* Apple-style role launcher on the public homepage. */
.role-card .role-icon .vcare-rc22-icon{width:29px;height:29px;color:#0a84ff}
.role-card .role-icon{box-shadow:inset 0 0 0 1px rgba(10,132,255,.12),0 10px 25px rgba(10,132,255,.12)}
.role-card .role-link{display:inline-flex;align-items:center;gap:6px}

@media(max-width:780px){
  body.vcare-rc22{padding-bottom:calc(82px + var(--v22-safe-bottom))}
  body.vcare-rc22 :where(h1){font-size:clamp(30px,10vw,46px)!important;line-height:1.05!important;letter-spacing:-.045em!important}
  body.vcare-rc22 :where(h2){font-size:clamp(23px,7vw,32px)!important;line-height:1.15!important}
  body.vcare-rc22 :where(h3){font-size:clamp(18px,5vw,24px)!important;line-height:1.25!important}
  body.vcare-rc22 :where(.wrap,.shell,.workspace-content,.vstore-wrap,.vhome-wrap){width:100%!important;max-width:100%!important;padding-inline:12px!important}
  body.vcare-rc22 :where(.grid,.grid.two,.grid.three,.grid.four,.module-grid,.workspace-stats,.route-list,.formgrid){grid-template-columns:1fr!important}
  body.vcare-rc22 :where(table[data-vcare-responsive="1"]){border:0!important;background:transparent!important;box-shadow:none!important}
  body.vcare-rc22 :where(table[data-vcare-responsive="1"] tbody tr){display:block!important;margin:0 0 12px!important;padding:10px!important;border:1px solid var(--v22-line)!important;border-radius:20px!important;background:var(--v22-surface-solid)!important;box-shadow:var(--v22-shadow-soft)!important}
  body.vcare-rc22 :where(table[data-vcare-responsive="1"] tbody td){display:grid!important;grid-template-columns:minmax(92px,38%) minmax(0,1fr)!important;gap:10px!important;border:0!important;border-bottom:1px solid var(--v22-line)!important;padding:10px 4px!important;border-radius:0!important;color:var(--v22-text)!important}
  body.vcare-rc22 :where(table[data-vcare-responsive="1"] tbody td:last-child){border-bottom:0!important}
  body.vcare-rc22 :where(table[data-vcare-responsive="1"] tbody td)::before{content:attr(data-label);color:var(--v22-muted);font-weight:800;font-size:12px}
  body.vcare-rc22 :where(table[data-vcare-responsive="1"] thead){display:none!important}
  .site-header .nav{min-height:68px}
  .role-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .role-card{min-height:0!important;padding:17px 13px 15px!important;border-radius:24px!important;text-align:center;display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start}
  .role-card .role-icon{width:62px!important;height:62px!important;border-radius:19px!important;background:linear-gradient(145deg,#fff,#e8f3ff)!important}
  .role-card h3{margin:12px 0 4px!important;font-size:16px!important}
  .role-card p{font-size:12px!important;line-height:1.5!important;margin:0!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .role-card .role-link{position:static!important;margin-top:10px!important;font-size:12px!important;color:#0066cc!important}
}
@media(max-width:390px){
  body.vcare-rc22 .vcare-rc22-dock__item span:last-child{font-size:9px;max-width:62px}
  .role-grid{gap:9px!important}
  .role-card{padding-inline:10px!important}
}
