* {
    box-sizing: border-box
}

:root {
    --pink: #ff6fa8;
    --pink-dark: #e43e80;
    --teal: #1eb7a6;
    --cream: #fff6e8;
    --card: #fffaf1cc;
    --text: #172033;
    --purple: #7c5cff;
    --gold: #f6c445;
    --green: #32c36c;
    --red: #ff5c7a;
    --blue: #4a90e2;
    --shadow: 0 16px 36px #6d28461a
}

body {
    margin: 0;
    font-family: Segoe UI, Arial, sans-serif;
    color: var(--text);
    background: var(--cream)
}

.bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(255, 248, 235, .84), rgba(255, 248, 235, .84)), url('assets/background.png') center/cover no-repeat;
    z-index: -2
}

.decor {
    position: fixed;
    z-index: -1;
    font-size: 34px;
    opacity: .75;
    pointer-events: none;
    animation: floatDecor 7s ease-in-out infinite
}

.decor-1 {
    top: 8%;
    left: 26%
}

.decor-2 {
    top: 18%;
    right: 8%;
    animation-delay: .7s
}

.decor-3 {
    bottom: 10%;
    right: 12%;
    animation-delay: 1.3s
}

.decor-4 {
    top: 54%;
    left: 37%;
    animation-delay: 2s
}

.decor-5 {
    bottom: 22%;
    left: 18%;
    animation-delay: 2.5s
}

@keyframes floatDecor {

    0%,
    100% {
        transform: translateY(0) rotate(-8deg)
    }

    50% {
        transform: translateY(-14px) rotate(8deg)
    }
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 315px;
    background: linear-gradient(180deg, #12b7a8, #088b7d);
    padding: 14px;
    box-shadow: 0 20px 50px #6d284633;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 5
}

.brand-card {
    background: #fffaf1;
    border: 2px solid #ff91bd;
    border-radius: 34px;
    text-align: center;
    padding: 8px 12px 14px;
    box-shadow: 0 16px 30px #56284726;
    overflow: hidden
}

.mascot {
    height: 286px;
    object-fit: contain;
    display: block;
    margin: -8px auto -56px
}

.logo {
    width: 116%;
    max-height: 180px;
    object-fit: contain;
    margin-left: -8%;
    display: block
}

nav {
    display: flex;
    flex-direction: column;
    gap: 9px
}

.nav-btn {
    border: 2px solid #ff91bd;
    border-radius: 18px;
    background: #ffffff26;
    color: white;
    font-weight: 900;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    transition: .2s;
    font-size: 15px
}

.nav-btn:hover,
.nav-btn.active {
    background: #ff6fa8;
    transform: translateX(4px);
    box-shadow: 0 12px 22px #6a204733
}

.values {
    margin-top: auto;
    border: 1px solid #ffffff66;
    border-radius: 24px;
    padding: 18px;
    color: white;
    background: #ffffff1c
}

.values strong,
.values span,
.values small {
    display: block;
    margin-bottom: 10px
}

.values small {
    opacity: .88
}

.main {
    margin-left: 315px;
    padding: 26px
}

.page {
    display: none
}

.page.active {
    display: block
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 18px
}

.hello {
    color: #ff5b9c;
    font-size: 26px;
    font-weight: 900
}

.hero h1 {
    font-size: 56px;
    line-height: 1;
    margin: 0;
    color: #172033
}

.hero p {
    font-size: 18px;
    color: #51606f
}

.hero-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.pill {
    min-width: 150px;
    background: var(--card);
    border: 2px solid #ffb6cf;
    border-radius: 22px;
    padding: 14px 18px;
    box-shadow: 0 12px 28px #6d28461a
}

.pill small {
    display: block;
    color: #e74282;
    text-transform: uppercase;
    font-weight: 900
}

.pill strong {
    font-size: 22px
}

.online {
    color: #099e55
}

.summary-panel,
.panel {
    background: var(--card);
    border: 2px solid #ffb6cf;
    border-radius: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
    transition: .22s
}

.summary-panel {
    padding: 24px;
    margin-bottom: 18px
}

.summary-panel h2,
.panel h3 {
    margin: 0 0 16px;
    color: #f13c82;
    text-transform: uppercase
}

.panel:hover,
.metric:hover {
    transform: translateY(-4px)
}

.metrics {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px
}

.metric {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 24px;
    background: #ffffffa8;
    border-right: 1px solid #ffd0de;
    min-height: 118px;
    transition: .22s
}

.metric img {
    width: 84px;
    height: 84px;
    object-fit: contain
}

.metric span {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px
}

.metric strong {
    display: block;
    font-size: 34px;
    line-height: 1
}

.metric small {
    font-weight: 900;
    color: #607080
}

.metric small.up {
    color: #07975d
}

.metric small.down {
    color: #e43e80
}

.metric small.neutral {
    color: #607080
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr;
    gap: 16px;
    margin-bottom: 16px
}

.panel {
    padding: 20px;
    min-height: 265px
}

.donut-row {
    display: flex;
    gap: 18px;
    align-items: center
}

.donut {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    flex: 0 0 auto
}

.donut:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff7ea;
    box-shadow: inset 0 0 0 1px #ffd2df
}

