/* Estilos generales AFOCAT API */
.afocat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.afocat-form-group {
    margin-bottom: 15px;
}

.afocat-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.afocat-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.afocat-btn:hover {
    background: #005a87;
}

.afocat-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.afocat-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablas responsivas */
.afocat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.afocat-table th,
.afocat-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.afocat-table th {
    background: #f5f5f5;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .afocat-table {
        display: block;
        overflow-x: auto;
    }
    
    .afocat-container {
        padding: 10px;
    }
}

/* Estilos para alertas y notificaciones */
.afocat-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 4px;
    z-index: 9999;
    max-width: 400px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.afocat-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.afocat-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.afocat-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.afocat-alert-close {
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
}

.afocat-alert-close:hover {
    opacity: 1;
}

/* Estados de afiliación */
.afocat-estado-vigente {
    color: #28a745;
    font-weight: bold;
}

.afocat-estado-vencido {
    color: #dc3545;
    font-weight: bold;
}

/* Botones */
.afocat-btn-primary {
    background: #0073aa;
    color: white;
}

.afocat-btn-danger {
    background: #dc3545;
    color: white;
}

.afocat-btn-secondary {
    background: #6c757d;
    color: white;
}

.afocat-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Paneles */
.afocat-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.afocat-panel-heading {
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.afocat-panel-body {
    padding: 15px;
}

.afocat-panel-info {
    border-color: #bce8f1;
}

.afocat-panel-info .afocat-panel-heading {
    background: #d9edf7;
    border-color: #bce8f1;
    color: #31708f;
}

/* Utilidades */
.afocat-text-center {
    text-align: center;
}

.afocat-no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive para tablas */
@media (max-width: 768px) {
    .afocat-table {
        font-size: 12px;
    }
    
    .afocat-alert {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}