
.bg-slideshow {
  position: fixed;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: -1;
}

.bg-slideshow li {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: imageAnimation 24s linear infinite;
}

.bg-slideshow li:nth-child(1) { background-image: url("https://safety.apexwebbuilders.in/assets/img/ecloslidernew1.jpg"); animation-delay: 0s; }
.bg-slideshow li:nth-child(2) { background-image: url("https://safety.apexwebbuilders.in/assets/img/ecoslidernew4.jpg"); animation-delay: 8s; }
.bg-slideshow li:nth-child(3) { background-image: url("https://safety.apexwebbuilders.in/assets/img/ecoslidernew5.jpg"); animation-delay: 16s; }

@keyframes imageAnimation {
  0% { opacity: 0; }
  10% { opacity: 1; }
  33% { opacity: 1; }
  43% { opacity: 0; }
  100% { opacity: 0; }
}:root {
  --bg: #f3f0e8;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --line: rgba(38, 61, 44, 0.12);
  --text: #143126;
  --muted: #5d7168;
  --accent: #0f766e;
  --accent-dark: #0d5f59;
  --danger: #ba3f38;
  --warning: #d18f26;
  --success: #25734e;
  --shadow: 0 22px 55px rgba(20, 49, 38, 0.12);
}

.portal-display-hidden {
  display: none !important;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 24%),
    radial-gradient(circle at right 20%, rgba(209, 143, 38, 0.14), transparent 20%),
    linear-gradient(180deg, #f8f5ee 0%, #efe8da 100%);
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }

.is-hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 30, 0.92), rgba(7, 10, 30, 0.72) 44%, rgba(7, 10, 30, 0.4)),
    url("https://safety.apexwebbuilders.in/assets/img/ecloslidernew4.jpg") center / cover no-repeat;
}

#loginScreen {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: auto;
  overflow-y: auto;
}

#loginScreen.is-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#appShell {
  position: relative;
  z-index: 10;
}

#appShell.is-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#loginForm input,
#loginForm select,
#loginForm textarea,
#loginForm button {
  pointer-events: auto !important;
  opacity: 1 !important;
}

body.login-mode > * {
  pointer-events: none !important;
}

body.login-mode #loginScreen,
body.login-mode #loginScreen * {
  pointer-events: auto !important;
}

body.login-mode > :not(#loginScreen) {
  display: none !important;
}

body.login-mode #loginScreen {
  display: grid !important;
}

/* Emergency login isolation: only the login form layer stays interactive */
body.login-mode #loginScreen * {
  pointer-events: none !important;
}

body.login-mode #loginScreen .login-box,
body.login-mode #loginScreen .login-panel,
body.login-mode #loginScreen .prelogin-nav,
body.login-mode #loginScreen .prelogin-nav *,
body.login-mode #loginScreen .prelogin-home,
body.login-mode #loginScreen .prelogin-home *,
body.login-mode #loginScreen .prelogin-contact,
body.login-mode #loginScreen .prelogin-contact *,
body.login-mode #loginScreen #loginForm,
body.login-mode #loginScreen #loginForm *,
body.login-mode #loginScreen .login-actions,
body.login-mode #loginScreen .login-actions *,
body.login-mode #loginScreen .login-help-links,
body.login-mode #loginScreen .login-help-links * {
  pointer-events: auto !important;
}

body.login-mode #loginScreen #loginForm input,
body.login-mode #loginScreen #loginForm select,
body.login-mode #loginScreen #loginForm textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
  caret-color: #1b2b24 !important;
}

.login-box {
  width: 100%;
  max-width: 460px;
  padding: 20px;
}

.prelogin-nav {
  width: 100%;
  min-height: 96px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(9, 9, 29, 0.96);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.prelogin-brand-group {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  min-width: 0;
}

.prelogin-brand {
  display: inline-flex;
  align-items: center;
  min-width: 210px;
  text-decoration: none;
}

.prelogin-brand img {
  width: min(230px, 42vw);
  max-height: 62px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  padding: 6px 10px;
}

.prelogin-trial-badge {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  padding: 9px 18px 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: linear-gradient(135deg, #20b15a 0%, #0f766e 48%, #2563eb 100%);
  box-shadow: 0 14px 32px rgba(32, 177, 90, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.prelogin-trial-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 30%, rgba(255, 255, 255, 0.3) 44%, transparent 58% 100%);
  transform: translateX(-115%);
  animation: trialBadgeSweep 3.2s ease-in-out infinite;
}

.prelogin-trial-badge span,
.prelogin-trial-badge strong {
  position: relative;
  z-index: 1;
}

.prelogin-trial-badge span {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fef08a;
}

.prelogin-trial-badge strong {
  font-size: clamp(0.88rem, 1.1vw, 1.08rem);
  line-height: 1.05;
}

@keyframes trialBadgeSweep {
  0%,
  48% {
    transform: translateX(-115%);
  }
  76%,
  100% {
    transform: translateX(115%);
  }
}

.prelogin-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.6vw, 36px);
  flex-wrap: wrap;
}

.prelogin-menu-item {
  position: relative;
}

.prelogin-menu-link {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font: inherit;
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.prelogin-menu-link:hover,
.prelogin-menu-link:focus-visible {
  color: #8ce7d5;
  outline: none;
}

.prelogin-menu-link i {
  font-size: 0.82em;
}

.prelogin-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  min-width: 320px;
  padding: 22px 28px;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 22px 44px rgba(6, 11, 28, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 10000;
}

.prelogin-menu-item:hover .prelogin-dropdown,
.prelogin-menu-item:focus-within .prelogin-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.prelogin-dropdown a {
  color: #111111;
  text-decoration: none;
  font-size: clamp(1.08rem, 1.35vw, 1.5rem);
  line-height: 1.2;
  font-weight: 500;
}

.prelogin-dropdown a:hover,
.prelogin-dropdown a:focus-visible {
  color: #0f766e;
  outline: none;
}

.prelogin-dropdown-list {
  display: grid;
  gap: 24px;
}

.prelogin-dropdown-wide {
  left: 50%;
  width: min(720px, calc(100vw - 36px));
  transform: translate(-50%, 10px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 70px;
}

.prelogin-menu-item:hover .prelogin-dropdown-wide,
.prelogin-menu-item:focus-within .prelogin-dropdown-wide {
  transform: translate(-50%, 0);
}

.prelogin-home {
  width: min(1840px, calc(100% - 52px));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 46px) 0;
  display: grid;
  grid-template-columns: minmax(255px, 330px) minmax(420px, 1fr) minmax(300px, 380px);
  gap: clamp(22px, 3vw, 48px);
  align-items: start;
  position: relative;
  z-index: 1;
}

.prelogin-hero {
  color: #ffffff;
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: center;
  min-height: calc(100vh - 154px);
  padding-top: clamp(8px, 4vh, 54px);
}

.prelogin-kicker {
  margin: 0;
  color: #90f0df;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.prelogin-hero h1 {
  margin: 0;
  max-width: 760px;
  color: #ffffff;
  font-size: clamp(2.25rem, 4.1vw, 4.25rem);
  line-height: 0.98;
  font-weight: 800;
}

.prelogin-copy {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.55;
}

.prelogin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.prelogin-actions .cta,
.prelogin-actions .ghost-btn {
  min-height: 50px;
  text-decoration: none;
}

.prelogin-actions .ghost-btn.dark {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.prelogin-actions .ghost-btn.dark:hover,
.prelogin-actions .ghost-btn.dark:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.prelogin-feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.prelogin-feature-row article {
  min-height: 126px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 16, 31, 0.58);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.prelogin-feature-row i {
  color: #8ce7d5;
  font-size: 1.5rem;
}

.prelogin-feature-row strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.prelogin-feature-row span {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.prelogin-contact {
  width: 100%;
  margin: 0;
  padding: clamp(18px, 2vw, 28px);
  min-height: calc(100vh - 154px);
  max-height: calc(100vh - 118px);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: start;
  overflow-y: auto;
  box-shadow: 0 24px 54px rgba(6, 11, 28, 0.18);
  position: relative;
  z-index: 5;
  scroll-margin-top: 116px;
}

.prelogin-contact-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.prelogin-contact-copy .prelogin-kicker {
  color: #0f766e;
}

.prelogin-contact-copy h2 {
  margin: 0;
  color: #183665;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.02;
  font-weight: 800;
}

.prelogin-contact-copy p {
  margin: 0;
  color: #36536a;
  font-size: 0.94rem;
  line-height: 1.5;
}

.prelogin-contact-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.prelogin-contact-form .grid-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.prelogin-contact-form label {
  display: grid;
  gap: 5px;
  color: #183665;
  font-weight: 700;
  font-size: 0.78rem;
}

.prelogin-contact-form input,
.prelogin-contact-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(24, 54, 101, 0.24);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 8px 10px;
  color: #143126;
}

.prelogin-service-checklist {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 7px;
  max-height: 144px;
  overflow-y: auto;
  color: #183665;
}

.prelogin-service-checklist legend {
  margin-bottom: 5px;
  font-weight: 800;
}

.prelogin-service-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.prelogin-service-checklist input {
  width: auto;
  min-height: auto;
}

.prelogin-budget {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
  color: #183665;
  font-size: 0.82rem;
}

.prelogin-budget legend {
  margin-bottom: 6px;
  font-weight: 800;
}

.prelogin-budget label,
.prelogin-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  min-width: 0;
}

.prelogin-contact-form .prelogin-consent {
  display: flex;
  justify-content: flex-start;
  line-height: 1.45;
}

.prelogin-budget input,
.prelogin-consent input {
  width: auto;
  min-height: auto;
}

.prelogin-contact-form .cta {
  justify-self: start;
  min-width: 98px;
  min-height: 44px;
}

.prelogin-contact-status {
  min-height: 22px;
  margin: 0;
  color: #0f766e;
  font-weight: 800;
}

.prelogin-contact-status.is-error {
  color: #ba3f38;
}

.login-panel {
  width: min(720px, 100%);
  padding: 30px;
}

.prelogin-home .login-box {
  max-width: 360px;
  padding: 0;
  justify-self: end;
}

.prelogin-home .login-panel {
  width: 100%;
  padding: 22px;
  border-radius: 24px !important;
}

.prelogin-home .raiseehs-logo-login {
  width: min(285px, 100%);
  max-height: 112px;
}

.prelogin-home .login-form {
  gap: 12px;
}

.prelogin-home .login-form label > span {
  font-size: 0.8rem;
}

.prelogin-home #loginForm input,
.prelogin-home #loginForm select {
  min-height: 42px;
}

.prelogin-home .login-actions {
  margin-top: 2px;
}

.prelogin-home .login-help-links {
  gap: 12px;
  font-size: 0.84rem;
}

.login-brand,
.login-actions,
.session-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-name {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 800;
  color: #1f4fc9;
  letter-spacing: 0.01em;
}

.software-name {
  margin: 10px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #29a33a;
  text-align: center;
}

.software-name.inline {
  margin: 0;
  font-size: inherit;
  text-align: left;
}

.login-copy {
  margin: 24px 0 18px;
}

.login-copy h2,
.login-copy p {
  margin: 0;
}

.login-copy p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 560px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-actions {
  flex-wrap: nowrap;
  justify-content: center;
}

.login-help-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}

