/* Botão de fechar da galeria de fotos (modal) */
.modal-zoom-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #1abc9c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 2;
}
@media (max-width: 700px) {
  .modal-zoom-close-btn {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    top: 8px;
    right: 8px;
  }
}
@media (max-width: 480px) {
  .modal-zoom-close-btn {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
    top: 4px;
    right: 4px;
  }
}
/* Controles de navegação da galeria de fotos (próximo/anterior) */
.modal-zoom-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #1abc9c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.18);
  z-index: 1;
}
.modal-zoom-nav-btn.prev {
  left: 1%;
}
.modal-zoom-nav-btn.next {
  right: 1%;
}
@media (max-width: 700px) {
  .modal-zoom-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
}
@media (max-width: 480px) {
  .modal-zoom-nav-btn {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
  }
}
.modal-content .thumbs-grid .thumb {
  max-width: 220px;
  max-height: 160px;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(44,62,80,0.08);
  margin: 0 auto;
  display: block;
}
/* Grid dos cards de atendimentos */
.atendimentos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}
.card-atendimento {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 0.2s;
}
.card-atendimento:hover {
  box-shadow: 0 4px 24px rgba(44,62,80,0.14);
}
.card-atendimento .thumbs-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.card-atendimento .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(44,62,80,0.08);
}
.card-atendimento .info {
  font-size: 1rem;
  color: #444;
  margin-top: 8px;
  margin-bottom: 8px;
}
.card-atendimento .btn {
  margin-top: 8px;
}
@media (max-width: 900px) {
  .atendimentos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .card-atendimento {
    padding: 16px;
  }
}
/* Filtros de logs - layout responsivo */
.logs-filtros-form {
  margin-bottom: 16px;
}


/* Filtros de logs - layout flexível, padrão relatorios.php */
.logs-filtros-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
.logs-filtro-item {
  display: flex;
  flex-direction: column;
  min-width: 150px;
  flex: 1 1 0;
}
.logs-filtro-botoes {
  display: flex;
  gap: 12px;
  min-width: 180px;
  flex: 0 0 auto;
  align-items: stretch;
  margin-bottom: 0;
  width: 100%;
}
.logs-filtro-botoes .btn {
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 1rem;
  margin: 0;
  border-radius: 25px;
  box-sizing: border-box;
}
.logs-filtro-botoes .btn-secondary {
  border-width: 2px;
  color: #1abc9c;
  background: #fff;
  box-shadow: none;
  border: 2px solid #1abc9c;
}
.logs-filtro-botoes .btn-primary {
  background: #1abc9c;
  color: #fff;
  border: none;
}
.btn-primary {
  background: #1abc9c;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 32px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary:hover, .btn-primary:focus {
  background: #16a085;
}
.btn-secondary {
  background: #fff;
  color: #1abc9c;
  border: 2px solid #1abc9c;
  border-radius: 25px;
  padding: 12px 32px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #f5f5f5;
}
@media (max-width: 700px) {
  .logs-filtros-flex {
    flex-direction: column;
    gap: 10px;
  }
  .logs-filtro-item {
    width: 100%;
    min-width: 0;
  }
  .logs-filtro-botoes {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    align-items: stretch;
    padding: 0;
  }
  .logs-filtro-botoes .btn {
    width: 100%;
    min-width: 0;
    border-radius: 25px;
    margin: 0;
    height: 48px;
    min-height: 48px;
    font-size: 1rem;
    box-sizing: border-box;
  }
}
@import url('https://fonts.googleapis.com/css?family=Montserrat:700,600|Open+Sans:400,600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
  margin: 0;
  line-height: 1.5;
}

