.brand-badge{letter-spacing:.08em}
.navbar-brand{font-weight:700}

:root{
  --sidebar-width: 286px;
  --app-radius: 20px;
}

body{
  min-height:100vh;
}

.app-shell{
  display:flex;
  min-height:100vh;
}

.app-sidebar{
  width:var(--sidebar-width);
  background:linear-gradient(180deg,#081933 0%,#0a1f44 42%,#0d3b66 100%);
  color:#fff;
  position:sticky;
  top:0;
  height:100vh;
  padding:1.25rem 1rem 1rem;
  display:flex;
  flex-direction:column;
  box-shadow:18px 0 40px rgba(4, 18, 41, .16);
  z-index:1030;
}

.sidebar-brand{
  padding:.35rem .5rem 1rem;
  border-bottom:1px solid rgba(255,255,255,.12);
  margin-bottom:1rem;
}

.sidebar-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.2));
}

.sidebar-brand-name{
  color:#fff;
  font-weight:700;
  line-height:1.1;
}

.sidebar-brand-subtitle{
  color:rgba(255,255,255,.72);
  font-size:.84rem;
}

.sidebar-scroll{
  overflow:auto;
  padding-right:.25rem;
}

.sidebar-group{
  margin-bottom:1rem;
}

.sidebar-group-title{
  font-size:.73rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:rgba(255,255,255,.55);
  margin-bottom:.55rem;
  padding:0 .65rem;
}

.sidebar-link{
  display:flex;
  align-items:center;
  gap:.8rem;
  text-decoration:none;
  color:rgba(255,255,255,.8);
  border-radius:14px;
  padding:.78rem .9rem;
  transition:all .18s ease;
}

.sidebar-link i{
  width:18px;
  text-align:center;
}

.sidebar-link:hover{
  color:#fff;
  background:rgba(255,255,255,.1);
}

.sidebar-link.active{
  background:linear-gradient(135deg, rgba(0,180,255,.26), rgba(255,255,255,.12));
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}

.sidebar-footer{
  margin-top:auto;
  padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.12);
}

.sidebar-user-card{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
  border-radius:16px;
  padding:.9rem 1rem;
  margin-bottom:.75rem;
}

.sidebar-user-name{font-weight:700}
.sidebar-user-meta{font-size:.85rem;color:rgba(255,255,255,.72)}

.app-main{
  flex:1;
  min-width:0;
  padding:1.25rem 1.25rem 2rem;
}

.app-topbar{
  background:#fff;
  border:1px solid rgba(10,31,68,.08);
  box-shadow:0 14px 34px rgba(10,31,68,.05);
  border-radius:var(--app-radius);
  padding:1rem 1.2rem;
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:center;
  margin-bottom:1rem;
}

.topbar-kicker{
  font-size:.75rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#74839a;
  margin-bottom:.1rem;
}

.topbar-title{
  font-size:1.45rem;
  margin:0;
  font-weight:800;
  color:#0a1f44;
}

.topbar-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  justify-content:flex-end;
}

.topbar-chip{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.65rem .9rem;
  border-radius:999px;
  background:#eef5fb;
  color:#29415f;
  font-weight:600;
  font-size:.92rem;
}

.app-breadcrumb-wrap{
  margin-bottom:1rem;
  padding:0 .25rem;
}

.app-breadcrumb{
  background:transparent;
}

.app-breadcrumb .breadcrumb-item,
.app-breadcrumb .breadcrumb-item a{
  font-size:.92rem;
  color:#6b7b91;
  text-decoration:none;
}

.app-breadcrumb .breadcrumb-item.active{
  color:#0d3b66;
  font-weight:700;
}

.app-content{padding:0 .2rem;}

