@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

*{
  margin: 0;
  padding: 0;
  
  font-family: "Poppins", sans-serif;

}

.sidebar{
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 78px;
  background: #fafafa;
  padding: 6px 14px;
  z-index: 99;
  transition: all 0.5s ease;
  box-shadow: 0 4px 3px 1px rgba(0,0,0,0.1);
}

.sidebar.open{
  width: 200px;
}

/* Logo details */
.sidebar .logo-details{
  height: 60px;
  display: flex;
  align-items: center;
  position: relative;
}

.sidebar .logo-details .icon{
  opacity: 0;
  transition: all 0.5s ease;
}

.sidebar .logo-details .logo_name{
  color: #2c3e50; /* link / texto logo */
  font-size: 20px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.5s ease;
}

.sidebar.open .logo-details .icon,
.sidebar.open .logo-details .logo_name{
  opacity: 1;
}

/* Toggle button */
.sidebar .logo-details #btn{
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 23px;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s ease;
}

.sidebar.open .logo-details #btn{
  text-align: right;
}

/* Sidebar icons */
.sidebar i{
  color: #2c3e50; /* ícones */
  height: 60px;
  min-width: 50px;
  font-size: 28px;
  text-align: center;
  line-height: 60px;
}

/* Nav list */
.sidebar .nav-list{
  margin-top: 20px;
  height: 100%;
}

.sidebar li{
  position: relative;
  margin: 8px 0;
  list-style: none;
}

/* Tooltips */
.sidebar li .tooltip{
  position: absolute;
  top: -20px;
  left: calc(100% + 15px);
  
  background: #fafafa;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 400;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: 0s;
}

.sidebar li:hover .tooltip{
  opacity: 0.5;
  pointer-events: auto;
  transition: all 0.4s ease;
  top: 50%;
  transform: translateY(-50%);
}

.sidebar.open li .tooltip{
  display: none;
}

/* Search input */
.sidebar input{
  font-size: 15px;
  color: #fafafa;
  font-weight: 400;
  outline: none;
  height: 50px;
  width: 50px;
  border: none;
  border-radius: 12px;
  transition: all 0.5s ease;
  background: #5cbdb9; /* barra de busca */
}

.sidebar.open input{
  padding: 0 20px 0 50px;
  width: 100%;
}

.sidebar .bx-search{
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 22px;
  background: #5cbdb9;
  color: #fafafa;
}

.sidebar.open .bx-search:hover{
  background: #5cbdb9;
  color: #fafafa;
}

.sidebar .bx-search:hover{
  background: #fafafa;
  color: #5cbdb9;
}

/* Links */
.sidebar li a{
  display: flex;
  height: 100%;
  width: 100%;
  border-radius: 12px;
  align-items: center;
  text-decoration: none;
  transition: all 0.4s ease;
  background: #fafafa;
}

.sidebar li a:hover{
  background: #2c3e50;
}

.sidebar li a .links_name{
  color: #2c3e50;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
}

.sidebar.open li a .links_name{
  opacity: 1;
  pointer-events: auto;
}

.sidebar li a:hover .links_name,
.sidebar li a:hover i{
  transition: all 0.5s ease;
  color:#fafafa;
}

/* Link icons */
.sidebar li i{
  height: 50px;
  line-height: 50px;
  font-size: 18px;
  border-radius: 12px;
}

/* Profile section */
.sidebar li.profile{
  position: fixed;
  height: 60px;
  width: 78px;
  left: 0;
  bottom: -8px;
  padding: 10px 14px;
  background: #fafafa;
  transition: all 0.5s ease;
  overflow: hidden;
}

.sidebar.open li.profile{
  width: 250px;
}

.sidebar li .profile-details{
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.sidebar li img{
  height: 45px;
  width: 45px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
}

.sidebar li.profile .name,
.sidebar li.profile .job{
  font-size: 15px;
  font-weight: 400;
  color: #2c3e50;
  white-space: nowrap;
}

.sidebar li.profile .job{
  font-size: 12px;
}

/* Logout button */
.sidebar .profile #log_out{
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: #fafafa;
  width: 100%;
  height: 60px;
  line-height: 60px;
  border-radius: 0px;
  transition: all 0.5s ease;
}

.sidebar.open .profile #log_out{
  width: 50px;
  background: none;
}
/* Footer da sidebar */
.sidebar-footer {
    margin-top: auto;        /* empurra para o final */
    text-align: center;      /* centraliza horizontalmente */
    padding: 20px 0;
    flex-shrink: 0;          /* não encolhe */
}

/* Logo com proporção correta */
.sidebar-footer .logo-horana {
    width: 120px;            /* largura máxima desejada */
    height: auto;            /* mantém proporção */
    object-fit: contain;     /* evita distorção */
    display: block;
    margin: 0 auto;          /* centraliza */
    transition: 0.3s;
}

/* Ajuste para sidebar colapsada */
.sidebar:not(.open) .logo-horana {
    width: 40px;             
}
.home-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
 
  background: #fafafa;
  transition: all 0.5s ease;
  overflow: auto;
  display: flex;
  justify-content: center;
  
}