@media (max-width: 520px) {
  .login-shell {
    padding: 12px;
    place-items: start center;
  }

  .login-box {
    max-width: 100%;
    padding: 0;
  }

  .login-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .login-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .login-actions .cta,
  .login-actions .ghost-btn {
    width: 100%;
    min-width: 0;
  }

  .login-help-links {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

.text-link-btn {
  border: 0;
  background: transparent;
  color: #1f4fc9;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.text-link-btn:hover {
  color: #1542ad;
  text-decoration: underline;
}
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 6px 22px 28px;
  background: rgba(17, 31, 24, 0.92);
  color: #edf6f1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.brand,
.topbar,
.section-head,
.hero,
.donut-wrap,
.approval-steps,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { gap: 14px; }

.sidebar .brand {
  position: relative;
  top: -8px;
  margin-bottom: -14px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  box-shadow: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.brand-logo.small {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.brand-logo.large {
  width: 86px;
  height: 86px;
  border-radius: 999px;
}

.raiseehs-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.raiseehs-logo-login {
  width: min(420px, 82vw);
  max-height: 150px;
}

.raiseehs-logo-sidebar {
  width: min(180px, 100%);
  max-height: 72px;
  border-radius: 14px;
}

.raiseehs-logo-topbar {
  width: min(430px, 56vw);
  max-height: 132px;
}

.sidebar-logo-brand {
  justify-content: center;
  padding: 2px 0 10px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #78c2a4);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
}

.brand h1, .topbar h2, .hero h3, .section-head h3, .module-card h4 { margin: 0; }

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar .eyebrow, .side-card-label { color: rgba(237, 246, 241, 0.68); }

.side-nav { display: grid; gap: 8px; }

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-toggle {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.nav-toggle:hover,
.nav-toggle:focus,
.nav-toggle:active,
.nav-toggle.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: #edf6f1;
  outline: none;
  box-shadow: none;
}

.site-submenu {
  display: none;
  gap: 6px;
  margin-top: -2px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
}

.site-submenu.is-open {
  display: grid;
}

.settings-submenu {
  display: none;
  gap: 6px;
  margin-top: -2px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.settings-submenu.is-open {
  display: grid;
}

.site-submenu-link {
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(237, 246, 241, 0.88);
  text-align: left;
  font: inherit;
  padding: 10px 14px 10px 24px;
  border-radius: 12px;
  cursor: pointer;
}

.site-submenu-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-submenu-link {
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(237, 246, 241, 0.88);
  text-align: left;
  font: inherit;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-submenu-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-submenu-link.module-active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-group-title {
  padding: 8px 14px 2px;
  color: rgba(237, 246, 241, 0.58);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-link.module-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-group {
  display: grid;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-title {
  margin: 0;
  color: rgba(237, 246, 241, 0.58);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link {
  color: inherit;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-link.subtle {
  color: rgba(237, 246, 241, 0.78);
  background: rgba(255, 255, 255, 0.03);
}

.side-card {
  margin-top: auto;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: grid;
  gap: 8px;
}

.side-card strong { font-size: 1.05rem; }
.side-card span { color: rgba(237, 246, 241, 0.74); font-size: 0.92rem; }

.main-content {
  padding: 18px 22px 22px;
  display: grid;
  gap: 14px;
}

.company-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  min-height: 88px;
}

.company-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
  grid-column: 2;
  position: relative;
  top: -8px;
  left: -80px;
}

.topbar, .section-head, .hero { justify-content: space-between; }

.topbar-strong {
  display: none;
}

.topbar-strong .eyebrow,
.topbar-copy {
  color: rgba(244, 251, 248, 0.76);
}

.topbar-copy {
  margin: 10px 0 0;
  max-width: 640px;
}

.topbar-actions {
  width: 100%;
  justify-content: flex-end;
}

.profile-menu {
  display: grid;
  justify-items: end;
  gap: 6px;
  grid-column: 3;
}

.profile-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}
.profile-icon {
  min-width: 74px;
  min-height: 46px;
  height: auto;
  padding: 8px 18px;
  border-radius: 999px;
  display: inline-flex;
  place-items: center;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f4fc9, #29a33a);
  color: #fff28a;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.05;
  max-width: 250px;
  box-shadow: 0 6px 16px rgba(16, 34, 92, 0.2);
  text-shadow: 0 1px 2px rgba(6, 19, 62, 0.32);
}

.profile-panel {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.profile-site-switch {
  display: grid;
  gap: 4px;
  justify-items: end;
  width: min(220px, 100%);
}

.profile-site-switch label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.profile-site-switch select {
  min-width: 180px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.profile-logout {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 14px;
}

.company-bar .session-info {
  background: rgba(20, 49, 38, 0.08);
  color: var(--text);
}

.profile-change-password {
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 14px;
}
.company-bar .profile-logout {
  color: var(--text);
  border-color: rgba(20, 49, 38, 0.12);
  background: rgba(20, 49, 38, 0.04);
}

.cta {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta {
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.24);
}

.cta.secondary { background: linear-gradient(135deg, #204c3c, #2d6a54); }
.cta:hover { transform: translateY(-1px); }

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.ghost-btn.small {
  min-height: 34px;
  min-width: 68px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.table-wrap .ghost-btn,
.compact-table .ghost-btn {
  color: var(--text);
  background: rgba(20, 49, 38, 0.08);
  border: 1px solid rgba(20, 49, 38, 0.18);
}

.settings-table-wrap .ghost-btn {
  color: var(--text);
  background: rgba(20, 49, 38, 0.08);
  border: 1px solid rgba(20, 49, 38, 0.18);
}

.permit-action-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.permit-decision-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.permit-decision-group .decision-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 0.78rem;
  color: var(--text);
}

.permit-decision-group input[type="radio"] {
  width: auto;
}

.permit-action-group .ghost-btn.small {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.1;
}

.permit-action-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permit-action-panel {
  display: grid;
  gap: 8px;
  width: min(100%, 320px);
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(20, 49, 38, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 245, 0.9));
}

.permit-action-heading {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.permit-action-note {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}

.permit-comment-input {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(20, 49, 38, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.permit-comment-input:focus {
  outline: none;
  border-color: rgba(39, 181, 74, 0.42);
  box-shadow: 0 0 0 3px rgba(39, 181, 74, 0.1);
}

.permit-comment-trail {
  display: grid;
  gap: 8px;
  width: min(100%, 320px);
}

.permit-comment-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(20, 49, 38, 0.1);
  background: rgba(249, 251, 250, 0.96);
}

.permit-comment-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.permit-comment-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.permit-comment-meta,
.permit-comment-text,
.permit-comment-extra {
  font-size: 0.78rem;
  line-height: 1.45;
}

.permit-comment-meta {
  color: var(--text-light);
}

.permit-comment-text,
.permit-comment-extra {
  color: var(--text);
}

.ghost-btn.dark {
  color: var(--text);
  border-color: rgba(20, 49, 38, 0.12);
  background: rgba(20, 49, 38, 0.04);
}

.ghost-btn:hover,
.settings-edit-btn:hover,
.settings-delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(22, 49, 38, 0.1);
}

.form-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-action-row .ghost-btn,
.permit-action-group .ghost-btn {
  white-space: nowrap;
}

[class*="-view-btn"],
[data-permit-action="view"] {
  color: #0f4f59 !important;
  background: rgba(15, 122, 132, 0.12) !important;
  border-color: rgba(15, 122, 132, 0.22) !important;
}

[class*="-edit-btn"],
[data-permit-action="edit"],
[data-permit-action="save-decision"],
#monthlySwitchEditBtn {
  color: #1f4fc9 !important;
  background: rgba(31, 79, 201, 0.1) !important;
  border-color: rgba(31, 79, 201, 0.2) !important;
}

[class*="-delete-btn"],
[data-permit-action="delete"] {
  color: #a33e35 !important;
  background: rgba(191, 74, 65, 0.1) !important;
  border-color: rgba(191, 74, 65, 0.18) !important;
}

[class*="-print-btn"],
[data-permit-action="print"] {
  color: #8b5e1d !important;
  background: rgba(139, 94, 29, 0.11) !important;
  border-color: rgba(139, 94, 29, 0.2) !important;
}

[class*="-download-btn"],
[class*="-preview-btn"] {
  color: #2f7d4e !important;
  background: rgba(47, 125, 78, 0.1) !important;
  border-color: rgba(47, 125, 78, 0.2) !important;
}

.session-info {
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  font-size: 0.96rem;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 28px;
  background: linear-gradient(120deg, rgba(16, 52, 42, 0.95), rgba(17, 76, 68, 0.86));
  color: #f4fbf8;
}

.hero .eyebrow, .hero-copy { color: rgba(244, 251, 248, 0.82); }

.hero h3 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  max-width: 740px;
}

.hero-copy { max-width: 620px; margin-bottom: 0; }

.hero-badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 14px;
  width: min(420px, 100%);
}

.metric-pill {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-pill span, .kpi-card span, .module-card p, .legend span, .alert-item span, .upload-meta, .approval-step, .form-success {
  color: var(--muted);
}

.metric-pill strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
  color: #fff;
}

.dashboard-grid, .analytics-grid, .module-grid, .form-layout, .grid-two, .grid-three, .ops-strip, .admin-grid, .audience-grid, .deployment-grid, .sites-grid, .workspace-split {
  display: grid;
  gap: 20px;
}

.utility-bar {
  padding: 12px 18px;
  display: block;
}

.icon-shortcuts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.icon-shortcut {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid #e6573b;
  display: grid;
  place-items: center;
  color: #e6573b;
  font-size: 1.45rem;
  background: rgba(255, 255, 255, 0.7);
}

.icon-shortcut span:last-child {
  font-weight: 700;
  line-height: 1.2;
  max-width: 110px;
}

.icon-shortcut:hover .icon-ring {
  background: rgba(230, 87, 59, 0.08);
}

.ops-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sites-grid { grid-template-columns: 1.05fr 0.95fr; }
.audience-grid { grid-template-columns: 1fr 1fr; }
.dashboard-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analytics-grid { grid-template-columns: 1.3fr 0.9fr 0.9fr; }
.admin-grid { grid-template-columns: 1.2fr 0.8fr 0.8fr; }
.deployment-grid { grid-template-columns: 1.1fr 0.9fr; }
.module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-layout { grid-template-columns: 1fr 1fr; }
.workspace-split { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: start; }

.ops-card, .kpi-card, .chart-card, .donut-card, .alerts-card, .module-card, .form-card, .table-card, .quick-card { padding: 22px; }

.audience-card,
.field-panel,
.office-panel,
.timeline-card,
.site-rollup-card,
.site-table-card {
  padding: 22px;
}

.rollup-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.rollup-summary div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.rollup-summary strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.rollup-summary span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-network {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.network-hub {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(17, 31, 24, 0.96), rgba(26, 58, 46, 0.9));
  color: #fff;
  font-weight: 800;
  width: fit-content;
}

.network-sites {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.network-sites span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.88rem;
}

.site-open-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.site-pill-btn {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.88rem;
}

.site-table-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-align: left;
}

.site-drilldown {
  margin-bottom: 20px;
}

.site-drilldown-card {
  padding: 22px;
}

.site-detail-meta {
  margin: 8px 0 0;
  color: var(--muted);
}

.site-module-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 20px 0;
}

.site-module-tab {
  border: 1px solid rgba(20, 49, 38, 0.08);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
}

.site-module-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: transparent;
}

.site-module-pane {
  display: none;
}

.site-module-pane.active {
  display: block;
}

.site-overview-grid,
.site-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.site-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.site-overview-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(20, 49, 38, 0.08);
}

.site-overview-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.site-overview-card strong {
  font-size: 1.45rem;
}

.empty-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.workspace-left {
  display: grid;
  gap: 20px;
}

.workspace-split.module-focused {
  grid-template-columns: 1fr;
}

.workspace-split.module-focused .workspace-left {
  display: none;
}

.workspace-card,
.workspace-right {
  padding: 22px;
}

.module-launcher {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.dashboard-launcher {
  margin-top: 16px;
}

.module-tab {
  border: 1px solid rgba(20, 49, 38, 0.08);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
}

.module-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: transparent;
}

.module-pane {
  display: none;
}

.module-pane.active {
  display: block;
}

.module-pane-head {
  margin-bottom: 18px;
}

.module-pane-head h4,
.report-card strong {
  margin: 0 0 6px;
}

.module-pane-head p,
.report-card span,
.chat-bubble p {
  margin: 0;
  color: var(--muted);
}

.chat-feed,
.report-cards {
  display: grid;
  gap: 12px;
}

.view-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.view-toolbar label {
  display: grid;
  gap: 6px;
}

.view-toolbar span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.chat-bubble,
.report-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(20, 49, 38, 0.08);
}

.detail-card {
  display: grid;
  gap: 14px;
}

.settings-context {
  margin-bottom: 18px;
}

.settings-context label {
  display: grid;
  gap: 8px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

.settings-preview-menu {
  display: grid;
  gap: 8px;
}

.settings-preview-link {
  border: 0;
  background: rgba(20, 49, 38, 0.04);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-preview-link.active {
  background: rgba(20, 49, 38, 0.1);
  font-weight: 700;
}

.settings-data-sheet {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.settings-form {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.settings-form select[multiple],
.settings-employee-modal-card .settings-edit-modal-grid select[multiple] {
  min-height: 156px;
  height: auto;
}

.settings-checklist {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.settings-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(20, 49, 38, 0.04);
}

.settings-checklist input {
  width: auto;
}

.monthly-entry-wrap input {
  min-width: 110px;
}

.settings-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(20, 49, 38, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.settings-table-wrap table {
  margin: 0;
}

.settings-helper {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

body.dialog-open {
  overflow: hidden;
}

.settings-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
  padding: 18px;
  display: grid;
  place-items: center;
}

.settings-edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 18, 0.6);
}

.settings-edit-modal-card {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid rgba(20, 49, 38, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 249, 247, 0.95));
  box-shadow: 0 24px 56px rgba(11, 24, 20, 0.26);
  padding: 18px;
}

.settings-edit-modal-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.settings-edit-modal-head strong {
  font-size: 1.1rem;
  color: #143126;
}

.settings-edit-modal-head p {
  margin: 0;
  color: #4f6860;
}

.settings-edit-modal-form {
  display: grid;
  gap: 14px;
}

.settings-edit-modal-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-edit-modal-grid label {
  display: grid;
  gap: 7px;
}

.settings-edit-modal-grid label span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3a5750;
  text-transform: uppercase;
}

.settings-edit-modal-grid input,
.settings-edit-modal-grid select {
  height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 49, 38, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

.settings-edit-modal-grid textarea {
  min-height: 96px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 49, 38, 0.16);
  background: rgba(255, 255, 255, 0.96);
  resize: vertical;
}

.settings-edit-modal-span-2 {
  grid-column: span 2;
}

.settings-edit-modal-error {
  min-height: 20px;
  margin: 0;
  color: #b73636;
  font-weight: 700;
}

.settings-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .settings-edit-modal-grid {
    grid-template-columns: 1fr;
  }

  .settings-edit-modal-span-2 {
    grid-column: span 1;
  }
}

.settings-employee-toolbar {
  margin: 18px 0 14px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(18, 70, 58, 0.12);
  background:
    radial-gradient(circle at top left, rgba(106, 189, 171, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 243, 0.96));
  box-shadow: 0 18px 34px rgba(20, 49, 38, 0.08);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.settings-employee-toolbar-copy {
  display: grid;
  gap: 6px;
}

.settings-employee-toolbar-copy strong {
  font-size: 1.2rem;
  color: #17352b;
}

.settings-employee-toolbar-copy p {
  margin: 0;
  color: #4d6960;
  line-height: 1.55;
}

.settings-employee-add-btn {
  min-width: 170px;
  min-height: 52px;
  border-radius: 18px;
}

.settings-employee-modal-card {
  width: min(940px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(168, 200, 190, 0.55);
  background:
    radial-gradient(circle at top left, rgba(114, 208, 188, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 249, 246, 0.98));
  box-shadow: 0 28px 60px rgba(11, 24, 20, 0.2);
}

.settings-employee-modal-card .settings-edit-modal-head {
  gap: 8px;
  margin-bottom: 18px;
}

.settings-employee-modal-card .settings-edit-modal-head strong {
  font-size: clamp(1.6rem, 2vw, 2rem);
  color: #17352b;
}

.settings-employee-modal-card .settings-edit-modal-head p {
  font-size: 1rem;
  color: #5a746b;
}

.settings-employee-modal-card .settings-edit-modal-form {
  gap: 18px;
}

.settings-employee-modal-card .settings-edit-modal-grid {
  gap: 18px 16px;
}

.settings-employee-modal-card .settings-edit-modal-grid label {
  gap: 10px;
}

.settings-employee-modal-card .settings-edit-modal-grid label span {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #44655b;
}

.settings-employee-modal-card .settings-edit-modal-grid input,
.settings-employee-modal-card .settings-edit-modal-grid select,
.settings-employee-modal-card .settings-edit-modal-grid textarea {
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(158, 184, 175, 0.7);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 2px rgba(18, 44, 36, 0.04);
}

.settings-employee-modal-card .settings-edit-modal-grid input:focus,
.settings-employee-modal-card .settings-edit-modal-grid select:focus,
.settings-employee-modal-card .settings-edit-modal-grid textarea:focus {
  outline: none;
  border-color: rgba(68, 176, 152, 0.75);
  box-shadow: 0 0 0 4px rgba(68, 176, 152, 0.14);
}

.settings-employee-modal-card .settings-edit-modal-actions {
  padding-top: 6px;
  gap: 12px;
}

.settings-employee-modal-card .settings-edit-modal-actions .ghost-btn.dark.small,
.settings-employee-modal-card .settings-edit-modal-actions .cta.secondary {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
}

.settings-employee-modal-card .settings-edit-modal-actions .cta.secondary {
  min-width: 172px;
}

@media (max-width: 760px) {
  .settings-employee-toolbar {
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .settings-employee-add-btn {
    width: 100%;
  }

  .settings-employee-modal-card {
    padding: 18px;
    width: min(100vw - 18px, 100%);
  }
}

.settings-master-modal-card {
  width: min(1080px, calc(100vw - 36px));
}

.settings-master-modal-card .settings-edit-modal-actions .ghost-btn.dark.small,
.settings-master-modal-card .settings-edit-modal-actions .cta.secondary,
.settings-master-modal-card .settings-edit-modal-actions .settings-delete-btn {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
}

.settings-master-modal-card .settings-edit-modal-grid input[type="file"] {
  min-height: 54px;
  padding: 12px 14px;
}

.settings-master-modal-card .detail-grid {
  gap: 14px;
}

.settings-master-modal-card .detail-item {
  background: rgba(255, 255, 255, 0.88);
}

.settings-master-detail-span-2 {
  grid-column: span 2;
}

.settings-master-modal-sections {
  display: grid;
  gap: 18px;
}

.settings-master-modal-section {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(18, 70, 58, 0.1);
  background:
    radial-gradient(circle at top left, rgba(114, 208, 188, 0.09), transparent 32%),
    rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.settings-master-modal-section > strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1rem;
  color: #17352b;
}

.settings-master-modal-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.settings-master-modal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(33, 107, 88, 0.12);
  color: #27493f;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-master-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-master-summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(18, 70, 58, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 244, 0.92));
}

.settings-master-summary-card span {
  display: block;
  margin-bottom: 8px;
  color: #5a746b;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-master-summary-card strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.05;
  color: #17352b;
}

.settings-master-modal-helper {
  margin: 0;
  color: #5a746b;
  line-height: 1.55;
}

.settings-approval-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(18, 70, 58, 0.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(241, 248, 245, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 34px rgba(18, 55, 42, 0.08);
}

.settings-approval-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.settings-approval-head strong {
  display: block;
  color: #12372a;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.settings-approval-head p {
  margin: 0;
  color: #4b665c;
  font-size: 0.93rem;
}

.settings-master-modal-danger .settings-edit-modal-head strong {
  color: #8e2b2b;
}

@media (max-width: 760px) {
  .settings-master-modal-summary {
    grid-template-columns: 1fr;
  }

  .settings-master-modal-card .detail-grid {
    grid-template-columns: 1fr;
  }

  .settings-master-modal-section {
    padding: 16px;
  }

  .settings-master-detail-span-2 {
    grid-column: span 1;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(20, 49, 38, 0.08);
}

.detail-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-item strong {
  display: block;
  line-height: 1.45;
}

.chat-bubble strong {
  display: block;
  margin-bottom: 6px;
}

.chat-input {
  margin-top: 16px;
}

.compact-table table {
  margin-top: 0;
}

.field-card {
  background: linear-gradient(135deg, rgba(228, 247, 241, 0.96), rgba(255, 255, 255, 0.9));
}

.office-card {
  background: linear-gradient(135deg, rgba(233, 240, 255, 0.96), rgba(255, 255, 255, 0.9));
}

.audience-points {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.audience-points div,
.field-action,
.office-metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 49, 38, 0.06);
}

.audience-points strong,
.field-action strong,
.office-metric strong {
  display: block;
  margin-bottom: 6px;
}

.audience-points span,
.field-action span,
.office-metric span {
  color: var(--muted);
  font-size: 0.93rem;
}

.ops-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 247, 244, 0.88));
  display: grid;
  gap: 8px;
}

.ops-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ops-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.ops-card small {
  color: var(--muted);
  font-size: 0.92rem;
}

.kpi-card strong {
  display: block;
  font-size: 2rem;
  margin: 16px 0 8px;
}

.trend {
  display: inline-flex;
  margin-top: 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.trend.up { color: var(--success); }
.trend.down { color: #1b6a59; }
.trend.neutral { color: #8a610f; }

.accent-blue { background: linear-gradient(180deg, rgba(214, 234, 255, 0.95), rgba(255, 255, 255, 0.75)); }
.accent-gold { background: linear-gradient(180deg, rgba(255, 238, 205, 0.95), rgba(255, 255, 255, 0.75)); }
.accent-red { background: linear-gradient(180deg, rgba(255, 220, 216, 0.95), rgba(255, 255, 255, 0.75)); }
.accent-green { background: linear-gradient(180deg, rgba(220, 246, 230, 0.95), rgba(255, 255, 255, 0.75)); }

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-dark);
  font-size: 0.85rem;
  white-space: nowrap;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 6px;
}

.chart-summary.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-summary div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.chart-summary strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.chart-summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.bar-chart {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 16px;
  padding-top: 14px;
}

.bar-col { flex: 1; text-align: center; }

.bar-col strong {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
}

.bar {
  display: block;
  width: 100%;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, #1d8f84, #0b4b49);
  min-height: 22px;
}

.bar-col label { display: block; margin-top: 12px; color: var(--muted); }

.donut-wrap { justify-content: start; margin-top: 20px; }

.donut {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#c25735 0 28%, #e3b24b 28% 52%, #1f8f83 52% 76%, #335dc9 76% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: var(--panel-strong);
}

.legend { display: grid; gap: 12px; }
.legend div { display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 999px; }
.hot-work { background: #c25735; }
.cold-work { background: #e3b24b; }
.confined { background: #1f8f83; }
.electrical { background: #335dc9; }

.alert-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.alert-item {
  padding: 16px;
  border-radius: 20px;
  border-left: 5px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 6px;
}

.alert-item.critical { border-color: var(--danger); }
.alert-item.warning { border-color: var(--warning); }
.alert-item.info { border-color: var(--accent); }

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.table-toolbar select {
  min-width: 160px;
  padding: 11px 14px;
}

.shift-monthly-export-toolbar {
  align-items: flex-end;
}

.shift-monthly-export-toolbar .toolbar-filters {
  flex-wrap: wrap;
}

.shift-monthly-export-toolbar .toolbar-filters label {
  min-width: 180px;
}

.shift-monthly-export-toolbar .toolbar-filters span {
  color: var(--muted);
  font-size: 0.82rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(20, 49, 38, 0.08);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-ok {
  background: rgba(37, 115, 78, 0.1);
  color: var(--success);
}

.status-warn {
  background: rgba(209, 143, 38, 0.14);
  color: #9c670f;
}

.status-hold {
  background: rgba(186, 63, 56, 0.12);
  color: var(--danger);
}

.analytics-placeholder {
  grid-column: 1 / -1;
}

.quick-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.quick-item {
  text-align: left;
  border: 1px solid rgba(20, 49, 38, 0.08);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
}

.quick-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.quick-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-item p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.93rem;
}

.timeline-item small {
  color: var(--muted);
  font-weight: 700;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 6px;
}

.timeline-dot.critical { background: var(--danger); }
.timeline-dot.warning { background: var(--warning); }
.timeline-dot.success { background: var(--success); }
.timeline-dot.info { background: var(--accent); }

.field-actions,
.office-metrics {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.office-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.office-panel {
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.95), rgba(255, 255, 255, 0.88));
}

.field-panel {
  background: linear-gradient(180deg, rgba(243, 252, 248, 0.98), rgba(255, 255, 255, 0.9));
}

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 16px;
}

.module-card p { margin-bottom: 0; }
form { display: grid; gap: 16px; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.permit-requester-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.permit-requester-row.has-machine-hole { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label, fieldset { display: grid; gap: 8px; }
label span, legend, .approval-flow p { font-weight: 700; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 13px 14px;
  color: var(--text);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.file-upload input {
  padding: 10px;
  background: rgba(15, 118, 110, 0.06);
}

.error-message {
  min-height: 16px;
  font-size: 0.85rem;
  color: var(--danger);
}

.has-error input, .has-error select, .has-error textarea, .ppe-list.has-error {
  border-color: rgba(186, 63, 56, 0.45);
  box-shadow: 0 0 0 4px rgba(186, 63, 56, 0.08);
}

.ppe-list {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ppe-list label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ppe-list input { width: auto; }
.approval-flow { display: grid; gap: 10px; }
.approval-steps { justify-content: start; flex-wrap: wrap; }
.permit-checklist-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.permit-checklist-grid {
  display: grid;
  gap: 10px;
}
.permit-check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}
.permit-check-item label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.permit-check-item input[type="radio"] { width: auto; }
.permit-check-item .permit-check-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  align-items: stretch;
}
.permit-check-item .permit-check-note textarea {
  width: 100%;
}

.declaration-text {
  margin: 0.4rem 0 0.8rem;
  line-height: 1.55;
  color: var(--text-light);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.approval-step {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  align-items: start;
  justify-items: start;
  gap: 4px;
  color: var(--text);
}

.approval-step.active {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-dark);
  border-color: rgba(15, 118, 110, 0.28);
}

.approval-role {
  font-weight: 700;
}

.approval-actor {
  font-size: 0.78rem;
  color: var(--text-light);
}

.approval-state {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-light);
}

.approval-step.approved .approval-state {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.approval-step.rejected .approval-state {
  background: rgba(239, 68, 68, 0.16);
  color: #991b1b;
}

.approval-meta,
.approval-comment {
  font-size: 0.74rem;
  line-height: 1.45;
}

.approval-meta {
  color: var(--text-light);
}

.approval-comment {
  color: var(--text);
}

.confined-gas-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.confined-gas-grid .h2s-compact input {
  max-width: 220px;
}

.electrical-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.electrical-split-card {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 10px;
}

.electrical-split-card h5 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent-dark);
  text-align: center;
}

.electrical-given-row {
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
}

.permit-no-compact input {
  max-width: 220px;
}

.special-card {
  background: linear-gradient(180deg, rgba(240, 250, 247, 0.98), rgba(255, 255, 255, 0.92));
}

.form-success {
  min-height: 22px;
  margin: 0;
  color: var(--success);
  font-weight: 600;
}

@media (max-width: 1180px) {
  .app-shell, .form-layout, .analytics-grid, .admin-grid, .audience-grid, .deployment-grid, .sites-grid, .workspace-split { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .ops-strip, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .main-content, .sidebar { padding: 18px; }
  .company-bar, .utility-bar, .topbar, .hero, .section-head { flex-direction: column; align-items: start; }
  .company-bar { display: flex; }
  .topbar-actions, .hero-badge-grid, .dashboard-grid, .ops-strip, .module-grid, .grid-two, .grid-three, .ppe-list, .office-metrics, .rollup-summary { width: 100%; }
  .hero-badge-grid, .dashboard-grid, .ops-strip, .module-grid, .grid-two, .grid-three, .ppe-list, .office-metrics, .rollup-summary { grid-template-columns: 1fr; }
  .permit-requester-row, .permit-requester-row.has-machine-hole { grid-template-columns: 1fr; }
  .confined-gas-grid { grid-template-columns: 1fr; }
  .electrical-given-row { grid-template-columns: 1fr; }
  .electrical-stack { grid-template-columns: 1fr; }
  .permit-check-item { grid-template-columns: 1fr; }
  .icon-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .module-launcher { width: 100%; }
  .login-shell { padding: 18px; }
  .login-panel { padding: 22px; }
  .chart-summary, .chart-summary.compact { grid-template-columns: 1fr; }
  .view-toolbar { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .site-overview-grid, .site-summary-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .table-toolbar, .toolbar-filters { width: 100%; flex-direction: column; align-items: stretch; }
  .donut-wrap { flex-direction: column; align-items: start; }
  .bar-chart { gap: 10px; }
  .profile-menu, .profile-panel { width: 100%; justify-items: start; }
  .profile-actions-row { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .profile-user-menu { position: static; width: 100%; }
  .notification-popover { position: static; width: 100%; max-height: none; }
  .profile-site-switch { justify-items: start; }
  .profile-site-switch select { min-width: 100%; }
  .company-branding { width: 100%; }
}



.card-form {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 28px !important;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.login-company h4 {
  margin: 0 0 12px;
  text-align: center;
  color: #1f4fc9;
  font-size: 1.25rem;
  font-weight: 800;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.logo-container .brand-logo.large {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: contain;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(31, 79, 201, 0.12);
}

.logo-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.brand-text-content {
  text-align: left;
}

.brand-text-content h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: #2d3436;
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-text-content span {
  font-size: 0.85rem;
  color: #d63031;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.login-error {
  text-align: center;
  min-height: 22px;
}

.input-icon {
  position: relative;
}

.input-icon input {
  padding-right: 46px;
}

.input-icon i {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #224abe;
  pointer-events: none;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #28a745 0%, #224abe 100%);
  border: none;
}









.settings-edit-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 49, 38, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.settings-edit-btn:hover {
  background: rgba(39, 181, 74, 0.12);
}
.settings-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-delete-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(183, 54, 54, 0.18);
  background: rgba(255, 244, 244, 0.96);
  color: #b73636;
  font-weight: 700;
  cursor: pointer;
}

.settings-delete-btn:hover {
  background: rgba(183, 54, 54, 0.12);
}
.grid-one {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.shift-observation-block {
  margin-top: 10px;
  border: 1px solid rgba(23, 41, 35, 0.15);
}

.shift-observation-block > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.shift-observation-block .table-wrap table th,
.shift-observation-block .table-wrap table td {
  text-align: center;
}

.shift-observation-block .table-wrap table th:first-child,
.shift-observation-block .table-wrap table td:first-child {
  text-align: left;
  width: 64%;
}

.shift-observation-block input[type="radio"] {
  width: 16px;
  height: 16px;
}
.shift-rectification-block {
  margin-top: 14px;
}

.shift-induction-row {
  margin: 14px 0 8px;
}
.shift-permit-block {
  margin-top: 14px;
}
.shift-tbt-block {
  margin-top: 14px;
}

.shift-tbt-block > span {
  display: block;
  margin: 6px 0 10px;
  color: #324a41;
}

.shift-tbt-minutes {
  margin-top: 14px;
}

.shift-help-note {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: #23362f;
}
.shift-job-block {
  margin-top: 14px;
}

.employee-sheet-toolbar {
  margin-top: 18px;
  align-items: center;
}

.employee-sheet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.employee-performance-sheet {
  margin-top: 10px;
  max-height: 68vh;
  overflow: auto;
  position: relative;
  border: 1px solid rgba(20, 49, 38, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  --employee-sr-width: 64px;
  --employee-name-width: 240px;
}

.employee-performance-sheet table {
  min-width: 2500px;
  margin-top: 0;
}

.employee-performance-sheet thead th {
  white-space: normal;
  text-align: center;
  vertical-align: middle;
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(248, 251, 249, 0.98);
  box-shadow: inset 0 -1px 0 rgba(20, 49, 38, 0.08);
}

.employee-performance-sheet td {
  vertical-align: top;
  background: rgba(255, 255, 255, 0.92);
}

.employee-performance-sheet thead tr:first-child th:first-child,
.employee-performance-sheet tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: rgba(248, 251, 249, 0.98);
}

.employee-performance-sheet thead tr:first-child th:nth-child(2),
.employee-performance-sheet tbody td:nth-child(2) {
  position: sticky;
  left: var(--employee-sr-width);
  z-index: 5;
  background: rgba(248, 251, 249, 0.98);
}

.employee-performance-sheet thead tr:first-child th {
  top: 0;
  z-index: 4;
}

.employee-performance-sheet thead tr:nth-child(2) th {
  top: 48px;
  z-index: 4;
}

.employee-performance-sheet input,
.employee-performance-sheet textarea {
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 12px;
}

.employee-performance-sheet textarea {
  min-width: 150px;
  min-height: 72px;
  resize: vertical;
}

.employee-performance-sheet td:nth-child(2) input {
  min-width: 220px;
}

.employee-performance-sheet .employee-head-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  line-height: 1.2;
}

.employee-performance-sheet .employee-head-stack small {
  font-size: 0.72rem;
  color: #60756b;
  font-weight: 700;
}

.employee-performance-sheet .employee-note-cell {
  min-width: 160px;
  text-align: center;
  font-weight: 700;
  color: #6d4d0f;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.9), rgba(255, 252, 241, 0.9));
}

.employee-performance-sheet .employee-note-cell span {
  display: inline-block;
  line-height: 1.35;
}

.employee-performance-sheet .employee-indicator-cell {
  min-width: 220px;
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.92), rgba(253, 254, 255, 0.92));
}

.employee-performance-sheet .employee-indicator-cell select {
  min-width: 200px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(46, 86, 157, 0.24);
  background: #fff;
  font-weight: 700;
  color: #2f4566;
}

.employee-row-number {
  font-weight: 700;
  text-align: center;
  min-width: var(--employee-sr-width);
}

.employee-row-remove {
  min-width: 86px;
}

.shift-job-bottom-row {
  margin-top: 14px;
}

/* Visual refresh for dashboard, sidebar, and module workspace */
:root {
  --bg: #eef2ea;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --panel-soft: rgba(251, 248, 241, 0.84);
  --line: rgba(22, 56, 42, 0.12);
  --line-strong: rgba(22, 56, 42, 0.2);
  --text: #163126;
  --muted: #617468;
  --accent: #117b6b;
  --accent-dark: #0b5b52;
  --accent-blue: #1f4fc9;
  --success: #24734d;
  --warning: #d38f29;
  --danger: #bf4a41;
  --shadow: 0 24px 60px rgba(22, 49, 38, 0.12);
  --shadow-soft: 0 12px 34px rgba(22, 49, 38, 0.08);
  --sidebar-bg: linear-gradient(180deg, #15251d 0%, #1b3126 50%, #16352c 100%);
}

body {
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at top left, rgba(17, 123, 107, 0.2), transparent 24%),
    radial-gradient(circle at top right, rgba(31, 79, 201, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(211, 143, 41, 0.12), transparent 18%),
    linear-gradient(180deg, #f7f5ee 0%, #edf2ea 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.6;
}

.login-shell,
.app-shell {
  position: relative;
  z-index: 1;
}

body::before {
  width: 320px;
  height: 320px;
  top: -100px;
  right: -90px;
  background: radial-gradient(circle, rgba(31, 79, 201, 0.18), transparent 68%);
}

body::after {
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: 6vh;
  background: radial-gradient(circle, rgba(41, 163, 58, 0.16), transparent 70%);
}

.app-shell {
  grid-template-columns: 300px 1fr;
  background:
    linear-gradient(90deg, rgba(15, 24, 19, 0.06) 0, rgba(15, 24, 19, 0.06) 300px, transparent 300px),
    transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  isolation: isolate;
  padding: 20px 18px 24px;
  gap: 22px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 18px 14px auto 14px;
  height: 210px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(73, 176, 136, 0.28), transparent 58%),
    radial-gradient(circle at right, rgba(39, 89, 196, 0.22), transparent 56%);
  filter: blur(6px);
  opacity: 0.9;
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar .brand {
  top: 0;
  margin: 0;
  padding: 16px 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(7, 18, 14, 0.18);
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #127d6b 0%, #1f4fc9 58%, #29a33a 100%);
  box-shadow: 0 14px 24px rgba(10, 23, 53, 0.26);
}

.sidebar .software-name.inline {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.sidebar .eyebrow {
  margin-bottom: 4px;
  color: rgba(237, 246, 241, 0.62);
}

.side-nav {
  gap: 14px;
}

.nav-group {
  gap: 8px;
  padding: 14px 12px 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.nav-group-title {
  display: block;
  padding: 0 8px 6px;
  color: rgba(237, 246, 241, 0.62);
  letter-spacing: 0.16em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: rgba(237, 246, 241, 0.9);
  font-weight: 700;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(19, 105, 90, 0.34), rgba(31, 79, 201, 0.2));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.nav-link > * {
  position: relative;
  z-index: 1;
}

.nav-link-label {
  flex: 1;
}

.nav-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a7e8c5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-caret {
  font-size: 0.86rem;
  color: rgba(237, 246, 241, 0.62);
  transition: transform 0.18s ease, color 0.18s ease;
}

.nav-toggle.active .nav-caret {
  transform: rotate(180deg);
  color: #ffffff;
}

.nav-link:hover,
.nav-link.active,
.nav-toggle.active {
  color: #ffffff;
  border-color: rgba(167, 232, 197, 0.16);
  box-shadow: 0 12px 26px rgba(8, 20, 15, 0.2);
  transform: translateX(2px);
}

.nav-link:hover::before,
.nav-link.active::before,
.nav-toggle.active::before {
  opacity: 1;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon,
.nav-toggle.active .nav-icon {
  background: linear-gradient(135deg, rgba(31, 79, 201, 0.82), rgba(41, 163, 58, 0.78));
  border-color: transparent;
  color: #fff9bd;
  transform: scale(1.02);
}

.site-submenu,
.settings-submenu {
  margin-top: 4px;
  padding: 12px 10px 10px;
  border-radius: 20px;
  background: rgba(4, 12, 9, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.site-submenu-link,
.settings-submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.site-submenu-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f4fc9, #47b88a);
  flex: 0 0 8px;
}

.settings-submenu-link i {
  color: #a7e8c5;
  width: 18px;
  text-align: center;
}

.site-submenu-link:hover,
.settings-submenu-link:hover,
.settings-submenu-link.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 232, 197, 0.12);
  transform: translateX(2px);
}

.main-content {
  position: relative;
  padding: 22px 26px 30px;
  gap: 18px;
}

.main-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 280px;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0, rgba(17, 123, 107, 0.12), transparent 34%),
    radial-gradient(circle at 75% 0, rgba(31, 79, 201, 0.12), transparent 32%);
}

.main-content > * {
  position: relative;
  z-index: 1;
}

.company-bar {
  min-height: 104px;
  padding: 16px 20px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(250, 246, 237, 0.74));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  z-index: 38;
  overflow: visible;
  isolation: isolate;
}

.company-bar .company-branding {
  gap: 16px;
  padding: 14px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(31, 79, 201, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.company-bar .brand-logo {
  width: 84px;
  height: 84px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 79, 201, 0.1);
  box-shadow: 0 14px 28px rgba(31, 79, 201, 0.14);
}

.company-name {
  font-size: clamp(1.34rem, 1.95vw, 1.96rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.profile-menu {
  position: relative;
  gap: 8px;
  z-index: 39;
}

.profile-actions-row {
  align-items: center;
  padding: 10px 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(22, 56, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.profile-panel {
  padding: 4px 2px 0;
}

.profile-icon {
  min-width: 88px;
  min-height: 50px;
  border-radius: 18px;
  box-shadow: 0 14px 26px rgba(13, 31, 82, 0.16);
  border: 1px solid rgba(17, 123, 107, 0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.profile-icon:hover,
.profile-icon:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(17, 123, 107, 0.28);
  box-shadow: 0 18px 30px rgba(13, 31, 82, 0.2);
}

.company-bar .session-info {
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(17, 123, 107, 0.1), rgba(31, 79, 201, 0.08));
  border: 1px solid rgba(17, 123, 107, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.profile-change-password,
.company-bar .profile-logout {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(22, 56, 42, 0.1);
  box-shadow: 0 8px 18px rgba(22, 49, 38, 0.05);
}

.profile-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(230px, calc(100vw - 48px));
  padding: 12px;
  display: grid;
  gap: 10px;
  border-radius: 22px;
  border: 1px solid rgba(22, 56, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 248, 0.96));
  box-shadow: 0 24px 48px rgba(13, 31, 82, 0.14);
  backdrop-filter: blur(16px);
  z-index: 44;
}

.profile-menu-action {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 14px;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  height: 50px;
  border-radius: 18px;
  border: 1px solid rgba(17, 123, 107, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(226, 245, 239, 0.78));
  color: #0f5e54;
  box-shadow: 0 12px 24px rgba(15, 94, 84, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.notification-bell:hover,
.notification-bell:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(17, 123, 107, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(213, 239, 232, 0.9));
  box-shadow: 0 16px 30px rgba(15, 94, 84, 0.16);
}

.notification-bell i {
  font-size: 1.16rem;
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6573b, #c83f2f);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(200, 63, 47, 0.28);
}

.notification-badge.is-hidden {
  display: none;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 48px));
  max-height: min(70vh, 620px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 24px;
  border: 1px solid rgba(22, 56, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 250, 248, 0.95));
  box-shadow: 0 26px 54px rgba(13, 31, 82, 0.16);
  backdrop-filter: blur(18px);
  z-index: 45;
}

.notification-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(22, 56, 42, 0.08);
}

.notification-popover-head strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1rem;
}

.notification-popover-head span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.notification-popover-body {
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 12px;
  display: grid;
  gap: 10px;
}

.notification-item {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(22, 56, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(22, 49, 38, 0.06);
}

.notification-item.priority-high {
  border-color: rgba(200, 63, 47, 0.16);
  background: linear-gradient(135deg, rgba(255, 247, 245, 0.96), rgba(255, 255, 255, 0.92));
}

.notification-item.priority-medium {
  border-color: rgba(226, 158, 14, 0.18);
  background: linear-gradient(135deg, rgba(255, 252, 244, 0.96), rgba(255, 255, 255, 0.92));
}

.notification-item.priority-low {
  border-color: rgba(31, 79, 201, 0.12);
  background: linear-gradient(135deg, rgba(245, 249, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.notification-item-head,
.notification-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-item-module {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 123, 107, 0.1);
  color: #0f5e54;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notification-item-site {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.notification-item-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.4;
}

.notification-item-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.notification-item-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.notification-empty-note {
  margin: 0;
  padding: 0 18px 16px;
}

.utility-bar {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(22, 56, 42, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(243, 249, 245, 0.8));
  box-shadow: var(--shadow-soft);
}

.utility-bar::before {
  content: "";
  position: absolute;
  inset: auto -5% -65% 42%;
  height: 210px;
  background: radial-gradient(circle, rgba(17, 123, 107, 0.16), transparent 66%);
  pointer-events: none;
  z-index: 0;
}

.icon-shortcuts {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 14px;
}

.icon-shortcut {
  position: relative;
  padding: 16px 10px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(22, 56, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.icon-shortcut:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(17, 123, 107, 0.14);
  box-shadow: 0 14px 30px rgba(22, 49, 38, 0.08);
}

.icon-ring {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(230, 87, 59, 0.14);
  background: linear-gradient(135deg, rgba(230, 87, 59, 0.12), rgba(255, 255, 255, 0.82));
  color: #d65539;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.icon-shortcut span:last-child {
  max-width: none;
  font-weight: 800;
}

.dashboard-grid {
  gap: 18px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(22, 56, 42, 0.1);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 34px rgba(20, 49, 38, 0.14);
}

.kpi-card:focus-visible {
  outline: 3px solid rgba(17, 123, 107, 0.28);
  outline-offset: 2px;
  border-color: rgba(17, 123, 107, 0.28);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--accent-strip, linear-gradient(90deg, #117b6b, #1f4fc9));
  z-index: 0;
}

.kpi-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -40px;
  bottom: -44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.kpi-card p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(22, 49, 38, 0.72);
}

.kpi-card strong {
  font-size: clamp(2rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
}

.trend {
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid rgba(22, 56, 42, 0.08);
}

.accent-blue {
  --accent-strip: linear-gradient(90deg, #1f4fc9, #65a9ff);
  background: linear-gradient(180deg, rgba(220, 235, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.accent-gold {
  --accent-strip: linear-gradient(90deg, #d38f29, #edc86c);
  background: linear-gradient(180deg, rgba(255, 240, 212, 0.96), rgba(255, 255, 255, 0.78));
}

.accent-red {
  --accent-strip: linear-gradient(90deg, #bf4a41, #f08a7e);
  background: linear-gradient(180deg, rgba(255, 226, 220, 0.96), rgba(255, 255, 255, 0.78));
}

.accent-green {
  --accent-strip: linear-gradient(90deg, #2c8a54, #67c88b);
  background: linear-gradient(180deg, rgba(225, 247, 233, 0.96), rgba(255, 255, 255, 0.78));
}

.module-section .section-head {
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px dashed rgba(22, 56, 42, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(244, 248, 245, 0.62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.site-drilldown-card,
.workspace-card,
.workspace-right,
.report-card,
.detail-item,
.site-overview-card,
.settings-content-card,
.settings-table-wrap,
.employee-performance-sheet {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(22, 56, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 247, 240, 0.78));
  box-shadow: var(--shadow-soft);
}

.utility-bar,
.kpi-card,
.workspace-right,
.workspace-card,
.site-drilldown-card,
.report-card {
  overflow: hidden;
}

.utility-bar > *,
.kpi-card > *,
.site-drilldown-card > *,
.workspace-card > *,
.workspace-right > *,
.report-card > *,
.detail-item > *,
.site-overview-card > *,
.settings-content-card > *,
.settings-table-wrap > *,
.employee-performance-sheet > * {
  position: relative;
  z-index: 1;
}

.workspace-right::before,
.workspace-card::before,
.site-drilldown-card::before,
.report-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 22%);
  pointer-events: none;
  z-index: 0;
}

.summary-site-row {
  cursor: pointer;
}

.summary-site-row:hover td,
.summary-site-row:focus-visible td {
  background: rgba(17, 123, 107, 0.08);
}

.site-module-tabs {
  gap: 10px;
  padding: 4px;
  border-radius: 20px;
  background: rgba(22, 56, 42, 0.04);
  width: fit-content;
}

.site-module-tab {
  border-radius: 14px;
  border-color: rgba(22, 56, 42, 0.06);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(22, 49, 38, 0.04);
}

.site-module-tab.active {
  box-shadow: 0 12px 26px rgba(17, 123, 107, 0.2);
}

.module-pane.active {
  display: block;
  animation: paneFadeIn 0.24s ease;
}

.module-pane-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(22, 56, 42, 0.08);
}

.module-pane-head h4 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.report-cards {
  gap: 16px;
}

.report-card strong {
  font-size: 1.04rem;
  letter-spacing: -0.01em;
}

.detail-item {
  border-radius: 18px;
}

.chart-summary div {
  border: 1px solid rgba(22, 56, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.bar-chart {
  padding: 18px 0 6px;
  min-height: 240px;
}

.table-wrap,
.settings-table-wrap,
.employee-performance-sheet {
  overflow: auto;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 248, 0.72));
}

table {
  background: transparent;
}

th,
td {
  padding: 14px 12px;
}

th {
  background: rgba(22, 56, 42, 0.045);
  color: #51655b;
  font-weight: 800;
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: rgba(17, 123, 107, 0.035);
}

input,
select,
textarea {
  border: 1px solid rgba(22, 56, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 1px 2px rgba(22, 49, 38, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(17, 123, 107, 0.22);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(17, 123, 107, 0.46);
  box-shadow: 0 0 0 4px rgba(17, 123, 107, 0.12), 0 10px 24px rgba(17, 123, 107, 0.08);
  background: #ffffff;
}

label span,
legend,
.approval-flow p {
  color: #23392f;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.approval-flow {
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(240, 248, 245, 0.94), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(22, 56, 42, 0.08);
}

.approval-steps {
  gap: 10px;
}

.approval-step {
  padding: 12px 14px;
  min-width: 146px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(22, 56, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.approval-step.active {
  background: linear-gradient(135deg, rgba(17, 123, 107, 0.14), rgba(31, 79, 201, 0.08));
}

.permit-checklist-card {
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.96), rgba(255, 255, 255, 0.82));
  border-color: rgba(22, 56, 42, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.permit-check-item {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 56, 42, 0.06);
}

.special-card {
  background: linear-gradient(180deg, rgba(239, 249, 245, 0.96), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(17, 123, 107, 0.08);
}

.settings-layout {
  grid-template-columns: 210px 1fr;
  gap: 18px;
}

.settings-preview-menu {
  padding: 12px;
  border-radius: 22px;
  background: rgba(22, 56, 42, 0.04);
  border: 1px solid rgba(22, 56, 42, 0.08);
}

.settings-preview-link {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.settings-preview-link:hover,
.settings-preview-link.active {
  background: linear-gradient(135deg, rgba(17, 123, 107, 0.14), rgba(31, 79, 201, 0.08));
  border-color: rgba(17, 123, 107, 0.14);
  transform: translateX(2px);
  box-shadow: 0 10px 22px rgba(22, 49, 38, 0.06);
}

.tag {
  background: linear-gradient(135deg, rgba(17, 123, 107, 0.12), rgba(31, 79, 201, 0.08));
  border: 1px solid rgba(17, 123, 107, 0.12);
}

@keyframes paneFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 280px 1fr;
  }

  .company-bar .company-branding {
    left: -32px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .company-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .company-bar .company-branding {
    justify-self: start;
    grid-column: auto;
    left: 0;
    top: 0;
  }

  .profile-menu {
    grid-column: auto;
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .main-content {
    padding: 16px;
  }

  .company-bar {
    padding: 16px;
    border-radius: 24px;
  }

  .company-bar .company-branding {
    width: 100%;
    padding: 12px 16px;
    gap: 14px;
  }

  .company-bar .brand-logo {
    width: 70px;
    height: 70px;
  }

  .profile-actions-row {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .profile-user-menu {
    position: static;
    width: 100%;
  }

  .notification-popover {
    position: static;
    width: 100%;
    max-height: none;
  }

  .profile-panel,
  .profile-menu {
    width: 100%;
    justify-items: start;
  }

  .icon-shortcuts,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-link {
    padding: 12px;
  }

  .nav-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}

@media (max-width: 560px) {
  .icon-shortcuts,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar .brand,
  .nav-group,
  .settings-preview-menu {
    border-radius: 20px;
  }

  .company-name {
    font-size: 1.12rem;
  }

  .module-pane-head {
    align-items: start;
    flex-direction: column;
  }
}

/* Second-pass module beautification */
.workspace-right {
  border-radius: 30px;
}

.module-pane {
  --module-accent: #117b6b;
  --module-soft: rgba(17, 123, 107, 0.08);
}

#observation-pane { --module-accent: #117b6b; --module-soft: rgba(17, 123, 107, 0.08); }
#permit-pane { --module-accent: #1f4fc9; --module-soft: rgba(31, 79, 201, 0.08); }
#accident-pane,
#accident-investigation-pane { --module-accent: #bf4a41; --module-soft: rgba(191, 74, 65, 0.08); }
#monthly-report-pane { --module-accent: #d38f29; --module-soft: rgba(211, 143, 41, 0.08); }
#shift-report-pane { --module-accent: #0f7a84; --module-soft: rgba(15, 122, 132, 0.08); }
#employee-performance-pane { --module-accent: #2f7d4e; --module-soft: rgba(47, 125, 78, 0.08); }
#downloads-pane,
#safety-activity-pane { --module-accent: #8b5e1d; --module-soft: rgba(139, 94, 29, 0.08); }
#reports-pane { --module-accent: #3958b8; --module-soft: rgba(57, 88, 184, 0.08); }
#settings-pane { --module-accent: #455b52; --module-soft: rgba(69, 91, 82, 0.08); }

.module-pane-head {
  position: relative;
  align-items: center;
  padding: 0 0 18px 18px;
}

.module-pane-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 18px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--module-accent), color-mix(in srgb, var(--module-accent) 30%, white));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--module-accent) 22%, transparent);
}

.module-pane-head h4 {
  color: color-mix(in srgb, var(--module-accent) 78%, #143126);
}

.module-pane-head p {
  max-width: 760px;
}

.module-pane > .report-cards > .report-card,
.module-pane > .report-card {
  position: relative;
  overflow: hidden;
}

.module-pane > .report-cards > .report-card::after,
.module-pane > .report-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, var(--module-soft), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 14%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
}

.module-pane .report-card > * {
  position: relative;
  z-index: 2;
}

.module-pane .report-card > form,
.module-pane .report-card > .table-wrap,
.module-pane .report-card > .settings-table-wrap,
.module-pane .report-card > .settings-data-sheet,
.module-pane .report-card > .detail-grid,
.module-pane .report-card > .table-toolbar,
.module-pane .report-card > .permit-action-group,
.module-pane .report-card > .form-action-row,
.module-pane .report-card table,
.module-pane .report-card thead,
.module-pane .report-card tbody,
.module-pane .report-card tr,
.module-pane .report-card th,
.module-pane .report-card td {
  position: relative;
  z-index: 2;
}

.module-pane .report-card button,
.module-pane .report-card .ghost-btn,
.module-pane .report-card .cta {
  position: relative;
  z-index: 3;
}

.module-pane .report-card .ghost-btn {
  color: var(--text);
  border-color: rgba(20, 49, 38, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 245, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.module-pane .report-card .ghost-btn.dark {
  background: rgba(20, 49, 38, 0.05);
}

.module-pane .report-card .ghost-btn:disabled,
.module-pane .report-card button:disabled {
  opacity: 0.6;
  color: var(--muted);
}

.table-wrap td:last-child .ghost-btn,
.settings-table-wrap td:last-child .ghost-btn,
.permit-action-group .ghost-btn {
  margin: 3px 4px 3px 0;
}

#observation-pane form,
#permit-pane form,
#accident-pane form,
#accident-investigation-pane form,
#monthly-report-pane form,
#shift-report-pane form,
#employee-performance-pane form,
#downloads-pane form,
#safety-activity-pane form {
  gap: 18px;
}

.file-upload {
  position: relative;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 245, 0.74));
  border: 1px dashed rgba(22, 56, 42, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.file-upload span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.file-upload span::before {
  content: "\F603";
  font-family: "bootstrap-icons";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(17, 123, 107, 0.1);
  color: #117b6b;
  font-size: 1rem;
}

.file-upload input {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.permit-checklist-card legend,
.ppe-list legend {
  padding: 0 10px;
  color: color-mix(in srgb, var(--module-accent) 72%, #23392f);
  letter-spacing: 0.03em;
}

.permit-check-item {
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(88px, auto));
}

.permit-check-item > span:first-child,
.permit-check-item .permit-check-label {
  font-weight: 600;
  line-height: 1.45;
}

.permit-check-item label {
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(22, 56, 42, 0.06);
}

.permit-check-item .permit-check-note input,
.permit-check-item .permit-check-note textarea {
  max-width: 440px;
}

.electrical-split-card,
.special-card,
.shift-observation-block,
.shift-induction-row,
.shift-tbt-block,
.shift-permit-block,
.shift-job-block {
  border-radius: 22px;
  overflow: hidden;
}

.electrical-split-card h5 {
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--module-accent) 10%, white);
  color: color-mix(in srgb, var(--module-accent) 72%, #143126);
}

#monthly-report-pane .report-card:first-child,
#employee-performance-pane .report-card:first-child,
#downloads-pane #documentUploadCard,
#safety-activity-pane #safetyActivityUploadCard {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 248, 0.84));
}

#monthly-report-pane .report-cards > .report-card:nth-child(2)::after {
  opacity: 0.16;
}

#monthly-report-pane .settings-data-sheet,
#monthly-report-pane .settings-table-wrap {
  position: relative;
  z-index: 2;
}

#monthly-report-pane .settings-table-wrap .monthly-report-view-btn,
#monthly-report-pane .settings-table-wrap .monthly-report-edit-btn {
  min-width: 64px;
  font-weight: 700;
}

#monthly-report-pane .monthly-entry-wrap,
#employee-performance-pane .employee-performance-sheet {
  margin-top: 4px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

#monthly-report-pane .monthly-entry-wrap table thead th,
#reports-pane .compact-table thead th,
#downloads-pane .compact-table thead th,
#safety-activity-pane .compact-table thead th,
#shift-report-pane .compact-table thead th,
#employee-performance-pane .compact-table thead th {
  background: linear-gradient(180deg, rgba(22, 56, 42, 0.08), rgba(22, 56, 42, 0.03));
}

#monthly-report-pane .settings-data-sheet,
#downloads-pane .settings-data-sheet,
#settings-pane .settings-data-sheet {
  gap: 16px;
}

#monthly-report-pane .settings-checklist,
#employee-performance-pane .settings-checklist {
  padding: 10px;
  border-radius: 18px;
  background: rgba(22, 56, 42, 0.035);
  border: 1px solid rgba(22, 56, 42, 0.08);
}

#monthly-report-pane .settings-checklist label,
#employee-performance-pane .settings-checklist label {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(22, 56, 42, 0.06);
}

#shift-report-pane .shift-observation-block {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 251, 250, 0.86));
  box-shadow: 0 12px 24px rgba(15, 122, 132, 0.05);
}

#shift-report-pane .shift-observation-block > strong,
#shift-report-pane .shift-induction-row > strong,
#shift-report-pane .shift-tbt-block > strong,
#shift-report-pane .shift-permit-block > strong,
#shift-report-pane .shift-job-block > strong,
#shift-report-pane .report-card > strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 122, 132, 0.18), rgba(15, 122, 132, 0.08));
  border: 1px solid rgba(15, 122, 132, 0.16);
  color: #0f4f59;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(15, 122, 132, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#shift-report-pane .module-pane-head h4 {
  color: #0c5963;
}

#shift-report-pane .module-pane-head p {
  color: #425c56;
}

#shift-report-pane .compact-table thead th {
  background: linear-gradient(180deg, rgba(15, 122, 132, 0.14), rgba(15, 122, 132, 0.06));
  color: #355550;
}

#shift-report-pane .shift-observation-block .table-wrap,
#shift-report-pane .shift-induction-row .grid-two,
#shift-report-pane .shift-tbt-block .table-wrap,
#shift-report-pane .shift-permit-block .table-wrap,
#shift-report-pane .shift-job-block .table-wrap {
  margin-top: 14px;
}

#employee-performance-pane .employee-sheet-toolbar {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(47, 125, 78, 0.05);
  border: 1px solid rgba(47, 125, 78, 0.08);
}

#employee-performance-pane .employee-sheet-actions {
  gap: 12px;
}

#employee-performance-pane .report-card strong,
#monthly-report-pane .report-card strong,
#downloads-pane .report-card strong,
#safety-activity-pane .report-card strong,
#accident-pane .report-card strong,
#accident-investigation-pane .report-card strong,
#reports-pane .report-card strong,
#settings-pane .settings-content-card strong {
  font-size: 1.08rem;
}

#monthly-report-pane .report-card > strong,
#employee-performance-pane .report-card > strong,
#downloads-pane .report-card > strong,
#safety-activity-pane .report-card > strong,
#reports-pane .report-card > strong,
#accident-pane .report-card > strong,
#accident-investigation-pane .report-card > strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--module-accent) 16%, white), color-mix(in srgb, var(--module-accent) 7%, white));
  border: 1px solid color-mix(in srgb, var(--module-accent) 16%, transparent);
  color: color-mix(in srgb, var(--module-accent) 76%, #143126);
  font-weight: 800;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--module-accent) 8%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#downloads-pane .report-card,
#safety-activity-pane .report-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 247, 239, 0.84));
}

#monthly-report-pane .report-card strong::before,
#employee-performance-pane .report-card strong::before,
#downloads-pane .report-card strong::before,
#safety-activity-pane .report-card strong::before,
#accident-pane .report-card strong::before,
#accident-investigation-pane .report-card strong::before,
#reports-pane .report-card strong::before,
#settings-pane .settings-content-card strong::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--module-accent), color-mix(in srgb, var(--module-accent) 35%, white));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--module-accent) 12%, transparent);
}

#reports-pane .view-toolbar {
  padding: 14px;
  border-radius: 18px;
  background: rgba(57, 88, 184, 0.05);
  border: 1px solid rgba(57, 88, 184, 0.08);
}

#reports-pane .view-toolbar label,
#settings-pane .settings-context label {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 56, 42, 0.06);
}

#settings-pane .settings-content-card {
  padding: 20px;
}

#settings-pane .settings-context {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(69, 91, 82, 0.05);
  border: 1px solid rgba(69, 91, 82, 0.08);
}

#settings-pane .settings-preview-link {
  padding: 13px 14px;
  border-radius: 14px;
}

#settings-pane .settings-preview-link i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(69, 91, 82, 0.08);
}

