/* Local Aura-inspired Silver Mist adaptation. Source: https://github.com/CristianOlivera1/Aura/blob/main/lib/gradients.ts (MIT). */
body {
  --glass-solid:#f6faf7;
  --glass-tint:rgb(247 253 249 / 83%);
  --glass-edge:#c1d3c9;
  --glass-sheen:rgb(255 255 255 / 88%);
  --glass-shadow:0 10px 26px rgb(19 63 47 / 11%);
  --glass-focus:#166e50;
  --glass-input:#fcfefd;
  --glass-selection:#d6eee1;
}
body[data-theme="dark"] {
  --glass-solid:#20352d;
  --glass-tint:rgb(29 50 41 / 88%);
  --glass-edge:#527064;
  --glass-sheen:rgb(221 255 235 / 15%);
  --glass-shadow:0 12px 28px rgb(0 0 0 / 28%);
  --glass-focus:#91e5bb;
  --glass-input:#192c25;
  --glass-selection:#35594a;
}
body :is(.topbar,.mobile-dock,.header-filter-panel,.modal,#compareDialog,#financePreview,dialog.shift-editor) {
  background-color:var(--glass-solid);
  background-image:linear-gradient(150deg,var(--glass-sheen),transparent 54%);
  border:1px solid var(--glass-edge);
  box-shadow:inset 0 1px 0 var(--glass-sheen),var(--glass-shadow);
}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  body :is(.topbar,.mobile-dock,.header-filter-panel,.modal,#compareDialog,#financePreview,dialog.shift-editor) {
    background-color:var(--glass-tint);
    -webkit-backdrop-filter:blur(15px) saturate(130%);
    backdrop-filter:blur(15px) saturate(130%);
  }
}
body :is(.modal,#compareDialog,#financePreview,dialog.shift-editor) { border-radius:22px; }
body .modal-back:not(#loginGate), body dialog::backdrop { background-color:rgb(7 23 17 / 58%); }

body :is(.btn,.acts-tabs button,.expense-tabs button,.rev-tabs button,.view-toggle button) {
  border-radius:13px;
  border-color:var(--glass-edge);
  box-shadow:inset 0 1px 0 var(--glass-sheen),0 2px 4px rgb(15 45 33 / 8%);
  transition:box-shadow 150ms ease,background-color 150ms ease,border-color 150ms ease;
}
body :is(.btn:not(.primary):not(.danger),.acts-tabs button,.expense-tabs button,.rev-tabs button,.view-toggle button):not(.active):not([aria-pressed="true"]) {
  background-color:var(--glass-solid);
  background-image:linear-gradient(155deg,var(--glass-sheen),transparent 60%);
}
body :is(.acts-tabs,.expense-tabs,.rev-tabs,.view-toggle) button:is(.active,[aria-pressed="true"]) {
  background:var(--glass-selection);
  color:var(--ink);
  border-color:var(--glass-edge);
}
body .btn.primary {
  background-color:#176347;
  background-image:linear-gradient(155deg,#237e5a,#12553e);
  border-color:#17583f;
  color:#fff;
}
@media (hover:hover) {
  body :is(.btn,.acts-tabs button,.expense-tabs button,.rev-tabs button,.view-toggle button):hover:not(:disabled) {
    box-shadow:inset 0 1px 0 var(--glass-sheen),0 4px 12px rgb(10 42 28 / 20%);
  }
}
body :is(.field,.modal,.panel,.header-filter-panel) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]) {
  border-radius:11px;
  border-color:var(--glass-edge);
  background-color:var(--glass-input);
  box-shadow:inset 0 1px 3px rgb(14 48 32 / 8%);
}
body :is(button,input,select,textarea,summary,a):focus-visible { outline:2px solid var(--glass-focus);outline-offset:2px; }
body :is(.setting-row,.rev-history,.wo-history) {
  border-color:var(--glass-edge);
  border-radius:16px;
}
body :is(.rev-history,.wo-history,#page-invoices,#page-staff) table tbody tr:nth-child(even) {
  background-color:color-mix(in srgb,var(--glass-selection) 32%,transparent);
}
@media(max-width:650px) {
  body :is(.acts-tabs,.expense-tabs,.rev-tabs,.view-toggle) button { min-height:44px; }
  body dialog.shift-editor { border-radius:22px 22px 0 0; }
}
@media(prefers-reduced-motion:reduce) {
  body :is(.btn,.acts-tabs button,.expense-tabs button,.rev-tabs button,.view-toggle button) { transition:none; }
}
@media print {
  body :is(.panel,.modal,.btn) { background:#fff!important;box-shadow:none!important; }
}

body[data-theme="dark"] #payTable tbody td:first-child,
body[data-theme="dark"] .owner-matrix tbody td:first-child,
body[data-theme="dark"] #page-schedule .pool-schedule tbody td:first-child {background:#1f2d24;color:var(--ink);}
body[data-theme="dark"] #page-schedule .pool-schedule tbody td:first-child {background:#1f2d24!important;}
body[data-theme="dark"] #payTable thead th:first-child,
body[data-theme="dark"] .owner-matrix thead th:first-child,
body[data-theme="dark"] .schedule thead th:first-child {background:#202e25;color:var(--muted);}
body[data-theme="dark"] #payTable tbody tr:hover td:first-child {background:#283b30;}
body[data-theme="dark"] :is(.avatar,.self-banner .avatar,.account-avatar) {background:#304b3d;color:#b8ebce;}
body[data-theme="dark"] dialog.shift-editor button:not(.primary) {background:#263e33;color:#edf5ef;}

body[data-theme="dark"] :is(.workday-links,.owner-workday-grid) button {
  background:#22382e;color:#edf7ef;border-color:#426053;
}
body[data-theme="dark"] :is(.workday-links,.owner-workday-grid) button:is(:hover,:focus-visible) {background:#304c3e;border-color:#8ab69f;}
body[data-theme="dark"] :is(.workday-links button>span,.owner-workday-grid button>span,.workday-mark) {background:#365345;color:#d3f3df;}
body[data-theme="dark"] .cash-day-toggle {background:#263b32;color:#edf7ef;border-color:#577065;}
body[data-theme="dark"] .cash-day-toggle:is(.on,.active,[aria-pressed="true"],:has(input:checked)) {background:#594025;color:#fff2d7;border-color:#ba8c55;}
body[data-theme="dark"] .shift-12 {--shift-start:#4b391f;--shift-end:#352a1b;--shift-ink:#fff1ce;}
body[data-theme="dark"] .shift-14 {--shift-start:#533326;--shift-end:#3a271e;--shift-ink:#ffe7d9;}
body[data-theme="dark"] .shift-17 {--shift-start:#413454;--shift-end:#2c243a;--shift-ink:#f3e9ff;}
body[data-theme="dark"] .shift-19 {--shift-start:#293e58;--shift-end:#202e44;--shift-ink:#e5efff;}
body[data-theme="dark"] .shift-tech {--shift-start:#304a3a;--shift-end:#22372b;--shift-ink:#e3f6e9;}
body[data-theme="dark"] :is(.shift-12,.shift-14,.shift-17,.shift-19,.shift-tech) {
  background:linear-gradient(135deg,var(--shift-start),var(--shift-end)) !important;
  color:var(--shift-ink);
}
body[data-theme="dark"] :is(.shift-12,.shift-14,.shift-17,.shift-19,.shift-tech) :is(small,strong,b,.schedule-hours-value,.schedule-shift-station) {
  color:inherit;
  border-color:currentColor;
}