header, .header {
  background: #fff;
  color: #1abc9c;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #1abc9c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}


/* Sidebar moderna e responsiva */
.sidebar {
  background: #fff;
  color: #1abc9c;
  width: 240px;
  min-height: 100vh;
  box-shadow: 2px 0 8px rgba(44,62,80,0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 0 24px 0;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9;
  transition: width 0.2s;
}
.sidebar-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px 24px;
  border-bottom: 1px solid #f5f5f5;
  margin-bottom: 16px;
}
.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f5f5;
}
.sidebar-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1abc9c;
}
.sidebar-nav {
  width: 100%;
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.sidebar-nav li {
  width: 100%;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: #34495e;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0 25px 25px 0;
  transition: background 0.2s, color 0.2s;
}

.sidebar-nav a i {
  min-width: 20px;
  color: #1abc9c;
}
.sidebar-nav a:hover, .sidebar-nav a:focus {
  background: #f5f5f5;
  color: #16a085;
}
.sidebar-nav .fa {
  font-size: 1.2rem;
  margin-right: 0;
  color: inherit;
  min-width: 22px;
  text-align: center;
}

@media (max-width: 900px) {
  .sidebar {
    width: 64px;
    align-items: center;
    padding: 16px 0;
  }
  .sidebar.sidebar-open {
    font-size: 16px;
  }
  .sidebar-header, .sidebar-title {
    display: none;
  }
  .sidebar-nav a {
    text-align: left;
    padding: 12px 30px;
    font-size: 14px;
  }
  .sidebar-nav .fa {
    font-size: 1.5rem;
  }
}
@media (max-width: 600px) {
  .sidebar {
    display: none !important;
  }
  .sidebar.sidebar-open {
    display: flex !important;
    position: fixed !important;
    left: 0;
    top: 0;
    width: auto;
    max-width: 320px;
    min-height: 100vh;
    z-index: 1100 !important;
    background: #fff;
    box-shadow: 2px 0 16px rgba(44,62,80,0.18);
    margin-top: 64px !important;
  }
  main { margin-left: 0; }

  /* Tamanhos menores para títulos em mobile */
  .card-envio h2 {
    font-size: 1.2rem !important;
  }
  .header-logo, .header .header-logo {
    font-size: 1.2rem !important;
  }
}
/* Garante que a sidebar com .sidebar-open sempre aparece acima do header */
.sidebar.sidebar-open {
  display: flex !important;
  position: fixed !important;
  z-index: 1100 !important;
}

main {
  margin-left: 120px;
  padding: 20px;
  transition: margin-left 0.2s;
  width: calc(100% - 120px);
  box-sizing: border-box;
}
@media (max-width: 900px) {
  main {
    margin-left: 64px;
    width: calc(100% - 64px);
  }
}
@media (max-width: 600px) {
  main {
    margin-left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px;
  }
}

.btn {
  background: #1abc9c;
  color: #fff;
  border-radius: 25px;
  border: none;
  padding: 12px 32px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
}
.btn:hover, .btn:focus {
  background: #16a085;
  box-shadow: 0 4px 16px rgba(44,62,80,0.12);
}
.btn-secondary {
  background: #fff;
  color: #1abc9c;
  border: 2px solid #1abc9c;
}
.btn-secondary:hover {
  background: #f5f5f5;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  margin: 24px auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 90%;
  max-width: 1200px;
  box-sizing: border-box;
}

/* Card específico para envio de fotos */
.card-envio {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  margin: 24px auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 90%;
  max-width: 1200px;
  box-sizing: border-box;
}

input, select, textarea {
  border-radius: 8px;
  border: 1px solid #cccccc;
  padding: 12px;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
  transition: border 0.2s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border: 1.5px solid #1abc9c;
  background: #f5f5f5;
}

label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
  color: #222;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  color: #1abc9c;
  margin-top: 0;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.fa {
  margin-right: 8px;
}

/* Modais */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(44,62,80,0.18);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(44,62,80,0.18);
  min-width: 320px;
  max-width: 90vw;
}

/* Toasts */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #1abc9c;
  color: #fff;
  padding: 16px 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.12);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  z-index: 200;
  opacity: 0.95;
}
.toast.error {
  background: #e74c3c;
}
.toast.success {
  background: #27ae60;
}

/* Thumbnails de fotos */
.thumbs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(44,62,80,0.08);
}

/* Upload de foto com preview circular */
.profile-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-pic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1abc9c;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.95rem;
  color: #888888;
  margin-bottom: 16px;
}
.breadcrumbs .fa {
  margin: 0 4px;
}

