.dashboard {
  width: 100%;
  min-height: 100vh;
  padding-bottom: 60px;
}

.coverMapContainer {
  width: 100%;
  height: 350px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.mapFrame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #d9eadf;
}

.homeContent {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.section {
  margin-bottom: 46px;
}

.section:last-child {
  margin-bottom: 0;
}

.sectionHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.sectionHeader h1,
.sectionHeader h2 {
  color: var(--foreground);
  line-height: 1.15;
}

.sectionHeader h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.sectionHeader h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
}

.sectionHeader p {
  max-width: 680px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.64);
}

.sectionHeader :global(.btn-primary:disabled) {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.insightsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insightCard {
  min-height: 154px;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.insightCard span,
.profileDetails span,
.profileNote span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.insightCard strong {
  color: var(--primary);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
}

.insightCard small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
}

.profileScroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, calc((100% - 32px) / 3));
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 12px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(45, 212, 143, 0.46) rgba(238, 248, 239, 0.08);
  scrollbar-width: thin;
}

.profileScroller::-webkit-scrollbar {
  height: 8px;
}

.profileScroller::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(238, 248, 239, 0.08);
}

.profileScroller::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(45, 212, 143, 0.46);
}

.personCard {
  min-height: 286px;
  padding: 20px;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  scroll-snap-align: start;
}

.personAvatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.personAvatar:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.personAvatar:focus-visible,
.viewButton:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.personCard h3 {
  color: var(--foreground);
  font-size: 1.05rem;
  line-height: 1.2;
}

.personCard p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.personStats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  align-self: end;
}

.personStats div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.personStats dt {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.personStats dd {
  margin-top: 4px;
  color: var(--foreground);
  font-size: 0.96rem;
  font-weight: 800;
}

.viewButton {
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.viewButton:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}

.profileDetails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profileDetails div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.profileDetails strong {
  display: block;
  margin-top: 6px;
  color: var(--foreground);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.profileNote {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
}

.profileNote p {
  margin-top: 6px;
  color: var(--foreground);
}

.profileHeader {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  margin-top: -60px;
  position: relative;
  z-index: 10;
  gap: 24px;
}

.profileAvatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid var(--background);
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary);
  backdrop-filter: blur(var(--glass-blur));
}

.profileInfo {
  flex: 1;
  padding-bottom: 16px;
}

.name {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.categoryBadge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.notice {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.statsContainer {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.statBox {
  flex: 1;
  padding: 20px;
  text-align: center;
  transition: transform var(--transition-fast);
}

.statBox:hover {
  transform: translateY(-4px);
}

.statValue {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.statLabel {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contentGrid {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.card {
  padding: 24px;
  margin-bottom: 24px;
}

.cardTitle {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cardText {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 14px;
}

.allowedList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.allowedList span {
  padding: 6px 10px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.card :global(.btn-primary:disabled) {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.55;
  transform: none;
}

.requestList {
  display: grid;
  gap: 10px;
}

.requestItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.requestItem strong,
.requestItem span,
.requestMeta small {
  display: block;
}

.requestItem strong {
  color: var(--foreground);
}

.requestItem span,
.requestMeta small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  margin-top: 3px;
}

.requestMeta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.statusBadge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.approved {
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.proposed {
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.rejected {
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.statusBar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.statusFill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #34d399);
  width: 75%;
  border-radius: 4px;
}

.fieldGroup {
  margin-bottom: 16px;
}

.fieldLabel {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.fieldValue {
  font-size: 1rem;
  font-weight: 500;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.completionText {
  margin-top: 8px;
  font-size: 0.875rem;
  text-align: right;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 24px;
  border-radius: 16px;
  background: #101814;
  color: var(--foreground);
}

.modalHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.modalHeader h2 {
  margin-bottom: 4px;
  color: var(--foreground);
}

.modalHeader p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.875rem;
}

.closeButton {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--foreground);
  font-size: 1rem;
}

.closeButton:hover {
  background: rgba(255, 255, 255, 0.12);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--foreground);
  font-size: 0.9rem;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.secondaryButton {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--foreground);
  font-weight: 700;
}

.secondaryButton:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (prefers-color-scheme: light) {
  .modal {
    background: var(--surface-strong);
  }

  .sectionHeader p,
  .insightCard small,
  .personCard p,
  .personStats dt {
    color: var(--muted);
  }

  .insightCard span,
  .profileDetails span,
  .profileNote span {
    color: var(--muted);
  }

  .personStats div,
  .profileDetails div {
    background: rgba(238, 248, 239, 0.05);
  }

  .modalHeader p,
  .field span {
    color: var(--muted);
  }

  .field input,
  .field select,
  .field textarea {
    background: rgba(4, 12, 9, 0.46);
  }
}

@media (max-width: 960px) {
  .sectionHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .insightsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profileScroller {
    grid-auto-columns: minmax(300px, 74vw);
  }
}

@media (max-width: 768px) {
  .homeContent {
    width: min(100% - 32px, 1180px);
    padding-top: 28px;
  }

  .insightsGrid,
  .profileDetails {
    grid-template-columns: 1fr;
  }

  .profileScroller {
    grid-auto-columns: minmax(260px, 86vw);
  }

  .profileHeader {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .contentGrid {
    grid-template-columns: 1fr;
  }

  .requestItem,
  .modalActions {
    align-items: stretch;
    flex-direction: column;
  }

  .requestMeta {
    align-items: flex-start;
  }

  .modalOverlay {
    align-items: stretch;
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }
}
