/* BETA glass layer v2 (19 November 2026). Screen only, palette unchanged; follows
   output/ui/glassmorphism-prototype.html. Active only when <html> has class "glass-ui".
   Deliberately no backdrop-filter on .card or .content: a filtered ancestor becomes the containing
   block for position:fixed descendants and would trap component modals/overlays inside the card.
   Base controls (button/input/th) use :where() so they only replace the generic white defaults and
   never override component-specific colours (tabs, danger buttons, Meja Tagih, etc.). */
@media screen {
 html.glass-ui {
  --g-card:rgba(255,255,255,.58);
  --g-card-strong:rgba(255,255,255,.76);
  --g-edge:rgba(255,255,255,.78);
  --g-line:rgba(16,43,59,.07);
  --g-shadow:0 10px 34px rgba(16,43,59,.07),0 1px 2px rgba(16,43,59,.04),0 0 0 1px rgba(16,43,59,.045);
  --g-shine:inset 0 1px 0 rgba(255,255,255,.85);
 }
 /* Background: existing #f4f7fa with BETA-blue light and soft blurred orbs behind the glass. */
 html.glass-ui body {background-color:#f4f7fa;}
 html.glass-ui body::before {
  content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;
  background:
   radial-gradient(900px 620px at 88% -8%,rgba(8,127,177,.20),transparent 62%),
   radial-gradient(760px 560px at 8% 108%,rgba(2,132,199,.16),transparent 62%),
   radial-gradient(520px 420px at 52% 46%,rgba(16,43,59,.06),transparent 70%),
   radial-gradient(420px 320px at 30% 8%,rgba(229,242,250,.9),transparent 70%);
 }
 html.glass-ui body::after {
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
   radial-gradient(190px 190px at calc(94% - 170px) calc(18% + 170px),rgba(56,166,214,.30),rgba(8,127,177,.16) 55%,transparent 100%),
   radial-gradient(170px 170px at calc(22% + 150px) calc(100% - 90px),rgba(124,196,228,.28),rgba(2,132,199,.12) 60%,transparent 100%),
   radial-gradient(130px 130px at calc(48% + 110px) 50px,rgba(229,242,250,.55),rgba(135,195,223,.25) 60%,transparent 100%);
  filter:blur(40px);
 }
 html.glass-ui .app-shell {background:transparent;}

 /* Floating sidebar in the BETA button hover blue (#086c96 -> #087fb1, same as primary button hover) */
 html.glass-ui .app-shell>aside {
  inset:12px auto 12px 12px;height:auto;max-height:none;border-radius:22px;color:#fff;
  background:linear-gradient(165deg,rgba(8,108,150,.96),rgba(8,127,177,.92));
  -webkit-backdrop-filter:blur(22px) saturate(140%);backdrop-filter:blur(22px) saturate(140%);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 18px 50px rgba(8,108,150,.32),inset 0 1px 0 rgba(255,255,255,.22);
 }
 html.glass-ui .app-shell>aside .sidebar-logo {box-shadow:0 0 0 4px rgba(255,255,255,.18);}
 html.glass-ui .app-shell>aside .sidebar-brand strong {color:#fff;}
 html.glass-ui .app-shell>aside :is(.sidebar-brand small,.sidebar-bottom small) {color:#e0f2fe;}
 html.glass-ui .app-shell>aside .nav-label {color:#e0f2fe;}
 html.glass-ui .app-shell>aside>nav :is(button,a.sidebar-hr) {border-radius:12px;color:#f8fcfe;}
 html.glass-ui .app-shell>aside>nav :is(button,a.sidebar-hr):hover {background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.18);color:#fff;}
 html.glass-ui .app-shell>aside>nav button.active {
  background:rgba(255,255,255,.96);color:#075985;
  border-color:#fff;
  box-shadow:0 6px 18px rgba(4,47,73,.20),inset 0 1px 0 #fff;
 }
 html.glass-ui .app-shell>aside>nav .badge {background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.32);color:#fff;border-radius:7px;}
 html.glass-ui .app-shell>aside>nav .active .badge {background:#087fb1;border-color:#087fb1;color:#fff;}
 html.glass-ui .app-shell>aside .avatar {background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.35);color:#fff;}
 html.glass-ui .app-shell>aside .sidebar-bottom {border-top-color:rgba(255,255,255,.22);}
 html.glass-ui .app-shell>aside .sidebar-bottom .icon {color:#fff;}
 html.glass-ui .app-shell>aside .sidebar-bottom .icon:hover {background:rgba(255,255,255,.16);}

 /* Workspace, floating header */
 html.glass-ui .app-shell .workspace {margin-left:274px;}
 html.glass-ui .app-shell .workspace>header {
  top:12px;margin:12px 16px 0 0;border:1px solid var(--g-edge);border-radius:16px;
  background:var(--g-card-strong);
  -webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);
  box-shadow:var(--g-shadow),var(--g-shine);
 }
 html.glass-ui .app-shell .workspace>header .badge {background:rgba(229,242,250,.75);border:1px solid rgba(185,221,235,.8);border-radius:999px;}
 html.glass-ui .app-shell .content {padding:26px 16px 48px 2px;}
 html.glass-ui .app-shell .page-header h1 {font-size:28px;letter-spacing:-.8px;}

 /* Cards: translucent white, edge highlight, no backdrop-filter (see header note) */
 html.glass-ui .app-shell .card {background:var(--g-card);border-color:var(--g-edge);border-radius:18px;box-shadow:var(--g-shadow),var(--g-shine);}
 html.glass-ui .app-shell .card-header {border-bottom-color:rgba(16,43,59,.06);}
 html.glass-ui .app-shell .card .card {background:rgba(255,255,255,.5);border-color:rgba(255,255,255,.7);box-shadow:none;}
 html.glass-ui .app-shell .stat {position:relative;overflow:hidden;}
 html.glass-ui .app-shell .stat::before {content:"";position:absolute;left:0;top:16px;bottom:16px;width:4px;border-radius:0 4px 4px 0;background:#087fb1;pointer-events:none;}
 html.glass-ui .app-shell .stat::after {content:"";position:absolute;right:-30px;top:-30px;width:110px;height:110px;border-radius:50%;pointer-events:none;background:radial-gradient(circle,rgba(8,127,177,.16),transparent 70%);}
 html.glass-ui .app-shell .dashboard-project {background:var(--g-card);border-color:var(--g-edge);border-radius:18px;box-shadow:var(--g-shadow),var(--g-shine);transition:transform .18s,box-shadow .18s,background-color .18s,border-color .18s;}
 html.glass-ui .app-shell .dashboard-project:hover {background:rgba(255,255,255,.72);border-color:var(--g-edge);transform:translateY(-2px);box-shadow:0 16px 40px rgba(16,43,59,.10),var(--g-shine);}
 html.glass-ui .app-shell .dashboard-project progress {border-radius:999px;}
 html.glass-ui .app-shell :is(.office-view-tabs,.project-tabs) {background:rgba(255,255,255,.55);border-color:var(--g-edge);}
 :where(html.glass-ui .app-shell) .alert {background-color:rgba(240,249,255,.72);}

 /* Generic controls: glass only where the component kept the default white */
 :where(html.glass-ui .app-shell) button {
  background:rgba(255,255,255,.62);border-color:var(--g-edge);
  box-shadow:0 1px 2px rgba(16,43,59,.05),var(--g-shine);
 }
 :where(html.glass-ui .app-shell) button:hover {background:rgba(255,255,255,.85);}
 /* Same specificity as the beta-studio field rule it replaces, so component-specific fields keep theirs */
 :where(html.glass-ui) .app-shell :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]) {
  background:rgba(255,255,255,.66);border-color:rgba(216,226,233,.9);
  box-shadow:inset 0 1px 2px rgba(16,43,59,.04);
 }
 :where(html.glass-ui) .app-shell :is(input,select,textarea):disabled {background:rgba(243,246,249,.7);}
 html.glass-ui .app-shell .queue-item {background:rgba(255,255,255,.42);border-color:rgba(255,255,255,.75);box-shadow:var(--g-shine);}
 html.glass-ui .app-shell .queue-item:hover {background:rgba(255,255,255,.72);}
 html.glass-ui .app-shell>aside :is(button,input,select,textarea) {box-shadow:none;}
 html.glass-ui .app-shell .table-wrap {border-radius:0 0 18px 18px;}
 html.glass-ui .app-shell table:not(.gantt) th {
  background:rgba(245,248,251,.82);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
 }
 html.glass-ui .app-shell table:not(.gantt) :is(th,td) {border-bottom-color:rgba(16,43,59,.06);}
 html.glass-ui .app-shell table:not(.gantt) tbody tr:hover>td {background-color:rgba(255,255,255,.55);}
 html.glass-ui .app-shell .content .badge {border-radius:999px;}

 /* Component surfaces inside cards (white or #f8fafc in component CSS). Sticky columns, dialogs,
    PDF canvases, Gantt cells and meeting slides are deliberately left solid. */
 html.glass-ui .app-shell :is(.annual-row,.wf-slot-row,.wf-board-task,.order-groups li,.sp-table,.sp-mobile article,.rq-hero,.rq-filters,.rq-summary .rq-stat,.requests-panel>.table-wrap,.chart-panel,.cc-result,.button-link) {background:rgba(255,255,255,.55);}
 html.glass-ui .app-shell :is(.annual-heading,.annual-details,.wf-slot,.wf-commitment,.wf-day summary,.worklog .wl-cell,.order-panel,.ws-detail,.contract-card .info-grid,.contract-card .pre-line,.steps>div,.term-editor,.kom-empty,.kom-confirm,.event,.archive-note,.upload-box) {background:rgba(248,250,252,.5);}
 html.glass-ui .app-shell .annual-row:hover {background:rgba(255,255,255,.75);}
 html.glass-ui .app-shell .annual-name {background:rgba(255,255,255,.9);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);}

 /* Primary buttons: gradient between the two existing BETA blues */
 html.glass-ui :is(.app-shell,.login-page) button.primary:not(:disabled) {
  background:linear-gradient(135deg,#087fb1,#0284c7);border-color:rgba(255,255,255,.25);color:#fff;
  box-shadow:0 8px 22px rgba(8,127,177,.30),inset 0 1px 0 rgba(255,255,255,.3);
 }
 html.glass-ui :is(.app-shell,.login-page) button.primary:not(:disabled):hover {background:linear-gradient(135deg,#086c96,#087fb1);}

 /* Modal (App.vue) and mobile scrim */
 html.glass-ui .app-shell .modal-backdrop {background:rgba(16,43,59,.32);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);}
 html.glass-ui .app-shell .modal {background:#fff;border-color:var(--g-edge);border-radius:22px;box-shadow:0 30px 80px rgba(16,43,59,.25),var(--g-shine);}
 html.glass-ui .app-shell .modal-footer {background:#f9fbfc;}
 /* Every dialog/form window is a SOLID surface (user feedback 19 Nov: translucent forms were confusing).
    Only the dimmed backdrop behind it gets a light blur, so the window stands out from the page. */
 html.glass-ui .app-shell :is(.wf-dialog,.bt-dialog,.ci-dialog,.ar-modal>.card,.daily-panel,.rq-modal,.ce-dialog,.att-dialog,.ws-dialog,.sp-dialog,.recap-dialog,.report-dialog,.evidence-dialog,.session-recovery>section) {background:#fff;box-shadow:0 30px 80px rgba(16,43,59,.25);}
 html.glass-ui .app-shell :is(.modal,.wf-dialog,.bt-dialog,.ci-dialog,.ar-modal>.card,.daily-panel,.rq-modal,.ce-dialog,.att-dialog,.ws-dialog,.evidence-dialog) .card {background:#f8fafc;border-color:#e2e8f0;}
 html.glass-ui :is(.wf-overlay,.bt-overlay,.ci-overlay,.ar-modal,.daily-overlay,.rq-overlay,.ce-overlay,.att-overlay,.ws-overlay,.sp-overlay,.recap-overlay,.report-overlay,.evidence-overlay,.var-overlay,.crav-overlay,.session-recovery) {-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);}
 /* Sticky first columns stay solid, also on row hover, so scrolled cells never show through */
 html.glass-ui .app-shell table:not(.gantt) tr>:is(td,th):is(.sticky-client,.work-label),
 html.glass-ui .app-shell :is(.worklog .table-wrap table,table.track-gantt) tbody tr>td:first-child {background-color:#fff;}
 html.glass-ui .scrim {background:rgba(16,43,59,.35);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);}

 /* Meja Tagih: glass frame only; its cards, tables and sticky columns stay solid for readability */
 html.glass-ui .app-shell .collection.meja-tagih-theme[class] {background:rgba(255,255,255,.42);border-color:var(--g-edge);box-shadow:var(--g-shadow),var(--g-shine);}
 html.glass-ui .app-shell .collection.meja-tagih-theme .collection-tabs {background:rgba(255,255,255,.74);}
 html.glass-ui .app-shell .collection.meja-tagih-theme button:not(.primary):not(.active) {box-shadow:none;}

 /* Login: one floating glass panel, navy intro on the left, glass card on the right */
 html.glass-ui .login-page {min-height:calc(100vh - 24px);margin:12px;border-radius:24px;overflow:hidden;background:rgba(255,255,255,.18);border:1px solid var(--g-edge);box-shadow:var(--g-shadow),var(--g-shine);}
 /* Login intro: smooth BETA blue gradient (dark navy-blue -> button blue), soft light top-right only */
 html.glass-ui .login-page .login-intro {position:relative;overflow:hidden;background:linear-gradient(155deg,#082f49 0%,#075985 50%,#086c96 76%,#087fb1 100%);}
 html.glass-ui .login-page .login-intro::before {content:"";position:absolute;border-radius:50%;pointer-events:none;filter:blur(10px);width:420px;height:420px;right:-120px;top:-120px;background:radial-gradient(circle,rgba(56,166,214,.30),transparent 65%);}
 html.glass-ui .login-page .login-intro>* {position:relative;}
 html.glass-ui .login-page .login-card {width:min(420px,calc(100% - 48px));padding:34px 30px;border-radius:18px;background:var(--g-card-strong);border:1px solid var(--g-edge);box-shadow:var(--g-shadow),var(--g-shine);-webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);}
 html.glass-ui .login-page :is(input,select,textarea) {background:rgba(255,255,255,.66);border-color:rgba(216,226,233,.9);border-radius:11px;}

 /* Desktop sidebar: width proportional to the viewport, compact rows so all menus fit,
    and a minimised icon rail (html.side-mini, toggled by #beta-side-toggle, see app.blade.php). */
 @media(min-width:1001px) {
  html.glass-ui {--side-w:clamp(232px,17.2vw,264px);}
  html.glass-ui.side-mini {--side-w:76px;}
  html.glass-ui .app-shell>aside {width:var(--side-w);padding:20px 12px 14px;transition:width .22s ease,padding .22s ease;}
  html.glass-ui .app-shell .workspace {margin-left:calc(26px + var(--side-w));transition:margin-left .22s ease;}
  html.glass-ui .app-shell>aside .sidebar-brand {padding:0 8px 18px;}
  html.glass-ui .app-shell>aside .sidebar-logo {width:42px;height:42px;}
  html.glass-ui .app-shell>aside .sidebar-brand>div {min-width:0;white-space:nowrap;overflow:hidden;}
  html.glass-ui .app-shell>aside .nav-label {padding:0 12px 8px;white-space:nowrap;overflow:hidden;}
  html.glass-ui .app-shell>aside>nav {gap:2px;padding:2px 2px 10px;scrollbar-gutter:auto;scrollbar-color:rgba(255,255,255,.35) transparent;}
  html.glass-ui .app-shell>aside>nav::-webkit-scrollbar {width:5px;}
  html.glass-ui .app-shell>aside>nav::-webkit-scrollbar-track {background:transparent;}
  html.glass-ui .app-shell>aside>nav::-webkit-scrollbar-thumb {background:rgba(255,255,255,.35);}
  html.glass-ui .app-shell>aside>nav :is(button,a.sidebar-hr) {position:relative;min-height:38px;padding:8px 11px;gap:11px;font-size:12.5px;line-height:1.3;white-space:nowrap;overflow:hidden;}
  html.glass-ui .app-shell>aside>nav svg {width:18px;height:18px;}
  html.glass-ui .app-shell>aside .sidebar-bottom {padding:12px 4px 0;}
  html.glass-ui .app-shell>aside .sidebar-bottom strong {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  html.glass-ui .app-shell>aside .sidebar-bottom small {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

  /* Minimised rail: icons only, tooltips come from title attributes */
  html.glass-ui.side-mini .app-shell>aside {padding:20px 10px 14px;}
  html.glass-ui.side-mini .app-shell>aside .sidebar-brand {justify-content:center;padding:0 0 18px;}
  html.glass-ui.side-mini .app-shell>aside .sidebar-brand>div {display:none;}
  html.glass-ui.side-mini .app-shell>aside .nav-label {font-size:0;height:1px;padding:0;margin:0 10px 10px;background:rgba(255,255,255,.25);}
  html.glass-ui.side-mini .app-shell>aside>nav {padding:2px 0 10px;}
  html.glass-ui.side-mini .app-shell>aside>nav :is(button,a.sidebar-hr) {justify-content:center;padding:8px 0;font-size:0;gap:0;}
  html.glass-ui.side-mini .app-shell>aside>nav .badge {position:absolute;top:2px;right:calc(50% - 24px);margin:0;min-width:0;padding:0 4px;font-size:9px;line-height:14px;border-radius:7px;background:#fff;color:#075985;border-color:#fff;box-shadow:0 2px 6px rgba(4,47,73,.25);}
  html.glass-ui.side-mini .app-shell>aside .sidebar-bottom {flex-direction:column;align-items:center;gap:6px;padding:12px 0 0;}
  html.glass-ui.side-mini .app-shell>aside .sidebar-bottom>div {display:none;}
  html.glass-ui.side-mini .app-shell>aside .sidebar-bottom .icon {margin:0;}

  /* Toggle button riding on the sidebar edge; only when the app shell (not login) is on screen */
  html.glass-ui body:has(.app-shell>aside) #beta-side-toggle {display:grid;}
  html.glass-ui body:has(.wf) #beta-side-toggle {display:none;}
 }
 #beta-side-toggle {
  display:none;place-items:center;position:fixed;z-index:31;top:31px;left:calc(12px + var(--side-w,248px) - 13px);
  width:26px;height:26px;min-height:0;padding:0;border-radius:50%;cursor:pointer;color:#102b3b;
  background:rgba(255,255,255,.9);border:1px solid rgba(16,43,59,.12);
  box-shadow:0 4px 14px rgba(16,43,59,.18),inset 0 1px 0 #fff;
  transition:left .22s ease,background-color .15s,transform .15s;
 }
 #beta-side-toggle:hover {background:#fff;transform:scale(1.08);}
 #beta-side-toggle:focus-visible {outline:3px solid rgba(66,169,213,.55);outline-offset:2px;}
 #beta-side-toggle svg {width:14px;height:14px;transition:transform .22s ease;}
 html.side-mini #beta-side-toggle svg {transform:rotate(180deg);}
 @media(max-height:820px) and (min-width:1001px) {
  html.glass-ui .app-shell>aside .sidebar-brand {padding-bottom:12px;}
  html.glass-ui .app-shell>aside .sidebar-logo {width:38px;height:38px;}
  html.glass-ui .app-shell>aside {padding-top:16px;padding-bottom:12px;}
  html.glass-ui .app-shell>aside .nav-label {padding-bottom:6px;}
  html.glass-ui .app-shell>aside>nav {gap:1px;padding-bottom:6px;}
  html.glass-ui .app-shell>aside>nav :is(button,a.sidebar-hr) {min-height:32px;padding-top:5px;padding-bottom:5px;}
  html.glass-ui.side-mini .app-shell>aside>nav :is(button,a.sidebar-hr) {padding:5px 0;}
  html.glass-ui .app-shell>aside .sidebar-bottom {padding-top:10px;}
  #beta-side-toggle {top:27px;}
 }

 @media(max-width:1000px) {
  html.glass-ui .app-shell>aside {width:264px;max-width:calc(100vw - 44px);}
  html.glass-ui .app-shell>aside:not(.open) {transform:translateX(calc(-100% - 24px));}
  html.glass-ui .app-shell .workspace {margin-left:0;}
  html.glass-ui .app-shell .workspace>header {margin:12px 12px 0;}
  html.glass-ui .app-shell .content {padding:22px 12px 36px;}
 }
 @media(max-width:650px) {
  html.glass-ui .app-shell .content {padding:20px 12px 32px;}
  html.glass-ui .app-shell .page-header h1 {font-size:23px;}
  html.glass-ui .login-page {margin:0;min-height:100vh;border-radius:0;border:0;}
  html.glass-ui .login-page .login-card {padding:30px 22px;margin:28px auto;}
 }
 @media(prefers-reduced-motion:reduce) {
  html.glass-ui .app-shell .dashboard-project {transition:none;}
  html.glass-ui .app-shell .dashboard-project:hover {transform:none;}
  html.glass-ui .app-shell>aside,html.glass-ui .app-shell .workspace,#beta-side-toggle,#beta-side-toggle svg {transition:none;}
 }
 /* Readability fallbacks: no blur support, or user prefers less transparency */
 @supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  html.glass-ui {--g-card:rgba(255,255,255,.94);--g-card-strong:#fff;}
  html.glass-ui .app-shell>aside {background:#086c96;}
 }
 @media(prefers-reduced-transparency:reduce) {
  html.glass-ui {--g-card:#fff;--g-card-strong:#fff;}
  html.glass-ui .app-shell>aside {background:#086c96;-webkit-backdrop-filter:none;backdrop-filter:none;}
  html.glass-ui body::after {display:none;}
 }
}
