/* Frontend - Lista de Médicos */
.hsv-lista-medicos-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #fff;
    color: #1a365d;
}

/* Header para gerenciamento (mesmo estilo do admin) */
.hsv-gerenciar-frontend .hsv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.hsv-gerenciar-frontend .hsv-header h1 {
    color: white;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hsv-gerenciar-frontend .hsv-header h1 .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
}

.hsv-gerenciar-frontend .hsv-btn-add {
    background: white !important;
    color: #2563eb !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    height: auto !important;
}

.hsv-gerenciar-frontend .hsv-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1) !important;
    background: #f8fafc !important;
}

/* Stats Cards para gerenciamento */
.hsv-gerenciar-frontend .hsv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hsv-gerenciar-frontend .hsv-stat-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hsv-gerenciar-frontend .hsv-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.hsv-gerenciar-frontend .hsv-stat-icon {
    font-size: 48px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
}

.hsv-gerenciar-frontend .hsv-stat-info h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
}

.hsv-gerenciar-frontend .hsv-stat-info p {
    margin: 5px 0 0 0;
    color: #64748b;
    font-size: 14px;
}

/* Filtros */
.hsv-gerenciar-frontend .hsv-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hsv-gerenciar-frontend .hsv-filter-select {
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.hsv-gerenciar-frontend .hsv-filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Search Wrapper para Gerenciamento */
.hsv-gerenciar-frontend .hsv-manage-search-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.hsv-gerenciar-frontend .hsv-manage-search {
    flex: 1;
    min-width: 300px;
}

.hsv-gerenciar-frontend .hsv-manage-search-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hsv-gerenciar-frontend .hsv-manage-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-gerenciar-frontend .hsv-table-info {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Table Container */
.hsv-gerenciar-frontend .hsv-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    overflow: hidden;
    margin-bottom: 25px;
}

.hsv-gerenciar-frontend .hsv-medicos-table {
    width: 100%;
    border-collapse: collapse;
}

.hsv-gerenciar-frontend .hsv-medicos-table thead {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.hsv-gerenciar-frontend .hsv-medicos-table thead th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsv-gerenciar-frontend .hsv-medicos-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.hsv-gerenciar-frontend .hsv-medicos-table tbody tr:hover {
    background: #f8fafc;
}

.hsv-gerenciar-frontend .hsv-medicos-table tbody td {
    padding: 18px 20px;
    color: #1e293b;
}

.hsv-gerenciar-frontend .hsv-col-foto {
    width: 80px;
}

.hsv-gerenciar-frontend .hsv-medico-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e2e8f0;
}

.hsv-gerenciar-frontend .hsv-table-medico-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hsv-gerenciar-frontend .hsv-table-medico-nome {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 4px;
}

.hsv-gerenciar-frontend .hsv-table-medico-crm {
    font-size: 13px;
    color: #64748b;
}

.hsv-gerenciar-frontend .hsv-col-acoes {
    width: 120px;
}

.hsv-gerenciar-frontend .hsv-btn-edit,
.hsv-gerenciar-frontend .hsv-btn-delete {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.hsv-gerenciar-frontend .hsv-btn-edit {
    background: #10b981;
    color: white;
}

.hsv-gerenciar-frontend .hsv-btn-edit:hover {
    background: #059669;
    transform: translateY(-2px);
}

.hsv-gerenciar-frontend .hsv-btn-delete {
    background: #ef4444;
    color: white;
}

.hsv-gerenciar-frontend .hsv-btn-delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Pagination */
.hsv-gerenciar-frontend .hsv-table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.hsv-gerenciar-frontend .hsv-pagination-btn {
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.hsv-gerenciar-frontend .hsv-pagination-btn:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.hsv-gerenciar-frontend .hsv-pagination-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.hsv-gerenciar-frontend .hsv-pagination-info {
    color: #64748b;
    font-weight: 500;
}

/* Loading e Empty States */
.hsv-gerenciar-frontend .hsv-manage-loading,
.hsv-gerenciar-frontend .hsv-manage-empty {
    text-align: center;
    padding: 60px 20px;
}

.hsv-gerenciar-frontend .hsv-manage-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hsv-gerenciar-frontend .hsv-manage-empty h3 {
    color: #1e293b;
    margin-bottom: 10px;
}

.hsv-gerenciar-frontend .hsv-manage-empty p {
    color: #64748b;
}

.hsv-frontend-header {
    text-align: center;
    margin-bottom: 50px;
}

.hsv-manage-medico-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.hsv-frontend-title {
    font-size: 42px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hsv-icon {
    font-size: 50px;
}

.hsv-frontend-subtitle {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}

.hsv-frontend-search {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.hsv-search-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hsv-front-search-input {
    flex: 1;
    min-width: 250px;
    padding: 16px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.hsv-front-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-front-filter-select {
    min-width: 220px;
    padding: 16px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.hsv-front-filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-front-btn-search {
    padding: 16px 36px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.hsv-front-btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.hsv-frontend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
    padding: 8px;
}

.hsv-front-medico-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
    border: 1px solid #eaecf0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    gap: 16px;
    min-height: 320px;
    transition: all 0.2s ease-in-out;
}

.hsv-front-medico-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.12);
}

.hsv-front-medico-foto {
    width: 80px;
    height: 80px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe); /* estilo semelhante ao admin */
    border-radius: 50% !important;
    margin: 0 auto;
    display: block;
    box-shadow: 0 6px 18px -6px rgba(16,24,40,0.12), 0 0 0 6px rgba(37,99,235,0.06);
    border: 4px solid #ffffff; /* borda branca para destacar */
    overflow: hidden;
}

/* Avatar do novo layout de cards (v2) - usar mesmo visual do admin */
.hsv-medico-foto-v2 {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 50%;
    display: block;
    margin: 0 auto 10px auto;
    box-shadow: 0 6px 18px -6px rgba(16,24,40,0.12), 0 0 0 6px rgba(37,99,235,0.06);
    border: 4px solid #ffffff;
}

/* Regras reforçadas para garantir avatar circular em todos os casos
   - usa seletores mais específicos e !important para evitar sobrescritas
   - garante que imagens dentro do header do card v2 fiquem recortadas em círculo */
.hsv-medico-card-v2 .hsv-medico-header-v2 img,
.hsv-medico-header-v2 img,
.hsv-medico-foto-v2 {
    width: 110px !important;
    height: 110px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: none !important;
}

.hsv-medico-header-v2 {
    overflow: hidden; /* garante que o círculo não vaze por cima do header */
}

.hsv-medico-info { min-width: 0; }

.hsv-front-medico-nome { word-break: break-word; white-space: normal; }

/* Small cards - empilha avatar acima do conteúdo para evitar corte */
@media (max-width: 480px) {
    .hsv-front-medico-card,
    .hsv-manage-medico-card,
    .hsv-medico-card { 
        flex-direction: column; 
        align-items: center; 
        text-align: center;
        width: 100%;
        padding: 20px 16px;
    }
    .hsv-front-medico-foto,
    .hsv-manage-medico-foto,
    .hsv-medico-foto { 
        margin: 0 auto 16px auto; 
        width: 80px;
        height: 80px;
    }
    .hsv-front-medico-info,
    .hsv-manage-medico-info,
    .hsv-medico-info { 
        padding: 10px 5px 10px 5px;
        width: 100%;
    }
    .hsv-front-medico-header,
    .hsv-manage-medico-header,
    .hsv-medico-header { 
        align-items: center; 
    }
    .hsv-front-medico-especialidade,
    .hsv-manage-medico-especialidade,
    .hsv-medico-especialidade { 
        margin: 5px auto 10px auto; 
    }
    .hsv-front-actions,
    .hsv-manage-medico-actions,
    .hsv-medico-actions { 
        justify-content: center; 
    }
    .hsv-front-medico-detail,
    .hsv-manage-medico-detail,
    .hsv-medico-detail { 
        justify-content: center;
        flex-wrap: wrap; /* Permite quebrar em várias linhas */
    }
    
    /* Garante que os detalhes do médico não quebrem inadequadamente em telas pequenas */
    .hsv-front-medico-detail span:last-child {
        max-width: calc(100% - 32px); /* Espaço para o ícone */
        text-align: center;
    }
}

.hsv-front-medico-info {
    padding: 6px 10px 8px 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Importante: permite que o flex item encolha abaixo da largura mínima de conteúdo */
    overflow-wrap: break-word; /* Quebra palavras longas de forma mais natural */
    word-wrap: break-word; /* Compatibilidade com navegadores antigos */
    hyphens: auto; /* Adiciona hífens quando quebrar palavras muito longas */
    max-width: 100%; /* Garante que não ultrapasse o container */
}

.hsv-front-medico-nome {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 4px 0;
    text-align: center;
    line-height: 1.2;
    width: 100%;
}

.hsv-front-medico-especialidade {
    display: inline-block;
    padding: 6px 16px;
    background: #0066FF;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 4px auto;
    text-align: center;
}

.hsv-front-medico-header {
    display:flex;
    flex-direction: column;
    align-items: center;
    gap:8px;
    width: 100%;
}

.hsv-front-medico-header .hsv-front-medico-nome { flex:0; font-size:20px; }

.hsv-divider {
    border: none;
    border-top: 1px solid #e6eefb;
    margin: 12px 0;
}

.hsv-front-medico-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
    width: 100%;
}

.hsv-front-medico-detail .dashicons {
    background: #EFF4FF;
    color: #344054;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hsv-front-actions {
    display:flex;
    gap:12px;
    justify-content:center;
    margin-top:12px;
}

.hsv-front-actions .hsv-btn-edit, .hsv-front-actions .hsv-btn-delete {
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 15px;
}

.hsv-front-actions .hsv-btn-edit { background: linear-gradient(135deg,#2563eb,#1d4ed8); color:white; }
.hsv-front-actions .hsv-btn-delete { background: linear-gradient(135deg,#ef4444,#dc2626); color:white; }

.hsv-front-medico-detail {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #475467;
    font-size: 14px;
    line-height: 20px;
}

.hsv-front-medico-detail span:last-child { 
    color: #101828;
    font-weight: 500;
    line-height: 20px;
}

.hsv-front-medico-bio {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    width: 100%;
    max-width: 100%;
}

.hsv-front-loading,
.hsv-front-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

/* Paginação */
.hsv-medicos-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    text-align: center;
}

.hsv-pagination-info {
    font-size: 15px;
    color: #475467;
}

.hsv-pagination-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.hsv-pagination-controls button {
    padding: 12px 24px;
    border: none;
    background: #EFF4FF;
    color: #2563eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hsv-pagination-controls button:hover:not(:disabled) {
    background: #2563eb;
    color: white;
}

.hsv-pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Seletor de itens por página */
.hsv-items-per-page {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    background: white;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.hsv-items-per-page label {
    color: #475467;
    font-size: 14px;
    font-weight: 500;
}

.hsv-items-per-page select {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hsv-items-per-page select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-front-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Frontend - Gerenciamento */
.hsv-gerenciar-frontend {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hsv-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px 35px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.hsv-manage-title {
    color: white;
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hsv-manage-btn-add {
    background: white;
    color: #2563eb;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hsv-manage-btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.hsv-plus {
    font-size: 24px;
    font-weight: 700;
}

.hsv-manage-search {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.hsv-manage-search-input {
    flex: 1;
    min-width: 250px;
    padding: 16px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.hsv-manage-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-manage-filter-select {
    min-width: 220px;
    padding: 16px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.hsv-manage-filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-manage-btn-search {
    padding: 16px 36px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hsv-manage-btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.hsv-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    width: 100%;
}

.hsv-manage-medico-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 16px;
    height: 100%; /* Garante altura consistente em grids */
    padding: 14px 18px;
    width: 100%;
}

.hsv-manage-medico-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.hsv-manage-medico-foto {
    width: 64px;
    height: 64px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 50%;
    flex: 0 0 64px;
    margin: 8px 18px 8px 12px;
}

.hsv-manage-medico-info {
    padding: 6px 8px 6px 0;
    flex: 1 1 auto;
    min-width: 0; /* Permite que encolha abaixo do tamanho mínimo */
    overflow-wrap: anywhere; /* Permite quebra de palavras */
    display: flex;
    flex-direction: column;
}

.hsv-manage-medico-nome {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    word-break: break-word;
    white-space: normal;
}

.hsv-manage-medico-especialidade {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.hsv-manage-medico-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 15px;
    word-break: break-word;
    width: 100%;
}

.hsv-manage-medico-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    justify-content: center;
}

.hsv-manage-btn-edit,
.hsv-manage-btn-delete {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    display: block;
    white-space: nowrap;
}

.hsv-manage-btn-edit {
    background: #2563eb;
    color: white;
}

.hsv-manage-btn-edit:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.hsv-manage-btn-delete {
    background: #ef4444;
    color: white;
}

.hsv-manage-btn-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.hsv-manage-loading,
.hsv-manage-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.hsv-manage-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Modal */
.hsv-manage-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    animation: fadeIn 0.3s ease;
}

.hsv-manage-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hsv-manage-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.hsv-manage-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 35px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.hsv-manage-modal-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}

.hsv-manage-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hsv-manage-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#hsvManageForm {
    padding: 35px;
}

.hsv-manage-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.hsv-manage-form-group {
    display: flex;
    flex-direction: column;
}

.hsv-manage-form-group.full {
    grid-column: 1 / -1;
}

.hsv-manage-form-group label {
    margin-bottom: 8px;
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}

.hsv-manage-form-group input,
.hsv-manage-form-group select,
.hsv-manage-form-group textarea {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    max-width: 100%; /* Garante que não ultrapasse o container */
}

.hsv-manage-form-group input:focus,
.hsv-manage-form-group select:focus,
.hsv-manage-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-manage-form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.hsv-manage-file-upload input[type="file"] {
    display: none;
}

.hsv-manage-file-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    font-weight: 700;
}

.hsv-manage-file-label:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.hsv-upload-icon {
    font-size: 22px;
}

.hsv-manage-foto-preview {
    margin-top: 15px;
    display: none;
}

.hsv-manage-foto-preview.active {
    display: block;
}

.hsv-manage-foto-preview img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.hsv-manage-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

.hsv-manage-btn-cancel,
.hsv-manage-btn-save {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hsv-manage-btn-cancel {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.hsv-manage-btn-cancel:hover {
    background: #e2e8f0;
}

.hsv-manage-btn-save {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.hsv-manage-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

/* Notificações */
.hsv-front-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 28px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 99999999;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    font-weight: 700;
    font-size: 16px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hsv-front-notification.success {
    background: #10b981;
    color: white;
}

.hsv-front-notification.error {
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hsv-frontend-title,
    .hsv-manage-title {
        font-size: 28px;
        flex-direction: column;
    }

    .hsv-manage-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hsv-search-wrapper,
    .hsv-manage-search {
        flex-direction: column;
    }

    .hsv-front-search-input,
    .hsv-front-filter-select,
    .hsv-manage-search-input,
    .hsv-manage-filter-select {
        width: 100%;
    }

    .hsv-manage-form-grid {
        grid-template-columns: 1fr;
    }

    .hsv-manage-modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* ===================================
   ESTILOS DO MODAL PARA GERENCIAMENTO
   =================================== */

.hsv-gerenciar-frontend .hsv-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.hsv-gerenciar-frontend .hsv-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hsv-gerenciar-frontend .hsv-modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    animation: slideUp 0.3s ease;
}

.hsv-gerenciar-frontend .hsv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.hsv-gerenciar-frontend .hsv-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.hsv-gerenciar-frontend .hsv-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hsv-gerenciar-frontend .hsv-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Form Styles */
.hsv-gerenciar-frontend #hsvManageForm {
    padding: 30px;
}

.hsv-gerenciar-frontend .hsv-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.hsv-gerenciar-frontend .hsv-form-group {
    display: flex;
    flex-direction: column;
}

.hsv-gerenciar-frontend .hsv-form-group.full {
    grid-column: 1 / -1;
}

.hsv-gerenciar-frontend .hsv-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.hsv-gerenciar-frontend .hsv-form-group input,
.hsv-gerenciar-frontend .hsv-form-group select,
.hsv-gerenciar-frontend .hsv-form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.hsv-gerenciar-frontend .hsv-form-group input:focus,
.hsv-gerenciar-frontend .hsv-form-group select:focus,
.hsv-gerenciar-frontend .hsv-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hsv-gerenciar-frontend .hsv-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
.hsv-gerenciar-frontend .hsv-file-upload {
    position: relative;
}

.hsv-gerenciar-frontend .hsv-file-upload input[type="file"] {
    display: none;
}

.hsv-gerenciar-frontend .hsv-file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    font-weight: 600;
}

.hsv-gerenciar-frontend .hsv-file-label:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.hsv-gerenciar-frontend .hsv-foto-preview {
    margin-top: 15px;
    display: none;
}

.hsv-gerenciar-frontend .hsv-foto-preview.active {
    display: block;
}

.hsv-gerenciar-frontend .hsv-foto-preview img {
    max-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Modal Footer */
.hsv-gerenciar-frontend .hsv-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.hsv-gerenciar-frontend .hsv-btn-cancel {
    padding: 12px 24px !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: auto !important;
}

.hsv-gerenciar-frontend .hsv-btn-cancel:hover {
    background: #e2e8f0 !important;
}

.hsv-gerenciar-frontend .hsv-btn-save {
    padding: 12px 24px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px !important;
    font-weight: 600 !important;
    height: auto !important;
}

/* Responsive para Modal */
@media (max-width: 768px) {
    .hsv-gerenciar-frontend .hsv-form-row {
        grid-template-columns: 1fr;
    }
    
    .hsv-gerenciar-frontend .hsv-modal-content {
        width: 95%;
        margin: 10px;
    }
}
