/* Helen & Sons HRIS · Glass polish, 27 Nov 2026
   Visual only. Preserve all existing brand tokens, routes, data and permissions.
   Load last so the established light/dark palette remains authoritative.
   No externally hosted fonts, images, scripts or UI dependencies.
*/
html[data-theme] .app-shell{
  --hs-glass-blur:blur(18px) saturate(145%);
  --hs-glass-edge:rgba(255,255,255,.65);
  --hs-glass-glint:rgba(255,255,255,.86);
  --hs-glass-shadow:0 16px 46px rgba(18,33,71,.12),0 3px 12px rgba(18,33,71,.05),inset 0 1px 0 rgba(255,255,255,.75);
  --hs-glass-hover:0 22px 55px rgba(18,33,71,.18),0 8px 18px rgba(18,33,71,.07),inset 0 1px 0 rgba(255,255,255,.87);
  --hs-glass-card:linear-gradient(140deg,rgba(255,255,255,.92) 0%,rgba(255,255,255,.78) 47%,rgba(255,255,255,.86) 100%);
  --hs-glass-subcard:linear-gradient(150deg,rgba(255,255,255,.79),rgba(246,248,255,.62));
  --hs-glass-field:rgba(255,255,255,.76);
  --hs-glass-focus:rgba(24,33,71,.22);
}
html[data-theme="dark"] .app-shell{
  --hs-glass-edge:rgba(255,255,255,.21);
  --hs-glass-glint:rgba(255,255,255,.27);
  --hs-glass-shadow:0 20px 48px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.14);
  --hs-glass-hover:0 24px 60px rgba(0,0,0,.29),0 5px 16px rgba(0,0,0,.13),inset 0 1px 0 rgba(255,255,255,.18);
  --hs-glass-card:linear-gradient(140deg,rgba(255,255,255,.12),rgba(255,255,255,.045) 49%,rgba(255,255,255,.085));
  --hs-glass-subcard:linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.045));
  --hs-glass-field:rgba(255,255,255,.075);
  --hs-glass-focus:rgba(255,255,255,.31);
}

/* Quiet ambient reflections: the underlying navy/gold light/dark colors stay intact. */
html[data-theme] .app-shell .page-wrap{
  background-image:
    radial-gradient(ellipse 46% 31% at 93% 3%,rgba(212,173,85,.10),transparent 100%),
    radial-gradient(ellipse 44% 32% at 3% 32%,rgba(255,255,255,.18),transparent 100%),
    linear-gradient(180deg,rgba(255,255,255,.055),transparent 55%)!important;
  background-attachment:scroll!important;
}
html[data-theme="dark"] .app-shell .page-wrap{
  background-image:
    radial-gradient(ellipse 50% 32% at 95% 4%,rgba(212,173,85,.065),transparent 100%),
    radial-gradient(ellipse 40% 34% at 2% 38%,rgba(255,255,255,.055),transparent 100%)!important;
}
html[data-theme] .app-shell .page:not(.hidden){
  animation:hs-glass-page-in .46s cubic-bezier(.2,.75,.2,1) both;
}
@keyframes hs-glass-page-in{
  from{opacity:.82;transform:translateY(7px)}
  to{opacity:1;transform:translateY(0)}
}