.settings-action-group .settings-edit-btn,
.settings-action-group .settings-delete-btn {
  box-shadow: 0 8px 16px rgba(22, 49, 38, 0.05);
}

@media (max-width: 980px) {
  .permit-check-item {
    grid-template-columns: 1fr;
  }

  .module-pane-head {
    padding-left: 14px;
  }
}

@media (max-width: 760px) {
  .file-upload {
    padding: 14px;
  }

#reports-pane .view-toolbar,
#employee-performance-pane .employee-sheet-toolbar,
#settings-pane .settings-context {
    padding: 12px;
  }

  #settings-pane .settings-preview-link,
  .site-module-tab {
    width: 100%;
  }

  .site-module-tabs {
    width: 100%;
    flex-wrap: wrap;
  }
}

#goals-pane .module-pane-head h4,
#monthly-report-pane .module-pane-head h4,
#employee-performance-pane .module-pane-head h4,
#downloads-pane .module-pane-head h4,
#safety-activity-pane .module-pane-head h4,
#reports-pane .module-pane-head h4,
#accident-pane .module-pane-head h4,
#accident-investigation-pane .module-pane-head h4 {
  color: color-mix(in srgb, var(--module-accent) 82%, #143126);
}

#goals-pane .module-pane-head p,
#monthly-report-pane .module-pane-head p,
#employee-performance-pane .module-pane-head p,
#downloads-pane .module-pane-head p,
#safety-activity-pane .module-pane-head p,
#reports-pane .module-pane-head p,
#accident-pane .module-pane-head p,
#accident-investigation-pane .module-pane-head p {
  color: #465f56;
}

