html {
  background: linear-gradient(135deg, #25418E 10%, #071848 70%);
  min-height: 100%;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  min-height: 100%;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: linear-gradient(180deg, #0A2558 10%, #000E28 100%);
  color: #fff;
  padding: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  background-color: #000E28;
  padding: 19px 18px 10px 20px;
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: bold;
}

.sidebar-header span {
  font-size: 0.95rem;
  color: #a5c6fe;
}

.sidebar-nav {
  margin-top: 30px;
  flex: 1;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0 0 0 20px;
}

.sidebar-nav ul li {
  display: flex;
  align-items: center;
  font-size: 1.09rem;
  margin-bottom: 30px;
  gap: 16px;
  cursor: pointer;
  padding: 10px 6px;
  border-radius: 5px;
}

.sidebar-nav ul li:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a {
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.sidebar-nav .material-icons {
  font-size: 1.5em;
}

.navbar {
  position: fixed;
  top: 0;
  left: 250px;
  height: 91px;
  width: calc(100% - 250px);
  background: linear-gradient(90deg, #0A2558 10%, #000E28 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  z-index: 10;
  padding: 0 38px 0 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.navbar-logo h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

.dashboard-content {
  margin-left: 250px;
  margin-top: 91px;
  padding: 10px;
  height: calc(100vh - 91px);
  box-sizing: border-box;
  overflow: hidden;
}

.desktop-row-1 {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0;
  max-height: calc(50% - 5px);
}

.desktop-row-1 > .dashboard-cadas {
  flex: 0 0 60%;
  overflow: hidden;
}

.desktop-row-1 > .dashboard-percentual {
  flex: 0 0 calc(40% - 10px);
  overflow: hidden;
}

.desktop-row-2 {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0;
  max-height: calc(50% - 5px);
}

.desktop-row-2 > .dashboard-servicos,
.desktop-row-2 > .dashboard-firebase,
.desktop-row-2 > .dashboard-estado {
  flex: 1;
  overflow: hidden;
}

.dashboard-cadas {
  background: #020C27;
  padding: 10px;
  border-radius: 16px;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-cadas h2 {
  font-size: 1rem;
  margin: 0 0 8px 0;
}

.dashboard-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
  flex: 1;
}

.dashboard-card {
  background: #17295C;
  border-radius: 12px;
  flex: 1;
  min-width: 0;
  padding: 8px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dashboard-card h3 {
  font-size: 0.7rem;
  margin: 0 0 3px 0;
  text-align: center;
}

.dashboard-date {
  font-size: 0.6rem;
  margin: 3px 0 0 0;
  text-align: center;
}

.percentual-title {
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  color: #fff;
  margin: 0 0 5px 0;
}

.dashboard-percentual {
  background: #020C27;
  padding: 10px;
  border-radius: 16px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.dashboard-percentual h2,
.dashboard-percentual h3,
.dashboard-percentual p {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.percentual-chart-container {
  width: 120px;
  height: 120px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 1;
}

.percentual-legenda {
  text-align: center;
  font-size: 0.7rem;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.legenda-cliente {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #39cf7d;
  border-radius: 3px;
  margin-right: 3px;
  vertical-align: middle;
}

.legenda-paneleiro {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #34b1e2;
  border-radius: 3px;
  margin: 0 3px 0 8px;
  vertical-align: middle;
}

.dashboard-servicos {
  background: #081F4A;
  padding: 10px;
  border-radius: 16px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.dashboard-servicos h2 {
  background: #020C27;
  color: #fff;
  font-size: 0.9rem;
  margin: -10px -10px 5px -10px;
  padding: 8px 10px;
  border-radius: 16px 16px 0 0;
}

.servicos-top {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.servicos-content {
  padding-top: 0px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  color: yellow;
  position: relative;
  margin-top: -5%;
}

.servicos-content p {
  font-size: 2rem;
  font-weight: bold;
}

.ativo-fundo {
  position: absolute;
  left: 0;
  width: 100%;
  height: 88%;
  z-index: -1;
}

.servicos-content2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin-top: 5%;
}

.servico-bloco {
  display: flex;
  align-items: center;
  gap: 7px;
}

.servico-bloco p {
  font-size: 2rem;
  color: #fff;
  font-weight: bold;
  margin: 0 0 0 2px;
  text-underline-offset: 2px;
}

.servico-bloco h3 {
  font-size: 1.6rem;
  color: #fff;
  font-weight: bold;
  margin: 0 0 0 8px;
}

.dashboard-firebase {
  background: #020C27;
  padding: 10px;
  border-radius: 16px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.dashboard-firebase h2 {
  font-size: 0.9rem;
  margin: 0 0 5px 0;
}

.dashboard-img,
.dashboard-img2 h2 {
  color: #36FB39;
}

.dashboard-img,
.dashboard-img2 p {
  color: #36FB39;
}

.dashboard-img {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.fogo {
  width: 77px;
  height: auto;
}

.dashboard-img2 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
}

.dashboard-estado {
  background: #020C27;
  padding: 10px;
  border-radius: 16px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.dashboard-estado h2 {
  font-size: 0.9rem;
  margin: 0 0 5px 0;
}

.robo {
  width: 77px;
  height: auto;
}

.parte-texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.parte-texto h2 {
  font-size: 1.03rem;
  margin: 0;
}

.parte-texto p {
  font-size: 0.80rem;
  margin: 0;
}


.radial-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  margin: 3px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-number {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  z-index: 1;
}

.radial-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  z-index: 0;
}

.radial-bg {
  stroke: #10306b;
  opacity: 0.4;
}

/* CÍRCULOS COM GIRO E ANIMAÇÃO DE COR */
.radial-anim-cadastros,
.radial-anim-clientes,
.radial-anim-paneleiros {
  stroke-dasharray: 126;
  stroke-dashoffset: 0;
  transform-origin: 25px 25px;
  animation:
    radial-spin 2.5s linear infinite,
    radial-colors-cadastros 2.5s ease-in-out infinite;
}


@keyframes radial-colors-cadastros {

  0%,
  100% {
    stroke: #39cf7d;
  }

  50% {
    stroke: #34b1e2;
  }
}

.radial-anim-clientes {
  animation:
    radial-spin 2.5s linear infinite,
    radial-colors-clientes 2.5s ease-in-out infinite;
}

@keyframes radial-colors-clientes {

  0%,
  100% {
    stroke: #34b1e2;
  }

  50% {
    stroke: #f2c94c;
  }
}

.radial-anim-paneleiros {
  animation:
    radial-spin 2.5s linear infinite,
    radial-colors-paneleiros 2.5s ease-in-out infinite;
}

@keyframes radial-colors-paneleiros {

  0%,
  100% {
    stroke: #f2c94c;
  }

  50% {
    stroke: #39cf7d;
  }
}

/* Administração styles */
.admin-container {
  background: #020C27;
  padding: 25px;
  border-radius: 24px;
  color: #fff;
  width: 90%;
  margin: auto;
  margin-top: 20px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.user-card {
  background: #17295C;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #fff;
}

.user-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.user-card h3 {
  margin: 10px 0;
  font-size: 1.2rem;
}

.user-card p {
  margin: 5px 0;
  font-size: 0.9rem;
}

.card-actions {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.card-actions button {
  background: #34b1e2;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
}

.card-actions button:hover {
  background: #2a9cc8;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #17295C;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 12px;
  color: #fff;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #fff;
}

#modal-body ul {
  list-style: none;
  padding: 0;
}

#modal-body li {
  background: #25418E;
  margin: 5px 0;
  padding: 10px;
  border-radius: 5px;
}

/* Layout visibility */
.desktop-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.mobile-layout {
  display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 20;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .hamburger {
    display: block;
    position: absolute;
    left: 20px;
  }

  .navbar {
    left: 0;
    width: 100%;
    justify-content: center;
  }

  .navbar-logo h1 {
    font-size: 1.9rem;
  }

  .navbar-logo h1::before {
    content: "Conserta Já";
  }

  .dashboard-content {
    margin-left: 0;
    margin-top: 91px;
    padding: 15px;
    height: auto;
    overflow: auto;
    width: 100%;
    margin: 91px auto 0 auto;
  }

  .desktop-layout {
    display: none;
  }

  .mobile-layout {
    display: block;
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    text-align: center;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .mobile-layout * {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .mobile-layout img {
    max-width: 100%;
    height: auto;
  }

  .mobile-layout svg {
    max-width: 100%;
    height: auto;
  }

  .dashboard-row-mobile {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 15px;
  }

  .dashboard-row-mobile-3 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin: 0 auto;
  }

  .dashboard-row-mobile > .dashboard-cadas,
  .dashboard-row-mobile > .dashboard-percentual {
    width: 100%;
    margin: 0 auto;
  }

  .dashboard-row-mobile-3 > .dashboard-servicos,
  .dashboard-row-mobile-3 > .dashboard-firebase,
  .dashboard-row-mobile-3 > .dashboard-estado {
    width: 100%;
    margin: 0 auto;
  }

  /* Mobile: cards de usuários em coluna */
  .mobile-layout .dashboard-row {
    flex-direction: column;
    gap: 15px;
  }

  .mobile-layout .dashboard-card {
    padding: 15px;
    min-height: 120px;
  }

  .mobile-layout .dashboard-card h3 {
    font-size: 1rem;
  }

  .mobile-layout .radial-wrapper {
    width: 80px;
    height: 80px;
  }

  .mobile-layout .radial-number {
    font-size: 1.5rem;
  }

  .mobile-layout .radial-anim-cadastros,
  .mobile-layout .radial-anim-clientes,
  .mobile-layout .radial-anim-paneleiros {
    stroke-dasharray: 201;
    transform-origin: 40px 40px;
  }

  .mobile-layout .dashboard-date {
    font-size: 0.8rem;
  }

  .mobile-layout .dashboard-cadas h2 {
    font-size: 1.2rem;
  }

  .mobile-layout .percentual-chart-container {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }

  .mobile-layout .percentual-chart-container canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
  }

  .mobile-layout .percentual-title {
    font-size: 1.2rem;
  }

  .mobile-layout .percentual-legenda {
    font-size: 0.9rem;
  }

  .mobile-layout .radial-svg {
    width: 80px;
    height: 80px;
  }

  .mobile-layout .dashboard-servicos,
  .mobile-layout .dashboard-firebase,
  .mobile-layout .dashboard-estado {
    padding: 15px;
  }

  .mobile-layout .dashboard-servicos h2 {
    background: none;
    margin: -15px -15px 5px -15px;
  }

  .mobile-layout .servicos-top {
    border-radius: 16px 16px 0 0;
  }

  .mobile-layout .dashboard-servicos .servicos-content2 {
    align-items: center;
  }

  .mobile-layout .dashboard-servicos .servico-bloco {
    justify-content: center;
  }

  .mobile-layout .servicos-content {
    justify-content: center;
  }

  .mobile-layout .dashboard-servicos h2 {
    font-size: 1.2rem;
    text-align: center;
    padding-left: 45px;
  }

  .mobile-layout .dashboard-firebase h2,
  .mobile-layout .dashboard-estado h2 {
    font-size: 1.1rem;
  }

  .mobile-layout .fogo,
  .mobile-layout .robo {
    width: 89px;
  }

  .charts-content {
    margin-left: 0;
    flex-direction: column;
    order: 1;
  }

  .chart-container {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .admin-container {
    width: 100%;
  }

  .users-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .user-card {
    padding: 15px;
  }

  .card-actions {
    flex-direction: column;
  }
}

@media (min-width: 1920px) {
  .dashboard-servicos,
  .dashboard-firebase,
  .dashboard-estado {
    margin-top: 3%;
    max-height: calc(100% - 130px);
  }
  body, html {
  height: 100%;
  overflow-x: hidden;
  }
}