.sidebar.open ~ .home-section {
  margin-left: 200px; /* sidebar aberta */
}

.home-section .text{
  display: inline-block;
  color: var(--main-color);
  font-size: 25px;
  font-weight: 500;
  margin: 18px
}

@media (max-width: 768px) {
  .home-section {
    margin-left: 0;
    width: 100%;
    padding-bottom: 70px; /* altura da bottom bar */
  }

}
.container {
  padding-top: 20px;
  width: 100%;
  
  
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.titulo {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
}

.lista {
  display: flex;
  flex-direction: center;
  gap: 10px;
  flex-wrap: wrap;

}

.card {
  background: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 0 4px 2px rgba(0,0,0,0.1);
  flex: 1 1 calc(33.33% - 10px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-direction: column;  
  gap: 10px;  
  max-width : 30%;
  min-width: 200px;
  box-sizing: border-box;
  
}
.card form{
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}



.card-text {
  
  font-weight: 600;
  color: #2c3e50;
    
}
.servico-info {
  margin-top: 5px;
  font-size: 14px;
  color: #6b7280;
}


.servico-vazio {
  padding: 20px;
  background: #f4f6f9;
  border-radius: 8px;
  text-align: center;
  color: #2c3e50;
}

.modal {
  z-index: 2000;
  border-radius:18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  
  
}
.modal-header {
  border-bottom: 1px solid #f1f1f1;
  padding: 20px 25px;
}
.modal-backdrop {
  z-index: 1990;
}
.btn{
  width: 80px;

  white-space: nowrap;  
}

.modal-title {
  font-weight: 600;
  font-size: 18px;
}

.modal-body {
  padding: 25px;
}
.modal-header .close:hover {
  opacity: 1;
  transform: scale(1.2);
}
.form-control {
  border-radius: 10px;
  padding: 5px 5px;
}
.form-control:focus {
  border-color: black;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.horarios-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hora-card {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  transition: 0.2s;
}

.hora-card:hover {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.sem-horario {
  font-size: 13px;
  font-weight: bold;
  color: #0a0a0a;

}
h2, h3 {
  text-align: center;
  margin-bottom: 20px;
}
.servicos-grid {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  align-items: center;
}

.servico-card {
  width: 100%;
  max-width: 800px;
  padding: 15;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: 0.3s;
  align-items: center;
}

.servico-card:hover {
  border-color: #4a90e2;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.servico-nome {
  font-weight: bold;
  font-size: 16px;
}

.servico-info {
  margin-top: 5px;
  font-size: 14px;
  color: #6b7280;
}


/* ===== DATAS ===== */

.datas-grid {
  
  display: grid;
  grid-template-columns: repeat(auto-list, minmax(100px, 1fr));
  gap: 20px;
  margin-top: 20px;
}


.data-card {
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  flex: 1 1 calc(33.33% - 10px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-direction: column;  
}

.data-header {
  font-weight: bold;
  margin-bottom: 10px;
}
.perfil {
  background: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 0 4px 2px rgba(0,0,0,0.1);

  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 300px;
  width: 100%;
  max-width: 450px;
  box-sizing: border-box;
  
  
}


.grafico-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto; /* evita quebrar layout */
    position: relative;
    height: 300px; /* desktop */
}

#graficoServicos {
    width: 100% !important;
    height: auto !important;
}
@media (max-width: 768px) {
    .grafico-container {
        height: 400px; /* aumenta altura no mobile */
    }
}
.alert-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.custom-alert {
    width: 100%;
    max-width: 600px;
    padding: 18px 22px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    animation: fadeIn 0.4s ease-in-out;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: 0.3s;
}

.close-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* SUCCESS */
.custom-alert.success {
    background: #e9f9ef;
    color: #0f5132;
    border-left: 6px solid #198754;
}

/* ERROR */
.custom-alert.error {
    background: #fdeaea;
    color: #842029;
    border-left: 6px solid #dc3545;
}

/* WARNING */
.custom-alert.warning {
    background: #fff4e5;
    color: #664d03;
    border-left: 6px solid #ffc107;
}
.filtro{
  background: #ffffff;
  padding: 4px 6px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  flex: 1 1 calc(33.33% - 10px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width : 30%;
  min-width: 200px;
  box-shadow: 0 0 4px 2px rgba(0,0,0,0.1);
}
.hidden {
    display: none;
  }

 .home-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 


button.close-offcanvas {
    background: transparent;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: black;
    cursor: pointer;
    transition: 0.3s;
}

/* button.close-offcanvas:hover {
    transform: scale(1.2);
    color: #ffdddd;
} */

/* overlay escuro */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 998;
}

/* menu lateral */
#offcanvas {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  padding: 20px;
  transition: 0.3s;
  z-index: 999;

  display: flex;
  flex-direction: column;
}

/* header */
#offcanvas .header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* links */
#offcanvas a {
  text-decoration: none;
  color: #333;
  margin-bottom: 15px;
}

/* estado ativo */
#offcanvas.active {
  right: 0;
}

#overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 469px) {
  .card-dashboard {
  min-width: 150px;
  }
}

@media (max-width: 468px) {
  .card {
    flex: 1 1 100%;
    max-width: 90%;
  }
}