:root {
  --dnp-gold: #f5c556;
  --dnp-brown: #4d3824;
  --dnp-blue: #a2d0d4;
  --dnp-bg: #fffaf0;
  --dnp-white: #ffffff;
  --dnp-muted: rgba(77, 56, 36, 0.68);
  --dnp-border: rgba(77, 56, 36, 0.14);
  --dnp-shadow: 0 24px 70px rgba(77, 56, 36, 0.14);
  --dnp-danger: #b94b4b;
  --dnp-success: #3d8f68;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(245, 197, 86, 0.28), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(162, 208, 212, 0.35), transparent 30%),
    linear-gradient(180deg, #fffaf0 0%, #fff6df 100%);
  color: var(--dnp-brown);
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.dnp-family-main {
  padding: 34px 28px 80px;
}

.dnp-family-container {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.dnp-family-hero {
  padding: 42px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(77, 56, 36, 0.97), rgba(77, 56, 36, 0.86)),
    radial-gradient(circle at top right, rgba(245, 197, 86, 0.42), transparent 34%);
  color: white;
  box-shadow: var(--dnp-shadow);
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
}

.dnp-family-label {
  display: inline-flex;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(245, 197, 86, 0.18);
  color: var(--dnp-gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dnp-family-hero h1 {
  max-width: 720px;
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.dnp-family-hero p {
  max-width: 690px;
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.74);
}

.dnp-family-hero-card {
  min-width: 190px;
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.dnp-family-hero-card span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.dnp-family-hero-card strong {
  display: block;
  margin-top: 6px;
  font-size: 38px;
  color: var(--dnp-gold);
}

.dnp-family-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.dnp-family-card,
.dnp-family-list-card {
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--dnp-border);
  box-shadow: 0 18px 46px rgba(77, 56, 36, 0.08);
  backdrop-filter: blur(14px);
}

.dnp-family-card-head {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.dnp-family-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--dnp-gold);
  color: var(--dnp-brown);
  font-size: 12px;
  font-weight: 900;
}

.dnp-family-card h2,
.dnp-family-list-card h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.dnp-family-card p,
.dnp-family-list-card p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--dnp-muted);
}

.dnp-family-grid,
.dnp-family-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.dnp-family-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.dnp-family-field {
  display: grid;
  gap: 8px;
}

.dnp-family-field label,
.dnp-family-group-title {
  font-size: 12px;
  font-weight: 900;
}

.dnp-family-field input,
.dnp-family-field textarea,
.dnp-family-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border-radius: 16px;
  border: 1px solid var(--dnp-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--dnp-brown);
  font-size: 14px;
  outline: none;
}

.dnp-family-field textarea {
  padding: 14px 15px;
  resize: vertical;
}

.dnp-family-field input:focus,
.dnp-family-field textarea:focus,
.dnp-family-field select:focus {
  border-color: rgba(245, 197, 86, 0.95);
  box-shadow: 0 0 0 4px rgba(245, 197, 86, 0.18);
}

.dnp-family-group-title {
  margin: 20px 0 10px;
}

.dnp-family-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dnp-family-choice input {
  display: none;
}

.dnp-family-choice span {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid var(--dnp-border);
  background: white;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.dnp-family-choice input:checked + span {
  background: var(--dnp-gold);
  border-color: var(--dnp-gold);
}

.dnp-family-choice.urgent input:checked + span {
  background: rgba(185, 75, 75, 0.14);
  color: var(--dnp-danger);
}

.dnp-family-check-list {
  display: grid;
  gap: 10px;
}

.dnp-family-check-list label {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--dnp-border);
  background: white;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.dnp-family-check-list input {
  width: 17px;
  height: 17px;
  accent-color: var(--dnp-gold);
}

.dnp-family-actions,
.dnp-family-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.dnp-family-btn {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.dnp-family-btn-primary {
  background: var(--dnp-gold);
  color: var(--dnp-brown);
}

.dnp-family-btn-light {
  background: rgba(77, 56, 36, 0.08);
  color: var(--dnp-brown);
}

.dnp-family-list-card {
  margin-top: 22px;
}

.dnp-family-list-head {
  margin-bottom: 18px;
}

.dnp-family-table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid var(--dnp-border);
  background: white;
}

.dnp-family-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}

.dnp-family-table th,
.dnp-family-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(77, 56, 36, 0.10);
  text-align: left;
  font-size: 14px;
}

.dnp-family-table th {
  background: rgba(245, 197, 86, 0.17);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
}

.dnp-family-badge,
.dnp-family-status {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.dnp-family-badge {
  background: rgba(162, 208, 212, 0.38);
}

.dnp-family-badge.urgente,
.dnp-family-badge.alta {
  background: rgba(185, 75, 75, 0.13);
  color: var(--dnp-danger);
}

.dnp-family-badge.média {
  background: rgba(245, 197, 86, 0.32);
}

.dnp-family-status.analisando {
  background: rgba(245, 197, 86, 0.28);
  color: var(--dnp-brown);
}

.dnp-family-status.ajudando {
  background: rgba(162, 208, 212, 0.42);
  color: var(--dnp-brown);
}

.dnp-family-status.finalizado {
  background: rgba(61, 143, 104, 0.14);
  color: var(--dnp-success);
}

.dnp-family-table-actions {
  display: flex;
  gap: 8px;
}

.dnp-family-action {
  padding: 9px 12px;
  border: none;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.dnp-family-view {
  background: rgba(162, 208, 212, 0.38);
  color: var(--dnp-brown);
}

.dnp-family-edit {
  background: rgba(245, 197, 86, 0.36);
  color: var(--dnp-brown);
}

.dnp-family-delete {
  background: rgba(185, 75, 75, 0.12);
  color: var(--dnp-danger);
}

.dnp-family-empty {
  display: none;
  padding: 26px;
  text-align: center;
  color: var(--dnp-muted);
  font-weight: 800;
}

.dnp-family-empty.active {
  display: block;
}

.dnp-family-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dnp-family-modal.active {
  display: flex;
}

.dnp-family-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 17, 10, 0.58);
  backdrop-filter: blur(10px);
}

.dnp-family-modal-card {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 30px;
  background: var(--dnp-bg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.dnp-family-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.dnp-family-modal-head h3 {
  margin-top: 12px;
  font-size: 28px;
}

.dnp-family-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: white;
  color: var(--dnp-brown);
  font-size: 28px;
  cursor: pointer;
}

.dnp-family-view-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.dnp-family-view-item {
  padding: 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--dnp-border);
}

.dnp-family-view-item.full {
  grid-column: 1 / -1;
}

.dnp-family-view-item span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--dnp-muted);
  margin-bottom: 6px;
}

.dnp-family-view-item strong {
  font-size: 15px;
  color: var(--dnp-brown);
}

.page-content {
  margin-left: var(--sidebar-width);
  transition: margin-left 0.25s ease;
}

body.sidebar-collapsed .page-content {
  margin-left: var(--sidebar-collapsed);
}

@media (max-width: 980px) {
  .dnp-family-hero,
  .dnp-family-row {
    grid-template-columns: 1fr;
  }

  .dnp-family-hero {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .page-content {
    margin-left: 0;
  }

  .dnp-family-main {
    padding: 22px 16px 70px;
  }

  .dnp-family-grid,
  .dnp-family-stats,
  .dnp-family-choice-grid,
  .dnp-family-view-grid {
    grid-template-columns: 1fr;
  }

  .dnp-family-actions {
    flex-direction: column-reverse;
  }

  .dnp-family-btn {
    width: 100%;
  }
}