:root {
  --field-blue: #104a8b;
  --field-blue-dark: #0a3567;
  --field-ink: #2f3640;
  --field-green: #00c3a0;
  --field-green-dark: #008f78;
  --field-yellow: #f9f871;
  --field-red: #b42318;
  --field-muted: #667085;
  --field-border: #e3e3e3;
  --field-bg: #f5f7fa;
  --field-surface: #ffffff;
  --field-surface-muted: #f7f9fb;
  --field-shadow: 0 12px 32px rgba(16, 24, 40, 0.08);
  --field-shadow-sm: 0 8px 20px rgba(16, 24, 40, 0.06);
  --field-shadow-md: 0 18px 46px rgba(16, 24, 40, 0.1);
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/PlusJakartaSans-Regular-56dc0b31.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/PlusJakartaSans-MediumItalic-62be6bed.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--field-ink);
  background: var(--field-bg);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: var(--field-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

.login-body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--field-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(16, 47, 76, 0.96) 0%, rgba(20, 92, 158, 0.94) 48%, rgba(0, 169, 143, 0.9) 118%),
    #102f4c;
}

.login-body::before {
  display: none;
  content: none;
}

.login-background-symbol {
  position: fixed;
  right: max(-12rem, -10vw);
  bottom: max(-16rem, -14vw);
  z-index: 0;
  width: min(76vw, 48rem);
  height: auto;
  object-fit: contain;
  object-position: center;
  opacity: 0.18;
  pointer-events: none;
}

.login-page-brand {
  position: fixed;
  top: clamp(1.25rem, 4vw, 2.75rem);
  left: clamp(1.25rem, 5vw, 4rem);
  z-index: 2;
}

.login-brand-logo {
  display: block;
  width: 13rem;
  max-width: calc(100vw - 2.5rem);
  height: auto;
}

.login-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 28rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(6rem, 12vh, 8rem) 1.25rem 2rem;
}

.login-card,
.panel,
.mobile-panel,
.summary-card,
.record-card {
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--field-surface);
  box-shadow: var(--field-shadow);
}

