/* HYRCA 1.3 — warm canvas, ivory navigation and two-tone forest/brass icons. */
body.hyrca-theme { --hy-bg:#ece7db; --hy-surface:#fffdf8; --hy-border:#e4ddcf; --hy-text:#25362d; --hy-accent:#234332; --hy-shadow:0 12px 36px -24px #51412a40; background:var(--hy-bg); }
body.hyrca-shell { --hy-rail-width:266px; padding-inline-start:calc(var(--hy-rail-width) + 32px); }
body.hyrca-shell .container { max-width:none; width:calc(100% - 48px); }
body.hyrca-shell .hyrca-header { background:transparent; border:0; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; position:relative; }
body.hyrca-shell .hyrca-header-top { min-height:82px; justify-content:flex-end; }
body.hyrca-shell .hyrca-header-top > .hyrca-logo-link { display:none; }
body.hyrca-shell .hyrca-header-tools { margin:0; flex-direction:row; }
body.hyrca-shell .hyrca-icon-link,body.hyrca-shell .hyrca-notifications summary { background:var(--hy-surface); border-color:transparent; width:44px; height:44px; }
body.hyrca-shell .hyrca-account-nav > li > a { border-color:transparent; background:var(--hy-surface); }
body.hyrca-shell .hyrca-account-nav > li > a::before { background-color:#d0b276; }
body.hyrca-shell #main-body { padding-top:0; }
.hyrca-duotone .hyrca-tone { fill:#ccb27f; fill-opacity:.48; }
.hyrca-rail { position:fixed; inset-block:16px; inset-inline-start:16px; width:var(--hy-rail-width,266px); display:flex; flex-direction:column; background:var(--hy-surface); border:1px solid #e0d7c6; border-radius:24px; box-shadow:0 16px 48px -32px #55412745; z-index:80; padding:24px 14px 16px; }
.hyrca-rail-brand { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 12px 24px; }
.hyrca-rail .hyrca-brand img { width:34px; height:40px; }
.hyrca-rail .hyrca-brand strong { font-size:24px; }
.hyrca-rail .hyrca-brand small { color:#7e5d32; }
.hyrca-rail-navigation { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding-block:4px 20px; }
.hyrca-rail-menu,.hyrca-rail-submenu { list-style:none; margin:0; padding:0; }
.hyrca-rail-item { margin:0 0 6px; }
body.hyrca-theme .hyrca-rail-link { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:8px 12px; margin:0; border:1px solid transparent; border-radius:13px; background:transparent; color:#465449; text-align:start; font:600 14px/1.8 var(--hy-font); cursor:pointer; }
body.hyrca-theme .hyrca-rail-link:hover { background:#f5f1e7; color:#234332; }
body.hyrca-theme .hyrca-rail-link[aria-current=page],body.hyrca-theme .hyrca-rail-link[aria-expanded=true] { background:#eeefe3; border-color:#e1e3d2; color:#234332; }
.hyrca-rail-icon { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:11px; background:#f2eddf; color:#31533c; }
.hyrca-rail-icon .hyrca-icon { width:22px; height:22px; }
.hyrca-rail-label { flex:1; min-width:0; overflow-wrap:anywhere; }
.hyrca-rail-chevron { margin-inline-start:auto; display:flex; color:#829080; }
.hyrca-rail-chevron .hyrca-icon { width:16px; height:16px; transition:transform .2s; }
.hyrca-rail-disclosure[aria-expanded=true] .hyrca-rail-chevron .hyrca-icon { transform:rotate(180deg); }
.hyrca-rail-submenu { margin:6px 30px 12px 10px; padding-inline-start:14px; border-inline-start:1px solid #d7c29c; }
body.hyrca-theme .hyrca-rail-submenu a { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:9px 12px; border-radius:9px; color:#5b6558; font-size:13px; line-height:1.8; }
body.hyrca-theme .hyrca-rail-submenu a:hover,body.hyrca-theme .hyrca-rail-submenu a[aria-current=page] { background:#f4efe4; color:#254531; }
.hyrca-rail-divider { height:1px; background:#e4ddcf; margin:6px 12px; }
.hyrca-rail-bottom { border-top:1px solid #e6decd; padding-top:14px; }
.hyrca-rail-wallet { display:flex; align-items:center; gap:8px; padding:10px 8px; border:1px solid #e5d9c1; border-radius:14px; background:#f8f4e9; margin-bottom:14px; }
.hyrca-wallet-link { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.hyrca-wallet-link strong,.hyrca-rail-profile strong { display:block; font-size:13px; font-weight:650; }
.hyrca-wallet-link small,.hyrca-rail-profile small { display:block; color:#727563; font-size:11px; margin-top:3px; overflow-wrap:anywhere; }
body.hyrca-theme .hyrca-wallet-add { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border-radius:12px; background:#e8d7b2; color:#31513b; }
.hyrca-wallet-add .hyrca-icon { width:23px; height:23px; }
body.hyrca-theme .hyrca-wallet-add:hover { background:#ddc594; }
.hyrca-rail-profile { display:flex; align-items:center; gap:10px; padding:6px; }
.hyrca-profile-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#e7d5ad; color:#254632; flex:none; }
.hyrca-rail-profile > .hyrca-icon { width:15px; height:15px; margin-inline-start:auto; transform:rotate(90deg); }
.hyrca-rail-close { width:44px; height:44px; background:#f3eee4; border:0; border-radius:12px; color:#31513b; cursor:pointer; }
.hyrca-rail-close .hyrca-icon { width:20px; height:20px; }
.hyrca-rail-backdrop { position:fixed; inset:0; border:0; padding:0; background:#182a2466; backdrop-filter:blur(3px); z-index:79; cursor:pointer; }
body.hyrca-theme .hyrca-rail [hidden],body.hyrca-theme .hyrca-rail-backdrop[hidden] { display:none!important; }

/* Ivory cards and the fine, organic gold contours from the reference. */
body.hyrca-theme :is(.hyrca-home-hero,.hyrca-welcome) { background:#fffdf8; border:1px solid #e9e0cf; border-radius:24px; box-shadow:var(--hy-shadow); }
/* Keep the welcome card content-sized, independently of the page/rail height.
   Paint the decoration as a background so it cannot become a layout item. */
body.hyrca-theme .hyrca-home-hero {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  align-content:center;
  align-self:start;
  flex:0 0 auto;
  height:auto!important;
  min-height:190px!important;
  aspect-ratio:auto;
  padding:32px;
  background:#fffdf8 url('../img/hyrca/premium-contours.svg') no-repeat left center/auto 100%;
}
body.hyrca-theme :is(.hyrca-home-hero,.hyrca-welcome)::after { background:url('../img/hyrca/premium-contours.svg') no-repeat left center/auto 100%; width:360px; height:100%; top:0; inset-inline-end:0; bottom:0; opacity:.9; mask-image:linear-gradient(to right,#000 55%,transparent); -webkit-mask-image:linear-gradient(to right,#000 55%,transparent); }
body.hyrca-theme .hyrca-home-hero::before,
body.hyrca-theme .hyrca-home-hero::after { content:none; display:none; }
/* Older uploaded clientareahome.tpl files contain an inline square SVG.
   The gold art now lives in the background; this legacy node must not size a grid row. */
body.hyrca-theme .hyrca-home-hero > .hyrca-home-hero__art { display:none!important; }
body.hyrca-theme .hyrca-home-hero__text { min-width:0; overflow-wrap:anywhere; }
body.hyrca-theme .hyrca-home-hero__actions { min-width:0; }
body.hyrca-theme .hyrca-home-hero__actions .btn { white-space:normal; }
@media(max-width:1199px) {
  body.hyrca-theme .hyrca-home-hero { grid-template-columns:minmax(0,1fr); }
}
body.hyrca-theme .hyrca-home-hero h1 { font-size:clamp(24px,2.4vw,34px); }
body.hyrca-theme :is(.hyrca-stat,.hyrca-home-panel,.table-container) { border-radius:20px!important; background:var(--hy-surface); border-color:#e6dece!important; box-shadow:var(--hy-shadow); }
body.hyrca-theme .hyrca-stat { padding:24px; }
body.hyrca-theme .hyrca-stat__meta { border-top:2px solid #eee7d8; }
body.hyrca-theme .hyrca-home-panel > .card-header { background:transparent; }
body.hyrca-theme .hyrca-home-panel > .card-footer { background:#fffdf8; }
body.hyrca-theme .hyrca-footer { background:transparent; }
@media(min-width:992px) {
  body.hyrca-shell .hyrca-menu-toggle { display:none!important; }
}
@media(max-width:1199px) and (min-width:992px) {
  body.hyrca-shell { --hy-rail-width:236px; padding-inline-start:calc(var(--hy-rail-width) + 24px); }
  body.hyrca-shell .container { width:calc(100% - 36px); }
}
@media(max-width:991px) {
  body.hyrca-shell { padding-inline-start:0; }
  body.hyrca-shell .container { width:calc(100% - 32px); }
  body.hyrca-shell .hyrca-header { position:sticky; top:0; background:#ece7dbf2; backdrop-filter:blur(10px); z-index:60; }
  body.hyrca-shell .hyrca-header-top { min-height:72px; justify-content:space-between; gap:12px; }
  body.hyrca-shell .hyrca-header-top > .hyrca-logo-link { display:block; }
  .hyrca-rail { inset-block:10px; inset-inline-start:10px; width:min(300px,calc(100vw - 36px)); padding:20px 12px 14px; border-radius:22px; visibility:hidden; transform:translateX(110%); transition:transform .24s ease,visibility .24s; }
  .hyrca-rail.is-open { visibility:visible; transform:translateX(0); }
  body.hyrca-drawer-open { overflow:hidden; }
  body.hyrca-shell #main-body { padding-top:8px; }
  body.hyrca-theme .hyrca-home-hero { min-height:0!important; padding:24px; }
}
@media(max-width:575px) {
  body.hyrca-shell .hyrca-header-tools { gap:8px; }
  body.hyrca-shell .hyrca-home-hero { padding:24px 20px; }
  body.hyrca-theme .hyrca-stat { padding:16px; }
  .hyrca-rail-brand { padding-bottom:16px; }
}
@media(prefers-reduced-motion:reduce) {
  .hyrca-rail,.hyrca-rail-chevron .hyrca-icon { transition:none; }
}
@media print {
  .hyrca-rail,.hyrca-rail-backdrop { display:none!important; }
  body.hyrca-shell { padding-inline-start:0; }
}
/* Account dropdown: compact ivory rows, two-tone icons and a viewport-safe mobile panel. */
body.hyrca-theme .hyrca-account-nav .dropdown-menu{width:310px;min-width:270px;max-width:calc(100vw - 32px);max-height:min(820px,calc(100vh - 100px));max-height:min(820px,calc(100dvh - 100px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:10px;border:1px solid #e4ddcf;border-radius:20px;background:#fffdf8;box-shadow:0 22px 54px -24px #3c342b66}
body.hyrca-theme .hyrca-account-nav .dropdown-menu > li{flex:0 0 auto}
body.hyrca-theme .hyrca-account-nav .dropdown-menu .dropdown-item{min-height:48px;padding:7px 10px!important;gap:11px;border:1px solid transparent;border-radius:12px;line-height:1.6}
body.hyrca-theme .hyrca-account-nav .dropdown-menu .dropdown-item:hover{background:#f5f0e5!important}
body.hyrca-theme .hyrca-account-nav .dropdown-menu .dropdown-item.active{background:#edf0e3!important;border-color:#dce1cf}
.hyrca-account-item-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#f2ecde;color:#31523c}
.hyrca-account-item-icon .hyrca-icon{width:20px;height:20px}
.hyrca-dropdown-label{flex:1;min-width:0;overflow-wrap:anywhere}
body.hyrca-theme .hyrca-account-nav .dropdown-menu .badge{flex:none;margin-inline-start:auto}
body.hyrca-theme .hyrca-account-nav .dropdown-divider{margin:8px 10px;border-color:#e4dac7}
body.hyrca-theme .hyrca-account-nav .dropdown-item[href*="logout"]{color:#9a3c30!important}
body.hyrca-theme .hyrca-account-nav .dropdown-item[href*="logout"] .hyrca-account-item-icon{background:#f8eae2;color:#9a3c30}
body.hyrca-theme .hyrca-account-nav .dropdown-item[href*="logout"]:hover{background:#f9eee8!important}
@media(max-width:991px){
 body.hyrca-theme .hyrca-account-nav .dropdown-menu{position:fixed!important;inset:76px 16px auto!important;transform:none!important;width:auto;min-width:0;max-width:none;max-height:calc(100vh - 100px);max-height:calc(100dvh - 100px);margin:0;z-index:200}
}

body.hyrca-theme .hyrca-account-nav .dropdown-menu > li[menuitemname="Logout"]{position:sticky;bottom:0;z-index:1;background:#fffdf8;border-top:1px solid #e4dac7;padding-top:4px!important}