.page-shell{display:flex;flex-direction:column;gap:1rem;}
.page-header-card{
  background:#fff;
  border:1px solid rgba(10,31,68,.08);
  border-radius:var(--app-radius);
  box-shadow:0 10px 30px rgba(10,31,68,.05);
  padding:1.2rem 1.25rem;
}
.page-header-top{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;flex-wrap:wrap;}
.page-eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#4d87b3;margin-bottom:.35rem;}
.page-title{margin:0;font-size:1.7rem;font-weight:800;color:#0a1f44;}
.page-subtitle{margin:.45rem 0 0;color:#6b7b91;max-width:780px;}
.page-actions{display:flex;gap:.65rem;flex-wrap:wrap;}
.page-section-card{background:#fff;border:1px solid rgba(10,31,68,.08);border-radius:var(--app-radius);box-shadow:0 10px 30px rgba(10,31,68,.05);}
.page-section-card .card-body{padding:1.1rem 1.2rem;}
.filter-card{background:#fff;border:1px solid rgba(10,31,68,.08);border-radius:var(--app-radius);box-shadow:0 10px 30px rgba(10,31,68,.04);}
.filter-card .card-body{padding:1rem 1.1rem;}
.filter-label{font-size:.82rem;font-weight:700;color:#6b7b91;margin-bottom:.35rem;}

.card-soft{border:1px solid rgba(10,31,68,.08);box-shadow:0 10px 30px rgba(10,31,68,.05);border-radius:18px;background:#fff}
.kpi-card{height:100%;border-radius:18px;overflow:hidden}
.kpi-label{font-size:.82rem;text-transform:uppercase;letter-spacing:.08em;color:#6b7b91;margin-bottom:.35rem;font-weight:700}
.kpi-value{font-size:1.7rem;font-weight:800;color:#0a1f44;line-height:1.1}
.kpi-meta{color:#7a8799;font-size:.9rem;margin-top:.35rem}
.quick-actions-menu .dropdown-menu{border-radius:16px;border:1px solid rgba(10,31,68,.08);box-shadow:0 18px 35px rgba(10,31,68,.12)}

.family-row-card{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  gap:1rem;
  align-items:center;
  padding:1rem;
  border:1px solid rgba(10,31,68,.08);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#fbfdff);
}
.family-photo{width:72px;height:72px;border-radius:16px;overflow:hidden;background:#eef4fa;display:flex;align-items:center;justify-content:center}
.family-photo img{width:100%;height:100%;object-fit:cover}
.family-title{font-size:1.05rem;font-weight:800;color:#0a1f44}
.family-meta{display:flex;flex-wrap:wrap;gap:.35rem .7rem;color:#6d7c92;font-size:.92rem;margin-top:.35rem}
.family-actions{display:flex;flex-wrap:wrap;gap:.45rem;justify-content:flex-end}

.badge-soft-success{background:rgba(25,135,84,.12);color:#146c43;border:1px solid rgba(25,135,84,.18)}
.badge-soft-secondary{background:rgba(108,117,125,.12);color:#5a6268;border:1px solid rgba(108,117,125,.18)}
.badge-soft-warning{background:rgba(255,193,7,.16);color:#8a6d00;border:1px solid rgba(255,193,7,.2)}
.badge-soft-info{background:rgba(13,202,240,.16);color:#055160;border:1px solid rgba(13,202,240,.22)}
.badge-soft-danger{background:rgba(220,53,69,.14);color:#842029;border:1px solid rgba(220,53,69,.2)}

.summary-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(180px,1fr));gap:.85rem}
.summary-item{border:1px solid rgba(10,31,68,.08);border-radius:16px;padding:.95rem 1rem;background:#fff}
.summary-label{display:block;font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:#74839a;margin-bottom:.3rem;font-weight:700}
.summary-value{font-weight:700;color:#0a1f44}

.tab-card .nav-pills .nav-link{border-radius:12px;color:#4f617d;font-weight:700}
.tab-card .nav-pills .nav-link.active{background:#0d3b66;color:#fff}
.info-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}
.info-cell{border:1px solid rgba(10,31,68,.08);border-radius:16px;padding:.9rem 1rem;background:#fff}
.info-cell-label{font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:#74839a;margin-bottom:.25rem;font-weight:700}
.info-cell-value{color:#0a1f44;font-weight:600}
.mini-audit{border-left:3px solid rgba(0,180,255,.5);padding-left:.9rem}

.table thead th{font-size:.82rem;text-transform:uppercase;letter-spacing:.05em;color:#6b7b91;border-bottom-width:1px}
.table tbody td{vertical-align:middle}
.table-hover tbody tr:hover{background:#f6faff}
.status-cell-pendente{background:rgba(255,193,7,.06)}
.status-cell-pago{background:rgba(25,135,84,.05)}
.status-cell-negado{background:rgba(220,53,69,.06)}
.status-cell-agendado{background:rgba(13,202,240,.06)}
.status-cell-vencida{box-shadow:inset 3px 0 0 rgba(220,53,69,.65)}

.hub-card{height:100%;text-decoration:none;color:inherit}
.hub-card .card-body{padding:1.1rem 1.15rem}
.hub-icon{width:48px;height:48px;border-radius:14px;background:#eef4fa;color:#0d3b66;display:flex;align-items:center;justify-content:center;font-size:1.15rem}

.form-section .card-body{padding:1.25rem}
.section-kicker{font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6c757d;margin-bottom:.35rem}
.section-title{margin-bottom:.25rem;font-weight:700}
.section-help{color:#6c757d;margin-bottom:1rem;font-size:.95rem}
.highlight-input{font-size:1.05rem;font-weight:600}
.family-summary-card{border:1px dashed rgba(13,110,253,.35);border-radius:14px;padding:1rem;background:rgba(13,110,253,.04)}
.family-summary-top{display:flex;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:.5rem;flex-wrap:wrap}
.family-summary-badge{display:inline-flex;align-items:center;padding:.35rem .65rem;border-radius:999px;background:#0d6efd;color:#fff;font-weight:700;font-size:.8rem}
.family-summary-name{font-size:1.05rem;font-weight:700;margin-bottom:.5rem}
.family-summary-meta{display:grid;gap:.35rem;color:#495057}
.summary-section{background:linear-gradient(180deg,rgba(13,110,253,.03),rgba(13,110,253,0))}
.small-summary-grid .summary-item{border:1px solid rgba(0,0,0,.06);border-radius:12px;padding:.9rem 1rem;background:#fff;height:100%}
.action-bar{position:sticky;bottom:0;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);padding:.9rem 0 .25rem;z-index:10}

@media (max-width: 1199.98px){
  .app-shell{display:block}
  .app-sidebar{position:relative;height:auto;width:100%;border-radius:0;padding-bottom:1.25rem}
  .app-main{padding:1rem}
}

@media (max-width: 767.98px){
  .app-topbar,.page-header-top,.family-row-card{grid-template-columns:1fr;display:block}
  .topbar-meta{justify-content:flex-start;margin-top:.8rem}
  .page-actions,.family-actions{margin-top:.9rem}
  .family-row-card{display:flex;flex-direction:column;align-items:flex-start}
  .info-list{grid-template-columns:1fr}
  .form-section .card-body{padding:1rem}
  .action-bar{padding-top:.75rem}
}
