:root{
  --se-card-radius: 14px;
  --se-sidebar-w: 270px;
  --se-topbar-h: 56px;
}

.se-card{
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--se-card-radius);
  border: 0;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.se-badge{
  border-radius: 999px;
}

.se-photo{
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  background: #eef2f6;
}
.se-photo.se-photo-lg{
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.se-kpi{
  border-radius: var(--se-card-radius);
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.se-kpi .label{ color:#6c757d; font-size:.85rem; }
.se-kpi .value{ font-weight:600; font-size:1.3rem; }

/* Reports (territorial dashboard) */
.se-report-hero{
  border-radius: var(--se-card-radius);
  background: radial-gradient(1200px 520px at 40% 0%, rgba(13,110,253,.10) 0%, rgba(233,237,243,.0) 55%),
              linear-gradient(180deg, rgba(255,255,255,.75) 0%, rgba(233,237,243,.0) 100%);
  padding: 14px;
}
.se-report-hero-inner{
  max-width: 1100px;
  margin: 0 auto;
}
.se-report-title{
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.se-report-title-ico{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(13,110,253,.10);
  color: var(--se-primary, #0d6efd);
  border: 1px solid rgba(0,0,0,.06);
  flex: 0 0 auto;
}

.se-btn-apply{
  height: 44px;
  border-radius: 12px;
  font-size: 1.05rem;
}

.se-report-banner{
  border: 0;
  background: linear-gradient(180deg, rgba(248,240,226,.95) 0%, rgba(246,236,219,.90) 100%);
}
.se-report-banner .se-report-banner-icon{
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,193,7,.22);
  border: 1px solid rgba(255,193,7,.35);
  font-size: 22px;
  color: #a06b00;
}
.se-report-banner .se-report-banner-title{
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: .2px;
}
.se-report-banner-arrow{ font-size: 22px; opacity: .75; }

.se-report-filters .form-select,
.se-report-filters .form-control{
  height: 46px;
  border-radius: 12px;
}
.se-report-filters .card-body{
  padding: 18px;
}

.se-insight{
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.75);
}
.se-insight .card-body{
  padding: 14px 16px;
}
.se-insight-ico{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(13,110,253,.10);
  color: var(--se-primary, #0d6efd);
  flex: 0 0 auto;
}
.se-insight-title{
  font-weight: 600;
  letter-spacing: .2px;
}

.se-donut-wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.se-donut-shell{
  position: relative;
  width: 230px;
  height: 230px;
}
.se-donut-canvas{
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.se-donut-legend{
  width: 100%;
  max-width: 320px;
}
.se-donut-center{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 168px;
  border-radius: 16px;
  padding: 10px 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(.985);
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
}
.se-donut-shell:hover .se-donut-center,
.se-donut-shell:focus .se-donut-center{
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .12s ease, transform .12s ease, visibility 0s;
}
.se-donut-center-title{
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.se-donut-center-lines{
  display:flex;
  flex-direction: column;
  gap: 4px;
}
.se-donut-line{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  font-size: .78rem;
  color: #475569;
}
.se-donut-line span:first-child{
  display:flex;
  align-items:center;
  gap: 6px;
  min-width: 0;
}
.se-donut-line span:last-child{
  flex: 0 0 auto;
  color: #1f2a37;
  font-weight: 500;
}

.se-barrow{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.65);
}
.se-barrow-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.se-barrow-label{
  font-weight: 500;
  color: #1f2a37;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.se-barrow-val{
  font-weight: 500;
  color: #334155;
  flex: 0 0 auto;
}
.se-barrow-bar{
  height: 12px;
  border-radius: 999px;
  background: #e7edf6;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}
.se-barrow-fill{
  height: 100%;
  background: linear-gradient(90deg, var(--se-primary, #0d6efd) 0%, rgba(13,110,253,.35) 100%);
}

@media (min-width: 1200px){
  .se-donut-shell{
    width: 260px;
    height: 260px;
  }
  .se-donut-center{
    width: 182px;
    padding: 11px 11px;
  }
}
@media (max-width: 575.98px){
  .se-donut-shell{
    width: 200px;
    height: 200px;
  }
  .se-donut-center{
    width: 154px;
    padding: 9px 9px;
  }
  .se-barrow{
    padding: 9px 10px;
  }
}

.se-mini-kpi{
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  padding: 12px 12px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.se-mini-kpi .icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(13,110,253,.10);
  color: var(--se-primary, #0d6efd);
}
.se-mini-kpi .label{ color:#6c757d; font-size:.85rem; }
.se-mini-kpi .value{ font-weight:700; font-size:1.25rem; }

.se-segbar{
  height: 28px;
  border-radius: 14px;
  background: #eef2f6;
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(0,0,0,.06);
}
.se-seg{ height: 100%; }
.se-seg-apoia{ background: #2fb344; }
.se-seg-simpatiza{ background: #228be6; }
.se-seg-neutro{ background: #adb5bd; }
.se-seg-indeciso{ background: #fab005; }
.se-seg-naoapoia{ background: #fa5252; }

.se-seg-pendente{ background: #fa5252; }
.se-seg-andamento{ background: #fab005; }
.se-seg-atrasado{ background: #2fb344; }

.se-dot{
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.se-dot-apoia{ background: #2fb344; }
.se-dot-simpatiza{ background: #228be6; }
.se-dot-neutro{ background: #adb5bd; }
.se-dot-indeciso{ background: #fab005; }
.se-dot-naoapoia{ background: #fa5252; }

.se-dot-pendente{ background: #fa5252; }
.se-dot-andamento{ background: #fab005; }
.se-dot-atrasado{ background: #2fb344; }

.se-kpi-link{
  text-decoration: none;
  color: inherit;
}
.se-kpi-link:hover{
  transform: translateY(-1px);
}
.se-kpi-danger{ background: rgba(220,53,69,.10) !important; color: rgba(220,53,69,1) !important; }
.se-kpi-warn{ background: rgba(250,176,5,.14) !important; color: #a06b00 !important; }
.se-kpi-orange{ background: rgba(253,126,20,.14) !important; color: rgba(253,126,20,1) !important; }
.se-kpi-info{ background: rgba(13,110,253,.10) !important; color: rgba(13,110,253,1) !important; }

.se-badge-orange{
  background: #fd7e14;
  color: #fff;
}

.se-progress{
  height: 12px;
  border-radius: 999px;
  background: #e7edf6;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}
.se-progress-bar{
  height: 100%;
  background: linear-gradient(90deg, var(--se-primary, #0d6efd) 0%, rgba(13,110,253,.72) 100%);
}

.se-theme-dark .se-report-banner{
  background: linear-gradient(180deg, rgba(35,33,24,.95) 0%, rgba(20,18,12,.92) 100%);
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-report-banner .se-report-banner-icon{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-mini-kpi{
  background: #0f172a;
  border-color: rgba(255,255,255,.10);
}
.se-theme-dark .se-mini-kpi .icon{
  background: rgba(255,255,255,.06);
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-report-title-ico{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-segbar,
.se-theme-dark .se-progress{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.10);
}

.se-theme-dark .se-insight{
  border-color: rgba(255,255,255,.10);
  background: rgba(15,23,42,.80);
}
.se-theme-dark .se-insight-ico{
  background: rgba(255,255,255,.06);
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-donut-shell{
  background: rgba(15,23,42,.60);
  border-radius: 999px;
}
.se-theme-dark .se-donut-center{
  background: rgba(15,23,42,.96);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 10px 25px rgba(0,0,0,.40);
}
.se-theme-dark .se-donut-center-title{
  color: rgba(229,231,235,.88);
}
.se-theme-dark .se-donut-line{
  color: rgba(229,231,235,.78);
}
.se-theme-dark .se-donut-line span:last-child{
  color: rgba(229,231,235,.92);
}
@media (min-width: 1200px){
  .se-theme-dark .se-donut-shell{ background: rgba(15,23,42,.60); }
}

.se-chart-card canvas{
  max-width: 100%;
}
.se-bar-chart{
  position: relative;
  height: 300px;
}
@media (max-width: 575.98px){
  .se-bar-chart{
    height: 260px;
  }
}

.se-chart-legend{
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.se-chart-legend-item{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.65);
  font-size: 12px;
}
.se-chart-legend-item .left{
  display:flex;
  align-items:center;
  gap: 8px;
  min-width: 0;
  color: #334155;
  font-weight: 500;
}
.se-chart-legend-item .right{
  flex: 0 0 auto;
  color: #1f2a37;
  font-weight: 500;
}

@media (max-width: 575.98px){
  .se-chart-legend{
    grid-template-columns: 1fr;
  }
}

.se-theme-dark .se-chart-legend-item{
  border-color: rgba(255,255,255,.10);
  background: rgba(15,23,42,.80);
}
.se-theme-dark .se-chart-legend-item .left{
  color: rgba(229,231,235,.88);
}
.se-theme-dark .se-chart-legend-item .right{
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-barrow{
  border-color: rgba(255,255,255,.10);
  background: rgba(15,23,42,.80);
}
.se-theme-dark .se-barrow-label{
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-barrow-val{
  color: rgba(229,231,235,.82);
}
.se-theme-dark .se-barrow-bar{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.10);
}

/* Person profile */
.se-person-hero{
  border-radius: var(--se-card-radius);
  background: radial-gradient(1100px 520px at 45% 0%, rgba(13,110,253,.12) 0%, rgba(233,237,243,.0) 55%),
              linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(233,237,243,.0) 100%);
  padding: 14px;
}
.se-person-hero-inner{
  max-width: 1100px;
  margin: 0 auto;
}
.se-person-title{
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.se-person-tabs .nav-tabs{
  border-bottom-color: rgba(0,0,0,.08);
}
.se-person-tabs .nav-link{
  border: 0;
  color: #49566b;
  padding: 10px 14px;
  border-radius: 14px 14px 0 0;
}
.se-person-tabs .nav-link:hover{
  color: #0b2540;
  background: rgba(13,110,253,.06);
}
.se-person-tabs .nav-link.active{
  background: #fff;
  color: #0b2540;
  box-shadow: 0 -10px 25px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  border-bottom: 0;
}
.se-person-card .card-body{
  padding: 18px;
}
.se-photo-xl{
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 18px;
  background: #eef2f6;
}
.se-photo-btn{
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  line-height: 0;
  cursor: zoom-in;
}
.se-photo-btn:focus-visible{
  outline: 3px solid rgba(13,110,253,.25);
  outline-offset: 4px;
}
.se-photo-btn:hover .se-photo-xl{
  filter: contrast(1.02) saturate(1.02);
}

.se-photo-wrap{
  position: relative;
  display: inline-block;
}
.se-photo-overlay-btn{
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(13,110,253,.28);
  background: rgba(255,255,255,.92);
  color: rgba(13,110,253,1);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  cursor: pointer;
}
.se-photo-wrap:hover .se-photo-overlay-btn,
.se-photo-wrap:focus-within .se-photo-overlay-btn{
  opacity: 1;
  transform: translateY(0);
}
.se-photo-overlay-btn:hover{
  background: #fff;
}
.se-photo-overlay-btn:focus-visible{
  outline: 3px solid rgba(13,110,253,.25);
  outline-offset: 4px;
}
@media (hover: none){
  .se-photo-overlay-btn{ opacity: 1; transform: none; }
}

.se-dot-sep{
  opacity: .8;
}

.se-person-summary{
  display:flex;
  align-items:stretch;
  gap: 0;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.70);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.se-person-summary-item{
  flex: 1 0 160px;
  padding: 10px 12px;
  border-right: 1px solid rgba(0,0,0,.06);
  display:flex;
  flex-direction:column;
  gap: 2px;
}
.se-person-summary-item:last-child{
  border-right: 0;
}
.se-person-summary-item .label{
  color:#6c757d;
  font-size: .85rem;
}
.se-person-summary-item .value{
  font-weight: 600;
  color: #0b2540;
}

.se-photo-modal{
  border: 0;
  background: rgba(15,23,42,.92);
}
.se-photo-modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: .95;
}
.se-photo-modal-close:hover{ opacity: 1; }
.se-photo-modal-img{
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  display:block;
  background: rgba(0,0,0,.2);
}

.se-task-item{
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  padding: 12px;
  position: relative;
}
.se-task-item::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
  background: rgba(13,110,253,.35);
}
.se-task-warning::before{ background: rgba(255,193,7,.55); }
.se-task-primary::before{ background: rgba(13,110,253,.55); }
.se-task-success::before{ background: rgba(25,135,84,.55); }
.se-task-danger::before{ background: rgba(220,53,69,.55); }
.se-task-meta{ opacity: .9; }

.se-timeline{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.se-timeline-day{
  font-weight: 700;
  color: #4b5563;
  margin-top: 6px;
}
.se-timeline-item{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(0,0,0,.06);
}
.se-timeline-item .icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(13,110,253,.10);
}
.se-timeline-item .content{ min-width: 0; }
.se-timeline-item .meta{ white-space: nowrap; }

.se-person-chip{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  color: inherit;
}
.se-person-chip:hover{
  background: rgba(13,110,253,.06);
}

.se-theme-dark .se-person-hero{
  background: radial-gradient(1100px 520px at 45% 0%, rgba(59,130,246,.16) 0%, rgba(15,23,42,.0) 60%),
              linear-gradient(180deg, rgba(17,28,52,.92) 0%, rgba(15,23,42,.90) 100%);
}
.se-theme-dark .se-person-tabs .nav-link{ color: rgba(229,231,235,.82); }
.se-theme-dark .se-person-tabs .nav-link:hover{ background: rgba(255,255,255,.06); color:#fff; }
.se-theme-dark .se-person-tabs .nav-link.active{
  background: #0f172a;
  color: rgba(229,231,235,.92);
  border-color: rgba(255,255,255,.10);
}
.se-theme-dark .se-task-item{
  background: #0f172a;
  border-color: rgba(255,255,255,.10);
}
.se-theme-dark .se-timeline-item{
  background: rgba(15,23,42,.85);
  border-color: rgba(255,255,255,.10);
}
.se-theme-dark .se-person-chip{
  background: #0f172a;
  border-color: rgba(255,255,255,.10);
}

/* Base Territorial (Cadastro Geral) */
.se-base-hero{
  border-radius: var(--se-card-radius);
  background: radial-gradient(1200px 560px at 40% 0%, rgba(13,110,253,.10) 0%, rgba(233,237,243,.0) 58%),
              linear-gradient(180deg, rgba(255,255,255,.70) 0%, rgba(233,237,243,.0) 100%);
  padding: 14px;
}
.se-base-hero-inner{
  max-width: 1100px;
  margin: 0 auto;
}
.se-base-title{
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.se-btn-new{
  height: 42px;
  border-radius: 12px;
}

.se-kpi-strip .se-kpi-strip-inner{
  display:flex;
  overflow:hidden;
  border-radius: var(--se-card-radius);
}
.se-kpi-strip .se-kpi-strip-item{
  flex: 1 1 0;
  display: block;
  padding: 14px 16px;
  background: rgba(255,255,255,.75);
  border-right: 1px solid rgba(0,0,0,.06);
}
.se-kpi-link{
  text-decoration:none;
  color: inherit;
  cursor: pointer;
  transition: background .12s ease-in-out, transform .12s ease-in-out;
}
.se-kpi-link:hover{
  background: rgba(13,110,253,.06);
}
.se-kpi-link:active{
  transform: translateY(1px);
}
.se-kpi-link:focus-visible{
  outline: 2px solid rgba(13,110,253,.35);
  outline-offset: -2px;
}
.se-kpi-disabled{
  opacity: .65;
  cursor: not-allowed;
}
.se-kpi-strip .se-kpi-strip-item:last-child{ border-right: 0; }
.se-kpi-strip .icon{ font-size: 20px; opacity: .9; }
.se-kpi-strip .label{ color:#6c757d; font-size: .95rem; margin-top: 6px; }
.se-kpi-strip .value{ font-weight: 500; font-size: 2rem; line-height: 1.05; margin-top: 4px; }

.se-filter-bar .card-body{ padding: 14px; }
.se-filter-bar .form-select,
.se-filter-bar .form-control{
  height: 46px;
  border-radius: 12px;
}
.se-btn-search{
  height: 46px;
  border-radius: 12px;
}

.se-base-table th{ vertical-align: middle; }
.se-primary-name{ font-weight: 400; }
.se-primary-name a{ font-weight: inherit; }
.se-open-count{ font-weight: 400; }
.se-btn-profile{
  min-width: 110px;
  border-radius: 12px;
}
.se-dot-gray{
  display:inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #adb5bd;
  vertical-align: middle;
  margin-right: 6px;
}

.se-theme-dark .se-base-hero{
  background: radial-gradient(1200px 560px at 40% 0%, rgba(59,130,246,.16) 0%, rgba(15,23,42,.0) 62%),
              linear-gradient(180deg, rgba(17,28,52,.92) 0%, rgba(15,23,42,.90) 100%);
}
.se-theme-dark .se-kpi-strip .se-kpi-strip-item{
  background: rgba(15,23,42,.80);
  border-right-color: rgba(255,255,255,.08);
}
.se-theme-dark .se-dot-gray{ background: rgba(255,255,255,.35); }

@media (max-width: 575.98px){
  .se-kpi-strip .se-kpi-strip-inner{
    flex-wrap: wrap;
  }
  .se-kpi-strip .se-kpi-strip-item{
    flex: 0 0 50%;
    border-right: 1px solid rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
  .se-kpi-strip .se-kpi-strip-item:nth-child(2n){
    border-right: 0;
  }
  .se-kpi-strip .se-kpi-strip-item:nth-last-child(-n+2){
    border-bottom: 0;
  }
  .se-theme-dark .se-kpi-strip .se-kpi-strip-item{
    border-right-color: rgba(255,255,255,.08);
    border-bottom-color: rgba(255,255,255,.08);
  }
}

/* Horizontal tabs (mobile) */
.se-tabs{
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.se-tabs .nav-link{
  white-space: nowrap;
}
.se-tabs::-webkit-scrollbar{ height: 8px; }
.se-tabs::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.18); border-radius: 999px; }
.se-theme-dark .se-tabs::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.18); }

/* Mobile smooth scrolling for wide tables */
.table-responsive{
  -webkit-overflow-scrolling: touch;
}

/* Layout (inspired by the provided UI screenshot) */
.se-body{
  background: #e9edf3;
}
.se-body.se-theme-dark{
  background: #0b1220;
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-card,
.se-theme-dark .se-panel,
.se-theme-dark .se-kpi,
.se-theme-dark .se-person-card{
  background: #0f172a;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  color: rgba(229,231,235,.92);
}
.se-theme-dark .se-panel-header{
  background: linear-gradient(180deg,#111c34 0%, #0f172a 100%);
  border-bottom-color: rgba(255,255,255,.08);
}
.se-theme-dark .se-nav-link:hover{ background: rgba(255,255,255,.06); color:#fff; }
.se-theme-dark .se-nav-link-sub{ color: rgba(229,231,235,.9); }
.se-theme-dark .se-nav-link-sub:hover{ color:#fff; }
.se-theme-dark .text-muted{ color: rgba(229,231,235,.70) !important; }
.se-theme-dark .table{ color: rgba(229,231,235,.92); }
.se-theme-dark .table-light{ --bs-table-bg: #111c34; --bs-table-color: rgba(229,231,235,.92); }
.se-theme-dark .form-control,
.se-theme-dark .form-select,
.se-theme-dark .input-group-text,
.se-theme-dark textarea{
  background: #0b1220;
  color: rgba(229,231,235,.92);
  border-color: rgba(255,255,255,.14);
}
.se-theme-dark .list-group-item{
  background: #0f172a;
  color: rgba(229,231,235,.92);
  border-color: rgba(255,255,255,.08);
}
.se-theme-dark .list-group-item.active{
  border-color: rgba(13,110,253,.55);
}

.se-topbar{
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(180deg, #0a3a69 0%, #082f55 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.se-topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 14px;
  gap: 10px;
  height: var(--se-topbar-h, 56px);
  max-height: 57px;
  flex-wrap: nowrap;
}

.se-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  text-decoration:none;
}
.se-brand:hover{ color:#fff; opacity:.95; }

.se-brand-logo{
  height:30px;
  width:auto;
  border-radius:8px;
  background: rgba(255,255,255,.1);
}
.se-login-logo{
  max-width: 260px;
  width: 100%;
  height: auto;
}
.se-brand-mark{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background: rgba(255,255,255,.12);
  color:#fff;
  font-size:18px;
}
.se-brand-text{ line-height:1.05; }
.se-brand-title{ font-weight:800; letter-spacing:.4px; }
.se-brand-sub{ opacity:.85; margin-left:6px; font-weight:300; letter-spacing:1px; }

@media (max-width: 424.98px){
  .se-brand-text{ display:none; }
}

.se-top-pill{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.90);
}
.se-top-pill:hover{ color:#fff; border-color: rgba(255,255,255,.28); }

.se-top-icon{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.90);
}
.se-top-icon:disabled{ opacity:.6; }

.se-sidebar{
  position: fixed;
  top: var(--se-topbar-h, 56px);
  bottom: 0;
  left: 0;
  width: var(--se-sidebar-w);
  background: linear-gradient(180deg,#f6f8fb 0%, #eef2f7 100%);
  border-right: 1px solid rgba(0,0,0,.06);
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow: hidden;
}

.se-nav{ display:flex; flex-direction:column; gap:6px; }
.se-sidebar .se-nav{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 70px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.se-offcanvas .offcanvas-body{
  overflow-y: auto;
}
.se-offcanvas{
  width: 320px;
}
.se-offcanvas .se-nav{
  padding-bottom: 12px;
}
.se-nav-divider{
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 8px 6px;
}
.se-nav-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  color:#243246;
  text-decoration:none;
  border: 0;
  width: 100%;
}
.se-nav-link:focus,
.se-nav-link:focus-visible{
  outline: 0;
  box-shadow: none;
}
.se-nav-link i{ width:18px; opacity:.85; }
.se-nav-link:hover{ background: rgba(13,110,253,.08); color:#0b2540; }
.se-nav-link.active{
  background: linear-gradient(180deg, rgba(13,110,253,.95) 0%, rgba(13,110,253,.75) 100%);
  color:#fff;
  box-shadow: none !important;
  outline: 0 !important;
}
.se-nav-link.active i{ opacity:1; }

.se-nav-subwrap{ display:flex; flex-direction:column; gap:6px; }
.se-nav-link-parent{
  text-align:left;
  background: transparent;
  font-weight: 400;
}
.se-nav-parent-label{
  line-height: 1.05;
}
.se-nav-link-parent.se-nav-pill{
  background: transparent;
  color:#243246;
  box-shadow: none !important;
  outline: 0 !important;
}
.se-nav-link-parent.se-nav-pill:hover{
  background: rgba(13,110,253,.08);
  color:#0b2540;
}
.se-nav-link-parent.se-nav-pill i{ opacity: 1; }
.se-nav-link-parent.se-nav-pill .se-nav-caret{ opacity: .9; }
.se-nav-link-parent.se-nav-pill.active,
.se-nav-link-parent.se-nav-pill[aria-expanded="true"]{
  background: linear-gradient(180deg, #2f7ffb 0%, #2a6fe0 100%);
  color:#fff;
  box-shadow: none !important;
  outline: 0 !important;
}
.se-nav-link-parent.se-nav-pill.active:hover,
.se-nav-link-parent.se-nav-pill[aria-expanded="true"]:hover{
  background: linear-gradient(180deg, #3a88ff 0%, #2d74ea 100%);
  color:#fff;
}
.se-nav-sub{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding-left: 14px;
  margin-top: 6px;
}
.se-nav-link-sub{
  padding: 8px 12px;
  border-radius: 12px;
}
.se-nav-link-parent[aria-expanded="true"] .se-nav-caret{
  transform: rotate(180deg);
}
.se-nav-caret{ transition: transform .15s ease-in-out; }

.se-sidebar-footer{
  margin-top:auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.se-main{
  padding-top: 16px;
}
.se-content{
  margin-left: var(--se-sidebar-w);
  padding: 18px 18px calc(40px + env(safe-area-inset-bottom, 0px));
}

.se-offcanvas .offcanvas-body{
  background: linear-gradient(180deg,#f6f8fb 0%, #eef2f7 100%);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Admin cards */
.se-section-title{
  font-weight: 800;
  letter-spacing: .2px;
}
.se-panel{
  background: #fff;
  border-radius: var(--se-card-radius);
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}
.se-panel-header{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: linear-gradient(180deg,#f9fbff 0%, #f1f5fb 100%);
  border-top-left-radius: var(--se-card-radius);
  border-top-right-radius: var(--se-card-radius);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap: wrap;
}
.se-panel-body{ padding: 14px; }

/* Schedule (Agenda) */
.se-sched-hero{
  background: radial-gradient(1200px 320px at 15% 0%, rgba(13,110,253,.10) 0%, rgba(13,110,253,0) 55%),
              radial-gradient(900px 260px at 80% 0%, rgba(25,135,84,.08) 0%, rgba(25,135,84,0) 55%);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--se-card-radius);
  box-shadow: 0 18px 40px rgba(0,0,0,.06);
  padding: 18px 18px;
}
.se-sched-title{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.1;
}
.se-sched-new{
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 14px 25px rgba(13,110,253,.18);
}
.se-sched-panel-header .btn-group .btn{
  border-color: rgba(0,0,0,.08);
  background: rgba(255,255,255,.9);
}
.se-sched-panel-header .btn-group .btn.active{
  background: rgba(13,110,253,.10);
  border-color: rgba(13,110,253,.25);
  color: #0d6efd;
}

.se-sv-list{ display:flex; flex-direction:column; gap:12px; }
.se-sv-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  padding: 14px 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.06);
}
.se-sv-title{ font-weight: 800; font-size: 1.35rem; letter-spacing: .1px; }
.se-sv-meta{ font-size: .96rem; margin-top: 4px; }
.se-sv-badge{ border-radius: 999px; padding: 8px 12px; font-size: .9rem; }
.se-sv-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.06);
  flex-wrap: wrap;
}
.se-iconbtn{
  width: 44px;
  height: 38px;
  padding: 0;
  display:grid;
  place-items:center;
  border-radius: 12px;
}
.se-history-list{ display:flex; flex-direction:column; gap:10px; }
.se-history-item{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 12px;
}

/* Visits (board + modal) */
.se-visits-page .se-sv-title{
  font-weight: 400;
}
.se-visits-tabs .nav-link,
.se-modal-tabs .nav-link{
  border: 0;
  color: #49566b;
  padding: 10px 14px;
  border-radius: 14px 14px 0 0;
}
.se-visits-tabs .nav-link:hover,
.se-modal-tabs .nav-link:hover{
  color: #0b2540;
  background: rgba(13,110,253,.06);
}
.se-visits-tabs .nav-link.active,
.se-modal-tabs .nav-link.active{
  background: #fff;
  color: #0b2540;
  box-shadow: 0 -10px 25px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  border-bottom: 0;
}

.se-fab{
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(13,110,253,.28);
  z-index: 1080;
}
@media (min-width: 992px){
  .se-fab{ display:none !important; }
}

.se-cal-header{
  justify-content: space-between;
}
.se-cal-table th{ border: 0 !important; padding-bottom: 10px; }
.se-cal-table td{ border: 0 !important; padding: 6px 2px; }
.se-cal-day{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.95);
  display:grid;
  place-items:center;
  margin: 0 auto;
  position: relative;
  color: #111827;
}
.se-cal-day:disabled{
  border-color: transparent;
  background: transparent;
}
.se-cal-day.is-today{
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 10px 20px rgba(13,110,253,.12);
}
.se-cal-day.has-event{
  background: rgba(13,110,253,.10);
  border-color: rgba(13,110,253,.20);
}
.se-cal-dot{
  position:absolute;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0d6efd;
}

@media (max-width: 991.98px){
  .se-sidebar{ display:none !important; }
  .se-content{ margin-left: 0; padding: 14px; }
  .se-offcanvas{ width: min(92vw, 360px); }
}

/* Small UX polish */
.btn-success{
  box-shadow: 0 10px 20px rgba(25,135,84,.18);
}

/* Register Visit (mobile style) */
.se-pin{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(13,110,253,.12);
  color: rgba(13,110,253,1);
  font-size: 18px;
  flex: 0 0 auto;
}
.se-person-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.se-status-option{
  width: 100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: linear-gradient(180deg,#ffffff 0%, #f6f8fb 100%);
  cursor: pointer;
  user-select: none;
}
.se-status-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.se-status-dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #adb5bd;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.9);
}
.se-status-pendente .se-status-dot{ background: #ffc107; }
.se-status-andamento .se-status-dot{ background: #0d6efd; }
.se-status-resolvido .se-status-dot{ background: #198754; }

.se-status-option.is-checked{
  border-color: rgba(13,110,253,.35);
  box-shadow: 0 10px 20px rgba(0,0,0,.06);
}
.se-status-pendente.is-checked{ border-color: rgba(255,193,7,.55); }
.se-status-andamento.is-checked{ border-color: rgba(13,110,253,.55); }
.se-status-resolvido.is-checked{ border-color: rgba(25,135,84,.55); }

.se-print-only{ display: none; }

@media print{
  .se-print-only{
    display: block !important;
  }
  .se-topbar,
  .se-sidebar,
  .se-offcanvas,
  .se-nav,
  .se-no-print{
    display:none !important;
  }
  .se-content{
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .se-card,
  .se-panel,
  .se-kpi,
  .se-mini-kpi{
    box-shadow: none !important;
  }
  .table-responsive{
    overflow: visible !important;
  }
  a[href]::after{
    content: "" !important;
  }
}

.row, .se-visits-page {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.alert, .se-panel {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
