/* Baria V1.4.44.68 — Golden Visual Contract system-wide rollout
   Source of truth: approved V67 Home visual language.
   Scope: every Baria app-shell page except the locked Home dashboard itself.
   Visual-only: no routes, medical logic, persistence, sidebar geometry or workflows are changed here. */
:root{
  --g68-ink:#183f38;
  --g68-ink-strong:#123d36;
  --g68-muted:#4e6861;
  --g68-teal:#0d7f73;
  --g68-teal-dark:#075f62;
  --g68-teal-soft:#edf9f6;
  --g68-blue-soft:#eef8fb;
  --g68-surface:#ffffff;
  --g68-page:#f4f8f7;
  --g68-border:#dfeae7;
  --g68-border-strong:#bddbd2;
  --g68-danger:#d8495a;
  --g68-danger-soft:#fff0f2;
  --g68-warning:#a06a00;
  --g68-warning-soft:#fff8e8;
  --g68-success:#16765f;
  --g68-success-soft:#edf8f3;
  --g68-shadow:0 3px 12px rgba(23,70,62,.035);
  --g68-shadow-hover:0 9px 22px rgba(23,70,62,.075);
  --g68-radius:16px;
  --g68-radius-sm:12px;
  --g68-icon-line:#d6e9e5;
  --g68-icon-surface:#eff9f6;
}

