/* Estilos para módulo de Credenciales API */

.token-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
}

.token-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.api-endpoint-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background-color: #e3f2fd;
    color: #1976d2;
    margin: 2px;
}

.request-limit-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.request-limit-fill {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.request-limit-fill.warning {
    background-color: #ffc107;
}

.request-limit-fill.danger {
    background-color: #dc3545;
}

.credential-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.credential-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.token-preview {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    margin: 20px 0;
}

.token-preview h4 {
    color: #28a745;
    margin-bottom: 10px;
}

.token-preview code {
    display: block;
    padding: 12px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 16px;
    user-select: all;
    word-break: break-all;
}

/* Historial de accesos */
.access-log-table {
    font-size: 14px;
}

.access-log-table .endpoint {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.response-code {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
}

.response-code.success {
    color: #155724;
    background-color: #d4edda;
}

.response-code.error {
    color: #721c24;
    background-color: #f8d7da;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .token-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .token-display {
        font-size: 12px;
    }
}