:root {
  color-scheme: light;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a,
button,
input,
select,
textarea {
  outline-color: #0f766e;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 60;
  border-radius: 0.375rem;
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 45;
  isolation: isolate;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #99f6e4;
  background:
    radial-gradient(circle at 18% 14%, rgba(20, 184, 166, 0.36), transparent 30%),
    radial-gradient(circle at 92% 42%, rgba(37, 99, 235, 0.2), transparent 32%),
    radial-gradient(circle at 40% 100%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(160deg, #ecfeff 0%, #dbeafe 48%, #dcfce7 100%);
  box-shadow: 12px 0 35px rgba(15, 118, 110, 0.1);
  padding: 1rem;
}

.app-sidebar::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.2));
}

.app-main {
  min-width: 0;
  background:
    linear-gradient(rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 0.86)),
    url("../img/system-background.svg") center top / cover no-repeat;
}

.content-wrap {
  width: min(100%, 86rem);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .content-wrap {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .content-wrap {
    padding-inline: 2rem;
  }
}

.sidebar-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  color: #0f172a;
  font-weight: 700;
}

.brand-mark {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.22);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  padding: 0.32rem;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.sidebar-nav .nav-link {
  justify-content: flex-start;
  width: 100%;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  color: #0f172a;
  padding: 0.75rem 0.85rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus-visible {
  border-color: rgba(15, 118, 110, 0.38);
  background: linear-gradient(135deg, rgba(204, 251, 241, 0.92), rgba(219, 234, 254, 0.86));
  color: #064e3b;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.14);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.sidebar-footer .btn-secondary,
.sidebar-footer .icon-btn {
  border-color: rgba(15, 118, 110, 0.2);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.sidebar-footer .icon-btn {
  width: 100%;
}

.btn-primary,
.btn-secondary,
.nav-link,
.icon-btn {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.btn-primary {
  background: #0f766e;
  color: #fff;
  padding: 0.625rem 1rem;
}

.btn-primary:hover {
  background: #115e59;
}

.btn-secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  padding: 0.55rem 0.9rem;
}

.btn-secondary:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.nav-link {
  color: #334155;
  padding: 0.5rem 0.75rem;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #ecfdf5;
  color: #065f46;
}

.icon-btn {
  height: 2.5rem;
  width: 2.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.icon-btn:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.mobile-sidebar-toggle,
.sidebar-close,
.sidebar-backdrop {
  display: none;
}

.panel {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(236, 254, 255, 0.82) 48%, rgba(240, 253, 244, 0.88) 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.panel {
  padding: 1.25rem;
}

.panel-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #0f172a;
  font-size: 1.125rem;
  font-weight: 700;
}

.metric-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.5rem;
  min-height: 7rem;
  padding: 1rem;
  color: #fff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.metric-card::before {
  position: absolute;
  inset: -30% -20% auto auto;
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  content: "";
}

.metric-card--workers {
  background: linear-gradient(135deg, #047857 0%, #14b8a6 100%) !important;
}

.metric-card--union {
  background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 100%) !important;
}

.metric-card--verified {
  background: linear-gradient(135deg, #6d28d9 0%, #db2777 100%) !important;
}

.metric-card--workplaces {
  background: linear-gradient(135deg, #b45309 0%, #f97316 100%) !important;
}

.metric-card--activities {
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 100%) !important;
}

.metric-card:hover,
.metric-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.22);
}

.metric-label {
  position: relative;
  z-index: 1;
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 650;
}

.metric-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.65rem;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.app-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.14), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(234, 126, 32, 0.28), transparent 38%),
    linear-gradient(120deg, #052e22 0%, #0f766e 46%, #0c2340 100%);
  box-shadow: 0 18px 45px rgba(6, 20, 17, 0.28);
}

.app-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  padding: clamp(1.15rem, 3vw, 2.1rem) clamp(1.15rem, 4vw, 2.5rem);
}

.app-banner-logo {
  flex: 0 0 auto;
  height: clamp(3.25rem, 6vw, 5rem);
  width: clamp(3.25rem, 6vw, 5rem);
  border-radius: 999px;
  background: #fff;
  padding: 0.4rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  object-fit: contain;
}

.app-banner-copy {
  min-width: 0;
}

.app-banner-eyebrow {
  margin: 0 0 0.3rem;
  color: #99f6e4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.app-banner-title {
  display: block;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  font-size: clamp(1.2rem, 2.9vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
}

.app-banner-tagline {
  display: block;
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.88rem, 1.2vw, 1.02rem);
  font-weight: 550;
  line-height: 1.4;
}

.app-banner-flagbar {
  height: 6px;
  background: linear-gradient(
    90deg,
    #198a3c 0%, #198a3c 33%,
    #de2010 33%, #de2010 44%,
    #000000 44%, #000000 55%,
    #ea7e20 55%, #ea7e20 100%
  );
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 65vh;
  padding: 2.5rem 0;
}

.auth-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 26rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  padding: 2.5rem 2rem 2rem;
}