.donut b,
.donut span {
    position: relative;
    z-index: 1
}

.donut b {
    font-size: 28px
}

.donut span {
    position: absolute;
    margin-top: 46px;
    font-size: 12px
}

.feedback-donut {
    background: conic-gradient(var(--pink) var(--pct), var(--teal) 0)
}

.team-donut {
    background: conic-gradient(var(--gold) 0 var(--gestaoEnd), var(--green) var(--gestaoEnd) var(--ativosEnd), var(--red) var(--ativosEnd) var(--inativosEnd), var(--blue) var(--inativosEnd) 100%)
}

.mini-stats div {
    border: 1px solid #ffbdd2;
    border-radius: 16px;
    padding: 12px 16px;
    margin: 0 0 10px;
    background: #ffffff80
}

.mini-stats span {
    display: block;
    font-size: 12px
}

.mini-stats strong {
    font-size: 22px;
    color: #e63c7d
}

.team-list p {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 11px 0;
    font-weight: 900
}

.team-list strong {
    margin-left: auto
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%
}

.gold {
    background: var(--gold)
}

.green {
    background: var(--green)
}

.red {
    background: var(--red)
}

.blue {
    background: var(--blue)
}

.chart svg {
    width: 100%;
    height: 185px
}

.large-chart svg {
    height: 285px
}

.line {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round
}

.line-ver {
    stroke: var(--purple)
}

.line-feed {
    stroke: var(--teal)
}

.chart-weeks {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 900;
    color: #687386
}

.legend-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 900
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px
}

.legend-dot.purple {
    background: var(--purple)
}

.legend-dot.teal {
    background: var(--teal)
}

.ranking-grid {
    grid-template-columns: 1fr 1fr 1fr
}

.bar {
    display: grid;
    grid-template-columns: 90px 1fr 48px;
    gap: 10px;
    align-items: center;
    margin: 12px 0
}

.bar i {
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #a77bff, #7857da);
    animation: growBar .8s ease both
}