/* Shared glass cards. Keep text colors inherited from the two-tone theme. */
html[data-theme] .app-shell .page :is(
  .panel,.premium-analytics-card,.h7-main-panel,.h7-stat,.dashboard-metrics,
  .hrc-panel,.hrc-stat,.break-stat,.break-scan-panel,.break-grid-card,
  .asset-stat,.premium-activity-item,.hs-self-card,.hs-self-panel,
  .hs-notification-compose,.hs-notification-hr-alerts,.hs-notification-item,
  .hr-master-detail,.hr-master-card,.hr-master-extra-collapse,
  .hns-ar-stat,.hns-ar-card
),
html[data-theme] #page-overview .metric-grid .metric-card.metric-link,
html[data-theme] #page-overview .overview-shortcut{
  background-color:transparent!important;
  background-image:var(--hs-glass-card)!important;
  border-color:var(--hs-glass-edge)!important;
  box-shadow:var(--hs-glass-shadow)!important;
  -webkit-backdrop-filter:var(--hs-glass-blur);
  backdrop-filter:var(--hs-glass-blur);
  border-radius:18px;
  transition:box-shadow .33s ease,border-color .33s ease,transform .33s cubic-bezier(.2,.75,.3,1),background-color .33s ease;
}
html[data-theme] .app-shell .page :is(
  .panel,.premium-analytics-card,.h7-main-panel,.h7-stat,.hrc-panel,.hrc-stat,
  .break-stat,.break-scan-panel,.asset-stat,.hs-notification-item,
  .hr-master-extra-collapse,.hns-ar-card
):hover,
html[data-theme] #page-overview .metric-grid .metric-card.metric-link:hover,
html[data-theme] #page-overview .overview-shortcut:hover{
  border-color:var(--hs-glass-glint)!important;
  box-shadow:var(--hs-glass-hover)!important;
}
html[data-theme] #page-overview .metric-grid .metric-card.metric-link:hover,
html[data-theme] #page-overview .overview-shortcut:hover,
html[data-theme] .app-shell .page button.premium-activity-item:hover{
  transform:translateY(-3px);
}

/* Extra reflections on priority cards. Use an overlay rather than swapping brand colors. */
html[data-theme] #page-overview :is(.premium-analytics-card,.metric-card.metric-link,.overview-shortcut){
  position:relative;
  isolation:isolate;
}
html[data-theme] #page-overview :is(.premium-analytics-card,.metric-card.metric-link,.overview-shortcut)::after{
  content:"";
  position:absolute;z-index:0;pointer-events:none;
  top:0;left:0;width:100%;height:100%;
  border-radius:inherit;
  background:linear-gradient(117deg,transparent 14%,rgba(255,255,255,.22) 32%,transparent 53%,rgba(255,255,255,.06) 78%,transparent 94%);
  opacity:.75;mix-blend-mode:screen;
}
html[data-theme="dark"] #page-overview :is(.premium-analytics-card,.metric-card.metric-link,.overview-shortcut)::after{
  opacity:.32;
}
html[data-theme] #page-overview :is(.premium-analytics-card,.metric-card.metric-link,.overview-shortcut)>*{
  position:relative;z-index:1;
}
/* Deliberate hover-only sheen, no constantly running distractions. */
html[data-theme] #page-overview :is(.premium-analytics-card,.metric-card.metric-link,.overview-shortcut)::after{
  background-size:240% 100%;
  background-position:120% 0;
  transition:background-position .72s cubic-bezier(.2,.75,.25,1),opacity .25s ease;
}
html[data-theme] #page-overview :is(.premium-analytics-card,.metric-card.metric-link,.overview-shortcut):hover::after{
  background-position:-90% 0;opacity:.95;
}

/* Internal cards, statuses and filter surfaces get softer glass treatment. */
html[data-theme] .app-shell .page :is(
 .h7-stat,.premium-activity-item,.asset-stat,.break-stat,
 .hs-self-status,.hs-self-asset-list li,.hr-master-personal-group,
 .hr-master-summary-item,.hrc-stat,.hns-ar-stat,.hns-ar-filterbar,
 .hs-notification-item
){
  background-image:var(--hs-glass-subcard)!important;
  border-color:var(--hs-glass-edge)!important;
  box-shadow:0 8px 22px rgba(24,33,71,.07),inset 0 1px rgba(255,255,255,.32)!important;
}
html[data-theme="dark"] .app-shell .page :is(
 .h7-stat,.premium-activity-item,.asset-stat,.break-stat,
 .hs-self-status,.hs-self-asset-list li,.hr-master-personal-group,
 .hr-master-summary-item,.hrc-stat,.hns-ar-stat,.hns-ar-filterbar,
 .hs-notification-item
){
  box-shadow:0 8px 23px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.12)!important;
}

