/**
 * Estilos para la tarjeta de Categorías - Settings
 */

/* === TARJETA CATEGORÍAS === */
.categories-card .card-header {
    position: relative;
}

.btn-add-category {
    margin-left: auto;
    width: 20px;
    height: 20px;
    background: var(--accent-500);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
}

.btn-add-category:hover {
    background: var(--accent-400);
    transform: scale(1.1);
}

.categories-body {
    padding: 0;
    flex: 0 0 auto;
    max-height: 360px;
    overflow-y: auto;
}

.categories-body::-webkit-scrollbar {
    width: 4px;
}

.categories-body::-webkit-scrollbar-track {
    background: var(--dark-800);
}

.categories-body::-webkit-scrollbar-thumb {
    background: var(--dark-600);
    border-radius: 2px;
}

.loading-categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: rgba(255,255,255,0.4);
    gap: 8px;
    font-size: 11px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s;
}

.category-item:hover {
    background: rgba(255,255,255,0.03);
}

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

.category-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-500), #8b5cf6);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    font-size: 9px;
    color: rgba(255,255,255,0.4);
}

.category-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.category-item:hover .category-actions {
    opacity: 1;
}

.btn-edit-category,
.btn-delete-category {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.15s;
}

.btn-edit-category {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.btn-edit-category:hover {
    background: rgba(59, 130, 246, 0.4);
}

.btn-delete-category {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.btn-delete-category:hover {
    background: rgba(239, 68, 68, 0.4);
}

.empty-categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: rgba(255,255,255,0.3);
    gap: 8px;
    font-size: 11px;
}

/* === MODAL CATEGORÍAS === */
.category-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.category-modal.hidden {
    display: none;
}

.category-modal-content {
    background: var(--dark-900);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
}

.category-modal-content.delete-modal {
    max-width: 280px;
}

.category-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--dark-800);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.category-modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.btn-close-modal {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-close-modal:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.category-modal-body {
    padding: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.form-group input {
    background: var(--dark-700);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    color: white;
    width: 100%;
}

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

.form-group input::placeholder {
    color: rgba(255,255,255,0.3);
}

.category-modal-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--dark-800);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.category-modal-footer button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-cancel {
    background: var(--dark-700);
    color: rgba(255,255,255,0.7);
}

.btn-cancel:hover {
    background: var(--dark-600);
    color: white;
}

.btn-save {
    background: var(--accent-500);
    color: white;
}

.btn-save:hover {
    background: var(--accent-400);
}

.btn-delete {
    background: #dc2626;
    color: white;
}

.btn-delete:hover {
    background: #ef4444;
}

.delete-warning {
    text-align: center;
    color: rgba(255,255,255,0.8);
}

.delete-warning i {
    font-size: 32px;
    color: #f59e0b;
    margin-bottom: 12px;
}

.delete-warning p {
    font-size: 13px;
    margin-bottom: 8px;
}

.delete-info {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}