#goals-pane .compact-table thead th,
#monthly-report-pane .compact-table thead th,
#downloads-pane .compact-table thead th,
#safety-activity-pane .compact-table thead th,
#reports-pane .compact-table thead th,
#employee-performance-pane .compact-table thead th,
#accident-pane .compact-table thead th,
#accident-investigation-pane .compact-table thead th {
  background: linear-gradient(180deg, color-mix(in srgb, var(--module-accent) 16%, white), color-mix(in srgb, var(--module-accent) 6%, white));
  color: #41594f;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--module-accent) 10%, transparent);
}

#goals-pane .goals-sheet-block {
  margin-top: 18px;
}

#goals-pane .goals-sheet-block h5 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #1f4437;
}

#goals-pane .goals-table-wrap {
  max-height: 360px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 123, 107, 0.58) rgba(255, 255, 255, 0.7);
}

#goals-pane .goals-table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

#goals-pane .goals-table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
}

#goals-pane .goals-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(17, 123, 107, 0.72), rgba(31, 79, 201, 0.56));
  border-radius: 999px;
}

#goals-pane .goals-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

#goals-pane .goals-table th,
#goals-pane .goals-table td {
  vertical-align: top;
  padding: 8px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

#goals-pane .goals-table th {
  font-size: 0.84rem;
  text-align: center;
}

