/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #f9fafb;
}

.btn-tertiary {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-tertiary:hover:not(:disabled) {
    color: var(--text-primary);
    background-color: #f9fafb;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.full-width {
    flex: 1 1 100%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Ações do Formulário */
.login-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.menu-item {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.menu-item:hover {
    background-color: #f9fafb;
    color: var(--text-primary);
}

.menu-item.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.menu-icon {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.menu-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.logout-btn {
    color: var(--error-color);
}

.logout-btn:hover {
    background-color: #fef2f2;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 1.5rem;
}

/* Comunicados */
.comunicados-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comunicado-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.comunicado-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    object-fit: cover;
    flex-shrink: 0;
}

.comunicado-content {
    flex: 1;
}

.comunicado-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.comunicado-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 50%;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Tabelas */
.table-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-primary);
}

.data-table tr:hover {
    background-color: #f9fafb;
}

/* Badges de Status */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #fef2f2;
    color: #991b1b;
}

/* Botões Pequenos */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 5% auto;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Calendário */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-view {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.calendar-header > div {
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.calendar-header > div:last-child {
    border-right: none;
}

.calendar-body {
    max-height: 600px;
    overflow-y: auto;
}

.calendar-row {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.calendar-row:last-child {
    border-bottom: none;
}

.time-cell, .day-cell {
    padding: 0.5rem;
    border-right: 1px solid var(--border-color);
    min-height: 60px;
}

.time-cell {
    background-color: #f8fafc;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-cell {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.day-cell:hover {
    background-color: #f9fafb;
}

.day-cell:last-child {
    border-right: none;
}

.agendamento-item {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 250px;
}

/* Profile Container */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Estilos para informações do nocoDB */
.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.login-info p {
    margin: 0.25rem 0;
}

.login-info strong {
    color: var(--primary-color);
}

/* Status adicional para manutenção */
.status-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Melhorias na tabela */
.data-table td {
    vertical-align: middle;
}

/* Ajustes nos botões de ação */
.btn-sm {
    margin: 0 2px;
}
/* Loading State */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: #6b7280;
}

/* Detalhes da Sala */
.detalhe-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.detalhe-item:last-child {
    border-bottom: none;
}

.detalhe-item strong {
    color: #374151;
    display: inline-block;
    min-width: 120px;
}
/* Loading State */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: #6b7280;
}

/* Detalhes da Sala */
.detalhe-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.detalhe-item:last-child {
    border-bottom: none;
}

.detalhe-item strong {
    color: #374151;
    display: inline-block;
    min-width: 120px;
}
/* Estilos para Comunicados Dinâmicos */
.comunicado-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comunicado-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comunicado-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    object-fit: cover;
    flex-shrink: 0;
}

.comunicado-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.comunicado-content {
    flex: 1;
    min-width: 0;
}

.comunicado-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.comunicado-text {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comunicado-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.comunicado-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comunicado-tipo {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.comunicado-tipo.info {
    background-color: #dbeafe;
    color: #1e40af;
}

.comunicado-tipo.video {
    background-color: #fce7f3;
    color: #be185d;
}

.comunicado-tipo.atualizacao {
    background-color: #dcfce7;
    color: #166534;
}

.comunicado-tipo.manutencao {
    background-color: #fef3c7;
    color: #92400e;
}

.comunicado-tipo.urgente {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modal de Comunicado Detalhado */
.comunicado-detalhes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comunicado-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.comunicado-image-large {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    object-fit: cover;
    flex-shrink: 0;
}

.comunicado-meta-detalhes {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item strong {
    min-width: 120px;
    color: var(--text-primary);
}

.comunicado-conteudo h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.comunicado-conteudo p {
    line-height: 1.6;
    color: var(--text-secondary);
}

.comunicado-video, .comunicado-link {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.comunicado-video h3, .comunicado-link h3 {
    margin-bottom: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .comunicado-card {
        flex-direction: column;
        text-align: center;
    }
    
    .comunicado-image, .comunicado-icon {
        align-self: center;
    }
    
    .comunicado-header {
        flex-direction: column;
        text-align: center;
    }
    
    .comunicado-meta {
        justify-content: center;
    }
    
    .meta-item {
        justify-content: center;
    }
}
/* Estilos para Planos */
.modal-large {
    max-width: 900px;
}

.procedimentos-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin-bottom: 0;
    color: var(--text-primary);
}

.procedimento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    background: var(--surface-color);
}

.procedimento-info {
    flex: 1;
}

.procedimento-nome {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.procedimento-descricao {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.procedimento-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.procedimento-actions {
    display: flex;
    gap: 0.5rem;
}

/* Badges para status */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #fef2f2;
    color: #991b1b;
}

.status-archived {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Ações em tabela */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Loading states */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: #6b7280;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-large {
        margin: 5% 1rem;
        width: calc(100% - 2rem);
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .procedimento-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .procedimento-actions {
        align-self: flex-end;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
/* Estilos para Planos - Simplificado */
.modal-large {
    max-width: 900px;
}

.procedimentos-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin-bottom: 0;
    color: var(--text-primary);
}

/* Badges para status */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-archived {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Badges para contadores */
.count-badge {
    background-color: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Ações em tabela */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Loading states */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: #6b7280;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-large {
        margin: 5% 1rem;
        width: calc(100% - 2rem);
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3),
    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        text-align: center;
    }
}