/* Topbar/sidebar glass glow: retain exact original dark blue and gold accents. */
html[data-theme] .app-shell .topbar{
  background-image:linear-gradient(108deg,rgba(255,255,255,.08),transparent 36%,rgba(255,255,255,.045) 67%,transparent)!important;
  -webkit-backdrop-filter:blur(16px) saturate(130%);
  backdrop-filter:blur(16px) saturate(130%);
  box-shadow:0 9px 28px rgba(9,19,50,.16),inset 0 1px rgba(255,255,255,.09)!important;
}
html[data-theme] .app-shell .sidebar{
  background-image:
    radial-gradient(ellipse 58% 31% at 6% 88%,rgba(212,173,85,.12),transparent 100%),
    linear-gradient(145deg,rgba(255,255,255,.055),transparent 52%)!important;
  box-shadow:inset -1px 0 rgba(255,255,255,.16),8px 0 30px rgba(9,19,50,.13)!important;
}
html[data-theme] .app-shell .sidebar .nav-item{
  transition:background-color .25s ease,box-shadow .28s ease,transform .28s ease,border-color .28s ease;
}
html[data-theme] .app-shell .sidebar .nav-item:hover:not(.active){
  box-shadow:inset 0 1px rgba(255,255,255,.15),0 8px 22px rgba(0,0,0,.12)!important;
  transform:translateX(3px);
}
html[data-theme] .app-shell .sidebar .nav-item.active{
  box-shadow:0 10px 23px rgba(5,15,45,.18),inset 0 1px rgba(255,255,255,.52)!important;
}
html[data-theme] .app-shell .sidebar :is(.side-hint,.logout-btn),
html[data-theme] .app-shell .topbar :is(.server-state,.notification-bell,.theme-switch,.account-circle,.premium-search-shell){
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  box-shadow:inset 0 1px rgba(255,255,255,.14),0 5px 16px rgba(0,0,0,.09)!important;
}
html[data-theme] .app-shell .topbar :is(.notification-bell,.account-circle,.theme-switch){
  transition:box-shadow .26s ease,transform .26s ease;
}
html[data-theme] .app-shell .topbar :is(.notification-bell,.account-circle,.theme-switch):hover{
  transform:translateY(-2px);
  box-shadow:inset 0 1px rgba(255,255,255,.3),0 9px 22px rgba(0,0,0,.17)!important;
}

/* Brand-colored buttons retain their existing foreground and base fill. */
html[data-theme] .app-shell :is(.btn,.table-action,.reload-btn,.hr-master-buttons button,.break-tab,.hns-ar-tab,.leave-form-action){
  -webkit-backdrop-filter:blur(9px);
  backdrop-filter:blur(9px);
  box-shadow:0 5px 13px rgba(24,33,71,.085),inset 0 1px rgba(255,255,255,.45);
  transition:transform .22s ease,box-shadow .26s ease,filter .22s ease,border-color .22s ease;
}
html[data-theme] .app-shell :is(.btn,.table-action,.reload-btn,.hr-master-buttons button,.break-tab,.hns-ar-tab,.leave-form-action):hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 11px 24px rgba(24,33,71,.16),inset 0 1px rgba(255,255,255,.55);
  filter:brightness(1.025);
}
html[data-theme] .app-shell button:active:not(:disabled){
  transform:translateY(0);
}
html[data-theme] .app-shell :is(.btn,.table-action,.reload-btn):focus-visible,
html[data-theme] .app-shell .nav-item:focus-visible{
  outline:3px solid var(--hs-ink)!important;outline-offset:3px!important;
}

/* Glass input fields, excluding checkboxes/radio/buttons, without affecting validation. */
html[data-theme] .app-shell .page :is(
 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
 select,textarea
){
  -webkit-backdrop-filter:blur(9px);
  backdrop-filter:blur(9px);
  border-radius:12px;
  border-color:var(--hs-glass-edge)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.3),0 4px 11px rgba(24,33,71,.045);
  transition:border-color .22s ease,box-shadow .22s ease;
}
html[data-theme] .app-shell .page :is(
 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
 select,textarea
):focus-visible{
  outline:2px solid var(--hs-glass-focus);
  outline-offset:1px;
  box-shadow:0 0 0 4px var(--hs-glass-focus),inset 0 1px rgba(255,255,255,.22)!important;
}