.auth-card::before {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  content: "";
  height: 5px;
  background: linear-gradient(
    90deg,
    #198a3c 0%, #198a3c 33%,
    #de2010 33%, #de2010 44%,
    #000000 44%, #000000 55%,
    #ea7e20 55%, #ea7e20 100%
  );
}

.auth-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card-logo {
  display: flex;
  height: 4rem;
  width: 4rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.22);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  padding: 0.45rem;
  margin-bottom: 1.1rem;
}

.auth-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-card-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
}

.auth-card-subtitle {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 550;
}

.auth-error {
  margin-bottom: 1.1rem;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0.75rem 1rem;
}

.auth-card-footer {
  margin: 1.6rem 0 0;
  text-align: center;
  color: #64748b;
  font-size: 0.8125rem;
}

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

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.field-group {
  min-width: 0;
}

.field-label {
  display: block;
  margin-bottom: 0.375rem;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 650;
}

.form-input {
  min-height: 2.75rem;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
  color: #0f172a;
  padding: 0.625rem 0.75rem;
}

textarea.form-input {
  min-height: 7rem;
}

.form-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
  color: #334155;
  font-weight: 700;
  text-align: left;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1rem;
  vertical-align: top;
}

.data-table tbody tr:hover {
  background: rgba(236, 254, 255, 0.72);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-good {
  background: #dcfce7;
  color: #166534;
}

.status-muted {
  background: #e2e8f0;
  color: #334155;
}

.chart-wrap {
  position: relative;
  z-index: 1;
  height: 19rem;
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 0.75rem;
}

.chart-wide {
  height: 22rem;
}

.chart-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(153, 246, 228, 0.82);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
}

.chart-panel::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.48), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1));
}

.chart-panel--disability {
  background: linear-gradient(135deg, #ccfbf1 0%, #dbeafe 100%);
}

.chart-panel--gender {
  background: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%);
}

.chart-panel--province {
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 54%, #fef3c7 100%);
}

.chart-panel--union {
  background: linear-gradient(135deg, #cffafe 0%, #e0f2fe 100%);
}

.chart-panel--accessibility {
  background: linear-gradient(135deg, #fef3c7 0%, #dcfce7 100%);
}

.chart-panel--map {
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 45%, #dcfce7 100%);
}

.map-panel {
  position: relative;
  z-index: 1;
  height: 24rem;
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.map-full {
  height: min(72vh, 46rem);
  min-height: 28rem;
  border-radius: 0.375rem;
  overflow: hidden;
}

.map-popup {
  font-size: 0.8rem;
  line-height: 1.35;
}

.map-empty-banner {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}

.leaflet-container {
  font-family: inherit;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.detail-grid.single {
  grid-template-columns: 1fr;
}

.detail-grid dt {
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 700;
}

.detail-grid dd {
  margin-top: 0.15rem;
  color: #0f172a;
  font-weight: 600;
}

.feedback-button {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 40;
  border-radius: 999px;
  background: #7c2d12;
  color: #fff;
  padding: 0.8rem 1rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

.feedback-button:hover {
  background: #9a3412;
}

@media (max-width: 1023px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(18rem, calc(100vw - 3rem));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 15px 0 35px rgba(15, 23, 42, 0.25);
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-main {
    padding-top: 4.25rem;
  }

  .mobile-sidebar-toggle {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 50;
    display: inline-flex;
  }

  .sidebar-open .mobile-sidebar-toggle {
    display: none;
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .sidebar-open .sidebar-backdrop {
    pointer-events: auto;
    opacity: 1;
  }
}

.high-contrast {
  background: #000;
  color: #fff;
}

.high-contrast .bg-white,
.high-contrast .panel,
.high-contrast .metric-card,
.high-contrast header,
.high-contrast .app-sidebar,
.high-contrast .form-input {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

.high-contrast .text-slate-600,
.high-contrast .text-slate-700,
.high-contrast .text-slate-800,
.high-contrast .text-slate-950,
.high-contrast .sidebar-brand,
.high-contrast .metric-label,
.high-contrast .metric-value,
.high-contrast .panel-title,
.high-contrast .app-banner-copy,
.high-contrast .app-banner-eyebrow,
.high-contrast .app-banner-title,
.high-contrast .app-banner-tagline,
.high-contrast .detail-grid dt,
.high-contrast .detail-grid dd {
  color: #fff !important;
}

.high-contrast .btn-primary,
.high-contrast .feedback-button {
  background: #ffd400 !important;
  color: #000 !important;
}

.high-contrast .btn-secondary,
.high-contrast .nav-link,
.high-contrast .icon-btn,
.high-contrast .mobile-sidebar-toggle,
.high-contrast .app-banner {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

.high-contrast .app-banner-flagbar {
  display: none;
}

.high-contrast .metric-card::before {
  display: none;
}

.high-contrast .app-sidebar::before {
  display: none;
}

.high-contrast .app-main,
.high-contrast .chart-wrap {
  background: #000 !important;
}

.high-contrast .chart-panel::before {
  display: none;
}