#goals-pane .goals-table td {
  font-size: 0.85rem;
}

#goals-pane .goals-table th:nth-child(1),
#goals-pane .goals-table td:nth-child(1) {
  width: 7%;
}

#goals-pane .goals-table th:nth-child(2),
#goals-pane .goals-table td:nth-child(2) {
  width: 37%;
  text-align: left;
}

#goals-pane .goals-table th:nth-child(3),
#goals-pane .goals-table td:nth-child(3),
#goals-pane .goals-table th:nth-child(4),
#goals-pane .goals-table td:nth-child(4),
#goals-pane .goals-table th:nth-child(5),
#goals-pane .goals-table td:nth-child(5),
#goals-pane .goals-table th:nth-child(6),
#goals-pane .goals-table td:nth-child(6) {
  width: 14%;
}

#goals-pane .goals-table td input {
  min-width: 96px;
  width: 100%;
  max-width: 100%;
  display: block;
  padding: 7px 8px;
  font-size: 0.84rem;
  line-height: 1.2;
}

#goals-pane .goals-master-table-wrap {
  max-height: 430px;
}

#goals-pane .goals-master-table {
  min-width: 1120px;
  table-layout: fixed;
}

#goals-pane .goals-master-table th,
#goals-pane .goals-master-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

#goals-pane .goals-master-table th {
  white-space: nowrap;
}

#goals-pane .goals-master-table .goals-master-col-sheet {
  width: 13%;
}

#goals-pane .goals-master-table .goals-master-col-type {
  width: 10%;
}

#goals-pane .goals-master-table .goals-master-col-serial {
  width: 7%;
}

#goals-pane .goals-master-table .goals-master-col-description {
  width: 39%;
}

#goals-pane .goals-master-table .goals-master-col-minimum {
  width: 11%;
}

#goals-pane .goals-master-table .goals-master-col-weightage {
  width: 11%;
}

#goals-pane .goals-master-table .goals-master-col-action {
  width: 9%;
}

#goals-pane .goals-master-table th:nth-child(1),
#goals-pane .goals-master-table td:nth-child(1),
#goals-pane .goals-master-table th:nth-child(2),
#goals-pane .goals-master-table td:nth-child(2),
#goals-pane .goals-master-table th:nth-child(3),
#goals-pane .goals-master-table td:nth-child(3),
#goals-pane .goals-master-table th:nth-child(5),
#goals-pane .goals-master-table td:nth-child(5),
#goals-pane .goals-master-table th:nth-child(6),
#goals-pane .goals-master-table td:nth-child(6),
#goals-pane .goals-master-table th:nth-child(7),
#goals-pane .goals-master-table td:nth-child(7) {
  text-align: center;
}

#goals-pane .goals-master-table th:nth-child(4),
#goals-pane .goals-master-table td:nth-child(4) {
  text-align: left;
  overflow-wrap: break-word;
}

#goals-pane .goals-master-table .ghost-btn.small {
  min-width: 74px;
  padding: 8px 12px;
}

#goals-pane .goals-section-row td {
  background: color-mix(in srgb, var(--module-accent) 10%, white);
  font-weight: 600;
  line-height: 1.4;
}

#goals-pane .goals-table:not(.goals-master-table) th:nth-child(1),
#goals-pane .goals-table:not(.goals-master-table) td:nth-child(1),
#goals-pane .goals-table:not(.goals-master-table) th:nth-child(3),
#goals-pane .goals-table:not(.goals-master-table) td:nth-child(3),
#goals-pane .goals-table:not(.goals-master-table) th:nth-child(5),
#goals-pane .goals-table:not(.goals-master-table) td:nth-child(5) {
  text-align: center;
}

#goals-pane .goals-table:not(.goals-master-table) th:nth-child(2),
#goals-pane .goals-table:not(.goals-master-table) td:nth-child(2) {
  text-align: left;
}

#goals-pane .goals-table:not(.goals-master-table) .goals-section-row td:nth-child(3),
#goals-pane .goals-table:not(.goals-master-table) .goals-section-row td:nth-child(5) {
  text-align: center;
}

#goals-pane #goalsSheetTwoBody td:nth-child(3),
#goals-pane #goalsSheetTwoBody td:nth-child(5) {
  text-align: center;
}

#goals-pane #goalsSheetTwoBody .goals-section-row td:nth-child(4) {
  text-align: center;
}

#goals-pane .goals-total-row td {
  background: color-mix(in srgb, var(--module-accent) 8%, white);
}

#goals-pane .goals-planner-notes {
  border: 1px solid rgba(38, 84, 66, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(241, 247, 244, 0.9);
}

#goals-pane .goals-planner-notes ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

#goals-pane .goals-planner-notes li {
  margin-bottom: 4px;
  color: #2f4e43;
}

#goals-pane .goals-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#goals-pane .goals-workflow-block,
#goals-pane .goals-summary-block {
  border-top: 1px dashed rgba(38, 84, 66, 0.18);
  padding-top: 16px;
}

#goals-pane .goals-planner-shell {
  --planner-week-columns: 9% 11% 10% 12% 19.33% 19.33% 19.34%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 18px;
  background: rgba(255, 248, 176, 0.42);
  border: 1px solid rgba(179, 153, 0, 0.24);
  padding: 10px;
}

#goals-pane .goals-planner-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 123, 107, 0.62) rgba(255, 255, 255, 0.58);
}

#goals-pane .goals-planner-fit-stage {
  display: block;
  margin: 0;
  transform-origin: top left;
}

#goals-pane .goals-planner-scroll::-webkit-scrollbar {
  height: 10px;
}

#goals-pane .goals-planner-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
}

#goals-pane .goals-planner-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(17, 123, 107, 0.7), rgba(31, 79, 201, 0.58));
  border-radius: 999px;
}

#goals-pane .goals-planner-board {
  width: 1080px;
  max-width: none;
  min-width: 1080px;
  transform-origin: top left;
  border: 2px solid #d9ce2f;
  border-radius: 14px;
  overflow: hidden;
  background: #ffeb00;
  box-shadow: 0 16px 28px rgba(117, 96, 0, 0.14);
}

#goals-pane .goals-planner-board-head {
  background: #f1e800;
  color: #111;
  font-weight: 800;
  text-align: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

#goals-pane .goals-planner-week {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: var(--planner-week-columns);
  background: #fff;
}

#goals-pane .goals-planner-week span {
  font-size: 0.66rem;
  font-weight: 700;
  text-align: center;
  padding: 6px 3px;
  border-right: 1px solid rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
}

#goals-pane .goals-planner-week span:last-child {
  border-right: 0;
}

#goals-pane .goals-planner-grid {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: var(--planner-week-columns);
  background: #fff;
}

#goals-pane .goals-planner-cell {
  position: relative;
  min-height: 70px;
  border-right: 1px solid rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  padding: 24px 3px 3px;
  font-size: 0.58rem;
  line-height: 1.12;
  color: #111;
  background: #fff;
}

#goals-pane .goals-planner-cell:nth-child(7n) {
  border-right: 0;
}

#goals-pane .goals-planner-cell.empty {
  background: #fff;
}

#goals-pane .goals-planner-cell.tone-blue {
  background: #a9bddc;
}

#goals-pane .goals-planner-cell.tone-orange {
  background: #f8c8a3;
}

#goals-pane .goals-planner-cell.tone-plain {
  background: #d7d7d7;
}

#goals-pane .goals-planner-day {
  position: absolute;
  left: 3px;
  top: 3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  clip-path: polygon(16% 0, 84% 0, 100% 34%, 84% 100%, 16% 100%, 0 66%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-size: 0.58rem;
  font-weight: 600;
}

#goals-pane .goals-planner-copy {
  line-height: 1.18;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#goals-pane .goals-planner-metrics-wrap {
  background: #fff;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#goals-pane .goals-planner-metrics-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.62rem;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-description {
  width: 20%;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-targets {
  width: 6%;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-prev {
  width: 9%;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-present {
  width: 11%;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-cumulative,
#goals-pane .goals-planner-metrics-table col.metrics-col-balance {
  width: 11%;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-achieved {
  width: 16%;
}

#goals-pane .goals-planner-metrics-table col.metrics-col-balancepct {
  width: 16%;
}

#goals-pane .goals-planner-metrics-table th,
#goals-pane .goals-planner-metrics-table td {
  border: 1px solid rgba(0, 0, 0, 0.28);
  padding: 3px 3px;
  text-align: center;
  color: #111;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#goals-pane .goals-planner-metrics-table th:first-child,
#goals-pane .goals-planner-metrics-table td:first-child {
  text-align: left;
}

#goals-pane .goals-planner-metrics-table thead th {
  background: #f3f3f3;
  font-weight: 700;
}

#goals-pane .goals-planner-total-row td {
  font-weight: 700;
}

@media (max-width: 900px) {
  #goals-pane .goals-planner-board {
    min-width: 1080px;
    width: 1080px;
  }
}

#goals-pane .goals-summary-filters {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

#goals-pane .goals-summary-table-wrap {
  margin-top: 10px;
  max-height: 320px;
}

#goals-pane .goals-summary-table-wrap td select,
#goals-pane .goals-summary-table-wrap td input {
  min-width: 120px;
}

#goals-pane .goals-summary-block .empty-note {
  margin-top: 10px;
}

@media (max-width: 760px) {
  #goals-pane .goals-table-wrap {
    max-height: 300px;
  }
}

#legal-reminders-pane .module-pane-head h4 {
  color: #184f4d;
}

#legal-reminders-pane .module-pane-head p {
  color: #59706a;
}

#legal-reminders-pane .legal-reminder-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

#legal-reminders-pane .legal-summary-card {
  min-height: 148px;
  justify-content: space-between;
}

#legal-reminders-pane .legal-summary-card strong::before,
#legal-reminders-pane .report-card > strong::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 24px;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 999px;
  background: linear-gradient(180deg, #0e8a76, #2b61d8);
}

#legal-reminders-pane .legal-summary-card strong::before {
  margin-right: 10px;
}

#legal-reminders-pane .legal-summary-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #17362e;
}

#legal-reminders-pane .legal-summary-note {
  font-size: 0.84rem;
  color: #64766f;
}

#legal-reminders-pane .legal-reminder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

#legal-reminders-pane .legal-access-note {
  margin-top: 14px;
}

#legal-reminders-pane .legal-helper {
  margin: 0;
  font-size: 0.84rem;
  color: #5c6e68;
}

#legal-reminders-pane .legal-recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(22, 56, 42, 0.14);
  background: rgba(255, 255, 255, 0.66);
}

#legal-reminders-pane .legal-recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 123, 107, 0.1);
  color: #15584c;
  font-size: 0.82rem;
  font-weight: 700;
}

#legal-reminders-pane .legal-recipient-chip small {
  font-size: 0.72rem;
  color: #587a72;
}

#legal-reminders-pane .legal-recipient-empty {
  color: #6a7a74;
  font-size: 0.85rem;
}

#legal-reminders-pane .legal-entry-table-wrap {
  margin-top: 4px;
}

#legal-reminders-pane .legal-entry-table {
  min-width: 1180px;
}