/* Tables preserve column widths and native sticky headers; animate row fill only. */
html[data-theme] .app-shell .page :is(
 .table-scroll,.h7-table-viewport,.hr-master-scroll,.hrc-table-scroll,
 .hr-master-import-scroll,.hns-ar-table-wrap,.hrc-tbl
){
  border-color:var(--hs-glass-edge)!important;
  border-radius:15px;
  -webkit-backdrop-filter:blur(9px);
  backdrop-filter:blur(9px);
  box-shadow:inset 0 1px rgba(255,255,255,.28);
}
html[data-theme] .app-shell .page table tbody tr{
  transition:background-color .22s ease,box-shadow .22s ease;
}
html[data-theme] .app-shell .page table tbody tr:hover{
  background-color:rgba(255,255,255,.10);
}
html[data-theme="light"] .app-shell .page table tbody tr:hover{
  background-color:rgba(24,33,71,.045);
}
/* Don't transform rows: transformed table rows break sticky headers and focus. */
html[data-theme] .app-shell .page :is(.table-scroll,.h7-table-viewport) th{
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}

/* HR modals, leave preview, imported equipment assignment, dialogs. */
html[data-theme] :is(
 #live-modal .modal,.modal-content,.modal-dialog,.hr-master-modal,
 .hr-master-overlay .hr-master-dialog,.hns-ar-dialog,
 .leave-form-dialog,.hs-notification-dialog
){
  -webkit-backdrop-filter:blur(22px) saturate(145%);
  backdrop-filter:blur(22px) saturate(145%);
  border:1px solid var(--hs-glass-edge,rgba(255,255,255,.34))!important;
  box-shadow:0 28px 75px rgba(12,24,63,.25),inset 0 1px rgba(255,255,255,.35)!important;
  border-radius:22px;
}
html[data-theme] :is(.modal-overlay,.hr-master-overlay,.leave-form-overlay,.hns-ar-backdrop){
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
}
/* Keep dark-theme dialogs opaque enough for sensitive employee details. */
html[data-theme="dark"] :is(
 #live-modal .modal,.modal-content,.hr-master-modal,
 .hr-master-overlay .hr-master-dialog,.hns-ar-dialog,.leave-form-dialog
){
  background-color:var(--hs-card)!important;
}

/* Auth screen is outside .app-shell. Soft highlights, no content changes. */
html[data-theme] #auth-screen .auth-brand{
  isolation:isolate;
}
html[data-theme] #auth-screen .auth-brand::after{
  content:"";position:absolute;pointer-events:none;z-index:0;
  top:5%;left:-30%;width:85%;height:78%;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.12),transparent 67%);
  filter:blur(18px);
}
html[data-theme] #auth-screen .auth-content{
  padding:clamp(20px,2.6vw,37px);
  border:1px solid rgba(255,255,255,.60);
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.50),rgba(255,255,255,.08));
  box-shadow:0 18px 55px rgba(24,33,71,.07),inset 0 1px rgba(255,255,255,.65);
  -webkit-backdrop-filter:blur(18px);
  backdrop-filter:blur(18px);
}
html[data-theme="dark"] #auth-screen .auth-content{
  border-color:rgba(255,255,255,.21);
  background:linear-gradient(150deg,rgba(255,255,255,.12),rgba(255,255,255,.03));
  box-shadow:0 18px 50px rgba(0,0,0,.22);
}

/* Fully accessible light/dark, mobile and lower-power fallbacks. */
@media(max-width:900px){
  html[data-theme] .app-shell{--hs-glass-blur:blur(12px) saturate(130%);}
  html[data-theme] .app-shell .page :is(.panel,.premium-analytics-card,.h7-main-panel,.dashboard-metrics){
    border-radius:17px;
  }
  html[data-theme] .app-shell .sidebar .nav-item:hover:not(.active){transform:none}
}
@media(max-width:600px){
  html[data-theme] .app-shell{--hs-glass-blur:blur(8px) saturate(120%);}
  html[data-theme] .app-shell .page-wrap{background-attachment:scroll!important;}
  html[data-theme] #page-overview .metric-grid .metric-card.metric-link:hover,
  html[data-theme] #page-overview .overview-shortcut:hover{transform:none}
  html[data-theme] #auth-screen .auth-content{padding:20px;border-radius:18px}
}
@media(prefers-reduced-motion:reduce){
  html[data-theme] .app-shell *,
  html[data-theme] .app-shell *::before,
  html[data-theme] .app-shell *::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}