.bar.points i {
    background: linear-gradient(90deg, #ffc94d, #ff8f3f)
}

@keyframes growBar {
    from {
        width: 0 !important
    }
}

.bar span,
.bar b {
    font-weight: 900
}

.link-btn {
    border: 0;
    background: #fff0f6;
    color: #e43e80;
    font-weight: 900;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 14px;
    padding: 10px 14px
}

.mission p {
    font-size: 18px;
    line-height: 1.5
}

.mission strong {
    font-size: 24px;
    color: #e43e80;
    font-style: italic
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px
}

.page-head h2 {
    font-size: 36px;
    margin: 0
}

.page-head p {
    margin: 4px 0;
    color: #627083
}

select {
    border: 2px solid #ffb6cf;
    background: white;
    border-radius: 16px;
    padding: 12px 16px;
    font-weight: 900
}

.table-panel {
    padding: 18px;
    min-height: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fffefa;
    border-radius: 18px;
    overflow: hidden
}

th {
    background: #ff7fab;
    color: white;
    text-align: left;
    padding: 12px
}

td {
    padding: 11px;
    border-bottom: 1px solid #ffd6e3
}

tr:hover td {
    background: #fff0f6
}

.medal {
    font-weight: 900;
    color: #e43e80
}

.status-rpp {
    color: #236bd6;
    font-weight: 900
}

.status-ativo {
    color: #07975d;
    font-weight: 900
}

.status-inativo {
    color: #e43e80;
    font-weight: 900
}

.status-gestao {
    color: #c48e00;
    font-weight: 900
}

.team-separator td {
    background: #fff0f6 !important;
    color: #e43e80;
    font-weight: 900;
    text-transform: uppercase
}

.health-graph {
    margin-bottom: 18px
}

@media(max-width:1350px) {
    .metrics {
        grid-template-columns: repeat(3, 1fr)
    }

    .grid,
    .ranking-grid {
        grid-template-columns: 1fr 1fr
    }

    .hero {
        flex-direction: column
    }

    .hero-pills {
        justify-content: flex-start
    }
}

@media(max-width:850px) {
    .sidebar {
        position: static;
        width: auto
    }

    .main {
        margin-left: 0
    }

    .metrics,
    .grid,
    .ranking-grid {
        grid-template-columns: 1fr
    }

    .donut-row {
        flex-direction: column
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start
    }

    .hero h1 {
        font-size: 38px
    }

    .mascot {
        height: 210px
    }

    .logo {
        width: 260px;
        margin: auto
    }

    .metric img {
        width: 70px;
        height: 70px
    }
}

.empty {
    font-weight: 900;
    color: #687386;
    background: #fff0f6;
    border: 1px solid #ffd6e3;
    border-radius: 16px;
    padding: 12px 14px;
    display: inline-block
}

/* =========================================================
   AJUSTE MOBILE
   ========================================================= */


@media (max-width: 850px) {
  body {
    overflow-x: hidden;
  }

  .main {
    margin-left: 0 !important;
    padding: 18px 14px !important;
    width: 100% !important;
  }

  .page-head {
    margin-top: 24px;
    padding: 0 4px;
  }

  .page-head h2 {
    font-size: 42px !important;
    line-height: 1.05;
  }

  .page-head p {
    font-size: 18px;
  }

  .table-panel {
    width: 100%;
    overflow-x: auto;
    padding: 14px !important;
    border-radius: 26px;
  }

  .table-panel table {
    min-width: 780px;
    font-size: 15px;
  }

  .table-panel th,
  .table-panel td {
    padding: 12px 14px;
    white-space: nowrap;
  }

  #weeklyTable,
  #globalTable,
  #healthTable {
    width: 100%;
  }

  #weekly .panel,
  #global .panel,
  #feedback .panel {
    margin-top: 14px;
  }

  #weekSelect,
  #globalSort {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    margin-top: 10px;
  }

  .health-graph {
    min-height: 280px;
  }

  .large-chart {
    overflow-x: auto;
  }

  .large-chart svg,
  #healthChart svg,
  #evolutionChart svg {
    min-width: 520px;
  }

  .chart-weeks {
    min-width: 520px;
    gap: 18px;
  }

  .sidebar {
    position: relative !important;
    width: 100% !important;
    min-height: auto;
    padding: 14px;
  }

  .brand-card {
    max-width: 100%;
  }

  .nav-btn {
    font-size: 18px;
    padding: 18px 22px;
  }

  .values {
    font-size: 18px;
  }
}

/* Ajuste extra para telas bem pequenas */
@media (max-width: 480px) {
  .page-head h2 {
    font-size: 36px !important;
  }

  .table-panel table {
    min-width: 720px;
    font-size: 14px;
  }

  .table-panel th,
  .table-panel td {
    padding: 10px 12px;
  }

  .main {
    padding: 14px 10px !important;
  }
}