#legal-reminders-pane .legal-entry-table th,
#legal-reminders-pane .legal-entry-table td {
  vertical-align: top;
}

#legal-reminders-pane .legal-entry-table td:nth-child(1) {
  text-align: center;
  font-weight: 700;
}

#legal-reminders-pane .legal-entry-license {
  min-width: 220px;
  font-weight: 700;
  color: #1d3b31;
}

#legal-reminders-pane .legal-entry-table td select,
#legal-reminders-pane .legal-entry-table td input {
  min-width: 120px;
}

#legal-reminders-pane .legal-entry-table td input[data-entry-field="remarks"] {
  min-width: 180px;
}

#legal-reminders-pane .legal-entry-file-upload {
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 16px;
}

#legal-reminders-pane .legal-entry-file-meta {
  display: block;
  margin-top: 8px;
  white-space: normal;
  word-break: break-word;
}

#legal-reminders-pane .legal-document-name {
  font-weight: 700;
  color: #1f382f;
}

#legal-reminders-pane .legal-filter-toolbar {
  margin-bottom: 12px;
}

#legal-reminders-pane .legal-export-row {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 0 4px;
}

#legal-reminders-pane .legal-export-row .settings-helper {
  margin: 0;
}

#legal-reminders-pane .legal-export-picker {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(22, 56, 42, 0.035);
  border: 1px solid rgba(22, 56, 42, 0.08);
}

#legal-reminders-pane .legal-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#legal-reminders-pane .legal-export-head > span {
  color: #25473a;
  font-weight: 700;
}

#legal-reminders-pane .legal-export-checklist {
  margin-top: 0;
  max-height: 240px;
  padding: 4px 6px 0 0;
}

#legal-reminders-pane .legal-export-checklist label {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(22, 56, 42, 0.06);
}

#legal-reminders-pane .compact-table thead th {
  white-space: nowrap;
}

#legal-reminders-pane .detail-grid {
  align-items: stretch;
}

#legal-reminders-pane .legal-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

#legal-reminders-pane .legal-detail-list {
  display: grid;
  gap: 8px;
}

#legal-reminders-pane .legal-detail-list span {
  display: block;
  font-size: 0.82rem;
  color: #60716c;
}

#legal-reminders-pane .legal-detail-list strong {
  display: block;
  margin-top: 4px;
}

#legal-reminders-pane .legal-detail-value {
  margin-top: 4px;
  font-weight: 700;
  color: #20352d;
}

@media (max-width: 1080px) {
  #legal-reminders-pane .legal-reminder-grid {
    grid-template-columns: 1fr;
  }

  #legal-reminders-pane .legal-export-head {
    flex-direction: column;
    align-items: stretch;
  }
}

body.page-locked {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.mobile-nav-toggle,
.mobile-sidebar-backdrop {
  display: none;
}

.company-branding,
.profile-menu,
.profile-panel,
.workspace-right,
.workspace-card,
.module-pane,
.report-card,
.site-drilldown-card,
.settings-content-card,
.settings-table-wrap,
.employee-performance-sheet,
.detail-grid,
.site-overview-grid,
.site-summary-grid,
.report-cards,
.table-wrap {
  min-width: 0;
}

.company-name,
.session-info,
.nav-link-label,
.site-submenu-link,
.settings-submenu-link,
.site-module-tab,
.icon-shortcut span,
.report-card span,
.detail-item strong,
.detail-item span,
.table-wrap td,
.settings-table-wrap td {
  overflow-wrap: anywhere;
}

.table-wrap,
.settings-table-wrap,
.employee-performance-sheet {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(22, 56, 42, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(20, 49, 38, 0.08);
    cursor: pointer;
  }

  .mobile-nav-toggle i {
    font-size: 1.35rem;
    line-height: 1;
  }

  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    border: 0;
    padding: 0;
    background: rgba(13, 23, 18, 0.44);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 84vw);
    height: 100vh;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    padding: 18px 16px 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
  }

  .app-shell.mobile-sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
  }

  .app-shell.mobile-sidebar-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    padding: 16px 18px 24px;
  }

  .company-bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    min-height: auto;
  }

  .company-bar .company-branding {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .profile-menu {
    grid-column: 1 / -1;
    width: 100%;
    justify-items: stretch;
  }

  .profile-panel {
    width: 100%;
  }

  .profile-actions-row {
    justify-content: space-between;
    width: 100%;
    flex-wrap: nowrap;
  }

  .profile-user-menu,
  .notification-popover {
    position: static;
    width: 100%;
    max-height: none;
  }

  .utility-bar {
    padding: 14px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .icon-shortcuts {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .site-module-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .site-module-tab {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-preview-menu {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .settings-preview-link {
    flex: 0 0 auto;
    min-width: 190px;
  }

  .table-wrap table,
  .settings-table-wrap table,
  #monthly-report-pane .monthly-entry-wrap table,
  #reports-pane .compact-table table,
  #downloads-pane .compact-table table,
  #shift-report-pane .compact-table table,
  #safety-activity-pane .compact-table table,
  #accident-pane .compact-table table,
  #accident-investigation-pane .compact-table table,
  #legal-reminders-pane .legal-entry-table,
  #legal-reminders-pane .compact-table table,
  #safety-quiz-pane .compact-table table {
    min-width: 720px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .login-shell {
    padding: 0;
  }

  .prelogin-nav {
    min-height: auto;
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .prelogin-menu {
    width: 100%;
    justify-content: flex-start;
    gap: 10px 18px;
  }

  .prelogin-menu-link {
    font-size: 0.98rem;
  }

  .prelogin-dropdown,
  .prelogin-dropdown-wide {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    padding: 16px;
    transform: none;
  }

  .prelogin-dropdown-wide {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .prelogin-menu-item:hover .prelogin-dropdown-wide,
  .prelogin-menu-item:focus-within .prelogin-dropdown-wide {
    transform: none;
  }

  .prelogin-home {
    grid-template-columns: 1fr;
    padding: 28px 16px;
  }

  .prelogin-feature-row {
    grid-template-columns: 1fr;
  }

  .prelogin-contact {
    width: calc(100% - 32px);
    margin: 22px auto 34px;
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .prelogin-contact-copy,
  .prelogin-contact-form {
    min-height: auto;
    padding: 22px;
  }

  .prelogin-contact-form .grid-two {
    grid-template-columns: 1fr;
  }

  .login-box,
  .login-panel {
    padding: 16px;
  }

  .main-content {
    padding: 14px;
    gap: 12px;
  }

  .company-bar {
    padding: 14px;
    border-radius: 22px;
  }

  .company-bar .company-branding {
    padding: 12px 14px;
    gap: 12px;
  }

  .company-bar .brand-logo {
    width: 62px;
    height: 62px;
  }

  .company-name {
    font-size: 1rem;
    line-height: 1.25;
  }

  .profile-actions-row {
    padding: 8px 10px;
  }

  .workspace-right,
  .workspace-card,
  .report-card,
  .site-drilldown-card,
  .settings-content-card,
  .employee-performance-sheet {
    padding: 16px;
    border-radius: 20px;
  }

  .module-pane-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 0 14px 14px;
  }

  .module-pane-head::before {
    bottom: 14px;
  }

  .module-pane-head h4 {
    font-size: 1.2rem;
  }

  .module-pane-head p {
    max-width: 100%;
  }

  .dashboard-grid,
  .icon-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-wrap,
  .settings-table-wrap,
  .employee-performance-sheet {
    border-radius: 16px;
  }

  .table-wrap th,
  .table-wrap td,
  .settings-table-wrap th,
  .settings-table-wrap td {
    padding: 12px 10px;
    font-size: 0.9rem;
  }

  #employee-performance-pane .employee-performance-sheet {
    max-height: none;
  }

  #employee-performance-pane .employee-performance-sheet table {
    min-width: 1900px;
  }

  #employee-performance-pane .employee-performance-sheet input,
  #employee-performance-pane .employee-performance-sheet textarea {
    min-width: 84px;
  }

  #employee-performance-pane .employee-performance-sheet td:nth-child(2) input {
    min-width: 180px;
  }

  #legal-reminders-pane .legal-entry-file-upload {
    min-width: 160px;
  }

  .quiz-wheel-stage {
    width: 184px;
    height: 184px;
  }

  .quiz-wheel-center {
    width: 70px;
    height: 70px;
  }

  .quiz-wheel-label {
    font-size: 0.95rem;
  }

  .quiz-timer-display {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .mobile-nav-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .company-bar .brand-logo {
    width: 54px;
    height: 54px;
  }

  .dashboard-grid,
  .icon-shortcuts {
    grid-template-columns: 1fr;
  }

  .workspace-right,
  .workspace-card,
  .report-card,
  .site-drilldown-card,
  .settings-content-card {
    padding: 14px;
  }

  .site-module-tabs {
    gap: 8px;
  }
}

.app-shell.interview-only-mode .utility-bar,
.app-shell.interview-only-mode #dashboard,
.app-shell.interview-only-mode #siteDrilldown,
.app-shell.interview-only-mode #sitesMenuToggle,
.app-shell.interview-only-mode #siteMenuList,
.app-shell.interview-only-mode #settingsMenuToggle,
.app-shell.interview-only-mode #settingsMenuList,
.app-shell.interview-only-mode .nav-link[href="#dashboard"],
.app-shell.interview-only-mode .module-link:not([data-module-target="safety-quiz-pane"]),
.app-shell.interview-only-mode .icon-shortcut:not([data-module-target="safety-quiz-pane"]),
.app-shell.interview-only-mode #portalNotificationBell,
.app-shell.interview-only-mode #changePasswordBtn {
  display: none !important;
}

.app-shell.interview-only-mode .sidebar {
  max-width: 290px;
}

.app-shell.interview-only-mode .module-pane:not(#safety-quiz-pane) {
  display: none !important;
}

.quiz-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.quiz-wheel-layout {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.quiz-wheel-stage {
  position: relative;
  width: 224px;
  height: 224px;
  margin: 0 auto;
}

.quiz-wheel-pointer {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 28px solid #0f5f6f;
  z-index: 3;
}

.quiz-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid rgba(15, 95, 111, 0.14);
  background:
    conic-gradient(
      from -36deg,
      #32d27a 0deg 72deg,
      #ffbf3f 72deg 144deg,
      #4fa4ff 144deg 216deg,
      #ff7c6b 216deg 288deg,
      #b96dff 288deg 360deg
    );
  box-shadow: 0 20px 40px rgba(18, 43, 34, 0.16);
  transition: transform 4.1s cubic-bezier(0.18, 0.9, 0.24, 1);
}

.quiz-wheel-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f5f6f 0%, #26a65b 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 6px solid rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  z-index: 2;
}

.quiz-wheel-label {
  position: absolute;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  z-index: 1;
  transform: translate(-50%, -50%);
}

.quiz-wheel-actions {
  display: grid;
  gap: 14px;
}

.quiz-admin-permission-form {
  display: grid;
  gap: 16px;
}

.quiz-admin-permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-master-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.quiz-master-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.quiz-master-toolbar label span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.quiz-master-toolbar select {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(20, 94, 82, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.quiz-master-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-master-meta-grid {
  margin-top: 14px;
}

.quiz-master-table-wrap table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.quiz-master-table-wrap th,
.quiz-master-table-wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  vertical-align: top;
}

.quiz-master-table-wrap th:nth-child(1),
.quiz-master-table-wrap td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.quiz-master-table-wrap th:nth-child(2),
.quiz-master-table-wrap td:nth-child(2) {
  width: 88px;
}

.quiz-master-table-wrap th:nth-child(3),
.quiz-master-table-wrap td:nth-child(3) {
  width: 104px;
}

.quiz-master-table-wrap th:nth-child(5),
.quiz-master-table-wrap td:nth-child(5) {
  width: 180px;
}

.quiz-master-table-wrap th:nth-child(6),
.quiz-master-table-wrap td:nth-child(6) {
  width: 118px;
  text-align: center;
}

.quiz-master-table-wrap td:nth-child(4) {
  font-weight: 500;
  color: #17352f;
}

.quiz-master-table-wrap td:nth-child(5) {
  color: #35524c;
}

.quiz-master-table-wrap .settings-action-group {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.quiz-master-table-wrap .settings-action-group .ghost-btn,
.quiz-master-table-wrap .settings-action-group .settings-edit-btn,
.quiz-master-table-wrap .settings-action-group .settings-delete-btn {
  width: 100%;
  justify-content: center;
}

.quiz-type-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 95, 111, 0.18);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  color: #2d4a44;
}

.quiz-type-pill.active {
  background: linear-gradient(135deg, #0f5f6f 0%, #26a65b 100%);
  color: #fff;
  border-color: transparent;
}

.quiz-form {
  display: grid;
  gap: 18px;
}

.quiz-question-card {
  border: 1px solid rgba(15, 95, 111, 0.12);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.quiz-question-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #17352f;
}

.quiz-question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quiz-question-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 95, 111, 0.08);
  color: #0f5f6f;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quiz-options-grid {
  display: grid;
  gap: 10px;
}

.quiz-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  justify-content: start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 95, 111, 0.12);
  background: rgba(245, 250, 247, 0.92);
  cursor: pointer;
}

.quiz-option input {
  margin: 3px 0 0;
  justify-self: start;
  align-self: start;
}

.quiz-option span {
  display: block;
  text-align: left;
  line-height: 1.5;
  color: #17352f;
  word-break: break-word;
}

.quiz-text-answer {
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 95, 111, 0.12);
  background: rgba(245, 250, 247, 0.92);
  color: #17352f;
  font: inherit;
  resize: vertical;
}

.quiz-pictorial-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 95, 111, 0.06);
  color: #274742;
  font-size: 0.9rem;
}

.quiz-pictorial-grid {
  display: grid;
  gap: 16px;
}

.quiz-pictorial-card {
  border: 1px solid rgba(15, 95, 111, 0.14);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 10px;
}

.quiz-pictorial-image-wrap {
  width: 100%;
  min-height: 220px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef4f2;
  border: 1px solid rgba(15, 95, 111, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-pictorial-image {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}

.quiz-pictorial-image-wrap.scene-top .quiz-pictorial-image {
  object-position: center 4%;
}

.quiz-pictorial-image-wrap.scene-bottom .quiz-pictorial-image {
  object-position: center 68%;
}

.quiz-pictorial-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  color: #4d6660;
  font-weight: 700;
}

.quiz-pictorial-answer-label {
  font-weight: 700;
  color: #1f4039;
  font-size: 0.95rem;
}

.quiz-timer-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin: 14px 0 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 95, 111, 0.12);
  background: linear-gradient(135deg, rgba(228, 245, 240, 0.9) 0%, rgba(245, 249, 255, 0.95) 100%);
}

.quiz-timer-banner.running {
  border-color: rgba(38, 166, 91, 0.22);
  box-shadow: inset 0 0 0 1px rgba(38, 166, 91, 0.08);
}

.quiz-timer-banner strong,
.quiz-timer-banner span {
  display: block;
}

.quiz-timer-banner span {
  margin-top: 4px;
  color: #4c6760;
}

.quiz-timer-display {
  min-width: 94px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 95, 111, 0.14);
  color: #0f5f6f;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quiz-guide-card .quiz-guide-list {
  display: grid;
  gap: 8px;
  color: #365852;
}

.quiz-form .form-error-text {
  color: #b93b32;
  font-weight: 700;
}

@media (max-width: 900px) {
  .quiz-wheel-layout {
    grid-template-columns: 1fr;
  }

  .quiz-master-toolbar {
    align-items: stretch;
  }

  .quiz-master-toolbar label {
    width: 100%;
  }

  .quiz-pictorial-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-pictorial-image-wrap {
    height: 220px;
  }

  .quiz-question-head,
  .quiz-timer-banner {
    grid-template-columns: 1fr;
  }

  .quiz-master-table-wrap th,
  .quiz-master-table-wrap td {
    padding: 11px 9px;
    font-size: 0.88rem;
  }

  .quiz-master-table-wrap th:nth-child(2),
  .quiz-master-table-wrap td:nth-child(2),
  .quiz-master-table-wrap th:nth-child(3),
  .quiz-master-table-wrap td:nth-child(3) {
    width: 78px;
  }

  .quiz-master-table-wrap th:nth-child(5),
  .quiz-master-table-wrap td:nth-child(5) {
    width: 148px;
  }

  .quiz-master-table-wrap th:nth-child(6),
  .quiz-master-table-wrap td:nth-child(6) {
    width: 108px;
  }
}