@media print{
  html[data-theme] .app-shell .page *,
  html[data-theme] #auth-screen *{
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
    animation:none!important;box-shadow:none!important;
  }
  html[data-theme] .app-shell .page-wrap{background-image:none!important}
}
@supports not ((backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px))){
  /* Solid surfaces on browsers that cannot blur, preserving contrast. */
  html[data-theme="light"] .app-shell{--hs-glass-card:linear-gradient(#fff,#fff);--hs-glass-subcard:linear-gradient(#f4f5f8,#f4f5f8);}
  html[data-theme="dark"] .app-shell{--hs-glass-card:linear-gradient(#182147,#182147);--hs-glass-subcard:linear-gradient(#222b52,#222b52);}
}

/* PERF PASS · 27 Nov 2026
   Backdrop-filter on every row, card and form creates many compositing layers.
   Opaque/glossy gradients and inset highlights look almost identical, with
   substantially less GPU work. Only the topbar/dialogs keep a real blur.
   Lower-powered phones avoid backdrop-filter completely.
*/
html[data-theme] .app-shell .page :is(
  .panel,.premium-analytics-card,.h7-main-panel,.h7-stat,.dashboard-metrics,
  .hrc-panel,.hrc-stat,.break-stat,.break-scan-panel,.break-grid-card,
  .asset-stat,.premium-activity-item,.hs-self-card,.hs-self-panel,
  .hs-notification-compose,.hs-notification-hr-alerts,.hs-notification-item,
  .hr-master-detail,.hr-master-card,.hr-master-extra-collapse,
  .hns-ar-stat,.hns-ar-card,.table-scroll,.h7-table-viewport,
  .hr-master-scroll,.hrc-table-scroll,.hr-master-import-scroll,
  .hns-ar-table-wrap,.hrc-tbl
),
html[data-theme] #page-overview .metric-grid .metric-card.metric-link,
html[data-theme] #page-overview .overview-shortcut,
html[data-theme] .app-shell .page table thead th,
html[data-theme] .app-shell .page :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
  select,textarea
),
html[data-theme] .app-shell :is(.btn,.table-action,.reload-btn,.hr-master-buttons button,.break-tab,.hns-ar-tab,.leave-form-action){
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html[data-theme] .app-shell .page:not(.hidden){
  /* Large data-heavy pages should not be animated/transformed as one giant GPU layer. */
  animation:hs-glass-page-opacity .19s ease-out both!important;
}
@keyframes hs-glass-page-opacity{
  from{opacity:.90}
  to{opacity:1}
}
/* Avoid always-on backdrop blurring on every topbar control. */
html[data-theme] .app-shell .sidebar :is(.side-hint,.logout-btn),
html[data-theme] .app-shell .topbar :is(.server-state,.notification-bell,.theme-switch,.account-circle,.premium-search-shell){
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
@media(max-width:900px),(hover:none) and (pointer:coarse){
  html[data-theme] .app-shell .topbar,
  html[data-theme] .app-shell .sidebar,
  html[data-theme] :is(
    #live-modal .modal,.modal-content,.modal-dialog,.hr-master-modal,
    .hr-master-overlay .hr-master-dialog,.hns-ar-dialog,.leave-form-dialog,.hs-notification-dialog,
    .modal-overlay,.hr-master-overlay,.leave-form-overlay,.hns-ar-backdrop
  ){
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  html[data-theme] .app-shell .page :is(.panel,.premium-analytics-card,.dashboard-metrics,.h7-main-panel){
    box-shadow:0 8px 23px rgba(18,33,71,.10),inset 0 1px rgba(255,255,255,.5)!important;
  }
  html[data-theme="dark"] .app-shell .page :is(.panel,.premium-analytics-card,.dashboard-metrics,.h7-main-panel){
    box-shadow:0 8px 23px rgba(0,0,0,.17),inset 0 1px rgba(255,255,255,.09)!important;
  }
}
@media(prefers-reduced-transparency:reduce){
  html[data-theme] .app-shell,
  html[data-theme] .app-shell .page{
    --hs-glass-blur:none;
  }
  html[data-theme] .app-shell .page :is(.panel,.premium-analytics-card,.h7-main-panel,.dashboard-metrics){
    background-image:linear-gradient(var(--hs-card),var(--hs-card))!important;
  }
  html[data-theme] .app-shell *,
  html[data-theme] .app-shell *::before,
  html[data-theme] .app-shell *::after{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
}
