/* Focus visible - Accesibilidad */
:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
}

/* Eliminar outline solo para mouse, mantener para teclado */
:focus:not(:focus-visible) {
    outline: none;
}

/* Botones y elementos interactivos */
.btn:focus-visible,
a:focus-visible {
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--primary-400);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-700);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--bg-tertiary);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn svg {
    width: 20px;
    height: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-fast);
}

.card:hover {
    border-color: var(--primary-600);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.card-description {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--bg-tertiary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

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

.badge-success {
    background: var(--success);
    color: white;
}

.service-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    transition: all var(--transition-fast);
}

.service-card:hover {
    border-color: var(--primary-600);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
}

.service-card h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.service-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.service-url {
    font-size: var(--text-xs);
    color: var(--primary-400);
    font-family: var(--font-mono);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: border-color var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--primary-500);
}

.text-primary { color: var(--primary-400); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-muted); }

.font-mono { font-family: var(--font-mono); }

.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    padding: var(--space-4) var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-toast, 1080);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-slow);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-warning { border-left: 4px solid var(--warning); }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--bg-tertiary);
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.stat-card-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary-400);
}

.stat-card-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

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

.table th,
.table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--bg-tertiary);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.table tr:hover td {
    background: var(--bg-hover);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-tertiary);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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