@media (max-width: 760px) {
  .quiz-master-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .quiz-master-table-wrap table {
    display: block;
    min-width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  .quiz-master-table-wrap thead {
    display: none;
  }

  .quiz-master-table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .quiz-master-table-wrap tbody tr {
    display: block;
    border: 1px solid rgba(20, 49, 38, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    overflow: hidden;
  }

  .quiz-master-table-wrap tbody td {
    display: grid;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    width: 100% !important;
    align-items: start;
    gap: 8px;
    border-bottom: 1px dashed rgba(20, 49, 38, 0.1);
    text-align: left;
  }

  .quiz-master-table-wrap tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
  }

  .quiz-master-table-wrap tbody td:last-child {
    border-bottom: 0;
  }

  .quiz-master-table-wrap tbody td[data-label="Action"] {
    display: block;
  }

  .quiz-master-table-wrap tbody td[data-label="Action"]::before {
    display: block;
    margin-bottom: 8px;
  }
}

.card,
.card-form,
.company-bar,
.profile-user-menu,
.notification-popover,
.kpi-card,
.module-pane,
.report-card,
.file-preview-backdrop {
  -webkit-backdrop-filter: blur(18px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card,
  .card-form,
  .company-bar,
  .profile-user-menu,
  .notification-popover,
  .kpi-card,
  .module-pane,
  .report-card {
    background-color: rgba(255, 255, 255, 0.96) !important;
  }

  .file-preview-backdrop {
    background: rgba(11, 22, 18, 0.72) !important;
  }
}

@supports not (position: sticky) {
  .sidebar,
  .employee-performance-sheet th,
  .employee-performance-sheet tbody td:first-child,
  .employee-performance-sheet tbody td:nth-child(2) {
    position: static;
  }
}

/* Settings table fit improvements (desktop + mobile) */
#settings-pane .settings-table-wrap table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

#settings-pane .settings-table-wrap th,
#settings-pane .settings-table-wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  vertical-align: top;
}

#settings-pane .settings-table-wrap th:last-child,
#settings-pane .settings-table-wrap td:last-child {
  width: 132px;
  text-align: center;
}

#settings-pane .settings-table-wrap .settings-action-group {
  justify-content: center;
}

@media (max-width: 980px) {
  #settings-pane .settings-table-wrap table {
    min-width: 100% !important;
    table-layout: fixed;
  }

  #settings-pane .settings-table-wrap th,
  #settings-pane .settings-table-wrap td {
    padding: 11px 9px;
    font-size: 0.88rem;
  }
}

@media (max-width: 760px) {
  #settings-pane .settings-table-wrap th,
  #settings-pane .settings-table-wrap td {
    padding: 10px 8px;
    font-size: 0.82rem;
  }

  #settings-pane .settings-table-wrap th:last-child,
  #settings-pane .settings-table-wrap td:last-child {
    width: 114px;
  }

  #settings-pane .settings-table-wrap .settings-action-group {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  #settings-pane .settings-table-wrap .settings-action-group .ghost-btn,
  #settings-pane .settings-table-wrap .settings-action-group .settings-edit-btn,
  #settings-pane .settings-table-wrap .settings-action-group .settings-delete-btn {
    width: 100%;
    justify-content: center;
  }

  #settings-pane .settings-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #settings-pane .settings-table-wrap table {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
  }

  #settings-pane .settings-table-wrap thead {
    display: none;
  }

  #settings-pane .settings-table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  #settings-pane .settings-table-wrap tbody tr {
    display: block;
    border: 1px solid rgba(20, 49, 38, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    overflow: hidden;
  }

  #settings-pane .settings-table-wrap tbody td {
    display: grid;
    grid-template-columns: minmax(92px, 42%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border-bottom: 1px dashed rgba(20, 49, 38, 0.1);
  }

  #settings-pane .settings-table-wrap tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
  }

  #settings-pane .settings-table-wrap tbody td:last-child {
    border-bottom: 0;
  }

  #settings-pane .settings-table-wrap tbody td[data-label="Action"] {
    display: block;
  }

  #settings-pane .settings-table-wrap tbody td[data-label="Action"]::before {
    display: block;
    margin-bottom: 8px;
  }
}

#settings-pane .legal-master-table-wrap table,
#settings-pane .employee-master-table-wrap table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

#settings-pane .legal-master-table-wrap th,
#settings-pane .legal-master-table-wrap td,
#settings-pane .employee-master-table-wrap th,
#settings-pane .employee-master-table-wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  vertical-align: top;
}

#settings-pane .legal-master-table-wrap td[data-label="Action"],
#settings-pane .employee-master-table-wrap td[data-label="Action"] {
  text-align: center;
}

#settings-pane .legal-master-table-wrap .settings-action-group,
#settings-pane .employee-master-table-wrap .settings-action-group {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

#settings-pane .legal-master-table-wrap .settings-action-group .ghost-btn,
#settings-pane .legal-master-table-wrap .settings-action-group .settings-edit-btn,
#settings-pane .legal-master-table-wrap .settings-action-group .settings-delete-btn,
#settings-pane .employee-master-table-wrap .settings-action-group .ghost-btn,
#settings-pane .employee-master-table-wrap .settings-action-group .settings-edit-btn,
#settings-pane .employee-master-table-wrap .settings-action-group .settings-delete-btn {
  min-width: 74px;
}

#settings-pane .employee-master-table-wrap th:last-child,
#settings-pane .employee-master-table-wrap td:last-child {
  width: 220px;
}

#employee-performance-pane tr.employee-master-highlight {
  background: rgba(96, 173, 125, 0.18) !important;
  transition: background 0.25s ease;
}

#downloads-pane .compact-table table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

#downloads-pane .compact-table th,
#downloads-pane .compact-table td {
  padding: 14px 10px;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.45;
}

#downloads-pane .compact-table th:nth-child(1),
#downloads-pane .compact-table td:nth-child(1) {
  width: 52px;
  text-align: center;
}

#downloads-pane .compact-table th:nth-child(5),
#downloads-pane .compact-table td:nth-child(5) {
  width: 92px;
}

#downloads-pane .compact-table th:nth-child(6),
#downloads-pane .compact-table td:nth-child(6) {
  width: 136px;
}

#downloads-pane .compact-table th:nth-child(7),
#downloads-pane .compact-table td:nth-child(7) {
  width: 244px;
  text-align: right;
}

#downloads-pane .compact-table td:nth-child(2),
#downloads-pane .compact-table td:nth-child(3),
#downloads-pane .compact-table td:nth-child(4) {
  overflow-wrap: anywhere;
  word-break: normal;
}

#downloads-pane .compact-table td:nth-child(5) {
  white-space: nowrap;
}

#downloads-pane .compact-table td:nth-child(4) a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#downloads-pane .compact-table td:last-child .settings-action-group {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
}

#downloads-pane .compact-table .settings-action-group .ghost-btn,
#downloads-pane .compact-table .settings-action-group .settings-edit-btn,
#downloads-pane .compact-table .settings-action-group .settings-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  min-width: 54px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 14px;
  line-height: 1;
  white-space: nowrap;
}

#downloads-pane .compact-table .settings-action-group .document-download-btn {
  min-width: 78px;
}

@media (max-width: 980px) {
  #downloads-pane .compact-table table {
    min-width: 100%;
  }

  #downloads-pane .compact-table th,
  #downloads-pane .compact-table td {
    padding: 12px 8px;
  }

  #downloads-pane .compact-table th:nth-child(7),
  #downloads-pane .compact-table td:nth-child(7) {
    width: 230px;
  }
}

@media (max-width: 760px) {
  #downloads-pane .compact-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #downloads-pane .compact-table table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  #downloads-pane .compact-table thead {
    display: none;
  }

  #downloads-pane .compact-table tbody {
    display: grid;
    gap: 12px;
  }

  #downloads-pane .compact-table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(20, 49, 38, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
  }

  #downloads-pane .compact-table tbody td {
    display: grid;
    grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    width: auto !important;
    padding: 12px 14px;
    text-align: left !important;
    white-space: normal;
    border-bottom: 1px dashed rgba(20, 49, 38, 0.1);
  }

  #downloads-pane .compact-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
  }

  #downloads-pane .compact-table tbody td:last-child {
    display: block;
    border-bottom: 0;
  }

  #downloads-pane .compact-table tbody td:last-child::before {
    display: block;
    margin-bottom: 8px;
  }

  #downloads-pane .compact-table td:last-child .settings-action-group {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

#safety-activity-pane .compact-table table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

#safety-activity-pane .compact-table th,
#safety-activity-pane .compact-table td {
  padding: 14px 10px;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.45;
}

#safety-activity-pane .compact-table th:nth-child(1),
#safety-activity-pane .compact-table td:nth-child(1) {
  width: 48px;
  text-align: center;
}

#safety-activity-pane .compact-table th:nth-child(3),
#safety-activity-pane .compact-table td:nth-child(3) {
  width: 96px;
}

#safety-activity-pane .compact-table th:nth-child(5),
#safety-activity-pane .compact-table td:nth-child(5) {
  width: 84px;
}

#safety-activity-pane .compact-table th:nth-child(6),
#safety-activity-pane .compact-table td:nth-child(6) {
  width: 128px;
}

#safety-activity-pane .compact-table th:nth-child(7),
#safety-activity-pane .compact-table td:nth-child(7) {
  width: 214px;
  text-align: right;
}

#safety-activity-pane .compact-table td:nth-child(2),
#safety-activity-pane .compact-table td:nth-child(4),
#safety-activity-pane .compact-table td:nth-child(6) {
  overflow-wrap: anywhere;
  word-break: normal;
}

#safety-activity-pane .compact-table td:nth-child(3),
#safety-activity-pane .compact-table td:nth-child(5) {
  white-space: nowrap;
}

#safety-activity-pane .compact-table td:last-child .settings-action-group {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 5px;
}

#safety-activity-pane .compact-table .settings-action-group .ghost-btn,
#safety-activity-pane .compact-table .settings-action-group .settings-edit-btn,
#safety-activity-pane .compact-table .settings-action-group .settings-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  min-width: 48px;
  margin: 0;
  padding: 8px 9px;
  border-radius: 14px;
  line-height: 1;
  white-space: nowrap;
}

#safety-activity-pane .compact-table .settings-action-group .safety-activity-download-btn {
  min-width: 74px;
}

.report-card > strong + span,
.settings-content-card > strong + span {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

#settings-pane .settings-content-card > strong {
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
  margin-bottom: 8px;
}

@media (max-width: 1180px) {
  #safety-activity-pane .compact-table th:nth-child(6),
  #safety-activity-pane .compact-table td:nth-child(6) {
    width: 122px;
  }
}

@media (max-width: 980px) {
  #safety-activity-pane .compact-table th,
  #safety-activity-pane .compact-table td {
    padding: 12px 8px;
  }

  #safety-activity-pane .compact-table th:nth-child(7),
  #safety-activity-pane .compact-table td:nth-child(7) {
    width: 206px;
  }
}

@media (max-width: 760px) {
  #safety-activity-pane .compact-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #safety-activity-pane .compact-table table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  #safety-activity-pane .compact-table thead {
    display: none;
  }

  #safety-activity-pane .compact-table tbody {
    display: grid;
    gap: 12px;
  }

  #safety-activity-pane .compact-table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(20, 49, 38, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
  }

  #safety-activity-pane .compact-table tbody td {
    display: grid;
    grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    width: auto !important;
    padding: 12px 14px;
    text-align: left !important;
    white-space: normal;
    border-bottom: 1px dashed rgba(20, 49, 38, 0.1);
  }

  #safety-activity-pane .compact-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
  }

  #safety-activity-pane .compact-table tbody td:last-child {
    display: block;
    border-bottom: 0;
  }

  #safety-activity-pane .compact-table tbody td:last-child::before {
    display: block;
    margin-bottom: 8px;
  }

#safety-activity-pane .compact-table td:last-child .settings-action-group {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.login-mode #loginScreen.login-shell {
    padding: 0;
    place-items: stretch;
    overflow-x: hidden;
  }

  body.login-mode #loginScreen .prelogin-nav,
  body.login-mode #loginScreen .prelogin-home,
  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .prelogin-hero,
  body.login-mode #loginScreen .prelogin-feature-row,
  body.login-mode #loginScreen .prelogin-feature-row article {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.login-mode #loginScreen .login-box,
  body.login-mode #loginScreen .login-panel,
  body.login-mode #loginScreen .login-form,
  body.login-mode #loginScreen .login-form label,
  body.login-mode #loginScreen .input-icon {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.login-mode #loginScreen .login-box {
    width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    padding: 0;
  }

  body.login-mode #loginScreen .login-panel {
    width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    padding: 14px;
    border-radius: 22px;
    overflow: hidden;
  }

  body.login-mode #loginScreen .login-company h4 {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  body.login-mode #loginScreen .brand-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  body.login-mode #loginScreen .logo-container .brand-logo.large {
    width: 80px;
    height: 80px;
  }

  body.login-mode #loginScreen .brand-text-content h3 {
    font-size: 1.55rem;
  }

  body.login-mode #loginScreen .login-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin-inline: auto;
    align-items: stretch;
    gap: 10px;
  }

  body.login-mode #loginScreen #loginForm label > span {
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
  }

  body.login-mode #loginScreen #loginForm input,
  body.login-mode #loginScreen #loginForm select,
  body.login-mode #loginScreen #loginForm textarea {
    width: 100%;
    max-width: 300px;
    min-width: 0;
    margin-inline: auto;
  }

  body.login-mode #loginScreen #loginForm .input-icon {
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
  }

  body.login-mode #loginScreen #loginForm .input-icon input {
    width: 100%;
  }

  body.login-mode #loginScreen .login-actions .cta,
  body.login-mode #loginScreen .login-actions .ghost-btn {
    width: 100%;
    max-width: 300px;
    min-width: 0;
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  body:not(.login-mode) .app-shell,
  body:not(.login-mode) .main-content {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }

  body:not(.login-mode) .main-content {
    padding: 14px;
  }

  body:not(.login-mode) .main-content > * {
    width: calc(100vw - 42px);
    max-width: calc(100vw - 42px);
    min-width: 0;
    justify-self: start;
  }

  body:not(.login-mode) .company-bar,
  body:not(.login-mode) .utility-bar,
  body:not(.login-mode) .workspace-right,
  body:not(.login-mode) .module-pane,
  body:not(.login-mode) .report-card,
  body:not(.login-mode) .settings-content-card {
    width: auto;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  body:not(.login-mode) .workspace-right,
  body:not(.login-mode) .report-card,
  body:not(.login-mode) .settings-content-card {
    padding-right: 28px;
  }

  body:not(.login-mode) .module-pane-head,
  body:not(.login-mode) .module-pane-head p,
  body:not(.login-mode) .report-card,
  body:not(.login-mode) .report-card p,
  body:not(.login-mode) .report-card span,
  body:not(.login-mode) label,
  body:not(.login-mode) input,
  body:not(.login-mode) select,
  body:not(.login-mode) textarea {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body:not(.login-mode) .module-pane-head p {
    width: 100%;
    max-width: calc(100vw - 140px);
  }

  body:not(.login-mode) .company-bar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    overflow: visible;
  }

  body:not(.login-mode) .mobile-nav-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  body:not(.login-mode) .company-bar .company-branding {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    left: 0;
    top: 0;
  }

  body:not(.login-mode) .profile-menu {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    justify-items: stretch;
  }

  body:not(.login-mode) .profile-actions-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  body:not(.login-mode) .profile-icon {
    min-width: 88px;
    max-width: calc(100vw - 110px);
  }

  body:not(.login-mode) .notification-bell {
    flex: 0 0 52px;
  }

  body:not(.login-mode) .profile-site-switch,
  body:not(.login-mode) .profile-site-switch select,
  body:not(.login-mode) .company-bar .session-info {
    width: 100%;
    max-width: 100%;
  }
}

/* Final pre-live alignment pass */
#settings-pane .settings-preview-menu {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  align-content: start;
  align-items: stretch;
  padding: 10px;
  scrollbar-width: thin;
}

#settings-pane .settings-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

#settings-pane .settings-preview-link {
  flex: 0 0 auto;
  width: auto;
  min-width: 170px;
  max-width: 220px;
  min-height: 54px;
  height: auto;
  line-height: 1.35;
}

#settings-pane .settings-preview-link i {
  flex: 0 0 auto;
}

#settings-pane .settings-preview-link span {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

#settings-pane .settings-table-wrap,
#downloads-pane .compact-table,
#safety-activity-pane .compact-table {
  overflow-x: auto;
  overflow-y: hidden;
}

#settings-pane .settings-table-wrap table {
  table-layout: auto;
  min-width: max(100%, 920px);
}

#settings-pane .settings-table-wrap th,
#settings-pane .settings-table-wrap td {
  word-break: normal;
  overflow-wrap: anywhere;
}

#settings-pane .employee-master-table-wrap table {
  min-width: 980px;
  table-layout: fixed;
}

#settings-pane .employee-master-table-wrap th,
#settings-pane .employee-master-table-wrap td {
  padding: 14px 12px;
  vertical-align: middle;
  text-align: left;
}

#settings-pane .employee-master-table-wrap th:nth-child(1),
#settings-pane .employee-master-table-wrap td:nth-child(1) {
  width: 112px;
}

#settings-pane .employee-master-table-wrap th:nth-child(2),
#settings-pane .employee-master-table-wrap td:nth-child(2) {
  width: 102px;
}

#settings-pane .employee-master-table-wrap th:nth-child(3),
#settings-pane .employee-master-table-wrap td:nth-child(3) {
  width: 160px;
}

#settings-pane .employee-master-table-wrap th:nth-child(4),
#settings-pane .employee-master-table-wrap td:nth-child(4) {
  width: 70px;
}

#settings-pane .employee-master-table-wrap th:nth-child(5),
#settings-pane .employee-master-table-wrap td:nth-child(5) {
  width: 92px;
}

#settings-pane .employee-master-table-wrap th:nth-child(6),
#settings-pane .employee-master-table-wrap td:nth-child(6) {
  width: 96px;
}

#settings-pane .employee-master-table-wrap th:nth-child(7),
#settings-pane .employee-master-table-wrap td:nth-child(7) {
  width: 118px;
}

#settings-pane .employee-master-table-wrap th:nth-child(8),
#settings-pane .employee-master-table-wrap td:nth-child(8) {
  width: 90px;
  text-align: center;
}