body.baria-app-shell:not(.home-dashboard-v55){
  background:var(--g68-page)!important;
  color:var(--g68-ink)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame{
  color:var(--g68-ink)!important;
  background:transparent!important;
}

/* Remove the older alternating/accent-strip visual language. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel,.card,.section-card,.module-card,.stat,.clinical057-card,.clinical057-subsection-card,.clinical057-segment,.pp546-panel,.pp546-summary-card,.pp546-data-card,.sono-organ-card,.endo-card,.inv547-panel)::before{
  display:none!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.module-grid,.grid-4,.grid-3)>*{
  border-top-width:1px!important;
  border-top-color:var(--g68-border)!important;
}

/* Shared page headers — same quiet premium shell as Home. */
body.baria-app-shell:not(.home-dashboard-v55) :where(.topbar,.clinic-page-head,.pp546-topbar,.panel-head:first-child,.kba-wrap>.panel-head){
  border:1px solid var(--g68-border)!important;
  border-radius:var(--g68-radius)!important;
  background:linear-gradient(180deg,#fff 0%,#fcfefd 100%)!important;
  box-shadow:var(--g68-shadow)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) :where(.topbar,.clinic-page-head,.pp546-topbar){
  padding:14px 18px!important;
  margin-bottom:16px!important;
}
body.baria-app-shell:not(.home-dashboard-v55) :where(.topbar,.clinic-page-head,.pp546-topbar) h1{
  margin-block:0 2px!important;
  color:var(--g68-ink-strong)!important;
  font-weight:var(--w-weight-bold)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .eyebrow{
  color:var(--g68-teal)!important;
  font-weight:var(--w-weight-bold)!important;
  letter-spacing:0!important;
}

/* Golden card contract. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel,.card,.section-card,.module-card,.stat,.notice,.clinical057-card,.clinical057-subsection-card,.clinical057-segment,.pp546-panel,.pp546-summary-card,.pp546-data-card,.sono-organ-card,.endo-card,.inv547-panel,.kba-panel,.kb-topic-accordion,.hub-section,.hub-side-card){
  border:1px solid var(--g68-border)!important;
  border-radius:var(--g68-radius)!important;
  background:linear-gradient(180deg,#fff 0%,#fcfefd 100%)!important;
  box-shadow:var(--g68-shadow)!important;
  overflow:clip;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background-color .16s ease!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel,.card,.section-card,.module-card,.stat,.clinical057-card,.clinical057-subsection-card,.pp546-summary-card,.pp546-data-card,.sono-organ-card,.endo-card,.inv547-panel,.kba-panel):hover{
  border-color:var(--g68-border-strong)!important;
  box-shadow:var(--g68-shadow-hover)!important;
  background:#fff!important;
}

/* Section heads: subtle tint, not fully colored cards. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel-head,.clinical057-card-head,.sono-structured-head){
  min-height:auto!important;
  margin:0!important;
  padding:12px 14px!important;
  border:0!important;
  border-bottom:1px solid #e7f0ed!important;
  border-radius:0!important;
  background:linear-gradient(135deg,#f1faf7 0%,#f5fafc 100%)!important;
  box-shadow:none!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel-head,.clinical057-card-head,.sono-structured-head) h2,
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel-head,.clinical057-card-head,.sono-structured-head) h3{
  color:#214f47!important;
  font-weight:var(--w-weight-bold)!important;
}

/* Typography hierarchy mirrors Home. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame h1{font-weight:var(--w-weight-bold)!important;color:var(--g68-ink-strong)!important}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame h2{font-weight:var(--w-weight-bold)!important;color:#214f47!important}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame h3{font-weight:var(--w-weight-bold)!important;color:#28564d!important}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(p,small,.muted,.helper,.hint,.footer-note){color:var(--g68-muted)!important}
body.baria-app-shell:not(.home-dashboard-v55) .footer-note{opacity:.82!important;margin-block:18px!important;text-align:center!important}

/* Inputs and selectors. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame select,
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame textarea{
  border:1px solid var(--g68-border)!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#284b43!important;
  box-shadow:0 1px 3px rgba(23,70,62,.018)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame select:focus,
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame textarea:focus{
  outline:none!important;
  border-color:#8bc4b5!important;
  box-shadow:0 0 0 3px rgba(57,139,119,.10)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame input::placeholder,
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame textarea::placeholder{color:#98aaa5!important;opacity:1!important}

/* Buttons and actionable controls. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.btn,.button,button){
  border-radius:11px;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame .btn-primary{
  background:linear-gradient(135deg,#0f8879,#087269)!important;
  border-color:#087269!important;
  color:#fff!important;
  box-shadow:0 4px 10px rgba(8,114,105,.11)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame .btn-primary:hover{
  background:linear-gradient(135deg,#0b776d,#075f59)!important;
  box-shadow:0 7px 16px rgba(8,114,105,.16)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame .btn-light{
  background:#fff!important;border-color:var(--g68-border)!important;color:#315b51!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame .btn-light:hover{
  background:#f3faf7!important;border-color:#beddd4!important;
}

/* Tabs/chips/filters. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.pp546-tabs,.tabs,.tabbar,.kba-tabs){
  border:1px solid var(--g68-border)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(23,70,62,.025)!important;
  padding:5px!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.pp546-tabs,.tabs,.tabbar,.kba-tabs) :where(a,button).active,
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.pp546-tabs,.tabs,.tabbar,.kba-tabs) :where(a,button).is-active{
  background:#e9f7f2!important;color:#0b675e!important;border-color:#cbe6dd!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.badge,.status,.chip,.check-chip){font-weight:var(--w-weight-bold)!important}

/* Semantic states remain explicit and consistent. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.status.ok,.badge.ok,.success,.is-success){
  background:var(--g68-success-soft)!important;color:var(--g68-success)!important;border-color:#cce7dc!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.status.warn,.badge.warn,.warning,.is-warning){
  background:var(--g68-warning-soft)!important;color:var(--g68-warning)!important;border-color:#f1dfb6!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.status.danger,.badge.danger,.danger,.is-danger,.alert-danger){
  background:var(--g68-danger-soft)!important;color:var(--g68-danger)!important;border-color:#f1cbd1!important;
}

/* Tables. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.table-wrap,.pp546-table-wrap){
  border:1px solid var(--g68-border)!important;border-radius:14px!important;background:#fff!important;overflow:auto!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame table{border-collapse:separate!important;border-spacing:0!important}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame table th{
  background:#f4faf7!important;color:#496b63!important;border-bottom:1px solid var(--g68-border)!important;font-weight:var(--w-weight-bold)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame table td{border-bottom-color:#e8f0ed!important;color:#294b43!important}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame table tbody tr:hover{background:#f5faf8!important}

/* Conditional/accordion boxes. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(fieldset,details,.clinical057-choice,.clinical057-method-panel,.clinical057-conditional-block,.renal-v515-panel,.sono-advanced-inner,.sono-surgeon-decision,.sono-surgeon-plan-wrap,.endo-upload,.endo-docs,.sono110-upload,.sono110-docs){
  border-color:var(--g68-border)!important;border-radius:var(--g68-radius-sm)!important;background:#fff!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame details[open]{border-color:#bddbd2!important;background:#fbfefd!important}

/* Golden icon treatment system-wide. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-global-sidebar__item .baria-global-sidebar__icon{
  border:1px solid #e0ece8!important;
  background:linear-gradient(145deg,var(--g68-icon-surface),#fbfefd)!important;
  box-shadow:0 1px 5px rgba(18,83,72,.025)!important;
}
/* Use the same icon background for every navigation item: no alternate blue tint. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-global-sidebar__item .baria-sidebar-module-icon{
  width:37px!important;height:37px!important;max-width:37px!important;max-height:37px!important;
  opacity:1!important;filter:saturate(1.14) contrast(1.04) drop-shadow(0 1px 1px rgba(7,90,78,.035))!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-global-sidebar__item.is-active .baria-global-sidebar__icon{
  border-color:#bcded3!important;background:#fff!important;box-shadow:0 2px 7px rgba(12,92,74,.06)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-global-sidebar__support-icon{
  border:1px solid #dceae6!important;background:#eef8f5!important;
}
body.baria-app-shell:not(.home-dashboard-v55).baria-sidebar-collapsed .baria-global-sidebar__item .baria-global-sidebar__icon{width:42px!important;height:42px!important}
body.baria-app-shell:not(.home-dashboard-v55).baria-sidebar-collapsed .baria-global-sidebar__item .baria-sidebar-module-icon{width:36px!important;height:36px!important;max-width:36px!important;max-height:36px!important}

/* Existing module artwork should never look disabled unless it truly is. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.module-card,.card,.shortcut,.quick-card,.action-card) img{
  opacity:1!important;filter:saturate(1.10) contrast(1.025)!important;
}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where([aria-disabled="true"],.is-disabled,.disabled){opacity:.48!important;filter:grayscale(.22)!important}

/* Clickable cards get the same restrained lift as Home. */
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(a.module-card,a.card,.module-card[role="button"],.card[role="button"]){text-decoration:none!important}
body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(a.module-card,a.card,.module-card[role="button"],.card[role="button"]):hover{transform:translateY(-2px)!important}

/* Public knowledge/FAQ pages that already use app-shell inherit the same family without changing content layout. */
body.public-landing.baria-app-shell:not(.home-dashboard-v55) :where(.public-nav .inner,.kb-topic-page,.knowledge-page .container>.panel,.faq-card,.roadmap-card){
  border-color:var(--g68-border)!important;
}

/* Responsive: shell geometry stays owned by app-shell; only visual density changes. */
@media(max-width:1050px){
  body.baria-app-shell:not(.home-dashboard-v55) :where(.topbar,.clinic-page-head,.pp546-topbar){padding:12px 14px!important}
}
@media(max-width:760px){
  body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame :where(.panel,.card,.section-card,.module-card,.stat,.pp546-panel,.sono-organ-card,.endo-card){border-radius:14px!important}
}
@media(prefers-reduced-motion:reduce){
  body.baria-app-shell:not(.home-dashboard-v55) .baria-page-frame *,
  body.baria-app-shell:not(.home-dashboard-v55) .baria-global-sidebar__item{transition:none!important;animation:none!important}
}