/* Tabela de logs */
.logs-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
}
.logs-table th, .logs-table td {
  padding: 12px 16px;
  text-align: left;
}
.logs-table tr:nth-child(even) {
  background: #f5f5f5;
}
.logs-table th {
  background: #1abc9c;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

/* Utilitários */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.gap-2 { gap: 16px; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  main { margin-left: 0; }
}
@media (max-width: 600px) {
  .card, .card-envio {
    padding: 24px 16px;
    max-width: 100%;
    min-width: 0;
    width: 95%;
    margin: 16px auto;
  }
  .btn { width: 100%; }
  .modal-content { padding: 16px; }
  .header, header { padding: 0 8px; }
}

@media (max-width: 400px) {
  .card, .card-envio {
    padding: 20px 12px;
    max-width: 100%;
    min-width: 0;
    width: 95%;
    margin: 12px auto;
  }
}

/* Responsivo específico para formulários de login/recuperação/nova senha */
@media (max-width: 768px) {
  body {
    padding: 0 !important;
  }
  .card, .card-envio {
    padding: 24px 16px !important;
    max-width: 95% !important;
    width: 95% !important;
    margin: 16px auto !important;
  }
  input, select, textarea {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .btn {
    width: 100% !important;
    font-size: 1rem !important;
    padding: 12px 16px !important;
  }
  label {
    font-size: 0.95rem !important;
  }
}

@media (max-width: 480px) {
  .card, .card-envio {
    padding: 20px 12px !important;
    width: 95% !important;
    max-width: 100% !important;
    margin: 12px auto !important;
  }
  h2 {
    font-size: 1.2rem !important;
    margin-bottom: 16px !important;
  }
  input, select {
    font-size: 16px !important;
    padding: 12px !important;
  }
  .form-group input[type="date"],
  .form-group input[type="time"] {
    padding-left: 12px !important;
  }
}

/* Containers específicos centralizados */
.container,
.main-content,
.diagnosticos-container,
.lista-unidades-container,
.unidade-main,
.cadastro-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .container,
  .main-content,
  .diagnosticos-container,
  .lista-unidades-container,
  .unidade-main,
  .cadastro-main {
    width: 100%;
    padding: 16px;
  }
}

/* Ajustes para formulários */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}

.input-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

@media (max-width: 600px) {
  .input-row {
    flex-direction: column;
    gap: 0;
  }
  
  .input-row .form-group {
    width: 100% !important;
  }
  
  .input-row input,
  .input-row select {
    width: 100% !important;
  }
}

/* Garantir centralização e largura correta em todos os dispositivos */
@media (max-width: 768px) {
  main {
    padding: 12px !important;
    width: 100% !important;
  }
  
  .card-envio {
    width: 95% !important;
    max-width: 100% !important;
    margin: 12px auto !important;
    padding: 24px 16px !important;
  }
  
  .dashboard-header {
    padding: 16px !important;
    margin-bottom: 20px !important;
  }
  
  .dashboard-quick-actions {
    width: 100% !important;
  }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 400px) {
  main {
    padding: 8px !important;
  }
  
  .card, .card-envio {
    width: 96% !important;
    padding: 16px 12px !important;
  }
}

/* Prevenir zoom indesejado em inputs no iOS */
input, select, textarea {
  font-size: 16px;
}

/* Garantir que elementos com width inline sejam responsivos */
@media (max-width: 600px) {
  input[style*="width"],
  select[style*="width"] {
    width: 100% !important;
  }
}

/* Classes adicionais para padronização global */
.cadastro-titulo {
  font-family: 'Montserrat', sans-serif;
  color: #1abc9c;
  text-align: center;
  margin-bottom: 24px;
}

.cadastro-titulo i {
  color: #888;
  margin-right: 8px;
}

/* Estilos para dashboard */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 24px 32px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  margin-bottom: 32px;
  border-radius: 16px;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 16px;
}

.user-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
}

.dashboard-quick-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.btn-dashboard {
  width: 220px;
  background: #1abc9c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px 0;
  font-size: 1.1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  transition: background 0.2s, box-shadow 0.2s;
  text-decoration: none;
  margin-bottom: 0;
}

.btn-dashboard:hover,
.btn-dashboard:focus {
  background: #17a589;
  color: #fff;
  box-shadow: 0 4px 16px rgba(44,62,80,0.12);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.dashboard-card-icon {
  font-size: 2.5rem;
  color: #1abc9c;
  margin-bottom: 12px;
}

.dashboard-card-count {
  font-size: 2rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #1abc9c;
}

.dashboard-card-label {
  font-size: 1rem;
  color: #888;
  margin-top: 4px;
}

@media (max-width: 700px) {
  .dashboard-quick-actions {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .btn-dashboard {
    width: 100%;
  }
  
  .dashboard-header {
    padding: 16px;
    margin-bottom: 20px;
  }
}

@media (max-width: 600px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 400px) {
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
}