#settings-pane .employee-master-table-wrap th:nth-child(9),
#settings-pane .employee-master-table-wrap td:nth-child(9) {
  width: 158px;
  text-align: center;
}

#settings-pane .employee-master-table-wrap td:nth-child(1),
#settings-pane .employee-master-table-wrap td:nth-child(2),
#settings-pane .employee-master-table-wrap td:nth-child(4),
#settings-pane .employee-master-table-wrap td:nth-child(5),
#settings-pane .employee-master-table-wrap td:nth-child(6),
#settings-pane .employee-master-table-wrap td:nth-child(7),
#settings-pane .employee-master-table-wrap td:nth-child(8) {
  overflow-wrap: normal;
}

#settings-pane .employee-master-table-wrap td:nth-child(3) {
  overflow-wrap: anywhere;
}

#settings-pane .employee-master-table-wrap .settings-action-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

#settings-pane .employee-master-table-wrap .settings-action-group .ghost-btn,
#settings-pane .employee-master-table-wrap .settings-action-group .settings-edit-btn,
#settings-pane .employee-master-table-wrap .settings-action-group .settings-delete-btn {
  min-width: 64px;
  margin: 0;
  white-space: nowrap;
}

#settings-pane .employee-master-table-wrap th:last-child,
#settings-pane .employee-master-table-wrap td:last-child,
#downloads-pane .compact-table th:last-child,
#downloads-pane .compact-table td:last-child,
#safety-activity-pane .compact-table th:last-child,
#safety-activity-pane .compact-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -12px 0 18px rgba(20, 49, 38, 0.06);
}

#settings-pane .employee-master-table-wrap th:last-child,
#downloads-pane .compact-table th:last-child,
#safety-activity-pane .compact-table th:last-child {
  z-index: 6;
  background: linear-gradient(180deg, rgba(246, 242, 235, 0.98), rgba(246, 242, 235, 0.94));
}

#settings-pane .employee-master-table-wrap th:last-child,
#settings-pane .employee-master-table-wrap td:last-child {
  position: static;
  box-shadow: none;
}

#downloads-pane .compact-table table {
  min-width: 1060px;
}

#safety-activity-pane .compact-table table {
  min-width: 1040px;
}

#downloads-pane .compact-table th,
#downloads-pane .compact-table td,
#safety-activity-pane .compact-table th,
#safety-activity-pane .compact-table td {
  word-break: normal;
}

#downloads-pane .compact-table td:last-child .settings-action-group,
#safety-activity-pane .compact-table td:last-child .settings-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

#downloads-pane .compact-table .settings-action-group .ghost-btn,
#downloads-pane .compact-table .settings-action-group .settings-edit-btn,
#downloads-pane .compact-table .settings-action-group .settings-delete-btn,
#safety-activity-pane .compact-table .settings-action-group .ghost-btn,
#safety-activity-pane .compact-table .settings-action-group .settings-edit-btn,
#safety-activity-pane .compact-table .settings-action-group .settings-delete-btn {
  min-width: 74px;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 760px) {
  #settings-pane .settings-preview-menu {
    align-content: start;
  }

  #settings-pane .employee-master-table-wrap table,
  #downloads-pane .compact-table table,
  #safety-activity-pane .compact-table table {
    min-width: 0;
  }

  #settings-pane .employee-master-table-wrap th:nth-child(n),
  #settings-pane .employee-master-table-wrap td:nth-child(n) {
    width: auto;
    text-align: left;
  }

  #settings-pane .employee-master-table-wrap th:last-child,
  #settings-pane .employee-master-table-wrap td:last-child,
  #downloads-pane .compact-table th:last-child,
  #downloads-pane .compact-table td:last-child,
  #safety-activity-pane .compact-table th:last-child,
  #safety-activity-pane .compact-table td:last-child {
    position: static;
    box-shadow: none;
  }

  #settings-pane .employee-master-table-wrap .settings-action-group,
  #downloads-pane .compact-table td:last-child .settings-action-group,
  #safety-activity-pane .compact-table td:last-child .settings-action-group {
    justify-content: flex-start;
  }
}

/* Cross-device fit polish for pre-login and portal layouts */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.login-shell,
.app-shell,
.main-content {
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
}

.prelogin-nav {
  max-width: 100vw;
  gap: clamp(12px, 1.8vw, 28px);
}

.prelogin-menu {
  min-width: 0;
  gap: clamp(12px, 1.5vw, 28px);
}

.prelogin-menu-link {
  font-size: clamp(0.95rem, 1.15vw, 1.18rem);
}

.prelogin-home {
  width: min(1600px, calc(100vw - 40px));
  grid-template-columns: minmax(250px, 0.82fr) minmax(360px, 1.36fr) minmax(260px, 0.82fr);
  gap: clamp(18px, 2vw, 34px);
}

.prelogin-contact {
  min-height: auto;
  max-height: calc(100vh - 138px);
  padding: clamp(18px, 1.6vw, 24px);
}

.prelogin-contact-copy h2 {
  font-size: clamp(1.9rem, 2.2vw, 2.75rem);
}

.prelogin-hero {
  min-height: calc(100vh - 138px);
}

.prelogin-hero h1 {
  font-size: clamp(2.2rem, 3.5vw, 4rem);
}

.prelogin-home .login-box {
  max-width: 340px;
}

.prelogin-home .login-panel {
  padding: clamp(18px, 1.5vw, 22px);
}

.app-shell {
  width: 100%;
  grid-template-columns: minmax(260px, 286px) minmax(0, 1fr);
}

.sidebar {
  min-width: 0;
}

.main-content {
  width: 100%;
  min-width: 0;
  padding-inline: clamp(14px, 1.6vw, 24px);
}

.main-content > *,
.utility-bar,
.dashboard-grid,
.module-section,
.module-pane,
.report-card,
.workspace-right,
.workspace-card,
.site-drilldown-card,
.settings-content-card {
  max-width: 100%;
  min-width: 0;
}

.icon-shortcuts {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: clamp(10px, 1vw, 14px);
}

.icon-shortcut {
  min-width: 0;
  padding-inline: 8px;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 1380px) {
  .prelogin-brand-group {
    gap: 10px;
  }

  .prelogin-brand {
    min-width: 170px;
  }

  .prelogin-brand img {
    width: min(190px, 36vw);
  }

  .prelogin-trial-badge {
    min-height: 48px;
    padding: 8px 14px;
  }

  .prelogin-trial-badge span {
    font-size: 0.7rem;
  }

  .prelogin-trial-badge strong {
    font-size: 0.9rem;
  }

  .prelogin-home {
    width: min(1280px, calc(100vw - 32px));
    grid-template-columns: minmax(240px, 0.78fr) minmax(330px, 1.28fr) minmax(250px, 0.78fr);
    gap: 18px;
  }

  .prelogin-contact-copy h2 {
    font-size: clamp(1.8rem, 2.1vw, 2.35rem);
  }

  .prelogin-feature-row {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .prelogin-feature-row article {
    min-height: 112px;
    padding: 12px;
  }

  .prelogin-home .raiseehs-logo-login {
    max-height: 96px;
  }

  .app-shell {
    grid-template-columns: minmax(240px, 270px) minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 14px;
  }
}

@media (max-width: 1120px) {
  .prelogin-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .prelogin-brand-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .prelogin-menu {
    width: 100%;
    justify-content: flex-start;
  }

  .prelogin-home {
    grid-template-columns: minmax(250px, 0.9fr) minmax(360px, 1.1fr);
  }

  .prelogin-hero {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: auto;
    padding-block: 18px 4px;
  }

  .prelogin-contact {
    grid-column: 1;
    grid-row: 2;
    max-height: none;
  }

  .prelogin-home .login-box {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .prelogin-home {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 14px;
    gap: 16px;
  }

  .prelogin-hero,
  .prelogin-contact,
  .prelogin-home .login-box {
    grid-column: 1;
    grid-row: auto;
  }

  .prelogin-contact {
    width: 100%;
    margin-inline: 0;
    max-height: none;
    padding: 16px;
    border-radius: 18px;
  }

  .prelogin-contact-copy,
  .prelogin-contact-form {
    padding: 0;
  }

  .prelogin-contact-copy h2,
  .prelogin-hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.65rem);
    line-height: 1.08;
  }

  .prelogin-contact-form .grid-two,
  .prelogin-contact-form .prelogin-service-checklist,
  .prelogin-contact-form label {
    min-width: 0;
    width: 100%;
  }

  .prelogin-service-checklist {
    max-height: 190px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .prelogin-home .login-box {
    width: 100%;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .prelogin-nav {
    padding: 12px;
  }

  .prelogin-brand {
    min-width: 0;
    width: 100%;
  }

  .prelogin-brand img {
    width: min(210px, 72vw);
  }

  .prelogin-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .prelogin-menu-item,
  .prelogin-menu-link {
    flex: 0 0 auto;
  }

  .prelogin-home {
    padding: 16px 10px 22px;
  }

  .prelogin-hero,
  .prelogin-contact,
  .prelogin-home .login-box {
    width: 100%;
  }

  .prelogin-home .login-panel,
  .prelogin-contact,
  .prelogin-hero {
    border-radius: 18px;
  }

  .prelogin-feature-row {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) and (min-width: 761px) {
  body:not(.login-mode) {
    overflow-x: hidden;
  }

  body:not(.login-mode) .app-shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    background: transparent;
  }

  body:not(.login-mode) .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  body:not(.login-mode) .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 84vw);
    height: 100vh;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
  }

  body:not(.login-mode) .app-shell.mobile-sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
  }

  body:not(.login-mode) .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    border: 0;
    padding: 0;
    background: rgba(13, 23, 18, 0.44);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  body:not(.login-mode) .app-shell.mobile-sidebar-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body:not(.login-mode) .main-content {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 16px 18px 24px;
  }

  body:not(.login-mode) .company-bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  body:not(.login-mode) .company-branding {
    grid-column: 2;
    justify-self: stretch;
    left: 0;
    top: 0;
    width: 100%;
  }

  body:not(.login-mode) .profile-menu {
    grid-column: 1 / -1;
    width: 100%;
    justify-items: stretch;
  }

  body:not(.login-mode) .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Smartphone final alignment overrides, including Chrome desktop-site mode */
@media (max-width: 760px) {
  body.login-mode #loginScreen .prelogin-nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px !important;
  }

  body.login-mode #loginScreen .prelogin-brand-group {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  body.login-mode #loginScreen .prelogin-brand {
    width: auto;
    min-width: 0;
  }

  body.login-mode #loginScreen .prelogin-brand img {
    width: min(172px, 42vw);
    max-height: 56px;
    padding: 5px 8px;
  }

  body.login-mode #loginScreen .prelogin-trial-badge {
    min-width: 0;
    min-height: 48px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 18px;
  }

  body.login-mode #loginScreen .prelogin-trial-badge span {
    font-size: 0.66rem;
  }

  body.login-mode #loginScreen .prelogin-trial-badge strong {
    font-size: clamp(0.78rem, 3.4vw, 0.96rem);
    line-height: 1.08;
    white-space: normal;
  }

  body.login-mode #loginScreen .prelogin-menu {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 8px 12px;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible;
  }

  body.login-mode #loginScreen .prelogin-menu-item,
  body.login-mode #loginScreen .prelogin-menu-link {
    min-width: 0;
    width: 100%;
  }

  body.login-mode #loginScreen .prelogin-menu-link {
    justify-content: flex-start;
    padding: 6px 0;
    font-size: 0.88rem;
    line-height: 1.2;
    white-space: normal;
  }

  body.login-mode #loginScreen .prelogin-dropdown,
  body.login-mode #loginScreen .prelogin-dropdown-wide {
    display: none;
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 12px;
    max-height: 260px;
    overflow-y: auto;
  }

  body.login-mode #loginScreen .prelogin-menu-item:hover .prelogin-dropdown,
  body.login-mode #loginScreen .prelogin-menu-item:focus-within .prelogin-dropdown,
  body.login-mode #loginScreen .prelogin-menu-item:hover .prelogin-dropdown-wide,
  body.login-mode #loginScreen .prelogin-menu-item:focus-within .prelogin-dropdown-wide {
    display: grid;
  }

  body.login-mode #loginScreen .prelogin-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    width: 100%;
    padding: 14px 10px 22px !important;
  }

  body.login-mode #loginScreen .prelogin-hero,
  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .login-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.login-mode #loginScreen .prelogin-hero,
  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .login-panel {
    border-radius: 18px;
  }

  body.login-mode #loginScreen .prelogin-contact {
    position: relative;
    z-index: 1;
    width: calc(100% - 20px) !important;
    max-width: 420px !important;
    justify-self: center;
    margin-bottom: 28px !important;
    padding: 14px !important;
  }

  body.login-mode #loginScreen .login-box {
    position: relative;
    z-index: 2;
    width: calc(100% - 20px) !important;
    max-width: 420px !important;
    justify-self: center;
    padding-top: 16px !important;
  }

  body.login-mode #loginScreen .login-panel {
    padding: 16px !important;
  }
}

@media (max-width: 420px) {
  body.login-mode #loginScreen .prelogin-brand-group {
    gap: 7px;
  }

  body.login-mode #loginScreen .prelogin-brand img {
    width: min(150px, 40vw);
    max-height: 50px;
    padding: 4px 6px;
  }

  body.login-mode #loginScreen .prelogin-trial-badge {
    min-height: 44px;
    padding: 7px 8px;
  }

  body.login-mode #loginScreen .prelogin-trial-badge span {
    font-size: 0.6rem;
  }

  body.login-mode #loginScreen .prelogin-trial-badge strong {
    font-size: clamp(0.74rem, 3.25vw, 0.86rem);
  }

  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .login-box {
    width: calc(100% - 28px) !important;
    max-width: 360px !important;
  }

  body.login-mode #loginScreen .prelogin-contact {
    padding: 12px !important;
    margin-bottom: 34px !important;
  }

  body.login-mode #loginScreen .login-panel {
    padding: 14px !important;
  }

  body.login-mode #loginScreen .raiseehs-logo-login {
    width: min(300px, 74vw);
    max-height: 112px;
  }
}

@media screen and (max-device-width: 640px) and (min-width: 761px) {
  body:not(.login-mode) {
    overflow-x: hidden;
  }

  body:not(.login-mode) .app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    background: transparent !important;
  }

  body:not(.login-mode) .mobile-nav-toggle {
    display: inline-grid !important;
    place-items: center;
  }

  body:not(.login-mode) .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 84vw);
    height: 100vh;
    z-index: 40;
    transform: translateX(-105%);
  }

  body:not(.login-mode) .app-shell.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  body:not(.login-mode) .main-content {
    width: min(640px, calc(100vw - 28px));
    max-width: 640px;
    margin-inline: auto;
    padding: 14px;
    justify-self: center;
  }

  body:not(.login-mode) .company-bar {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  body:not(.login-mode) .company-branding {
    grid-column: 2;
    left: 0 !important;
    top: 0 !important;
    justify-self: stretch;
    width: 100%;
  }

  body:not(.login-mode) .profile-menu {
    grid-column: 1 / -1;
    width: 100%;
    justify-items: stretch;
  }

  body:not(.login-mode) .utility-bar,
  body:not(.login-mode) .dashboard-grid,
  body:not(.login-mode) .module-section,
  body:not(.login-mode) .workspace-split,
  body:not(.login-mode) .module-pane {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  body:not(.login-mode) .dashboard-grid,
  body:not(.login-mode) .icon-shortcuts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Final smartphone pre-login no-overlap guard */
@media (max-width: 760px) {
  body.login-mode #loginScreen .prelogin-home {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 36px !important;
  }

  body.login-mode #loginScreen .prelogin-hero,
  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .login-box {
    flex: 0 0 auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    transform: none !important;
  }

  body.login-mode #loginScreen .prelogin-contact {
    margin-bottom: 0 !important;
  }

  body.login-mode #loginScreen .login-box {
    margin-top: 10px !important;
  }
}

@media screen and (max-device-width: 640px) and (min-width: 761px) {
  body.login-mode #loginScreen .prelogin-nav {
    gap: 10px !important;
  }

  body.login-mode #loginScreen .prelogin-brand-group {
    gap: 8px;
  }

  body.login-mode #loginScreen .prelogin-brand {
    min-width: 0;
  }

  body.login-mode #loginScreen .prelogin-brand img {
    width: min(150px, 22vw);
    max-height: 48px;
    padding: 4px 7px;
  }

  body.login-mode #loginScreen .prelogin-trial-badge {
    min-height: 42px;
    padding: 7px 10px;
  }

  body.login-mode #loginScreen .prelogin-trial-badge span {
    font-size: 0.58rem;
  }

  body.login-mode #loginScreen .prelogin-trial-badge strong {
    font-size: 0.74rem;
  }

  body.login-mode #loginScreen .prelogin-home {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 38px !important;
    width: min(100%, 620px) !important;
    margin-inline: auto !important;
  }

  body.login-mode #loginScreen .prelogin-hero,
  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .login-box {
    flex: 0 0 auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    transform: none !important;
  }

  body.login-mode #loginScreen .prelogin-contact,
  body.login-mode #loginScreen .login-box {
    width: min(420px, calc(100vw - 52px)) !important;
    max-width: min(420px, calc(100vw - 52px)) !important;
    margin-inline: auto !important;
  }

  body.login-mode #loginScreen .login-box {
    margin-top: 12px !important;
  }
}

