/* Deixa a caixa dos inputs mais previsível */
* {
    box-sizing: border-box;
}

/* BODY específico da página de login */
body.login-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;

    /* Caminho da imagem de fundo (url pública /static/...) */
    background-image: url("/static/accounts/img/Background-Login.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Container que centraliza o card na tela */
.login-overlay {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* para o texto nomedosite ficar absoluto dentro dele */
}

/* Card branco de login */
.login-card {
    background-color: rgba(255, 255, 255, 0.97);
    padding: 30px 40px;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
    min-width: 380px;
}

/* Cada bloco (login / senha) */
.form-group {
    margin-bottom: 16px;
}

/* Título pequeno do bloco: SEU LOGIN, SUA SENHA */
.section-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* Label pequena: Login:, Senha: */
.field-label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

/* Inputs de texto e senha */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus {
    outline: none;
    border-color: #00a676;
    box-shadow: 0 0 0 3px rgba(0, 166, 118, 0.15);
}

/* Linha de baixo do formulário (checkbox à esquerda, botão à direita) */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* Texto do “Lembrar” */
.remember {
    font-size: 12px;
    color: #555;
}

/* Botão azul */
.btn-login {
    border: none;
    padding: 8px 18px;
    border-radius: 2px;
    font-size: 13px;
    cursor: pointer;
    background-color: #74b9ff;
    color: #fff;
    font-weight: 700;
}

.btn-login:hover {
    background-color: #4aa3ff;
}

/* “nomedosite” lá embaixo na tela */
.brand {
    position: absolute;
    bottom: 16px;
    font-size: 30px;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

.error-message {
    background-color: rgba(255, 0, 0, 0.06);
    border: 1px solid rgba(255, 0, 0, 0.4);
    color: #b00020;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 3px;
    margin-bottom: 12px;
}

/* --------------------------- */
/* LAYOUT INTERNO (pós-login) */
/* --------------------------- */

body.app-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f3f4f6;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 230px;
    background-color: #111827;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-username {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-nav {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 14px;
    color: #e5e7eb;
    text-decoration: none;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background-color: #1f2937;
}

.sidebar-nav-icon {
    margin-right: 8px;
    font-size: 14px;
}

/* MAIN */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */

.topbar {
    height: 56px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
}

.topbar-title {
    font-size: 15px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.btn-logout {
    border: none;
    background-color: #ef4444;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

/* CONTEÚDO PRINCIPAL */

.content {
    padding: 20px;
}

.card {
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    padding: 16px 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* GRID DO PERFIL */

.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.profile-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 12px;
}

.profile-form-group label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.profile-form-group input[type="text"],
.profile-form-group input[type="email"],
.profile-form-group input[type="password"],
.profile-form-group input[type="date"],
.profile-form-group input[type="time"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    box-sizing: border-box;
}

.field-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.btn-primary {
    border: none;
    background-color: #10b981;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* FOTO GRANDE */

.profile-photo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e5e7eb;
}

/* MENSAGENS */

.messages {
    margin-bottom: 10px;
}

.messages .message-success {
    background-color: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 3px;
}

.messages .message-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 3px;
}

/* SIDEBAR COLAPSADA */

.app-layout.sidebar-collapsed .sidebar {
    width: 72px;
}

.app-layout.sidebar-collapsed .sidebar-username,
.app-layout.sidebar-collapsed .sidebar-nav-label {
    display: none;
}

.app-layout.sidebar-collapsed .sidebar-header {
    align-items: center;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

.exams-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.exams-table th,
.exams-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
}

.exams-table thead {
    background-color: #f9fafb;
}

.exams-table th a {
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 12px;
}

.exam-view-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

.exam-view-info{
  min-width: 0;
}

.exam-view-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.exam-view-item{
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  background: #f9fafb;
}

.exam-view-label{
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.exam-view-value{
  font-size: 13px;
  color: #111827;
  word-break: break-word;
}

.exam-view-observations{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  min-height: 56px;
}

.exam-view-pdf{
  min-width: 0;
}

.exam-pdf-frame{
  width: 100%;
  height: 520px; /* se quiser mais alto, pode subir */
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}

.exam-extra-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.exam-extra-link{
  color: #2563eb;
  text-decoration: none;
  font-size: 13px;
}

.exam-extra-link:hover{
  text-decoration: underline;
}

@media (max-width: 1000px){
  .exam-view-grid{
    grid-template-columns: 1fr;
  }
  .exam-pdf-frame{
    height: 460px;
  }
}

.exams-table th a:hover {
    text-decoration: underline;
}

.exams-actions {
    white-space: nowrap;
    text-align: center;
}

.btn-icon {
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 4px;
}

.btn-icon-blue {
    background-color: #3b82f6;
    color: white;
}

.btn-icon-green {
    background-color: #10b981;
    color: white;
}

.btn-icon-red {
    background-color: #ef4444;
    color: white;
}

.btn-icon-gray {
  background-color: #6b7280;
  color: white;
}

.btn-icon-amber {
  background-color: #f59e0b;
  color: white;
}

.exams-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.exams-search-form {
    display: flex;
    gap: 6px;
}

.exams-search-form input[type="text"] {
    padding: 6px 8px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}

.exams-search-form button {
    border: none;
    background-color: #6b7280;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

/* Botão principal pode ser usado como <button> ou <a> */
.btn-primary {
    border: none;
    background-color: #10b981;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
}

/* Erros de campo no formulário */
.field-error {
    color: #b91c1c;
    font-size: 11px;
    margin-top: 2px;
}

/* Header dos exames com botão + search */
.exams-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-upload-exam {
    white-space: nowrap;
}

/* Formulário de upload (pode reaproveitar as classes de perfil) */
.exam-upload-form input[type="text"],
.exam-upload-form input[type="email"],
.exam-upload-form input[type="date"],
.exam-upload-form input[type="time"],
.exam-upload-form textarea {
    width: 100%;
}

.management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.management-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.management-tab {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 12px;
    text-decoration: none;
    color: #374151;
    background-color: #f9fafb;
}

.management-tab.active {
    background-color: #111827;
    color: #f9fafb;
    border-color: #111827;
}

.management-add-btn {
    font-size: 18px;
    padding: 4px 10px;
    border-radius: 999px;
}

.management-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-form-group select {
    width: 100%;
    height: 38px;        /* combina com os inputs */
    padding: 6px 10px;
    box-sizing: border-box;
}

.btn-siglas {
    border: none;
    background-color: #2563eb; /* azul */
    color: #ffffff;
    padding: 6px 12px;         /* igual ao Buscar */
    border-radius: 4px;        /* igual ao Buscar */
    font-size: 13px;           /* igual ao Buscar */
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;              /* força a mesma altura do Buscar */
    box-sizing: border-box;
}

.btn-siglas:hover {
    filter: brightness(0.95);
}

.optional-fields {
    margin-top: 12px;
    margin-bottom: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #f9fafb;
    padding: 10px 12px;
}

.optional-fields-summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    user-select: none;
}

.optional-fields-summary::marker {
    color: #6b7280;
}

.optional-fields-body {
    margin-top: 6px;
}

.file-list {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    font-size: 12px;
    color: #374151;
}

.file-list-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 12px;
}

.file-list ul {
    margin: 0;
    padding-left: 16px;
}

.file-list li {
    margin: 2px 0;
}

.file-input-hidden {
    position: absolute;
    left: -9999px;
}

/* Botão com estilo parecido com o "Buscar" */
.btn-file {
    border: none;
    background-color: #6b7280;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.btn-file:hover {
    filter: brightness(0.95);
}

.file-count {
    font-size: 12px;
    color: #374151;
}

/* Lista de arquivos */
.file-list {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    font-size: 12px;
    color: #374151;
}

.file-list ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.file-list li {
    margin: 4px 0;
}

.file-remove {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: #2563eb;
    cursor: pointer;
    text-align: left;
}

.file-remove:hover {
    text-decoration: underline;
}

.form-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-itens: center;
}

.btn-link {
    font-size: 13px;
    text-decoration: none;
}
.btn-link:hover {
    text-decoration: underline;
}

.file-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

/* Drop zone invisível por padrão; aparece só quando arrasta arquivo por cima */
.file-drop-zone {
    border: 1px dashed transparent;
    border-radius: 6px;
    padding: 6px;
}

.file-drop-zone.dragover {
    border-color: #9ca3af;
    background: rgba(17, 24, 39, 0.03);
}

.exam-pdf-wrapper{
  position: relative;
}

.exam-pdf-open{
  position: absolute;
  top: 40px;
  right: 12px;
  z-index: 5;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.two-cols-row{
  display: flex;
  gap: 16px;
}

.two-cols-row .col{
  flex: 1;
}

.hidden-box{
  display: none;
  margin-top: 8px;
}

#additional-cv-box{
  margin-top: 10px;
}

.btn-secondary{
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f3f3f3;
  cursor: pointer;
}

/* ===== Novo campo: Adicionar Clínicas/Veterinários ===== */
.cv-hidden {
  display: none;
}

.cv-box {
  margin-top: 10px;
}

#id_additional_clinic_or_vet {
  width: 100%;
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background: #fff;
}