.login-card {
  width: 100%;
  overflow: hidden;
  color: var(--field-ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 1.6rem 4.5rem rgba(6, 24, 41, 0.34);
}

.login-card::before {
  display: block;
  width: 100%;
  height: 0.42rem;
  content: "";
  background: linear-gradient(90deg, #145c9e, #00a98f 58%, #e8bd55);
}

.login-card-body {
  padding: 1.5rem;
}

.login-card-heading {
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-card-heading h1 {
  margin: 0 0 0.25rem;
  color: var(--field-ink);
  font-size: 1.38rem;
  font-weight: 700;
}

.login-card-heading p {
  margin: 0;
  color: rgba(47, 54, 64, 0.72);
}

.login-card-heading .login-eyebrow {
  margin-bottom: 0.5rem;
  color: #007f73;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-card .field label {
  color: var(--field-ink);
  font-weight: 600;
}

.login-card .field input {
  min-height: 2.9rem;
  color: var(--field-ink);
  border-color: rgba(47, 54, 64, 0.2);
}

.login-card .field input:focus {
  outline: none;
  border-color: #00a98f;
  box-shadow: 0 0 0 0.2rem rgba(0, 169, 143, 0.18);
}

.login-card .cubo-login-submit {
  min-height: 2.9rem;
  border-color: #145c9e;
  background-color: #145c9e;
  color: #fff;
  font-weight: 700;
}

.login-card .cubo-login-submit:hover,
.login-card .cubo-login-submit:focus {
  border-color: #0f416f;
  background-color: #0f416f;
  color: #fff;
}

.login-card .flash {
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.login-legal-links {
  position: fixed;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1rem, 4vw, 2rem);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}

.login-legal-links span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 600;
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-brand {
  margin-bottom: 1.5rem;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.55rem;
}

.login-brand p,
.brand small,
.muted {
  color: var(--field-muted);
}

.login-brand p {
  margin: 0.15rem 0 0;
}

.brand {
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.brand > span {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--field-green);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: auto;
  height: 2.25rem;
  display: block;
  object-fit: contain;
}

.login-logo {
  width: min(13rem, 64vw);
  height: auto;
  display: block;
}

.app-body {
  background:
    linear-gradient(180deg, #eef4f8 0, var(--field-bg) 16rem),
    var(--field-bg);
}

.admin-layout {
  min-height: 100vh;
}

.admin-sidebar {
  background:
    linear-gradient(180deg, #05315f 0%, #053a66 50%, #0a5a71 100%);
  color: #fff;
}

.admin-sidebar-brand {
  padding: 0 1.35rem 2.4rem;
}

.admin-sidebar-brand .brand-logo {
  height: 3.95rem;
  margin-left: -0.4rem;
}

.admin-sidebar-brand strong {
  font-size: 1.28rem;
  line-height: 1.2;
}

.admin-sidebar-brand small {
  margin-top: 0.65rem;
  font-size: 1.02rem;
  line-height: 1.25;
}

.admin-sidebar-nav {
  display: grid;
  gap: 0.45rem;
}

.admin-sidebar-nav a {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.admin-sidebar-nav a[aria-current="page"] {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
}

.admin-sidebar-nav-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
  flex: 0 0 auto;
  fill: none;
  opacity: 0.9;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.admin-sidebar-nav a[aria-current="page"] .admin-sidebar-nav-icon {
  opacity: 1;
}

.admin-main {
  min-width: 0;
  background: #f8fbfd;
}

.admin-main-header {
  min-height: 6.125rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid rgba(16, 74, 139, 0.14);
  background:
    linear-gradient(180deg, rgba(246, 251, 255, 0.98), rgba(235, 244, 250, 0.96));
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
  backdrop-filter: blur(12px);
}

.admin-main-header .topbar-user {
  color: var(--field-ink);
}

.admin-main-header .locale-switcher select {
  border-color: rgba(16, 74, 139, 0.16);
  background: #fff;
  color: var(--field-ink);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.admin-main-header .topbar-avatar {
  border-color: rgba(16, 74, 139, 0.18);
  background: rgba(16, 74, 139, 0.82);
  color: #fff;
}

.admin-main-header .topbar-user-name {
  color: var(--field-ink);
}

.admin-main-header .link-button {
  border-color: rgba(16, 74, 139, 0.16);
  background: #fff;
  color: var(--field-ink);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.admin-main-header .link-button:hover,
.admin-main-header .link-button:focus-visible {
  border-color: rgba(16, 74, 139, 0.28);
  background: #f8fbfd;
  color: var(--field-blue);
}

.app-shell.admin-app-shell {
  width: 100%;
  margin: 0;
  padding: 2rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(90deg, #0b335f 0%, #104a8b 56%, #0d6f78 100%);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
}

.topbar-inner {
  width: min(100%, 1440px);
  min-height: 4.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.topbar-nav {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.topbar-nav a {
  min-height: 2.45rem;
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.topbar-nav a:hover,
.topbar-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.topbar-nav a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.topbar-user {
  min-width: 0;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.topbar-user form,
.locale-switcher,
.sign-out-form {
  margin: 0;
}

.locale-switcher::before {
  display: none;
}

.locale-switcher select {
  max-width: 12.5rem;
  field-sizing: content;
  min-height: 2.55rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.48rem 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.locale-switcher select option {
  background: #fff;
  color: var(--field-ink);
}

.locale-switcher-login {
  margin-bottom: 0.8rem;
}

.locale-switcher-login select {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(8, 38, 64, 0.3);
}

.topbar-account {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.topbar-avatar {
  display: none;
}

.topbar-user-name {
  display: none;
  max-width: 10rem;
  overflow: hidden;
  color: #fff;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-button {
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(5, 35, 61, 0.18);
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.link-button:hover,
.link-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(5, 35, 61, 0.32);
}

.app-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.page-header {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}

.page-header h1,
.page-header h2 {
  margin: 0;
  color: var(--field-ink);
  letter-spacing: 0;
}

.page-header h1 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 800;
}

.page-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.page-header p {
  max-width: 62rem;
  margin: 0;
  color: var(--field-muted);
}

.header-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-filter {
  display: grid;
  grid-template-columns: minmax(10.5rem, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  justify-self: end;
}

.dashboard-filter .field {
  gap: 0.32rem;
}

.dashboard-filter .field label {
  color: var(--field-ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.dashboard-filter .field input {
  min-height: 2.9rem;
  border-color: rgba(16, 74, 139, 0.12);
  box-shadow: var(--field-shadow-sm);
}

.dashboard-filter .button {
  min-height: 2.9rem;
  padding-inline: 1rem;
  box-shadow: var(--field-shadow-sm);
}

.audit-filter-panel {
  margin-bottom: 1rem;
}

.audit-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.audit-filter-actions {
  align-self: end;
}

.audit-pagination {
  justify-content: center;
  margin-top: 1rem;
}

.metadata-block {
  max-height: 32rem;
  margin: 0;
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(16, 74, 139, 0.1);
  border-radius: 8px;
  background: #f7fbfd;
  color: var(--field-ink);
  font-size: 0.9rem;
}

.admin-dashboard {
  display: grid;
  gap: 1rem;
}

.admin-dashboard .page-header {
  margin-bottom: 0;
}

.work-site-panel,
.admin-dashboard-exceptions {
  display: grid;
  gap: 1rem;
}

.work-site-employees-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.work-site-employees-header h2 {
  margin: 0;
}

.work-site-employees-header .button {
  min-height: 2.65rem;
  padding-inline: 1rem;
}

.grid,
.summary-grid,
.admin-grid {
  display: grid;
  gap: 1rem;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.panel,
.mobile-panel,
.summary-card,
.record-card {
  padding: 1.05rem;
  border-color: rgba(16, 74, 139, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 255, 0.96)),
    var(--field-surface);
  box-shadow: var(--field-shadow-sm);
}

.summary-card strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--field-blue);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 800;
}

.summary-card span {
  color: var(--field-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.summary-card-link {
  color: inherit;
  text-decoration: none;
}

.summary-card-link:hover {
  border-color: rgba(16, 74, 139, 0.24);
  box-shadow: var(--field-shadow-md);
}

.modal-dialog {
  width: min(34rem, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid rgba(16, 74, 139, 0.12);
  border-radius: 8px;
  background: var(--field-surface);
  color: var(--field-ink);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.24);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.modal-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.modal-header {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-header p {
  margin: 0.25rem 0 0;
}

.modal-close-button {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(16, 74, 139, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--field-ink);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
  border-color: rgba(16, 74, 139, 0.28);
  color: var(--field-blue);
}

.mobile-main {
  max-width: 34rem;
  margin: 0 auto;
}

.responsibility-acceptance-card {
  max-width: 34rem;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.responsibility-acceptance-text {
  display: grid;
  gap: 0.75rem;
}

.responsibility-acceptance-text p {
  margin: 0;
}

.mobile-panel {
  display: grid;
  gap: 1rem;
  border-color: rgba(0, 195, 160, 0.2);
  box-shadow: var(--field-shadow-md);
}

.current-worksite {
  display: grid;
  gap: 0.25rem;
}

.current-worksite strong {
  color: var(--field-blue);
  font-size: 1.22rem;
}

.work-site-address-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.work-site-address-pin {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action {
  width: 100%;
  min-height: 4.4rem;
  padding: 1rem;
  font-size: 1.12rem;
  box-shadow: 0 18px 32px rgba(16, 74, 139, 0.2);
}

.location-status {
  min-height: 3rem;
  display: flex;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 74, 139, 0.09);
  background: #f4f9fb;
  color: var(--field-muted);
}

.button {
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--field-ink);
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.button:hover {
  border-color: rgba(16, 74, 139, 0.36);
  color: var(--field-blue);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-primary {
  border-color: var(--field-blue);
  background:
    linear-gradient(135deg, var(--field-blue), var(--field-blue-dark)),
    var(--field-blue);
  color: #fff;
}

.button-primary:hover {
  border-color: var(--field-blue-dark);
  background:
    linear-gradient(135deg, var(--field-blue-dark), #082c55),
    var(--field-blue-dark);
  color: #fff;
}

.button-danger {
  border-color: var(--field-red);
  color: var(--field-red);
}

.button-full {
  width: 100%;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label,
.field-label {
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.58rem 0.75rem;
  border: 1px solid rgba(16, 74, 139, 0.16);
  border-radius: 8px;
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(0, 195, 160, 0.68);
  box-shadow: 0 0 0 0.2rem rgba(0, 195, 160, 0.16);
}

.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.work-site-map-field {
  gap: 0.5rem;
}

.work-site-map-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
  position: relative;
  z-index: 1000;
}

.work-site-map-search-field {
  position: relative;
}

.work-site-map-suggestions {
  display: grid;
  gap: 0.5rem;
  position: absolute;
  z-index: 1200;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid rgba(16, 74, 139, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--field-shadow-md);
}

.work-site-map-suggestions[hidden] {
  display: none;
}

.work-site-map-suggestion {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(16, 74, 139, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--field-ink);
  cursor: pointer;
  font-weight: 600;
  text-align: left;
}

.work-site-map-suggestion:hover,
.work-site-map-suggestion:focus {
  outline: none;
  border-color: rgba(0, 195, 160, 0.68);
  box-shadow: 0 0 0 0.2rem rgba(0, 195, 160, 0.12);
}

.work-site-map {
  width: 100%;
  min-height: 20rem;
  overflow: hidden;
  border: 1px solid rgba(16, 74, 139, 0.16);
  border-radius: 8px;
  background: #e8eef3;
}

.work-site-map-status {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.86rem;
}

.work-site-map .leaflet-control-attribution {
  font-size: 0.68rem;
}

.time-punch-map-panel {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.time-punch-map-header h2 {
  margin-bottom: 0.2rem;
}

.time-punch-map-header p,
.time-punch-map-status {
  margin: 0;
}

.time-punch-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin: 0;
  padding: 0;
  color: var(--field-muted);
  font-size: 0.82rem;
  list-style: none;
}

.time-punch-map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.time-punch-map-legend-marker,
.time-punch-map-legend-line {
  display: inline-block;
  flex: 0 0 auto;
}

.time-punch-map-legend-marker {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(16, 74, 139, 0.22);
}

.time-punch-map-legend-marker-work-site {
  background: #104a8b;
}

.time-punch-map-legend-marker-punch {
  background: #c83e4d;
}

.time-punch-map-legend-line {
  width: 1rem;
  border-top: 2px solid;
}

.time-punch-map-legend-line-geofence {
  border-color: #00a887;
}

.time-punch-map-legend-line-accuracy {
  border-color: #d97706;
  border-top-style: dashed;
}

.time-punch-map {
  width: 100%;
  min-height: 22rem;
  overflow: hidden;
  border: 1px solid rgba(16, 74, 139, 0.16);
  border-radius: 8px;
  background: #e8eef3;
}

.time-punch-map .leaflet-control-attribution {
  font-size: 0.68rem;
}

.location-confirmation-actions {
  display: grid;
  width: 100%;
}

.location-confirmation-actions[hidden] {
  display: none;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.check-field input {
  width: 1.05rem;
  height: 1.05rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(16, 74, 139, 0.1);
  border-radius: 8px;
  background: var(--field-surface);
  box-shadow: var(--field-shadow-sm);
}

.data-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid rgba(16, 74, 139, 0.08);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #f4f8fb;
  font-size: 0.86rem;
  color: var(--field-muted);
  font-weight: 750;
}

.data-table:has(thead th:last-child:empty) th:last-child,
.data-table:has(thead th:last-child:empty) td:last-child {
  text-align: right;
  white-space: nowrap;
}

.data-table:has(thead th:last-child:empty) td:last-child.row-actions {
  justify-content: flex-end;
}

.data-table td.row-actions {
  align-items: center;
  justify-content: flex-end;
}

.data-table .empty-table-cell {
  padding: 1.8rem 0.9rem;
  color: var(--field-muted);
  font-weight: 650;
  text-align: center;
}

.data-table:has(thead th:last-child:empty) td.empty-table-cell {
  text-align: center;
  white-space: normal;
}

.data-table tbody tr:hover {
  background: rgba(16, 74, 139, 0.025);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.work-sites-table {
  table-layout: fixed;
}

.work-sites-table-name {
  width: 24%;
}

.work-sites-table-address {
  width: 38%;
}

.work-sites-table-radius {
  width: 7rem;
}

.work-sites-table-status {
  width: 8rem;
}

.work-sites-table-actions {
  width: 11rem;
}

.work-site-name-cell,
.work-site-address-cell {
  overflow-wrap: anywhere;
}

.record-list {
  display: grid;
  gap: 0.75rem;
}

.record-card {
  display: grid;
  gap: 0.35rem;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

a.record-card:hover {
  border-color: rgba(16, 74, 139, 0.22);
  box-shadow: var(--field-shadow);
  transform: translateY(-1px);
}

.record-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #edf3f7;
  color: var(--field-ink);
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success {
  background: #dffaf5;
  color: #006d5d;
}

.badge-warning {
  background: #fff4dc;
  color: #8a4b00;
}

.badge-danger {
  background: #ffe8e5;
  color: var(--field-red);
}

.status-switch-form {
  margin: 0.75rem 0;
}

.status-switch-form-compact {
  margin: 0.45rem 0 0;
}

.status-switch-form-table {
  margin: 0;
}

.status-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  cursor: pointer;
}

.status-switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.status-switch-control {
  position: relative;
  width: 2.85rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(71, 84, 103, 0.18);
  transition: background 140ms ease, box-shadow 140ms ease;
}

.status-switch-control::after {
  position: absolute;
  top: 0.2rem;
  left: 0.22rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
  content: "";
  transition: transform 140ms ease;
}

.status-switch input[type="checkbox"]:checked + .status-switch-control {
  background: var(--field-blue);
  box-shadow: inset 0 0 0 1px rgba(10, 53, 103, 0.24);
}

.status-switch input[type="checkbox"]:checked + .status-switch-control::after {
  transform: translateX(1.25rem);
}

.status-switch input[type="checkbox"]:focus-visible + .status-switch-control {
  box-shadow: 0 0 0 0.2rem rgba(16, 74, 139, 0.2);
}

.status-switch-text {
  display: grid;
  gap: 0.12rem;
  line-height: 1.15;
}

.status-switch-label {
  color: var(--field-ink);
  font-weight: 750;
}

.status-switch-status {
  color: var(--field-muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.status-switch input[type="checkbox"]:checked ~ .status-switch-text .status-switch-status {
  color: var(--field-blue);
}

.flash,
.form-errors {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 74, 139, 0.1);
  background: var(--field-surface);
  box-shadow: var(--field-shadow-sm);
}

.flash {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 650;
}

.flash::before {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  content: "\2713";
  background: #ccefd9;
  color: #067044;
  font-size: 0.85rem;
  font-weight: 800;
}

.flash-notice {
  border-color: #b7dec8;
  background: #edfbf2;
}

.flash-alert,
.form-errors {
  border-color: #f0b8b1;
  background: #fff0ee;
}

.flash-alert::before {
  content: "!";
  background: #ffd8d3;
  color: var(--field-red);
}

.form-errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed rgba(16, 74, 139, 0.2);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--field-muted);
}

@media (max-width: 575.98px) {
  .work-site-map-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-site-employees-header {
    align-items: stretch;
    flex-direction: column;
  }

  .login-page-brand {
    right: 1.25rem;
    left: 1.25rem;
  }

  .login-brand-logo {
    width: 11rem;
  }

  .login-background-symbol {
    right: -14rem;
    bottom: -10rem;
    width: 34rem;
  }

  .login-legal-links {
    right: 1.25rem;
    bottom: 1rem;
    left: 1.25rem;
    justify-content: center;
  }
}

@media (max-width: 759.98px) {
  .app-shell {
    padding: 0.85rem 0.75rem 1.5rem;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0.6rem 0.75rem 0.5rem;
  }

  .admin-sidebar-brand {
    gap: 0.5rem;
    padding: 0;
  }

  .admin-sidebar-brand .brand-logo {
    height: 1.55rem;
    margin-left: 0;
  }

  .admin-sidebar-brand strong {
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .admin-sidebar-brand small {
    display: none;
  }

  .admin-sidebar-nav {
    display: flex;
    gap: 0.3rem;
    overflow-x: auto;
    margin: 0.55rem -0.75rem 0;
    padding: 0.1rem 0.75rem 0.15rem;
    scrollbar-width: none;
  }

  .admin-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-sidebar-nav a {
    min-height: 1.9rem;
    gap: 0.35rem;
    padding: 0.32rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .admin-sidebar-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 rgba(0, 195, 160, 0.82);
  }

  .admin-sidebar-nav-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .admin-main-header {
    min-height: auto;
    padding: 0.55rem 0.75rem;
  }

  .admin-main-header .topbar-user {
    gap: 0.35rem;
  }

  .admin-main-header .locale-switcher::before {
    border-color: rgba(16, 74, 139, 0.16);
    background: #fff;
    color: var(--field-ink);
  }

  .admin-main-header .link-button {
    min-height: 2.25rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }

  .app-shell.admin-app-shell {
    padding: 0.85rem 0.75rem 1.5rem;
  }

  .topbar {
    width: 100%;
  }

  .topbar-inner {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem 0.5rem;
  }

  .brand {
    gap: 0.5rem;
    grid-column: 1;
    grid-row: 1;
  }

  .brand-logo {
    height: 1.55rem;
  }

  .brand strong {
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .brand small {
    display: none;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .topbar-user {
    align-self: start;
    gap: 0.35rem;
    grid-column: 2;
    grid-row: 1;
  }

  .locale-switcher select {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    max-width: none;
    min-height: 100%;
    padding: 0;
    opacity: 0;
  }

  .locale-switcher {
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
  }

  .locale-switcher::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    content: attr(data-current-flag);
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
  }

  .locale-switcher-login::before {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(8, 38, 64, 0.3);
  }

  .locale-switcher:has(select:focus-visible)::before {
    border-color: rgba(0, 195, 160, 0.9);
    box-shadow: 0 0 0 0.2rem rgba(0, 195, 160, 0.24);
  }

  .link-button {
    min-height: 2.25rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }

  .topbar-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 0.3rem;
    margin: 0 -0.75rem;
    padding: 0.1rem 0.75rem 0.15rem;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar-nav a {
    min-height: 1.9rem;
    padding: 0.32rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
  }

  .page-header {
    gap: 0.45rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .page-header h2 {
    font-size: 1rem;
  }

  .page-header p {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .dashboard-filter {
    width: 100%;
    grid-template-columns: minmax(0, 9.5rem) auto;
    justify-content: start;
    justify-self: stretch;
    gap: 0.45rem;
  }

  .dashboard-filter .field {
    gap: 0.22rem;
  }

  .dashboard-filter .field label {
    font-size: 0.72rem;
  }

  .dashboard-filter .field input {
    min-height: 2.25rem;
    padding: 0.42rem 0.55rem;
    font-size: 0.78rem;
  }

  .dashboard-filter .button {
    min-height: 2.25rem;
    padding-inline: 0.72rem;
    font-size: 0.78rem;
  }

  .admin-dashboard {
    gap: 0.75rem;
  }

  .admin-dashboard-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .admin-dashboard .summary-card {
    min-width: 0;
    padding: 0.62rem;
  }

  .admin-dashboard .summary-card strong {
    font-size: 1.25rem;
  }

  .admin-dashboard .summary-card span {
    font-size: 0.66rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .work-site-panel,
  .admin-dashboard-exceptions {
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .panel-header .button {
    width: 100%;
    min-height: 2.25rem;
    font-size: 0.76rem;
  }

  .work-site-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .admin-dashboard .data-table {
    min-width: 34rem;
  }

  .admin-dashboard .data-table th,
  .admin-dashboard .data-table td {
    padding: 0.62rem 0.7rem;
    font-size: 0.72rem;
  }
}

@media (min-width: 760px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem 1rem;
  }

  .admin-sidebar-brand {
    display: grid;
    gap: 2.125rem;
    align-items: start;
  }

  .admin-sidebar-brand strong,
  .admin-sidebar-brand small,
  .admin-sidebar-nav a > span {
    position: relative;
  }

  .admin-sidebar-brand strong,
  .admin-sidebar-brand small {
    left: -1px;
  }

  .admin-sidebar-brand strong {
    top: 1px;
  }

  .admin-sidebar-brand small {
    top: -1px;
  }

  .admin-sidebar-nav a > span {
    top: 1px;
  }

  .admin-sidebar-nav {
    margin-top: 0;
  }

  .admin-main-header {
    position: sticky;
    top: 0;
    z-index: 8;
  }

  .topbar-inner {
    grid-template-columns: minmax(13rem, 1fr) auto;
  }

  .topbar-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar-user {
    grid-column: 2;
    grid-row: 1;
  }

  .topbar-avatar {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
  }

  .topbar-user-name {
    display: inline;
  }

  .locale-switcher select {
    max-width: 14.5rem;
  }

  .page-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 1280px) {
  .admin-layout {
    grid-template-columns: 18.25rem minmax(0, 1fr);
  }

  .app-shell.admin-app-shell {
    padding: 2.75rem 3.25rem 2.25rem;
  }

  .admin-dashboard {
    gap: 2rem;
  }

  .admin-dashboard-header h1 {
    font-size: 2.45rem;
  }

  .admin-dashboard-header p {
    position: relative;
    top: -2px;
    margin-top: 0.625rem;
    font-size: 1.05rem;
  }

  .dashboard-filter {
    position: relative;
    top: -3px;
    grid-template-columns: 14.5rem 5.75rem;
    gap: 1rem;
  }

  .dashboard-filter .field {
    gap: 0.75rem;
  }

  .dashboard-filter .field label {
    font-size: 0.92rem;
  }

  .dashboard-filter .field input,
  .dashboard-filter .button {
    min-height: 3.65rem;
    font-size: 1rem;
  }

  .admin-dashboard-summary,
  .work-site-summary {
    gap: 1.25rem;
  }

  .admin-dashboard-summary .summary-card {
    min-height: 7.25rem;
  }

  .admin-dashboard .summary-card {
    padding: 1.25rem 1.375rem;
  }

  .admin-dashboard .summary-card span {
    font-size: 1rem;
    font-weight: 500;
  }

  .admin-dashboard .summary-card strong {
    margin-top: 0.35rem;
    font-size: 2.9rem;
    font-weight: 500;
    line-height: 1.05;
  }

  .work-site-panel {
    gap: 1rem;
    padding: 1.35rem 2rem 2rem;
  }

  .work-site-panel .panel-header {
    align-items: center;
  }

  .work-site-panel .panel-header h2 {
    font-size: 1.4rem;
    line-height: 1.1;
  }

  .work-site-panel .panel-header .button {
    position: relative;
    top: 2.5px;
    min-width: 7.75rem;
    min-height: 3.125rem;
    margin-right: -0.375rem;
    font-size: 1.05rem;
  }

  .work-site-summary {
    gap: 1.5rem;
  }

  .work-site-summary .summary-card {
    min-height: 7.5rem;
  }

  .topbar-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar-nav {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
    overflow: visible;
  }

  .topbar-user {
    grid-column: 3;
    grid-row: 1;
  }
}