/* Caixa do seletor (dropdown aberto) */
.cv-box{
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed #d1d5db;
  border-radius: 4px;
  background: #ffffff;
}

/* Select múltiplo */
#id_additional_clinic_or_vet{
  height: 160px;        /* controla o tamanho visível */
  width: 100%;
}

/* Área dos botões OK/Limpar */
.cv-actions{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.cv-actions .cv-ok{
  padding: 6px 14px;
}

.exam-view-sub{
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

/* Alinhar a coluna de "Arquivos extras" com a coluna da esquerda */
.profile-form-group.file-drop-zone{
  padding: 0;
}

.optional-fields-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 6px;
  align-items: start;
}

.optional-fields-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.exam-observations-group textarea {
  min-height: 96px;
  resize: vertical;
}

.return-datetime-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  background: #ffffff;
  overflow: hidden;
}

.return-datetime-wrap:focus-within {
  border-color: #00a676;
  box-shadow: 0 0 0 3px rgba(0, 166, 118, 0.15);
}

.return-datetime-wrap::after {
  content: "";
  flex: 1 1 auto;
}

.return-date-part,
.return-time-part {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.return-date-part {
  width: 220px;
}

.return-time-part {
  width: 92px;
}

.return-divider {
  width: 1px;
  background: #e5e7eb;
  flex: 0 0 1px;
  margin-left: 10px;
  margin-right: 6px;
  align-self: stretch;
}

.return-datetime-wrap input[type="date"],
.return-datetime-wrap input[type="time"] {
  border: none !important;
  box-shadow: none !important;
  outline: none;
  width: 100%;
  height: 38px;
  background: transparent;
}

.return-datetime-wrap input[type="date"] {
  padding: 8px 6px 8px 10px;
}

.return-datetime-wrap input[type="time"] {
  padding: 8px 8px 8px 6px;
}

.additional-cv-group,
.extra-files-group {
  min-width: 0;
}

@media (max-width: 920px) {
  .optional-fields-columns {
    grid-template-columns: 1fr;
  }

  .return-date-part {
    width: 200px;
  }

  .return-time-part {
    width: 88px;
  }
}

.notify-bell.notify-empty {
  color: #9ca3af;
  opacity: 0.6;
  cursor: default;
}

.notify-input-wrap {
  position: relative;
}

.notify-input-wrap input[type="text"],
.notify-input-wrap input[type="email"] {
  padding-right: 44px; /* espaço pro sino */
}

/* botão do sino */
.notify-bell {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  border: 1px solid transparent;

  background: transparent;
  font-size: 16px;

  cursor: pointer;
  padding: 0;
}

/* vazio (cinza) */
.notify-bell.notify-empty {
  cursor: help;
  border-color: #d1d5db;
  background: #f3f4f6;
  opacity: 0.6;
  cursor: default;
}

/* ligado (verde) */
.notify-bell.notify-enabled {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
}

/* desligado (vermelho) */
.notify-bell.notify-disabled {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
}

.exam-upload-form.was-validated input:invalid,
.exam-upload-form.was-validated select:invalid,
.exam-upload-form.was-validated textarea:invalid {
  border-color: #ef4444 !important;
}

.notify-bell.notify-empty { cursor: help !important; }

/* ===== Gestão: layout com foto à esquerda ===== */
.mgmt-form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.mgmt-photo-card{
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.mgmt-photo-title{
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.mgmt-photo-preview-wrap{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
}

.mgmt-photo-preview{
  width: 100%;
  height: 100%;
  object-fit: cover; /* “corta” a imagem pra caber quadrado */
  display: block;
}

.mgmt-photo-hint{
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.mgmt-photo-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.mgmt-photo-input{
  display: none; /* escondemos o input real */
}

.mgmt-photo-btn{
  padding: 8px 12px;
}

.mgmt-photo-clear{
  padding: 8px 12px;
}

.mgmt-fields{
  min-width: 0;
}

/* responsivo */
@media (max-width: 920px){
  .mgmt-form-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== Gestão: coluna da foto menor e mais proporcional ===== */
.mgmt-form-grid{
  grid-template-columns: 320px 1fr; /* esquerda fixa e menor */
  align-items: start;
}

/* preview não precisa ser gigantesco */
.mgmt-photo-preview-wrap{
  width: 100%;
  height: 220px;      /* controla a altura da foto */
  aspect-ratio: auto; /* desliga quadrado gigante */
}

/* mantém o corte bonito */
.mgmt-photo-preview{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* botões alinhados */
.mgmt-photo-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* usa o estilo do site, só ajusta tamanho */
.mgmt-photo-btn,
.mgmt-photo-clear{
  padding: 8px 12px;
}

/* o texto de ajuda fica abaixo dos botões */
.mgmt-photo-hint{
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
}

/* responsivo: em telas menores vira uma coluna */
@media (max-width: 920px){
  .mgmt-form-grid{
    grid-template-columns: 1fr;
  }
  .mgmt-photo-preview-wrap{
    height: 200px;
  }
}

.mgmt-photo-clear{
  background: #ef4444;
}

/* ===== Gestão: preview da foto em CÍRCULO ===== */
.mgmt-photo-preview-wrap{
  width: 180px;
  height: 180px;
  margin: 0 auto;          /* centraliza */
  border-radius: 999px;    /* círculo */
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
}

.mgmt-photo-preview{
  width: 100%;
  height: 100%;
  object-fit: cover;       /* “corte natural” */
  object-position: center; /* centraliza o recorte */
  display: block;
}

/* ===== Gestão: preview da foto em CÍRCULO (maior) ===== */
.mgmt-photo-title{
  margin-bottom: 6px;
}

.mgmt-photo-preview-wrap{
  width: 240px;          /* era 180px */
  height: 240px;         /* era 180px */
  margin: 6px auto 0;    /* sobe um pouco em relação ao título */
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  position: relative;
}

.mgmt-photo-preview-wrap.dragover{
  border-color: #00a676;
  box-shadow: 0 0 0 3px rgba(0, 166, 118, 0.15);
}

.mgmt-photo-preview{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: pointer; /* permite clicar no círculo para escolher arquivo */
}

/* ===== Retorno: botão de presets ===== */

.return-datetime-wrap {
  position: relative;
  overflow: visible !important;
}

.return-datetime-wrap::after {
  content: none !important;
  display: none !important;
}

.return-spacer {
  flex: 1 1 auto;
  min-width: 12px;
}

.return-presets {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
}

.return-presets-toggle {
  width: 34px;
  min-width: 34px;
  height: 38px;
  border: none;
  border-left: 1px solid #e5e7eb;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.return-presets-toggle:hover {
  background: #f9fafb;
}

.return-presets-toggle:focus {
  outline: none;
  background: #f3f4f6;
}

.return-presets-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 40;
}

.return-presets-hidden {
  display: none;
}

.return-preset-option {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.return-preset-option:hover {
  background: #f3f4f6;
}

.return-preset-option:focus {
  outline: none;
  background: #eef2f7;
}

/* ===== Retorno: refinamento final do botão e direção do menu ===== */

.return-presets {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
}

.return-presets-toggle {
  width: 34px;
  min-width: 34px;
  height: 38px;
  border: none;
  border-left: 1px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  position: relative;
  padding: 0;
  font-size: 0;      /* esconde o caractere ▾ */
  color: transparent;
}

.return-presets-toggle:hover {
  background: #f9fafb;
}

.return-presets-toggle:focus {
  outline: none;
  background: #f3f4f6;
}

.return-presets-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -4px;
  margin-top: -2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #6b7280;
}

.return-presets-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 40;
  overflow-y: auto;
}

.return-presets-menu.return-presets-open-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.return-presets-hidden {
  display: none;
}

.return-preset-option {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.return-preset-option:hover {
  background: #f3f4f6;
}

.return-preset-option:focus {
  outline: none;
  background: #eef2f7;
}

/* ===== Select de Clínica / Veterinário (upload normal + upload em massa) ===== */

.clinic-vet-select {
  width: 100%;
  height: 38px;
  padding: 8px 38px 8px 12px;
  border: 1px solid #9ca3af;
  border-radius: 4px;
  background-color: #ffffff;
  color: #111827;
  font-size: 13px;
  line-height: 1.2;
  box-sizing: border-box;
  cursor: pointer;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5l3 3 3-3' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;

  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.clinic-vet-select:hover {
  background-color: #fcfcfd;
  border-color: #6b7280;
}

.clinic-vet-select:focus {
  outline: none;
  border-color: #00a676;
  box-shadow: 0 0 0 3px rgba(0, 166, 118, 0.15);
}

.clinic-vet-select:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* melhora visual interno quando o navegador permitir */
.clinic-vet-select option {
  background: #ffffff;
  color: #111827;
}

.clinic-vet-select optgroup {
  background: #ffffff;
  color: #111827;
  font-style: normal;
  font-weight: 700;
}

/* Firefox costuma respeitar melhor essa parte */
@-moz-document url-prefix() {
  .clinic-vet-select {
    text-indent: 0.01px;
    text-overflow: '';
  }
}

/* ===== Upload de exame: notificação da clínica/veterinário ===== */

.provider-notify-line {
  margin-top: 6px;
  min-height: 18px;
  display: flex;
  align-items: center;
}

.provider-notify-toggle {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.2;
}

.provider-notify-toggle:focus {
  outline: none;
}

.provider-notify-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 18px;
  border: 1px solid transparent;
  transform: translateY(0.25px);
}

.provider-notify-text {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(0.5px);
}

.provider-notify-neutral {
  color: #9ca3af;
  cursor: default;
}

.provider-notify-neutral .provider-notify-icon {
  border-color: #d1d5db;
  background: #f9fafb;
  opacity: 0.6;
}

.provider-notify-enabled {
  color: #6b7280;
}

.provider-notify-enabled .provider-notify-icon {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.16);
}

.provider-notify-disabled {
  color: #6b7280;
}

.provider-notify-disabled .provider-notify-icon {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
}

/* ===== Upload em massa: versão um pouco maior do botão da clínica/veterinário ===== */

.provider-notify-line-multi {
  margin-top: 6px;
  min-height: 18px;
}

.provider-notify-line-multi .provider-notify-toggle {
  gap: 6px;
  font-size: 11.5px;
}

.provider-notify-line-multi .provider-notify-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  font-size: 12px;
  border-radius: 5px;
  transform: translateY(0.25px);
}

.provider-notify-line-multi .provider-notify-text {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(0.5px);
}

.exams-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exams-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.exams-search-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.exams-search-form input[type="text"] {
    padding: 6px 8px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    min-width: 190px;
}

.exams-search-form button {
    border: none;
    background-color: #6b7280;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    height: 32px;
}

.exams-top-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.exams-page-arrow {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    box-sizing: border-box;
}

.exams-page-arrow:hover {
    background: #f3f4f6;
}

.exams-page-arrow.disabled {
    color: #9ca3af;
    background: #f9fafb;
    cursor: default;
    pointer-events: none;
}

.exams-per-page-form {
    display: flex;
    align-items: center;
}

.exams-per-page-form select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background: #ffffff;
    cursor: pointer;
    min-width: 62px;
}

.btn-siglas {
    border: none;
    background-color: #2563eb;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    box-sizing: border-box;
}

.btn-upload-exam {
    white-space: nowrap;
}

.exams-pagination-footer {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.exams-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.exams-pagination-link,
.exams-pagination-ellipsis {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.exams-pagination-link {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
}

.exams-pagination-link:hover {
    background: #f3f4f6;
}

.exams-pagination-link.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    font-weight: 600;
    cursor: default;
}

.exams-pagination-ellipsis {
    color: #6b7280;
}

@media (max-width: 900px) {
    .exams-header-right {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== Paginação + busca (ajuste final para Exames e Gestão) ===== */

.exams-header,
.management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exams-header-right,
.management-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.exams-search-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.exams-search-form input[type="text"] {
    padding: 6px 8px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    min-width: 190px;
}

.exams-search-form button {
    border: none;
    background-color: #6b7280;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    height: 32px;
}

.exams-top-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.exams-top-pagination-controls select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background: #ffffff;
    cursor: pointer;
    min-width: 62px;
}

.exams-page-arrow {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    box-sizing: border-box;
}

.exams-page-arrow:hover {
    background: #f3f4f6;
}

.exams-page-arrow.disabled {
    color: #9ca3af;
    background: #f9fafb;
    cursor: default;
    pointer-events: none;
}

.exams-pagination-footer {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.exams-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.exams-pagination-link,
.exams-pagination-ellipsis {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.exams-pagination-link {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
}

.exams-pagination-link:hover {
    background: #f3f4f6;
}

.exams-pagination-link.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    font-weight: 600;
    cursor: default;
}

.exams-pagination-ellipsis {
    color: #6b7280;
}

@media (max-width: 900px) {
    .exams-header-right,
    .management-header-right {
        width: 100%;
        justify-content: flex-start;
    }
}
